Skip to content

Commit

Permalink
Merge pull request #191 from pysat/sty/decode_times
Browse files Browse the repository at this point in the history
MAINT: decode times kwarg
  • Loading branch information
jklenzing committed Jun 14, 2023
2 parents 303ea96 + ab93499 commit 5b0654e
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Use pysat logger to raise non-deprecation warnings
* Update syntax based on latest pysat deprecations to make the code compatible with pysat 3.2.0.
* Updated syntax compliance with cdflib 1.0+
* Updated use of `decode_times` kwarg when loading xarray data to maintain current behaviour

## [0.0.4] - 2022-11-07
* Update instrument tests with new test class
Expand Down
3 changes: 2 additions & 1 deletion pysatNASA/instruments/icon_euv.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
meta_translation=meta_translation,
drop_meta_labels=['Valid_Max',
'Valid_Min',
'_FillValue'])
'_FillValue'],
decode_times=False)

# xarray can't merge if variable and dim names are the same
if 'Altitude' in data.dims:
Expand Down
3 changes: 2 additions & 1 deletion pysatNASA/instruments/icon_fuv.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,5 +224,6 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
meta_kwargs={'labels': labels},
meta_processor=filter_metadata,
meta_translation=meta_translation,
drop_meta_labels=drop_labels)
drop_meta_labels=drop_labels,
decode_times=False)
return data, meta
3 changes: 2 additions & 1 deletion pysatNASA/instruments/icon_mighti.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,8 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
'Valid_Min',
'Valid_Range',
'_Fillvalue',
'ScaleTyp'])
'ScaleTyp'],
decode_times=False)

# xarray can't merge if variable and dim names are the same
if 'Altitude' in data.dims:
Expand Down
2 changes: 2 additions & 0 deletions pysatNASA/instruments/methods/jhuapl.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def load_edr_aurora(fnames, tag='', inst_id='', pandas_format=False,
sdata, mdata = load_netcdf(fname, epoch_name='TIME', epoch_unit='s',
meta_kwargs={'labels': labels},
pandas_format=pandas_format,
decode_times=False,
strict_dim_check=strict_dim_check)

# Calculate the time for this data file. The pysat `load_netcdf` routine
Expand Down Expand Up @@ -238,6 +239,7 @@ def load_sdr_aurora(fnames, tag='', inst_id='', pandas_format=False,
sdata, mdata = load_netcdf(fname, epoch_name=load_time, epoch_unit='s',
meta_kwargs={'labels': labels},
pandas_format=pandas_format,
decode_times=False,
strict_dim_check=strict_dim_check)

# Calculate the time for this data file. The pysat `load_netcdf` routine
Expand Down
3 changes: 2 additions & 1 deletion pysatNASA/instruments/ses14_gold.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ def load(fnames, tag='', inst_id=''):
meta_kwargs={'labels': labels},
meta_translation=meta_translation,
combine_by_coords=False,
drop_meta_labels='FILLVAL')
drop_meta_labels='FILLVAL',
decode_times=False)

if tag in ['nmax', 'tdisk', 'tlimb']:
# Add time coordinate from scan_start_time
Expand Down

0 comments on commit 5b0654e

Please sign in to comment.