Skip to content

Commit 26f2308

Browse files
authored
FIX: Update code to use new cftime coders (#907)
* FIX: Update code to use new cftime coders. * STY: Fix spelling. * FIX: Forgot to remove use_cftime kwarg
1 parent 9a5c88b commit 26f2308

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

act/io/arm.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,13 @@ def read_arm_netcdf(
118118
decode_times = False
119119
use_cftime = False
120120

121-
# Add funciton keywords to kwargs dictionary for passing into open_mfdataset.
121+
if decode_times and use_cftime:
122+
decode_times = xr.coders.CFDatetimeCoder(use_cftime=True)
123+
124+
# Add function keywords to kwargs dictionary for passing into open_mfdataset.
122125
kwargs['combine'] = combine
123126
kwargs['concat_dim'] = concat_dim
124127
kwargs['decode_times'] = decode_times
125-
kwargs['use_cftime'] = use_cftime
126128
if len(filenames) > 1 and not isinstance(filenames, str):
127129
kwargs['combine_attrs'] = combine_attrs
128130

0 commit comments

Comments
 (0)