From e247cb8fafdf864e78d16232b7d7e2fc1790769f Mon Sep 17 00:00:00 2001
From: BenjaminBlake-NOAA
<52074832+BenjaminBlake-NOAA@users.noreply.github.com>
Date: Mon, 7 Oct 2024 09:42:19 -0400
Subject: [PATCH] Utilize jobid variable for non-DA tasks (#512)
---
jobs/JRRFS_FORECAST | 18 +-----------------
jobs/JRRFS_MAKE_GRID | 2 +-
jobs/JRRFS_MAKE_ICS | 3 +--
jobs/JRRFS_MAKE_LBCS | 3 +--
jobs/JRRFS_MAKE_OROG | 2 +-
jobs/JRRFS_MAKE_SFC_CLIMO | 2 +-
jobs/JRRFS_POST | 4 +---
jobs/JRRFS_PRDGEN | 13 ++-----------
parm/FV3LAM_wflow_firewx.xml | 24 ++++++++++++++++--------
parm/FV3LAM_wflow_nonDA.xml | 24 ++++++++++++++++--------
10 files changed, 41 insertions(+), 54 deletions(-)
diff --git a/jobs/JRRFS_FORECAST b/jobs/JRRFS_FORECAST
index c73a922bb..6085d156f 100755
--- a/jobs/JRRFS_FORECAST
+++ b/jobs/JRRFS_FORECAST
@@ -64,29 +64,13 @@ the specified cycle.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
+export jobid=${taskid}
export mem_num=m$(echo "${ENSMEM_INDX}")
export CYCLE_TYPE=${CYCLE_TYPE:-prod}
export CYCLE_SUBTYPE=${CYCLE_SUBTYPE:-empty}
-if [ ${CYCLE_TYPE} == "spinup" ]; then
- if [ "${DO_ENSEMBLE}" = "TRUE" ]; then # EnKF has spinup forecasts
- export jobid=${RUN}_forecast_spinup_${mem_num}_${envir}_${cyc}
- if [ ${CYCLE_SUBTYPE} == "ensinit" ]; then
- export jobid=${RUN}_forecast_ensinit_${mem_num}_${envir}_${cyc}
- fi
- else
- export jobid=${RUN}_forecast_spinup_${envir}_${cyc}
- fi
-else
- if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
- export jobid=${RUN}_forecast_${mem_num}_${envir}_${cyc}
- else
- export jobid=${RUN}_forecast_${envir}_${cyc}
- fi
-fi
-
export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
diff --git a/jobs/JRRFS_MAKE_GRID b/jobs/JRRFS_MAKE_GRID
index 058d33d41..779fe878b 100755
--- a/jobs/JRRFS_MAKE_GRID
+++ b/jobs/JRRFS_MAKE_GRID
@@ -61,7 +61,7 @@ This is the J-job script for the task that generates grid files.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
-export jobid=${RUN}_make_grid_${envir}_${cyc}
+export jobid=${taskid}
export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
diff --git a/jobs/JRRFS_MAKE_ICS b/jobs/JRRFS_MAKE_ICS
index 4a22a1f09..9f6f45c90 100755
--- a/jobs/JRRFS_MAKE_ICS
+++ b/jobs/JRRFS_MAKE_ICS
@@ -134,13 +134,12 @@ extrn_mdl_fns_on_disk_str="( "$( printf "\"%s\" " "${fns_on_disk[@]}" )")"
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
+export jobid=${taskid}
export mem_num=m$(echo "${ENSMEM_INDX}")
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
- export jobid=${RUN}_make_ics_${mem_num}_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/ics"
else
- export jobid=${RUN}_make_ics_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/ics"
fi
diff --git a/jobs/JRRFS_MAKE_LBCS b/jobs/JRRFS_MAKE_LBCS
index 518652dde..02343c8c5 100755
--- a/jobs/JRRFS_MAKE_LBCS
+++ b/jobs/JRRFS_MAKE_LBCS
@@ -173,13 +173,12 @@ extrn_mdl_fns_on_disk_str2="( "$( printf "\"%s\" " "${fns_on_disk2[@]}" )")"
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
+export jobid=${taskid}
export mem_num=m$(echo "${ENSMEM_INDX}")
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
- export jobid=${RUN}_make_lbcs_${mem_num}_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/lbcs"
else
- export jobid=${RUN}_make_lbcs_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/lbcs"
fi
diff --git a/jobs/JRRFS_MAKE_OROG b/jobs/JRRFS_MAKE_OROG
index 7eb80d4da..047e5b960 100755
--- a/jobs/JRRFS_MAKE_OROG
+++ b/jobs/JRRFS_MAKE_OROG
@@ -61,7 +61,7 @@ This is the J-job script for the task that generates orography files.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
-export jobid=${RUN}_make_orog_${envir}_${cyc}
+export jobid=${taskid}
export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
diff --git a/jobs/JRRFS_MAKE_SFC_CLIMO b/jobs/JRRFS_MAKE_SFC_CLIMO
index 59a70a00b..9af36f999 100755
--- a/jobs/JRRFS_MAKE_SFC_CLIMO
+++ b/jobs/JRRFS_MAKE_SFC_CLIMO
@@ -61,7 +61,7 @@ climatology.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
-export jobid=${RUN}_make_sfc_climo_${envir}_${cyc}
+export jobid=${taskid}
export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
diff --git a/jobs/JRRFS_POST b/jobs/JRRFS_POST
index 3a221ac81..f5a3a8628 100755
--- a/jobs/JRRFS_POST
+++ b/jobs/JRRFS_POST
@@ -62,20 +62,18 @@ on the output files corresponding to a specified forecast hour.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
+export jobid=${taskid}
export mem_num=m$(echo "${ENSMEM_INDX}")
export CYCLE_TYPE=${CYCLE_TYPE:-prod}
if [ ${CYCLE_TYPE} == "spinup" ]; then
export INPUT_DATA="${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}"
- jobid=${RUN}_post_spinup_${envir}_${cyc}_f${fhr}
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export INPUT_DATA="${DATAROOT}/${RUN}_forecast_${mem_num}_${envir}_${cyc}"
- jobid=${RUN}_post_${mem_num}_${envir}_${cyc}_f${fhr}
else
export INPUT_DATA="${DATAROOT}/${RUN}_forecast_${envir}_${cyc}"
- jobid=${RUN}_post_${envir}_${cyc}_f${fhr}
fi
fi
diff --git a/jobs/JRRFS_PRDGEN b/jobs/JRRFS_PRDGEN
index 7d7b6c8d0..d636f4ec3 100755
--- a/jobs/JRRFS_PRDGEN
+++ b/jobs/JRRFS_PRDGEN
@@ -62,19 +62,10 @@ files corresponding to a specified forecast hour.
export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
+export jobid=${taskid}
export mem_num=m$(echo "${ENSMEM_INDX}")
-
-CYCLE_TYPE=${CYCLE_TYPE:-prod}
-if [ "${CYCLE_TYPE}" = "spinup" ]; then
- jobid=${RUN}_post_spinup_${envir}_${cyc}_f${fhr}
-else
- if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
- jobid=${RUN}_post_${mem_num}_${envir}_${cyc}_f${fhr}
- else
- jobid=${RUN}_post_${envir}_${cyc}_f${fhr}
- fi
-fi
+export CYCLE_TYPE=${CYCLE_TYPE:-prod}
export DATA=${DATAROOT}/${jobid}
mkdir -p ${DATA}
diff --git a/parm/FV3LAM_wflow_firewx.xml b/parm/FV3LAM_wflow_firewx.xml
index 3e62091fe..1b9fa401d 100644
--- a/parm/FV3LAM_wflow_firewx.xml
+++ b/parm/FV3LAM_wflow_firewx.xml
@@ -197,10 +197,11 @@ MODULES_RUN_TASK_FP script.
{{ nnodes_make_grid }}:ppn={{ ppn_make_grid }}
{{ wtime_make_grid }}
&NODESIZE_ALL;
- &MAKE_GRID_TN;
+ &RUN;_&MAKE_GRID_TN;_&envir;_@H
&LOGDIR;/&MAKE_GRID_TN;.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_GRID_TN;_&envir;_@H
CDATE@Y@m@d@H
cyc@H
HOMErrfs&HOMErrfs;
@@ -222,10 +223,11 @@ MODULES_RUN_TASK_FP script.
{{ nnodes_make_orog }}:ppn={{ ppn_make_orog }}
{{ wtime_make_orog }}
&NODESIZE_ALL;
- &MAKE_OROG_TN;
+ &RUN;_&MAKE_OROG_TN;_&envir;_@H
&LOGDIR;/&MAKE_OROG_TN;.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_OROG_TN;_&envir;_@H
cyc@H
HOMErrfs&HOMErrfs;
envir&envir;
@@ -250,10 +252,11 @@ MODULES_RUN_TASK_FP script.
{{ nnodes_make_sfc_climo }}:ppn={{ ppn_make_sfc_climo }}
{{ wtime_make_sfc_climo }}
&NODESIZE_ALL;
- &MAKE_SFC_CLIMO_TN;
+ &RUN;_&MAKE_SFC_CLIMO_TN;_&envir;_@H
&LOGDIR;/&MAKE_SFC_CLIMO_TN;.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_SFC_CLIMO_TN;_&envir;_@H
cyc@H
HOMErrfs&HOMErrfs;
envir&envir;
@@ -281,10 +284,11 @@ MODULES_RUN_TASK_FP script.
{{ wtime_make_ics }}
&NATIVE_ALL;
&NODESIZE_ALL;
- &MAKE_ICS_TN;{{ uscore_ensmem_name }}
+ &RUN;_&MAKE_ICS_TN;_&envir;_@H
&LOGDIR;/&MAKE_ICS_TN;_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_ICS_TN;_&envir;_@H
PDY@Y@m@d
CDATE@Y@m@d@H
cyc@H
@@ -322,10 +326,11 @@ MODULES_RUN_TASK_FP script.
{{ wtime_make_lbcs }}
&NATIVE_ALL;
&NODESIZE_ALL;
- &MAKE_LBCS_TN;_#bcgrp#
+ &RUN;_&MAKE_LBCS_TN;_#bcgrp#_&envir;_@H
&LOGDIR;/&MAKE_LBCS_TN;_@Y@m@d@H_#bcgrp#.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_LBCS_TN;_&envir;_@H
PDY@Y@m@d
CDATE@Y@m@d@H
cyc@H
@@ -366,10 +371,11 @@ MODULES_RUN_TASK_FP script.
&NATIVE_FORECAST;
&NODESIZE_ALL;
{{ wtime_forecast }}
- &FORECAST_TN;
+ &RUN;_&FORECAST_TN;_&envir;_@H
&LOGDIR;/&FORECAST_TN;_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&FORECAST_TN;_&envir;_@H
PDY@Y@m@d
CDATE@Y@m@d@H
cyc@H
@@ -403,10 +409,11 @@ MODULES_RUN_TASK_FP script.
&NATIVE_ALL;
{{ wtime_post }}
&NODESIZE_ALL;
- &POST_TN;_f#fhr#
+ &RUN;_&POST_TN;_&envir;_@H_f#fhr#
&LOGDIR;/&POST_TN;_f#fhr#_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&POST_TN;_&envir;_@H_f#fhr#
PDY@Y@m@d
CDATE@Y@m@d@H
HOMErrfs&HOMErrfs;
@@ -444,10 +451,11 @@ MODULES_RUN_TASK_FP script.
&NATIVE_ALL;
{{ wtime_prdgen }}
&NODESIZE_ALL;
- &PRDGEN_TN;_f#fhr#
+ &RUN;_&PRDGEN_TN;_&envir;_@H_f#fhr#
&LOGDIR;/&PRDGEN_TN;_f#fhr#_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&POST_TN;_&envir;_@H_f#fhr#
PDY@Y@m@d
CDATE@Y@m@d@H
HOMErrfs&HOMErrfs;
diff --git a/parm/FV3LAM_wflow_nonDA.xml b/parm/FV3LAM_wflow_nonDA.xml
index a1002cdd8..71437191d 100644
--- a/parm/FV3LAM_wflow_nonDA.xml
+++ b/parm/FV3LAM_wflow_nonDA.xml
@@ -199,10 +199,11 @@ MODULES_RUN_TASK_FP script.
{{ nnodes_make_grid }}:ppn={{ ppn_make_grid }}
{{ wtime_make_grid }}
&NODESIZE_ALL;
- &MAKE_GRID_TN;
+ &RUN;_&MAKE_GRID_TN;_&envir;_@H
&LOGDIR;/&MAKE_GRID_TN;.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_GRID_TN;_&envir;_@H
CDATE@Y@m@d@H
cyc@H
HOMErrfs&HOMErrfs;
@@ -224,10 +225,11 @@ MODULES_RUN_TASK_FP script.
{{ nnodes_make_orog }}:ppn={{ ppn_make_orog }}
{{ wtime_make_orog }}
&NODESIZE_ALL;
- &MAKE_OROG_TN;
+ &RUN;_&MAKE_OROG_TN;_&envir;_@H
&LOGDIR;/&MAKE_OROG_TN;.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_OROG_TN;_&envir;_@H
cyc@H
HOMErrfs&HOMErrfs;
envir&envir;
@@ -252,10 +254,11 @@ MODULES_RUN_TASK_FP script.
{{ nnodes_make_sfc_climo }}:ppn={{ ppn_make_sfc_climo }}
{{ wtime_make_sfc_climo }}
&NODESIZE_ALL;
- &MAKE_SFC_CLIMO_TN;
+ &RUN;_&MAKE_SFC_CLIMO_TN;_&envir;_@H
&LOGDIR;/&MAKE_SFC_CLIMO_TN;.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_SFC_CLIMO_TN;_&envir;_@H
cyc@H
HOMErrfs&HOMErrfs;
envir&envir;
@@ -283,10 +286,11 @@ MODULES_RUN_TASK_FP script.
{{ wtime_make_ics }}
&NATIVE_ALL;
&NODESIZE_ALL;
- &MAKE_ICS_TN;{{ uscore_ensmem_name }}
+ &RUN;_&MAKE_ICS_TN;_&envir;_@H
&LOGDIR;/&MAKE_ICS_TN;_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_ICS_TN;_&envir;_@H
PDY@Y@m@d
CDATE@Y@m@d@H
cyc@H
@@ -332,10 +336,11 @@ MODULES_RUN_TASK_FP script.
{{ wtime_make_lbcs }}
&NATIVE_ALL;
&NODESIZE_ALL;
- &MAKE_LBCS_TN;_#bcgrp#
+ &RUN;_&MAKE_LBCS_TN;_#bcgrp#_&envir;_@H
&LOGDIR;/&MAKE_LBCS_TN;_@Y@m@d@H_#bcgrp#.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&MAKE_LBCS_TN;_&envir;_@H
PDY@Y@m@d
CDATE@Y@m@d@H
cyc@H
@@ -382,10 +387,11 @@ MODULES_RUN_TASK_FP script.
&NATIVE_FORECAST;
&NODESIZE_ALL;
{{ wtime_forecast }}
- &FORECAST_TN;
+ &RUN;_&FORECAST_TN;_&envir;_@H
&LOGDIR;/&FORECAST_TN;_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&FORECAST_TN;_&envir;_@H
PDY@Y@m@d
CDATE@Y@m@d@H
cyc@H
@@ -419,10 +425,11 @@ MODULES_RUN_TASK_FP script.
&NATIVE_ALL;
{{ wtime_post }}
&NODESIZE_ALL;
- &POST_TN;_f#fhr#
+ &RUN;_&POST_TN;_&envir;_@H_f#fhr#
&LOGDIR;/&POST_TN;_f#fhr#_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&POST_TN;_&envir;_@H_f#fhr#
PDY@Y@m@d
CDATE@Y@m@d@H
HOMErrfs&HOMErrfs;
@@ -460,10 +467,11 @@ MODULES_RUN_TASK_FP script.
&NATIVE_ALL;
{{ wtime_prdgen }}
&NODESIZE_ALL;
- &PRDGEN_TN;_f#fhr#
+ &RUN;_&PRDGEN_TN;_&envir;_@H_f#fhr#
&LOGDIR;/&PRDGEN_TN;_f#fhr#_@Y@m@d@H.log
GLOBAL_VAR_DEFNS_FP&GLOBAL_VAR_DEFNS_FP;
+ taskid&RUN;_&POST_TN;_&envir;_@H_f#fhr#
PDY@Y@m@d
CDATE@Y@m@d@H
HOMErrfs&HOMErrfs;