Skip to content

Commit

Permalink
update archive.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonMFernando-NOAA committed Aug 21, 2024
1 parent ef4d37c commit dda46b7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions parm/archive/gefs_arcdir.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
# Declare the GEFS_ARCH where atmos data will be sent
{% set GEFS_ARCH = ROTDIR ~"/gefsarch" %}

{% set file_set = [] %}

# test files
{% if RUN == "gefs" %}
{% set det_files = [] %}
{% 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]) %}
{% set atmos_files = [] %}
{% if path_exists(ROTDIR ~ "/gefs." ~ cycle_YMD ~ "12/ensstat/products/atmos/grib2/1p00") %}
{% do atmos_files.append([ROTDIR ~ "/gefs." ~ cycle_YMD ~
~ "12/ensstat/products/atmos/grib2/1p00/gefs.t12z.mean.pres_.0p50.f000.grib2.idx", GEFS_ARCH]) %}
{% endif %}
{% endif %}
{% set file_set = det_files %}
{% set file_set = atmos_files %}
# Actually write the yaml
mkdir:
- "{{ GEFS_ARCH }}"
Expand Down
5 changes: 3 additions & 2 deletions ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ def configure(self, arch_dict: Dict[str, Any]) -> (Dict[str, Any], List[Dict[str

archive_parm = os.path.join(arch_dict.PARMgfs, "archive")

# Collect the dataset to archive locally
arcdir_j2yaml = os.path.join(archive_parm, "gefs_arcdir.yaml.j2")
if arch_dict.RUN == "gefs":
# Collect the dataset to archive locally
arcdir_j2yaml = os.path.join(archive_parm, "gefs_arcdir.yaml.j2")

# Add the glob.glob function for capturing log filenames
# TODO remove this kludge once log filenames are explicit
Expand Down

0 comments on commit dda46b7

Please sign in to comment.