diff --git a/parm/wflow/coldstart.yaml b/parm/wflow/coldstart.yaml index ac319f7cf..1770367f1 100644 --- a/parm/wflow/coldstart.yaml +++ b/parm/wflow/coldstart.yaml @@ -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 @@ -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 diff --git a/scripts/chgres_cube.py b/scripts/chgres_cube.py index 6be8ccc65..5a952a03a 100644 --- a/scripts/chgres_cube.py +++ b/scripts/chgres_cube.py @@ -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()