Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: NaureenBharwaniNOAA <[email protected]>
  • Loading branch information
WeirAE and NaureenBharwaniNOAA authored Oct 25, 2024
1 parent 7d81efb commit 25fd2b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
4 changes: 2 additions & 2 deletions parm/wflow/coldstart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ metatask_run_ensemble:
mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}'
task_make_ics_mem#mem#:
<<: *default_task
command: !cycstr 'source &USHdir;/load_modules_wflow.sh hera ; python &SCRIPTSdir;/chgres_cube.py
command: !cycstr 'source &USHdir;/load_modules_wflow.sh {{ user.MACHINE }} ; python &SCRIPTSdir;/chgres_cube.py
-c &GLOBAL_VAR_DEFNS_FP;
--cycle @Y-@m-@dT@H:@M:@S
--key-path task_make_ics
Expand Down Expand Up @@ -128,7 +128,7 @@ metatask_run_ensemble:

task_make_lbcs_mem#mem#:
<<: *default_task
command: !cycstr 'source &USHdir;/load_modules_wflow.sh hera ; python &SCRIPTSdir;/chgres_cube.py
command: !cycstr 'source &USHdir;/load_modules_wflow.sh {{ user.MACHINE }} ; python &SCRIPTSdir;/chgres_cube.py
-c &GLOBAL_VAR_DEFNS_FP;
--cycle @Y-@m-@dT@H:@M:@S
--key-path task_make_lbcs
Expand Down
6 changes: 2 additions & 4 deletions scripts/chgres_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,8 @@
def _parse_var_defns(file):
var_dict = {}
with open(file, "r", encoding="utf-8") as f:
lines = f.readlines()
for line in lines:
line = line.strip()
if "=" in line:
for line in f:
if "=" in line.strip():
key, value = line.split("=", 1)
key = key.strip()
value = value.strip()
Expand Down

0 comments on commit 25fd2b4

Please sign in to comment.