@@ -222,9 +222,9 @@ def _get_groupby_time_accessor(var: Union[DataArray, Dataset], key: str) -> List
222
222
223
223
Parameters
224
224
----------
225
- var: DataArray, Dataset
225
+ var : DataArray, Dataset
226
226
DataArray belonging to the coordinate to be checked
227
- key: str, [e.g. "T.month"]
227
+ key : str, [e.g. "T.month"]
228
228
key to check for.
229
229
230
230
Returns
@@ -255,14 +255,14 @@ def _get_axis_coord(var: Union[DataArray, Dataset], key: str) -> List[str]:
255
255
256
256
Parameters
257
257
----------
258
- var: DataArray, Dataset
258
+ var : DataArray, Dataset
259
259
DataArray belonging to the coordinate to be checked
260
- key: str, ["X", "Y", "Z", "T", "longitude", "latitude", "vertical", "time"]
260
+ key : str, ["X", "Y", "Z", "T", "longitude", "latitude", "vertical", "time"]
261
261
key to check for.
262
- error: bool
262
+ error : bool
263
263
raise errors when key is not found or interpretable. Use False and provide default
264
264
to replicate dict.get(k, None).
265
- default: Any
265
+ default : Any
266
266
default value to return when error is False.
267
267
268
268
Returns
@@ -330,9 +330,9 @@ def _get_measure(obj: Union[DataArray, Dataset], key: str) -> List[str]:
330
330
331
331
Parameters
332
332
----------
333
- obj: DataArray, Dataset
333
+ obj : DataArray, Dataset
334
334
DataArray belonging to the coordinate to be checked
335
- key: str
335
+ key : str
336
336
key to check for.
337
337
338
338
Returns
@@ -471,18 +471,17 @@ def _getattr(
471
471
472
472
Parameters
473
473
----------
474
-
475
474
obj : DataArray, Dataset
476
475
attr : Name of attribute in obj that will be shadowed.
477
476
accessor : High level accessor object: CFAccessor
478
477
key_mappers : dict
479
478
dict(key_name: mapper)
480
- wrap_classes: bool
479
+ wrap_classes : bool
481
480
Should we wrap the return value with _CFWrappedClass?
482
481
Only True for the high level CFAccessor.
483
482
Facilitates code reuse for _CFWrappedClass and _CFWrapppedPlotMethods
484
483
For both of those, wrap_classes is False.
485
- extra_decorator: Callable (optional)
484
+ extra_decorator : Callable (optional)
486
485
An extra decorator, if necessary. This is used by _CFPlotMethods to set default
487
486
kwargs based on CF attributes.
488
487
"""
@@ -555,9 +554,9 @@ def _getitem(
555
554
556
555
Parameters
557
556
----------
558
- accessor: CFAccessor
559
- key: str, List[str]
560
- skip: str, optional
557
+ accessor : CFAccessor
558
+ key : str, List[str]
559
+ skip : str, optional
561
560
One of ["coords", "measures"], avoid clashes with special coord names
562
561
"""
563
562
@@ -889,12 +888,12 @@ def _rewrite_values(
889
888
890
889
Parameters
891
890
----------
892
- kwargs: Mapping
891
+ kwargs : Mapping
893
892
Mapping from kwarg name to value
894
- key_mappers: Mapping
893
+ key_mappers : Mapping
895
894
Mapping from kwarg name to a Mapper function that will convert a
896
895
given CF "special" name to an xarray name.
897
- var_kws: List[str]
896
+ var_kws : List[str]
898
897
List of variable kwargs that need special treatment.
899
898
e.g. **indexers_kwargs in isel
900
899
@@ -1188,8 +1187,7 @@ def standard_names(self) -> Dict[str, List[str]]:
1188
1187
1189
1188
Parameters
1190
1189
----------
1191
-
1192
- obj: DataArray, Dataset
1190
+ obj : DataArray, Dataset
1193
1191
Xarray object to process
1194
1192
1195
1193
Returns
@@ -1222,14 +1220,10 @@ def get_associated_variable_names(
1222
1220
1223
1221
Parameters
1224
1222
----------
1225
-
1226
- name: Hashable
1227
-
1228
- skip_bounds: bool, optional
1229
-
1223
+ name : Hashable
1224
+ skip_bounds : bool, optional
1230
1225
Returns
1231
1226
------
1232
-
1233
1227
Dict with keys "ancillary_variables", "cell_measures", "coordinates", "bounds"
1234
1228
"""
1235
1229
keys = ["ancillary_variables" , "cell_measures" , "coordinates" , "bounds" ]
@@ -1306,7 +1300,7 @@ def rename_like(
1306
1300
1307
1301
Parameters
1308
1302
----------
1309
- other: DataArray, Dataset
1303
+ other : DataArray, Dataset
1310
1304
Variables will be renamed to match variable names in this xarray object
1311
1305
1312
1306
Returns
@@ -1351,7 +1345,7 @@ def guess_coord_axis(self, verbose: bool = False) -> Union[DataArray, Dataset]:
1351
1345
1352
1346
Parameters
1353
1347
----------
1354
- verbose: bool
1348
+ verbose : bool
1355
1349
Print extra info to screen
1356
1350
1357
1351
Returns
@@ -1420,7 +1414,7 @@ def get_bounds(self, key: str) -> DataArray:
1420
1414
1421
1415
Parameters
1422
1416
----------
1423
- key: str
1417
+ key : str
1424
1418
Name of variable whose bounds are desired
1425
1419
1426
1420
Returns
@@ -1462,7 +1456,7 @@ def add_bounds(self, dims: Union[Hashable, Iterable[Hashable]]):
1462
1456
1463
1457
Parameters
1464
1458
----------
1465
- dims: Hashable or Iterable[Hashable]
1459
+ dims : Hashable or Iterable[Hashable]
1466
1460
Either a single dimension name or a list of dimension names.
1467
1461
1468
1462
Returns
@@ -1584,7 +1578,7 @@ def decode_vertical_coords(self, prefix="z"):
1584
1578
1585
1579
Parameters
1586
1580
----------
1587
- prefix: str, optional
1581
+ prefix : str, optional
1588
1582
Prefix for newly created z variables.
1589
1583
E.g. ``s_rho`` becomes ``z_rho``
1590
1584
@@ -1594,7 +1588,6 @@ def decode_vertical_coords(self, prefix="z"):
1594
1588
1595
1589
Notes
1596
1590
-----
1597
-
1598
1591
Will only decode when the ``formula_terms`` and ``standard_name`` attributes
1599
1592
are set on the parameter (e.g ``s_rho`` )
1600
1593
0 commit comments