Skip to content

Commit

Permalink
Combine stage yamls into one
Browse files Browse the repository at this point in the history
  • Loading branch information
KateFriedman-NOAA committed Jun 17, 2024
1 parent 3c45d58 commit 03b5024
Show file tree
Hide file tree
Showing 8 changed files with 98 additions and 92 deletions.
9 changes: 0 additions & 9 deletions parm/stage/analysis.yaml.j2

This file was deleted.

10 changes: 0 additions & 10 deletions parm/stage/atmosphere_cold.yaml.j2

This file was deleted.

17 changes: 0 additions & 17 deletions parm/stage/atmosphere_nest.yaml.j2

This file was deleted.

15 changes: 0 additions & 15 deletions parm/stage/atmosphere_warm.yaml.j2

This file was deleted.

8 changes: 0 additions & 8 deletions parm/stage/ice.yaml.j2

This file was deleted.

25 changes: 0 additions & 25 deletions parm/stage/ocean.yaml.j2

This file was deleted.

98 changes: 98 additions & 0 deletions parm/stage/stage.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
{% set cycle_HH = current_cycle | strftime("%H") %}
{% set cycle_YMD = current_cycle | to_YMD %}
{% set cycle_YMDH = current_cycle | to_YMDH %}

{% if MODE == "cycled" %}
analysis:
mkdir:
- "{{ COM_ATMOS_ANALYSIS }}"
copy:
# TODO: Add abias_int?
{% for ftype in ["abias", "abias_air", "abias_pc", "radstat"] %}
- ["{{ ICSDIR }}/{{ COM_ATMOS_ANALYSIS | relpath(ROTDIR) }}/{{ RUN }}.t{{ cycle_HH }}z.{{ ftype }}", "{{ COM_ATMOS_ANALYSIS }}"]
{% endfor %}
{% endif %}

{% if EXP_WARM_START == True %}
atmosphere_warm:
mkdir:
- "{{ COM_ATMOS_RESTART_PREV }}"
copy:
{% for ftype in ["coupler.res", "fv_core.res.nc"] %}
- ["{{ ICSDIR }}/{{ COM_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ DTG_PREFIX }}.{{ ftype }}", "{{ COM_ATMOS_RESTART_PREV }}"]
{% endfor %}
{% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
{% for ntile in range(1, ntiles + 1) %}
- ["{{ ICSDIR }}/{{ COM_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ DTG_PREFIX }}.{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_RESTART_PREV }}"]
{% endfor %} # ntile
{% endfor %} # ftype
{% else %}
atmosphere_cold:
mkdir:
- "{{ COM_ATMOS_INPUT }}"
copy:
- ["{{ ICSDIR }}/{{ COM_ATMOS_INPUT | relpath(ROTDIR) }}/gfs_ctrl.nc", "{{ COM_ATMOS_INPUT }}"]
{% for ftype in ["gfs_data", "sfc_data"] %}
{% for ntile in range(1, ntiles + 1) %}
- ["{{ ICSDIR }}/{{ COM_ATMOS_INPUT | relpath(ROTDIR) }}/{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_INPUT }}"]
{% endfor %} # ntile
{% endfor %} # ftype
{% endif %}

{% if DO_NEST %}
atmosphere_nest:
{% set ntile = 7 %}
mkdir:
- "{{ COM_ATMOS_RESTART_PREV }}"
copy:
{% if EXP_WARM_START == True %}
{% for ftype in ["ca_data", "fv_core.res", "fv_srf_wnd.res", "fv_tracer.res", "phy_data", "sfc_data"] %}
- ["{{ ICSDIR }}/{{ COM_ATMOS_RESTART_PREV | relpath(ROTDIR) }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_RESTART_PREV }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"]
{% endfor %} # ftype
{% else %}
{% for ftype in ["gfs_data", "sfc_data"] %}
- ["{{ COM_ATMOS_INPUT }}/{{ ftype }}.tile{{ ntile }}.nc", "{{ COM_ATMOS_INPUT }}/{{ ftype }}.nest0{{ ntile-5 }}.tile{{ ntile }}.nc"]
{% endfor %} # ftype
{% endif %} # cold-start
{% endif %}

{% if DO_WAVE %}
wave:
mkdir:
- "{{ COM_WAVE_RESTART_PREV }}"
copy:
- ["{{ ICSDIR }}/{{ COM_WAVE_RESTART_PREV | relpath(ROTDIR) }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.restart.{{ waveGRD }}", "{{ COM_WAVE_RESTART_PREV }}"]
{% endif %}

{% if DO_OCN %}
ocean:
mkdir:
- "{{ COM_OCEAN_RESTART_PREV }}"
copy:
#-------------------------
# Ocean initial conditions
#-------------------------
- ["{{ ICSDIR }}/{{ COM_OCEAN_RESTART_PREV | relpath(ROTDIR) }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.MOM.res.nc", "{{ COM_OCEAN_RESTART_PREV }}"]
#------------------------------------
# Resolution based initial conditions
#------------------------------------
{% if OCNRES == "025" %}
{% for nn in range(1, 3) %}
- ["{{ ICSDIR }}/{{ COM_OCEAN_RESTART_PREV | relpath(ROTDIR) }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.MOM.res_{{ nn }}.nc", "{{ COM_OCEAN_RESTART_PREV }}"]
{% endfor %}
{% endif %}
#-------------------------
# Ocean Perturbation Files
#-------------------------
{% if MEMDIR and REPLAY_ICS == "YES" %}
- ["{{ ICSDIR }}/{{ COM_OCEAN_RESTART_PREV | relpath(ROTDIR) }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.mom6_increment.nc", "{{ COM_OCEAN_RESTART_PREV }}"]
{% endif %}
{% endif %}

{% if DO_ICE %}
ice:
mkdir:
- "{{ COM_ICE_RESTART_PREV }}"
copy:
- ["{{ ICSDIR }}/{{ COM_ICE_RESTART_PREV | relpath(ROTDIR) }}/{{ cycle_YMD }}.{{ cycle_HH }}0000.cice_model.res.nc", "{{ COM_ICE_RESTART_PREV }}"]
{% endif %}
8 changes: 0 additions & 8 deletions parm/stage/wave.yaml.j2

This file was deleted.

0 comments on commit 03b5024

Please sign in to comment.