From 8e37e2bcf133fa7ffdcd1ab717919399b58ce97c Mon Sep 17 00:00:00 2001 From: isilber Date: Wed, 11 Dec 2024 00:46:17 +0000 Subject: [PATCH] FIX: add condition on "heights" dimension --- act/io/arm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/act/io/arm.py b/act/io/arm.py index f9a7fc0cdf..14b4aaece3 100644 --- a/act/io/arm.py +++ b/act/io/arm.py @@ -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: