@@ -166,13 +166,10 @@ def transform(self, to_crs, x, y):
166
166
Transform coordinates in this datasets coordinate system to `to_crs` coordinate system.
167
167
168
168
Args:
169
-
170
169
to_crs: `pyproj.CRS`.
171
-
172
170
x, y: Coordinates in `self` CRS.
173
171
174
172
Returns:
175
-
176
173
xn, yn: Coordinates in `to_crs`.
177
174
"""
178
175
t = pyproj .Transformer .from_crs (self .crs , to_crs , always_xy = True )
@@ -183,13 +180,10 @@ def itransform(self, from_crs, x, y):
183
180
Transform coordinates in `from_crs` coordinate system to this datasets coordinate system.
184
181
185
182
Args:
186
-
187
183
from_crs: `pyproj.CRS`.
188
-
189
184
x, y: Coordinates in `from_crs` CRS.
190
185
191
186
Returns:
192
-
193
187
xn, yn: Coordinates in this datasets CRS.
194
188
"""
195
189
t = pyproj .Transformer .from_crs (from_crs , self .crs , always_xy = True )
@@ -269,12 +263,10 @@ def set_crs(self, crs):
269
263
@abstractmethod
270
264
def is_1d (self ):
271
265
"""Returns True if dataset is 1D, i.e. time is a 1D coordinate variable."""
272
- pass
273
266
274
267
@abstractmethod
275
268
def is_2d (self ):
276
269
"""Returns True if dataset is 2D, i.e. time is a 2D variable and not a coordinate variable."""
277
- pass
278
270
279
271
def assign_cf_attrs (self ,
280
272
creator_name = None ,
@@ -495,15 +487,15 @@ def gridtime(self, times, timedim = None):
495
487
"""Interpolate dataset to a regular time interval or a different grid.
496
488
497
489
Args:
490
+ `times`: array or str
491
+ Target time interval, can be either:
492
+ - an array of times, or
493
+ - a string "freq" specifying a Pandas daterange (e.g. 'h', '6h, 'D'...) suitable for `pd.date_range`.
498
494
499
- `times`: Target time interval, can be either:
500
- - an array of times, or
501
- - a string "freq" specifying a Pandas daterange (e.g. 'h', '6h, 'D'...) suitable for `pd.date_range`.
502
-
503
- `timedime`: Name of new time dimension. The default is to use the same name as previously.
495
+ `timedime`: str
496
+ Name of new time dimension. The default is to use the same name as previously.
504
497
505
498
Returns:
506
-
507
499
A new dataset interpolated to the target times. The dataset will be 1D (i.e. gridded) and the time dimension will be named `time`.
508
500
"""
509
501
0 commit comments