diff --git a/act/io/arm.py b/act/io/arm.py index 05c9201a87..f9a7fc0cdf 100644 --- a/act/io/arm.py +++ b/act/io/arm.py @@ -841,12 +841,11 @@ def read_arm_mmcr(filenames): # read it in with xarray multi_ds = [] for f in filenames: - nc = Dataset(f, 'a') - # Change heights name to range to read appropriately to xarray - if 'heights' in nc.dimensions: - nc.renameDimension('heights', 'range') + nc = Dataset(f, 'r') 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"}) multi_ds.append(ds) # Concatenate datasets together if len(multi_ds) > 1: