Skip to content

Commit

Permalink
test1
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonMFernando-NOAA committed Aug 13, 2024
1 parent c1d46bf commit 9e43bda
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 4 deletions.
22 changes: 22 additions & 0 deletions parm/archive/gefs_arcdir.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{% set cycle_HH = current_cycle | strftime("%H") %}
{% set cycle_YMDH = current_cycle | to_YMDH %}
{% set cycle_YMD = current_cycle | to_YMD %}
{% set head = RUN + ".t" + cycle_HH + "z." %}

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

# 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"]) %}
{% endif %}

# Actually write the yaml
mkdir:
- "{{ GEFS_ARCH }}"
copy:
- {{ det_files }}
5 changes: 1 addition & 4 deletions ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,6 @@ def configure(self, arch_dict: Dict[str, Any]) -> (Dict[str, Any], List[Dict[str
if not os.path.isdir(arch_dict.ROTDIR):
raise FileNotFoundError(f"FATAL ERROR: The ROTDIR ({arch_dict.ROTDIR}) does not exist!")

if arch_dict.RUN == "gefs":
raise NotImplementedError("FATAL ERROR: Archiving is not yet set up for GEFS runs")

if arch_dict.RUN in ["gdas", "gfs"]:

# Copy the cyclone track files and rename the experiments
Expand All @@ -75,7 +72,7 @@ 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, "arcdir.yaml.j2")
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 9e43bda

Please sign in to comment.