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

fix ATL08 delta_time dimension read error #470

Merged
merged 5 commits into from
Nov 14, 2023
Merged
Show file tree
Hide file tree
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
88 changes: 44 additions & 44 deletions doc/source/user_guide/documentation/classes_dev_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 5 additions & 8 deletions icepyx/core/read.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ class Read:
String that shows the filename pattern as required for Intake's path_as_pattern argument.
The default describes files downloaded directly from NSIDC (subsetted and non-subsetted) for most products (e.g. ATL06).
The ATL11 filename pattern from NSIDC is: 'ATL{product:2}_{rgt:4}{orbitsegment:2}_{cycles:4}_{version:3}_{revision:2}.h5'.

catalog : string, default None
Full path to an Intake catalog for reading in data.
If you still need to create a catalog, leave as default.
Expand Down Expand Up @@ -313,8 +313,8 @@ def __init__(
# Raise error for depreciated argument
if catalog:
raise DeprecationError(
'The `catalog` argument has been deprecated and intake is no longer supported. '
'Please use the `data_source` argument to specify your dataset instead.'
"The `catalog` argument has been deprecated and intake is no longer supported. "
"Please use the `data_source` argument to specify your dataset instead."
)

if data_source is None:
Expand Down Expand Up @@ -616,11 +616,8 @@ def _combine_nested_vars(is2ds, ds, grp_path, wanted_dict):
except (AttributeError, KeyError):
pass

try:
is2ds = is2ds.assign(ds[grp_spec_vars])
except xr.MergeError:
ds = ds[grp_spec_vars].reset_coords()
is2ds = is2ds.assign(ds)
ds = ds[grp_spec_vars].swap_dims({"delta_time": "photon_idx"})
is2ds = is2ds.assign(ds)

return is2ds

Expand Down