Skip to content

Commit

Permalink
Correct ocean MOM.res_# stage copy
Browse files Browse the repository at this point in the history
- Set OCNRES to be three digits
- Correct for loop range to include third file

Refs NOAA-EMC#2864
  • Loading branch information
KateFriedman-NOAA committed Aug 27, 2024
1 parent 935ac64 commit 7d818dc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion parm/stage/ocean.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ocean:
{% set COMOUT_OCEAN_RESTART_PREV_MEM = COMOUT_OCEAN_RESTART_PREV_MEM_list[imem] %}
- ["{{ ICSDIR }}/{{ COMOUT_OCEAN_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.MOM.res.nc", "{{ COMOUT_OCEAN_RESTART_PREV_MEM }}"]
{% if OCNRES == "025" %}
{% for nn in range(1, 3) %}
{% for nn in range(1, 3 + 1) %}
- ["{{ ICSDIR }}/{{ COMOUT_OCEAN_RESTART_PREV_MEM | relpath(ROTDIR) }}/{{ m_prefix }}.MOM.res_{{ nn }}.nc", "{{ COMOUT_OCEAN_RESTART_PREV_MEM }}"]
{% endfor %}
{% endif %}
Expand Down
3 changes: 3 additions & 0 deletions scripts/exglobal_stage_ic.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ def main():

stage_dict = AttrDict()
for key in keys:
# Make sure OCNRES is three digits
if key == "OCNRES":
stage.task_config.OCNRES = f"{stage.task_config.OCNRES :03d}"
stage_dict[key] = stage.task_config[key]

# Also import all COM* directory and template variables
Expand Down

0 comments on commit 7d818dc

Please sign in to comment.