Skip to content

Commit

Permalink
Updated application scripts as per reviewer comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
HenryRWinterbottom committed Jun 7, 2024
1 parent 5413114 commit 1b5ff0c
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 38 deletions.
69 changes: 35 additions & 34 deletions jobs/JGLOBAL_ARCHIVE
Original file line number Diff line number Diff line change
Expand Up @@ -10,43 +10,44 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "arch" -c "base arch"
export CDUMP=${RUN/enkf}

YMD=${PDY} HH=${cyc} declare_from_tmpl -rx \
COMOUT_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \
COMOUT_ATMOS_BUFR:COM_ATMOS_BUFR_TMPL \
COMOUT_ATMOS_GEMPAK:COM_ATMOS_GEMPAK_TMPL \
COMOUT_ATMOS_GENESIS:COM_ATMOS_GENESIS_TMPL \
COMOUT_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL \
COMOUT_ATMOS_INPUT:COM_ATMOS_INPUT_TMPL \
COMOUT_ATMOS_MASTER:COM_ATMOS_MASTER_TMPL \
COMOUT_ATMOS_RESTART:COM_ATMOS_RESTART_TMPL \
COMOUT_ATMOS_TRACK:COM_ATMOS_TRACK_TMPL \
COMOUT_ATMOS_WMO:COM_ATMOS_WMO_TMPL \
COMOUT_CHEM_HISTORY:COM_CHEM_HISTORY_TMPL \
COMOUT_CHEM_ANALYSIS:COM_CHEM_ANALYSIS_TMPL \
COMOUT_MED_RESTART:COM_MED_RESTART_TMPL \
COMOUT_SNOW_ANALYSIS:COM_SNOW_ANALYSIS_TMPL \
COMOUT_ICE_HISTORY:COM_ICE_HISTORY_TMPL \
COMOUT_ICE_INPUT:COM_ICE_INPUT_TMPL \
COMOUT_ICE_RESTART:COM_ICE_RESTART_TMPL \
COMOUT_ICE_GRIB:COM_ICE_GRIB_TMPL \
COMOUT_OBS:COM_OBS_TMPL \
COMOUT_TOP:COM_TOP_TMPL \
COMOUT_OCEAN_HISTORY:COM_OCEAN_HISTORY_TMPL \
COMOUT_OCEAN_RESTART:COM_OCEAN_RESTART_TMPL \
COMOUT_OCEAN_GRIB:COM_OCEAN_GRIB_TMPL \
COMOUT_OCEAN_NETCDF:COM_OCEAN_NETCDF_TMPL \
COMOUT_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \
COMOUT_WAVE_GRID:COM_WAVE_GRID_TMPL \
COMOUT_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
COMOUT_WAVE_STATION:COM_WAVE_STATION_TMPL \
COMOUT_WAVE_RESTART:COM_WAVE_RESTART_TMPL \
COMOUT_ATMOS_OZNMON:COM_ATMOS_OZNMON_TMPL \
COMOUT_ATMOS_RADMON:COM_ATMOS_RADMON_TMPL \
COMOUT_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL \
COMOUT_CONF:COM_CONF_TMPL
COMIN_ATMOS_ANALYSIS:COM_ATMOS_ANALYSIS_TMPL \
COMIN_ATMOS_BUFR:COM_ATMOS_BUFR_TMPL \
COMIN_ATMOS_GEMPAK:COM_ATMOS_GEMPAK_TMPL \
COMIN_ATMOS_GENESIS:COM_ATMOS_GENESIS_TMPL \
COMIN_ATMOS_HISTORY:COM_ATMOS_HISTORY_TMPL \
COMIN_ATMOS_INPUT:COM_ATMOS_INPUT_TMPL \
COMIN_ATMOS_MASTER:COM_ATMOS_MASTER_TMPL \
COMIN_ATMOS_RESTART:COM_ATMOS_RESTART_TMPL \
COMIN_ATMOS_TRACK:COM_ATMOS_TRACK_TMPL \
COMIN_ATMOS_WMO:COM_ATMOS_WMO_TMPL \
COMIN_CHEM_HISTORY:COM_CHEM_HISTORY_TMPL \
COMIN_CHEM_ANALYSIS:COM_CHEM_ANALYSIS_TMPL \
COMIN_MED_RESTART:COM_MED_RESTART_TMPL \
COMIN_SNOW_ANALYSIS:COM_SNOW_ANALYSIS_TMPL \
COMIN_ICE_HISTORY:COM_ICE_HISTORY_TMPL \
COMIN_ICE_INPUT:COM_ICE_INPUT_TMPL \
COMIN_ICE_RESTART:COM_ICE_RESTART_TMPL \
COMIN_ICE_GRIB:COM_ICE_GRIB_TMPL \
COMIN_OBS:COM_OBS_TMPL \
COMIN_TOP:COM_TOP_TMPL \
COMIN_OCEAN_HISTORY:COM_OCEAN_HISTORY_TMPL \
COMIN_OCEAN_RESTART:COM_OCEAN_RESTART_TMPL \
COMIN_OCEAN_GRIB:COM_OCEAN_GRIB_TMPL \
COMIN_OCEAN_NETCDF:COM_OCEAN_NETCDF_TMPL \
COMIN_OCEAN_ANALYSIS:COM_OCEAN_ANALYSIS_TMPL \
COMIN_WAVE_GRID:COM_WAVE_GRID_TMPL \
COMIN_WAVE_HISTORY:COM_WAVE_HISTORY_TMPL \
COMIN_WAVE_STATION:COM_WAVE_STATION_TMPL \
COMIN_WAVE_RESTART:COM_WAVE_RESTART_TMPL \
COMIN_ATMOS_OZNMON:COM_ATMOS_OZNMON_TMPL \
COMIN_ATMOS_RADMON:COM_ATMOS_RADMON_TMPL \
COMIN_ATMOS_MINMON:COM_ATMOS_MINMON_TMPL \
COMIN_CONF:COM_CONF_TMPL \
COMOUT_ATMOS_TRACK:COM_ATMOS_TRACK_TMPL

for grid in "0p25" "0p50" "1p00"; do
YMD=${PDY} HH=${cyc} GRID=${grid} declare_from_tmpl -rx \
"COMOUT_ATMOS_GRIB_${grid}:COM_ATMOS_GRIB_GRID_TMPL"
"COMIN_ATMOS_GRIB_${grid}:COM_ATMOS_GRIB_GRID_TMPL"
done

###############################################################
Expand Down
4 changes: 2 additions & 2 deletions scripts/exglobal_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ def main():
for key in keys:
archive_dict[key] = archive.task_config[key]

# Also import all COMOUT* directory and template variables
# Also import all COMIN* directory and template variables
for key in archive.task_config.keys():
if key.startswith("COMOUT"):
if key.startswith("COMIN"):
archive_dict[key] = archive.task_config[key]

cwd = os.getcwd()
Expand Down
4 changes: 2 additions & 2 deletions ush/python/pygfs/task/archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def _gen_relative_paths(self, root_path: str) -> Dict:
rel_path_dict : Dict
Dictionary of paths relative to root_path. Members will be named
based on the dict names in self.config. For COM paths, the names will
follow COMOUT_<NAME> --> <name>_dir. For all other directories, the
follow COMIN_<NAME> --> <name>_dir. For all other directories, the
names will follow <NAME> --> <name>_dir.
"""

Expand All @@ -318,7 +318,7 @@ def _gen_relative_paths(self, root_path: str) -> Dict:
if isinstance(value, str):
if root_path in value:
rel_path = value.replace(root_path, "")
rel_key = (key[4:] if key.startswith("COMOUT_") else key).lower() + "_dir"
rel_key = (key[4:] if key.startswith("COMIN_") else key).lower() + "_dir"
rel_path_dict[rel_key] = rel_path

return rel_path_dict
Expand Down

0 comments on commit 1b5ff0c

Please sign in to comment.