Skip to content

Commit

Permalink
FIX: add condition on "heights" dimension
Browse files Browse the repository at this point in the history
  • Loading branch information
isilber committed Dec 11, 2024
1 parent 1b4b7b1 commit 8e37e2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion act/io/arm.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,8 @@ def read_arm_mmcr(filenames):
if nc is not None:
ds = xr.open_dataset(xr.backends.NetCDF4DataStore(nc))
# Change heights name to range to read appropriately to xarray
ds = ds.rename_dims({"heights": "range"})
if 'heights' in ds.dims:
ds = ds.rename_dims({"heights": "range"})
multi_ds.append(ds)
# Concatenate datasets together
if len(multi_ds) > 1:
Expand Down

0 comments on commit 8e37e2b

Please sign in to comment.