Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

properly apply all dimensions to deeply nested variables #623

Merged
merged 4 commits into from
Nov 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion icepyx/core/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,8 @@
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])

Check warning on line 557 in icepyx/core/read.py

View check run for this annotation

Codecov / codecov/patch

icepyx/core/read.py#L557

Added line #L557 was not covered by tests
is2ds = is2ds.assign(ds)

return is2ds
Expand Down Expand Up @@ -812,7 +814,7 @@

# 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:
Expand Down