Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
bnb32 committed Apr 30, 2024
1 parent 1a44fd8 commit bd972c6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sup3r/utilities/era_downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -623,9 +623,9 @@ def prune_output(cls, infile, prune_variables=None):
logger.info(f'Pruning {infile}.')
tmp_file = cls.get_tmp_file(infile)
with xr.Dataset(infile) as ds:
keep_vars = {k:v for k, v in dict(ds.data_vars)
keep_vars = {k: v for k, v in dict(ds.data_vars)
if 'level' not in ds[k].dims}
new_coords = {k:v for k, v in dict(ds.coords).items()
new_coords = {k: v for k, v in dict(ds.coords).items()
if 'level' not in k}
new_ds = xr.Dataset(coords=new_coords, data_vars=keep_vars)
new_ds.to_netcdf(tmp_file)
Expand Down Expand Up @@ -676,7 +676,7 @@ def run_month(cls,
variables : list | None
Variables to download. If None this defaults to just gepotential
and wind components.
prune_variables : list | None
prune_variables : bool | None
Variables to remove from final files. This is usually the multi
pressure level array of a variable which has since been
interpolated to specific heights.
Expand Down

0 comments on commit bd972c6

Please sign in to comment.