From 9c207841a5e1065647e5813d48d3bc0bf5d5a8ca Mon Sep 17 00:00:00 2001 From: AntonMFernando Date: Thu, 12 Sep 2024 17:03:19 -0400 Subject: [PATCH] updated archive directory --- parm/archive/gefs_ice.yaml.j2 | 36 ++++++++++++++++++++++++++++++++ parm/archive/gefs_wave.yaml.j2 | 1 - parm/archive/master_gefs.yaml.j2 | 4 ++++ 3 files changed, 40 insertions(+), 1 deletion(-) diff --git a/parm/archive/gefs_ice.yaml.j2 b/parm/archive/gefs_ice.yaml.j2 index e69de29bb2..aa7441a36b 100644 --- a/parm/archive/gefs_ice.yaml.j2 +++ b/parm/archive/gefs_ice.yaml.j2 @@ -0,0 +1,36 @@ +{% set cycle_HH = current_cycle | strftime("%H") %} +{% set cycle_YMD = current_cycle | to_YMD %} +{% set cycle_YMDH = current_cycle | to_YMDH %} +{% set head = RUN + "ice.t" + cycle_HH + "z." %} + +gefs: + name: "GEFS" + target: "{{ ATARDIR }}/{{ cycle_YMDH }}/gefs_wave.tar" + required: +#select mem%03d and ensstat files required +{% set file_set = [] %} +{% set membr = [] %} +{% for mem_nm in range(0, NMEM_ENS + 1) %} + {% do membr.append("mem" ~ '%03d' % mem_nm ) %} +{% endfor %} + +{% for mem in membr %} + {% set tmpl_dict = ({ '${ROTDIR}':ROTDIR, + '${RUN}':RUN, + '${YMD}':cycle_YMD, + '${HH}':cycle_HH, + '${MEMDIR}':mem }) %} + + {% set COMIN_ICE_HISTORY = COM_ICE_HISTORY_TMPL | replace_tmpl(tmpl_dict) %} + + # Select netcdf files to copy to the atardir + {% if RUN == "gefs" %} + {% if path_exists(COMIN_ICE_HISTORY) %} + {% for fhr in range(FHMIN_GFS + FHOUT_ICE_GFS, FHMAX_GFS + FHOUT_ICE_GFS, FHOUT_ICE_GFS) %} + {% set file_name = head ~ "6hr_avg" ~ ".f" ~ '%03d'|format(fhr) ~ ".nc" %} + {% set file_set = COMIN_ICE_HISTORY ~ "/" ~ file_name %} + - "{{ file_set | relpath(ROTDIR)}}" + {% endfor %} + {% endif %} + {% endif %} +{% endfor %} diff --git a/parm/archive/gefs_wave.yaml.j2 b/parm/archive/gefs_wave.yaml.j2 index 0f380081c8..cfa1fcef26 100644 --- a/parm/archive/gefs_wave.yaml.j2 +++ b/parm/archive/gefs_wave.yaml.j2 @@ -19,7 +19,6 @@ gefs: '${RUN}':RUN, '${YMD}':cycle_YMD, '${HH}':cycle_HH, - '${GRID}':"5p00", '${MEMDIR}':mem }) %} {% set COMIN_WAVE_GRID = COM_WAVE_GRID_TMPL | replace_tmpl(tmpl_dict) %} diff --git a/parm/archive/master_gefs.yaml.j2 b/parm/archive/master_gefs.yaml.j2 index aac52f83fd..cc50f8b93b 100644 --- a/parm/archive/master_gefs.yaml.j2 +++ b/parm/archive/master_gefs.yaml.j2 @@ -14,4 +14,8 @@ datasets: {% filter indent(width=4) %} {% include "gefs_wave.yaml.j2" %} +{% endfilter %} + +{% filter indent(width=4) %} +{% include "gefs_ice.yaml.j2" %} {% endfilter %} \ No newline at end of file