Skip to content

Commit

Permalink
update gefs_arcdir.yaml.j2
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonMFernando-NOAA committed Aug 16, 2024
1 parent ec5eeed commit f94fc05
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions parm/archive/gefs_arcdir.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,22 @@
{% set head = RUN + ".t" + cycle_HH + "z." %}

# Declare the GEFS_ARCH where atmos data will be sent
{% set GEFS_ARCH = ROTDIR ~ RUN ~"/arch" %}
{% set GEFS_ARCH = ROTDIR ~"/gefsarch" %}

# test files
{% if RUN == "gefs" %}
{% set det_files = [] %}
{% if path_exists(ROTDIR ~ RUN ~ "." ~ cycle_YMD ~ cycle_HH
~ "/ensstat/products/atmos/grib2/0p50") %}
{% do det_files.append([ROTDIR ~ RUN ~ "." ~ cycle_YMD ~ cycle_HH
~ "/ensstat/products/atmos/grib2/0p50/gefs.t12z.mean.pres_.0p50.f006.grib2"]) %}
{% if path_exists(ROTDIR ~ "/gefs.20210323/" ~ "12"
~ "/ensstat/products/atmos/grib2/0p50") %}
{% do det_files.append([ROTDIR ~ "/gefs.20210323/" ~ "12"
~ "/ensstat/products/atmos/grib2/0p50/gefs.t12z.mean.pres_.0p50.f000.grib2.idx", GEFS_ARCH]) %}
{% endif %}

{% endif %}
{% set file_set = det_files %}
# Actually write the yaml
mkdir:
- "{{ GEFS_ARCH }}"
copy:
- {{ det_files }}
{% for source_dest_pair in file_set %}
- {{ source_dest_pair }}
{% endfor %}

0 comments on commit f94fc05

Please sign in to comment.