Skip to content

Commit

Permalink
GitHub Action: Apply Pep8-formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Oct 19, 2023
1 parent 06dc70b commit 196d21d
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions jobs/prepare_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ def main(starttime, hstart, hstop, cfg, model_cfg):
for time in tools.iter_hours(starttime, hstart, hstop,
cfg.meteo['inc']):
meteo_file = os.path.join(
cfg.icon_input_icbc,
cfg.meteo['prefix'] + time.strftime(cfg.meteo['nameformat']))
cfg.icon_input_icbc, cfg.meteo['prefix'] +
time.strftime(cfg.meteo['nameformat']))
if cfg.model == 'icon-art' or cfg.model == 'icon-art-oem':
chem_file = os.path.join(
cfg.icon_input_icbc,
Expand Down Expand Up @@ -371,10 +371,12 @@ def main(starttime, hstart, hstop, cfg, model_cfg):
cfg.meteo['inc']):
src_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '_lbc.nc')
time.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '_lbc.nc')
merged_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '_merged.nc')
time.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '_merged.nc')
ds = xr.open_dataset(src_file)
# Load GEOSP-dataset as ds_geosp at time 00:
if (time.hour == 0):
Expand All @@ -397,10 +399,12 @@ def main(starttime, hstart, hstop, cfg, model_cfg):
if cfg.model.startswith('icon-art'):
meteo_file = os.path.join(
cfg.icon_input_icbc,
starttime.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '.nc')
starttime.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '.nc')
merged_file = os.path.join(
cfg.icon_input_icbc,
starttime.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '_merged.nc')
starttime.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '_merged.nc')
ds = xr.open_dataset(meteo_file)
merging = False
if 'PS' not in ds:
Expand Down Expand Up @@ -436,13 +440,15 @@ def main(starttime, hstart, hstop, cfg, model_cfg):
#------------
meteo_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '.nc')
time.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '.nc')
chem_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.chem_nameformat) + '.nc')
merged_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) +
time.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) +
'_merged.nc')
ds_meteo = xr.open_dataset(meteo_file)
ds_chem = xr.open_dataset(chem_file)
Expand All @@ -467,13 +473,15 @@ def main(starttime, hstart, hstop, cfg, model_cfg):
#------------
meteo_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '_lbc.nc')
time.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '_lbc.nc')
chem_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.chem_nameformat) + '_lbc.nc')
merged_file = os.path.join(
cfg.icon_input_icbc,
time.strftime(cfg.meteo['prefix'] + cfg.meteo['nameformat']) + '_merged.nc')
time.strftime(cfg.meteo['prefix'] +
cfg.meteo['nameformat']) + '_merged.nc')
ds_meteo = xr.open_dataset(meteo_file)
ds_chem = xr.open_dataset(chem_file)
# LNPS --> PS
Expand Down

0 comments on commit 196d21d

Please sign in to comment.