From ee3242c3851a579eeb33801ba33b9c9b827b00ca Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Tue, 14 Nov 2023 13:03:46 -0500 Subject: [PATCH] don't drop requested variables with dimension --- icepyx/core/read.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/icepyx/core/read.py b/icepyx/core/read.py index 52264c0e5..627395be2 100644 --- a/icepyx/core/read.py +++ b/icepyx/core/read.py @@ -616,13 +616,9 @@ def _combine_nested_vars(is2ds, ds, grp_path, wanted_dict): except (AttributeError, KeyError): pass - ds = ds[grp_spec_vars].reset_coords() + ds = ds[grp_spec_vars].swap_dims({"delta_time": "photon_idx"}) is2ds = is2ds.assign(ds) - # manually remove delta time as a dimension - if "delta_time" in is2ds.dims: - is2ds = is2ds.drop_dims("delta_time") - return is2ds def load(self):