From f1e731c1ba59b30c387b8772bd8cdef4390f62ed Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Thu, 24 Oct 2024 16:18:46 -0400 Subject: [PATCH 1/2] add length 1 dimensions to subgroup variables for proper merging --- icepyx/core/read.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/icepyx/core/read.py b/icepyx/core/read.py index b3212aef2..d2621eeb4 100644 --- a/icepyx/core/read.py +++ b/icepyx/core/read.py @@ -553,6 +553,8 @@ def _combine_nested_vars(is2ds, ds, grp_path, wanted_dict): pass ds = ds[grp_spec_vars].swap_dims({"delta_time": "photon_idx"}) + # add the rest of the dimensions of length 1 from is2ds to ds + ds = ds.expand_dims(dim=[dim for dim in is2ds.dims if is2ds[dim].size == 1]) is2ds = is2ds.assign(ds) return is2ds From 4a2183661aa0abae1af915d1d574f1c6bc8dc961 Mon Sep 17 00:00:00 2001 From: Jessica Scheick Date: Thu, 24 Oct 2024 16:24:04 -0400 Subject: [PATCH 2/2] add note about atl06 nesting --- icepyx/core/read.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/icepyx/core/read.py b/icepyx/core/read.py index d2621eeb4..b731fb90b 100644 --- a/icepyx/core/read.py +++ b/icepyx/core/read.py @@ -814,7 +814,7 @@ def _build_single_file_dataset(self, file, groups_list): # if there are any deeper nested variables, # get those so they have actual coordinates and add them - # this may apply to (at a minimum): ATL08 + # this may apply to (at a minimum): ATL06, ATL08 if any(grp_path in grp_path2 for grp_path2 in wanted_groups_list): for grp_path2 in wanted_groups_list: if grp_path in grp_path2: