Skip to content

Commit

Permalink
Merge pull request #182 from pysat/maint/pysat_depr
Browse files Browse the repository at this point in the history
MAINT: Update pysat deprecations
  • Loading branch information
jklenzing committed Jun 8, 2023
2 parents 70b5b96 + 42b02ca commit 1850c78
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
* Set use_cdflib=True for supported xarray instruments
* Set pysat 3.1.0 minimum
* 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+

## [0.0.4] - 2022-11-07
Expand Down
2 changes: 1 addition & 1 deletion pysatNASA/instruments/icon_euv.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):

data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch',
pandas_format=pandas_format,
labels=labels,
meta_kwargs={'labels': labels},
meta_processor=filter_metadata,
meta_translation=meta_translation,
drop_meta_labels=['Valid_Max',
Expand Down
2 changes: 1 addition & 1 deletion pysatNASA/instruments/icon_fuv.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):

data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch',
pandas_format=pandas_format,
labels=labels,
meta_kwargs={'labels': labels},
meta_processor=filter_metadata,
meta_translation=meta_translation,
drop_meta_labels=drop_labels)
Expand Down
2 changes: 1 addition & 1 deletion pysatNASA/instruments/icon_ivm.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):
'_FillValue': 'FillVal'}

data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch',
labels=labels,
meta_kwargs={'labels': labels},
meta_processor=filter_metadata,
meta_translation=meta_translation,
drop_meta_labels=['Valid_Max',
Expand Down
2 changes: 1 addition & 1 deletion pysatNASA/instruments/icon_mighti.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def load(fnames, tag='', inst_id='', keep_original_names=False):

data, meta = pysat.utils.io.load_netcdf(fnames, epoch_name='Epoch',
pandas_format=pandas_format,
labels=labels,
meta_kwargs={'labels': labels},
meta_processor=filter_metadata,
meta_translation=meta_translation,
drop_meta_labels=['Valid_Max',
Expand Down
6 changes: 3 additions & 3 deletions pysatNASA/instruments/methods/cdaweb.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,9 +276,9 @@ def load_xarray(fnames, tag='', inst_id='',
file_cadence=dt.timedelta(days=1),
labels={'units': ('Units', str), 'name': ('Long_Name', str),
'notes': ('Var_Notes', str), 'desc': ('CatDesc', str),
'min_val': ('ValidMin', (int, float)),
'max_val': ('ValidMax', (int, float)),
'fill_val': ('FillVal', (int, float))},
'min_val': ('ValidMin', (float, int)),
'max_val': ('ValidMax', (float, int)),
'fill_val': ('FillVal', (float, int))},
epoch_name='Epoch', drop_dims=None, var_translation=None,
meta_processor=None, meta_translation=None,
drop_meta_labels=None):
Expand Down
4 changes: 2 additions & 2 deletions pysatNASA/instruments/methods/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def clean_warn(self):
'none' No cleaning applied, routine not called in this case.
"""
pysat.logger.warn(' '.join(('No cleaning routines available for',
self.platform, self.name)))
pysat.logger.warning(' '.join(('No cleaning routines available for',
self.platform, self.name)))

return
6 changes: 4 additions & 2 deletions pysatNASA/instruments/methods/jhuapl.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ def load_edr_aurora(fnames, tag='', inst_id='', pandas_format=False,
# than a dimension or coordinate. Additionally, no coordinates
# are assigned.
sdata, mdata = load_netcdf(fname, epoch_name='TIME', epoch_unit='s',
labels=labels, pandas_format=pandas_format,
meta_kwargs={'labels': labels},
pandas_format=pandas_format,
strict_dim_check=strict_dim_check)

# Calculate the time for this data file. The pysat `load_netcdf` routine
Expand Down Expand Up @@ -235,7 +236,8 @@ def load_sdr_aurora(fnames, tag='', inst_id='', pandas_format=False,
# than a dimension or coordinate. Additionally, no coordinates
# are assigned.
sdata, mdata = load_netcdf(fname, epoch_name=load_time, epoch_unit='s',
labels=labels, pandas_format=pandas_format,
meta_kwargs={'labels': labels},
pandas_format=pandas_format,
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 @@ -244,7 +244,8 @@ def load(fnames, tag='', inst_id=''):
epoch_name = 'nevents'

data, meta = load_netcdf(fnames, pandas_format=pandas_format,
epoch_name=epoch_name, labels=labels,
epoch_name=epoch_name,
meta_kwargs={'labels': labels},
meta_translation=meta_translation,
combine_by_coords=False,
drop_meta_labels='FILLVAL')
Expand Down

0 comments on commit 1850c78

Please sign in to comment.