@@ -398,11 +398,11 @@ def open_dataset(
398
398
chunks : T_Chunks = None ,
399
399
cache : bool | None = None ,
400
400
decode_cf : bool | None = None ,
401
- mask_and_scale : bool | None = None ,
402
- decode_times : bool | None = None ,
403
- decode_timedelta : bool | None = None ,
404
- use_cftime : bool | None = None ,
405
- concat_characters : bool | None = None ,
401
+ mask_and_scale : bool | Mapping [ str , bool ] | None = None ,
402
+ decode_times : bool | Mapping [ str , bool ] | None = None ,
403
+ decode_timedelta : bool | Mapping [ str , bool ] | None = None ,
404
+ use_cftime : bool | Mapping [ str , bool ] | None = None ,
405
+ concat_characters : bool | Mapping [ str , bool ] | None = None ,
406
406
decode_coords : Literal ["coordinates" , "all" ] | bool | None = None ,
407
407
drop_variables : str | Iterable [str ] | None = None ,
408
408
inline_array : bool = False ,
@@ -451,25 +451,31 @@ def open_dataset(
451
451
decode_cf : bool, optional
452
452
Whether to decode these variables, assuming they were saved according
453
453
to CF conventions.
454
- mask_and_scale : bool, optional
454
+ mask_and_scale : bool or dict-like , optional
455
455
If True, replace array values equal to `_FillValue` with NA and scale
456
456
values according to the formula `original_values * scale_factor +
457
457
add_offset`, where `_FillValue`, `scale_factor` and `add_offset` are
458
458
taken from variable attributes (if they exist). If the `_FillValue` or
459
459
`missing_value` attribute contains multiple values a warning will be
460
460
issued and all array values matching one of the multiple values will
461
- be replaced by NA. This keyword may not be supported by all the backends.
462
- decode_times : bool, optional
461
+ be replaced by NA. Pass a mapping, e.g. ``{"my_variable": False}``,
462
+ to toggle this feature per-variable individually.
463
+ This keyword may not be supported by all the backends.
464
+ decode_times : bool or dict-like, optional
463
465
If True, decode times encoded in the standard NetCDF datetime format
464
466
into datetime objects. Otherwise, leave them encoded as numbers.
467
+ Pass a mapping, e.g. ``{"my_variable": False}``,
468
+ to toggle this feature per-variable individually.
465
469
This keyword may not be supported by all the backends.
466
- decode_timedelta : bool, optional
470
+ decode_timedelta : bool or dict-like , optional
467
471
If True, decode variables and coordinates with time units in
468
472
{"days", "hours", "minutes", "seconds", "milliseconds", "microseconds"}
469
473
into timedelta objects. If False, leave them encoded as numbers.
470
474
If None (default), assume the same value of decode_time.
475
+ Pass a mapping, e.g. ``{"my_variable": False}``,
476
+ to toggle this feature per-variable individually.
471
477
This keyword may not be supported by all the backends.
472
- use_cftime: bool, optional
478
+ use_cftime: bool or dict-like , optional
473
479
Only relevant if encoded dates come from a standard calendar
474
480
(e.g. "gregorian", "proleptic_gregorian", "standard", or not
475
481
specified). If None (default), attempt to decode times to
@@ -478,12 +484,16 @@ def open_dataset(
478
484
``cftime.datetime`` objects, regardless of whether or not they can be
479
485
represented using ``np.datetime64[ns]`` objects. If False, always
480
486
decode times to ``np.datetime64[ns]`` objects; if this is not possible
481
- raise an error. This keyword may not be supported by all the backends.
482
- concat_characters : bool, optional
487
+ raise an error. Pass a mapping, e.g. ``{"my_variable": False}``,
488
+ to toggle this feature per-variable individually.
489
+ This keyword may not be supported by all the backends.
490
+ concat_characters : bool or dict-like, optional
483
491
If True, concatenate along the last dimension of character arrays to
484
492
form string arrays. Dimensions will only be concatenated over (and
485
493
removed) if they have no corresponding variable and if they are only
486
494
used as the last dimension of character arrays.
495
+ Pass a mapping, e.g. ``{"my_variable": False}``,
496
+ to toggle this feature per-variable individually.
487
497
This keyword may not be supported by all the backends.
488
498
decode_coords : bool or {"coordinates", "all"}, optional
489
499
Controls which variables are set as coordinate variables:
0 commit comments