Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add taskid and run deterministic and EnKF DA cycles. #524

Merged
merged 1 commit into from
Oct 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion jobs/JRRFS_BLEND_ICS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question for you and @BenjaminBlake-NOAA

Since jobid is intended to be passed in from the "job card" - ecflow job in production, should we define it more like this?

export jobid=${jobid:-${taskid}}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MatthewPyle-NOAA I agree that definition of $jobid is probably best, since we will replace $taskid with $job.$PBS_JOBID eventually.

Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ on the RRFS initial conditions.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")
export jobid=${RUN}_make_ics_${mem_num}_${envir}_${cyc}
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/ics"

export DATA=${DATAROOT}/${jobid}
Expand Down
23 changes: 2 additions & 21 deletions jobs/JRRFS_PREP_CYC
Original file line number Diff line number Diff line change
Expand Up @@ -62,32 +62,13 @@ This is the J-job script for the prep_cyc tasks for 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}
#export ctrlpath=""
if [ "${CYCLE_TYPE}" = "spinup" ]; then
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then # EnKF has spinup forecasts
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_spinup_${mem_num}_${envir}_${cyc}/INPUT
if [ "${DO_ENSINIT}" = "TRUE" ] && [ "${CYCLE_SUBTYPE}" = "ensinit" ]; then
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_ensinit_${mem_num}_${envir}_${cyc}/INPUT
fi
# if [ "${DO_ENSINIT}" = "TRUE" ] && [ "${CYCLE_SUBTYPE}" = "spinup" ]; then
# ctrlpath=${ENSCTRL_DATAROOT}
# fi
else
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}/INPUT
# ctrlpath=${ENSCTRL_DATAROOT}
fi
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_${mem_num}_${envir}_${cyc}/INPUT
else
export INPUT_DATA=${DATAROOT}/${RUN}_forecast_${envir}_${cyc}/INPUT
fi
fi
export INPUT_DATA=${DATAROOT}/${taskid}/INPUT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we expect taskid here to be jobid, right?

Copy link
Contributor

@BenjaminBlake-NOAA BenjaminBlake-NOAA Oct 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes it should be $jobid. I can plan to fix that with my upcoming PR where jobid=${jobid:-taskid}


mkdir -p ${INPUT_DATA}
cd ${INPUT_DATA}
Expand Down
11 changes: 6 additions & 5 deletions jobs/JRRFS_SAVE_RESTART
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ This is the J-job script for the task that saves restart files to nwges.

export pid=${pid:-$$}
export RUN=${RUN:-rrfs}
export jobid=${taskid}

export mem_num=m$(echo "${ENSMEM_INDX}")

Expand All @@ -66,22 +67,22 @@ export CYCLE_SUBTYPE=${CYCLE_SUBTYPE:-empty}
export SURFACE_DIR=${SURFACE_DIR:-empty}
if [ "${CYCLE_TYPE}" = "spinup" ]; then
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then # EnKF has spinup forecasts
export DATA="${DATAROOT}/${RUN}_forecast_spinup_${mem_num}_${envir}_${cyc}"
export DATA="${DATAROOT}/${jobid}"
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/forecast_spinup"
if [ "${CYCLE_SUBTYPE}" = "ensinit" ]; then
export DATA="${DATAROOT}/${RUN}_forecast_ensinit_${mem_num}_${envir}_${cyc}"
export DATA="${DATAROOT}/${jobid}"
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/forecast_ensinit"
fi
else
export DATA="${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}"
export DATA="${DATAROOT}/${jobid}"
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/forecast_spinup"
fi
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
export DATA="${DATAROOT}/${RUN}_forecast_${mem_num}_${envir}_${cyc}"
export DATA="${DATAROOT}/${jobid}"
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/${mem_num}/forecast"
else
export DATA="${DATAROOT}/${RUN}_forecast_${envir}_${cyc}"
export DATA="${DATAROOT}/${jobid}"
export NWGES_DIR="${GESROOT}/${RUN}.${PDY}/${cyc}/forecast"
fi
fi
Expand Down
45 changes: 34 additions & 11 deletions parm/FV3LAM_wflow.xml

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions scripts/exrrfs_analysis_enkf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,10 @@ for imem in $(seq 1 $nens) ensmean; do
memcharv0="mem"$( printf "%03d" $imem )
fi
if [ "${CYCLE_TYPE}" = "spinup" ]; then
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${memchar}_${envir}_${cyc}/INPUT
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${envir}_${memchar}_${cyc}/INPUT
observer_nwges_dir="${GESROOT}/${RUN}.${PDY}/${cyc}_spinup/${memchar}/observer_gsi_spinup"
else
bkpath=${DATAROOT}/${RUN}_forecast_${memchar}_${envir}_${cyc}/INPUT
bkpath=${DATAROOT}/${RUN}_forecast_prod_${envir}_${memchar}_${cyc}/INPUT
observer_nwges_dir="${GESROOT}/${RUN}.${PDY}/${cyc}/${memchar}/observer_gsi"
fi
if [ "${imem}" = "ensmean" ]; then
Expand Down
6 changes: 3 additions & 3 deletions scripts/exrrfs_analysis_gsi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if [ "${CYCLE_TYPE}" = "spinup" ]; then
bkpath=${DATAROOT}/${RUN}_calc_ensmean_spinup_${envir}_${cyc}
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${mem_num}_${envir}_${cyc}/INPUT
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${envir}_${mem_num}_${cyc}/INPUT
else
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${envir}_${cyc}/INPUT
fi
Expand All @@ -138,9 +138,9 @@ else
bkpath=${DATAROOT}/${RUN}_calc_ensmean_${envir}_${cyc}
else
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
bkpath=${DATAROOT}/${RUN}_forecast_${mem_num}_${envir}_${cyc}/INPUT
bkpath=${DATAROOT}/${RUN}_forecast_prod_${envir}_${mem_num}_${cyc}/INPUT
else
bkpath=${DATAROOT}/${RUN}_forecast_${envir}_${cyc}/INPUT
bkpath=${DATAROOT}/${RUN}_forecast_prod_${envir}_${cyc}/INPUT
fi
fi
fi
Expand Down
4 changes: 2 additions & 2 deletions scripts/exrrfs_calc_ensmean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -121,9 +121,9 @@ for imem in $(seq 1 $nens)
memberstring=$( printf "%03d" $imem )

if [ "${CYCLE_TYPE}" = "spinup" ]; then
bkpath=${DATAROOT}/${RUN}_forecast_spinup_m${ensmem}_${envir}_${cyc}/INPUT # cycling, use background from RESTART
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${envir}_m${ensmem}_${cyc}/INPUT # cycling, use background from RESTART
else
bkpath=${DATAROOT}/${RUN}_forecast_m${ensmem}_${envir}_${cyc}/INPUT # cycling, use background from RESTART
bkpath=${DATAROOT}/${RUN}_forecast_prod_${envir}_m${ensmem}_${cyc}/INPUT # cycling, use background from RESTART
fi

dynvarfile=${bkpath}/fv_core.res.tile1.nc
Expand Down
3 changes: 3 additions & 0 deletions scripts/exrrfs_make_ics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -412,6 +412,9 @@ fi
#-----------------------------------------------------------------------
#
thomp_mp_climo_file=""
if [ "${SDF_USES_THOMPSON_MP}" = "TRUE" ]; then
thomp_mp_climo_file="${THOMPSON_MP_CLIMO_FP}"
fi
#
#-----------------------------------------------------------------------
#
Expand Down
3 changes: 3 additions & 0 deletions scripts/exrrfs_make_lbcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -436,6 +436,9 @@ tracers="\"\""
#-----------------------------------------------------------------------
#
thomp_mp_climo_file=""
if [ "${SDF_USES_THOMPSON_MP}" = "TRUE" ]; then
thomp_mp_climo_file="${THOMPSON_MP_CLIMO_FP}"
fi
#
#-----------------------------------------------------------------------
#
Expand Down
4 changes: 2 additions & 2 deletions scripts/exrrfs_recenter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,9 @@ for imem in $(seq 1 $nens)
memberstring=$( printf "%03d" $imem )

if [ "${CYCLE_TYPE}" = "spinup" ]; then
bkpath=${DATAROOT}/${RUN}_forecast_spinup_m${ensmem}_${envir}_${cyc}/INPUT # cycling, use background from RESTART
bkpath=${DATAROOT}/${RUN}_forecast_spinup_${envir}_m${ensmem}_${cyc}/INPUT # cycling, use background from RESTART
else
bkpath=${DATAROOT}/${RUN}_forecast_m${ensmem}_${envir}_${cyc}/INPUT # cycling, use background from RESTART
bkpath=${DATAROOT}/${RUN}_forecast_${envir}_m${ensmem}_${cyc}/INPUT # cycling, use background from RESTART
fi

dynvarfile=${bkpath}/fv_core.res.tile1.nc
Expand Down
2 changes: 1 addition & 1 deletion scripts/exrrfs_update_lbc_soil.sh
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ if [ "${MEM_TYPE}" = "MEAN" ]; then
bkpath=${DATAROOT}/${RUN}_calc_ensmean${cycle_tag}_${envir}_${cyc}/INPUT
else
if [ ${DO_ENSEMBLE} = "TRUE" ]; then
bkpath=${DATAROOT}/${RUN}_forecast${cycle_tag}_${mem_num}_${envir}_${cyc}/INPUT
bkpath=${DATAROOT}/${RUN}_forecast${cycle_tag}_${envir}_${mem_num}_${cyc}/INPUT
else
bkpath=${DATAROOT}/${RUN}_forecast${cycle_tag}_${envir}_${cyc}/INPUT
fi
Expand Down
Loading