From 476f83494eb735b2b194e2e4b53cbd1c376b453a Mon Sep 17 00:00:00 2001 From: AdamTheisen Date: Tue, 17 Dec 2024 11:14:40 -0600 Subject: [PATCH] ENH: I think I have a fix to work for read only. The proposed method did not work on my mac after downloading data. --- act/io/arm.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/act/io/arm.py b/act/io/arm.py index 14b4aaece3..f8dc8f9e7f 100644 --- a/act/io/arm.py +++ b/act/io/arm.py @@ -841,12 +841,12 @@ def read_arm_mmcr(filenames): # read it in with xarray multi_ds = [] for f in filenames: - nc = Dataset(f, 'r') + nc = Dataset(f, 'a', diskless=True) + # Change heights name to range to read appropriately to xarray + if 'heights' in nc.dimensions: + nc.renameDimension('heights', 'range') if nc is not None: ds = xr.open_dataset(xr.backends.NetCDF4DataStore(nc)) - # Change heights name to range to read appropriately to xarray - if 'heights' in ds.dims: - ds = ds.rename_dims({"heights": "range"}) multi_ds.append(ds) # Concatenate datasets together if len(multi_ds) > 1: