Skip to content

Commit

Permalink
fix ATL08 delta_time dimension read error (#470)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Action <[email protected]>
  • Loading branch information
JessicaS11 and rwegener2 authored Nov 14, 2023
1 parent ede0033 commit eb668bd
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 52 deletions.
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

0 comments on commit eb668bd

Please sign in to comment.