forked from NOAA-EMC/global-workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Fit2Obs to stand-alone job (NOAA-EMC#1456)
This PR moves the Fit2Obs invocation out of the vrfy job and into its own dedicated `fit2obs` job in the gdas suite. This new dedicated job uses the latest Fit2Obs tag `wflow.1.0`. The Fit2Obs requires a type of spin-up. The job looks back `VBACKUP_FITS` hrs and needs available inputs for that lookback cycle in the `ROTDIR`. The `jobs/JGDAS_FIT2OBS` script will first check that `xdate` (`CDATE` - `VBACKUP_FITS`) > `SDATE` and then if met, will check that the needed inputs exist. - If `xdate>SDATE` is not yet satisfied, the job will exit 0 with "Too early for FIT2OBS to run. Exiting.". The conditional is greater-than and not greater-than-or-equal since the first half cycle generally does not have some of the needed inputs (e.g. prepbufr). Thus the first half cycle is not included in the valid lookback cycles. This avoids erroneous job failures for the first cycle to run the Fit2Obs package. Additional logic could be introduced to include the half cycle if all available inputs are available. - If any of the needed inputs are missing the job will abort with "FATAL ERROR: FILE MISSING: ${file}". This spin-up means that the first cycles will run the job but exit 0 immediately. The 6th cycle (if `VBACKUP_FITS=24`) will be the first cycle to run the Fit2Obs package and produce output in the online archive. Changes: 1. Remove fit2obs variables and settings from `config.vrfy` and into newly created `config.fit2obs` for `fit2obs` job. 2. Remove fit2obs submission/invocation from `jobs/rocoto/vrfy.sh`. 3. Create new `fit2obs` job scripts: `jobs/rocoto/fit2obs.sh` and `jobs/JGDAS_FIT2OBS` 4. Add new `fit2obs` job to setup scripts: `workflow/applications.py` and `workflow/rocoto/workflow_tasks.py` 5. Add new `fit2obs` job to all env files. 6. Add new `fit2obs` job into `config.resources` (use 1 node on WCOSS2 and 3 nodes elsewhere). 7. Add `export DO_FIT2OBS="YES"` to `config.base.emc.dyn`. Resolves NOAA-EMC#1405 Resolves NOAA-EMC#1232
- Loading branch information
1 parent
363a2b4
commit e496e39
Showing
14 changed files
with
218 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
source "${HOMEgfs}/ush/jjob_header.sh" -e "fit2obs" -c "base fit2obs" | ||
|
||
|
||
############################################## | ||
# Set variables used in the script | ||
############################################## | ||
|
||
export CDUMP=${RUN/enkf} | ||
|
||
# Ignore spelling warning; nothing is misspelled | ||
# shellcheck disable=SC2153 | ||
CDATE=$(${NDATE} -"${VBACKUP_FITS}" "${PDY}${cyc}") # set CDATE to lookback cycle for use in fit2obs package | ||
export CDATE | ||
vday=${CDATE:0:8} | ||
vcyc=${CDATE:8:2} | ||
|
||
export COM_INA=${ROTDIR}/gdas.${vday}/${vcyc}/atmos | ||
# We want to defer variable expansion, so ignore warning about single quotes | ||
# shellcheck disable=SC2016 | ||
export COM_INF='$ROTDIR/vrfyarch/gfs.$fdy/$fzz' | ||
export COM_PRP=${ROTDIR}/gdas.${vday}/${vcyc}/obs | ||
|
||
export PRPI=${COM_PRP}/${RUN}.t${vcyc}z.prepbufr | ||
export sig1=${COM_INA}/${RUN}.t${vcyc}z.atmanl.nc | ||
export sfc1=${COM_INA}/${RUN}.t${vcyc}z.atmanl.nc | ||
export CNVS=${COM_INA}/${RUN}.t${vcyc}z.cnvstat | ||
|
||
export OUTPUT_FILETYPE=${OUTPUT_FILETYPE:-netcdf} | ||
|
||
export FIT_DIR=${ARCDIR}/fits | ||
[[ ! -d "${FIT_DIR}" ]] && mkdir -p "${FIT_DIR}" | ||
export HORZ_DIR=${ARCDIR}/horiz | ||
[[ ! -d "${HORZ_DIR}" ]] && mkdir -p "${HORZ_DIR}" | ||
export COMLOX=${DATA}/fitx | ||
[[ ! -d "${COMLOX}" ]] && mkdir -p "${COMLOX}" | ||
|
||
echo "echo err_chk">"${DATA}"/err_chk; chmod 755 "${DATA}"/err_chk | ||
echo "echo postmsg">"${DATA}"/postmsg; chmod 755 "${DATA}"/postmsg | ||
|
||
############################################## | ||
# Check spinup and available inputs | ||
############################################## | ||
|
||
# Ignore spelling warning; nothing is misspelled | ||
# shellcheck disable=SC2153 | ||
if [[ ${CDATE} -gt ${SDATE} ]]; then | ||
for file in ${PRPI} ${sig1} ${sfc1} ${CNVS}; do | ||
if [[ ! -f "${file}" ]]; then | ||
echo "FATAL ERROR: FILE MISSING: ${file}" | ||
exit 1 | ||
fi | ||
done | ||
|
||
############################################## | ||
# RUN FIT2OBS VERIFICATION | ||
############################################## | ||
|
||
"${fitdir}/batrun/excfs_gdas_vrfyfits.sh.ecf" | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
|
||
############################################## | ||
# End JOB SPECIFIC work | ||
############################################## | ||
|
||
############################################## | ||
# Final processing | ||
############################################## | ||
if [[ -e "${pgmout}" ]] ; then | ||
cat "${pgmout}" | ||
fi | ||
|
||
else | ||
|
||
echo "Too early for FIT2OBS to run. Exiting." | ||
|
||
fi | ||
|
||
########################################## | ||
# Remove the Temporary working directory | ||
########################################## | ||
cd "${DATAROOT}" || (echo "FATAL ERROR: ${DATAROOT} does not exist. ABORT!"; exit 1) | ||
[[ ${KEEPDATA} = "NO" ]] && rm -rf "${DATA}" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#! /usr/bin/env bash | ||
|
||
source "${HOMEgfs}/ush/preamble.sh" | ||
|
||
############################################################### | ||
echo | ||
echo "=============== START TO SOURCE FV3GFS WORKFLOW MODULES ===============" | ||
. "${HOMEgfs}/ush/load_fv3gfs_modules.sh" | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
|
||
export job="fit2obs" | ||
export jobid="${job}.$$" | ||
|
||
############################################################### | ||
echo | ||
echo "=============== START TO RUN FIT2OBS ===============" | ||
# Execute the JJOB | ||
"${HOMEgfs}/jobs/JGDAS_FIT2OBS" | ||
status=$? | ||
[[ ${status} -ne 0 ]] && exit "${status}" | ||
|
||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
#! /usr/bin/env bash | ||
|
||
########## config.fit2obs ########## | ||
# Fit to Observations | ||
|
||
echo "BEGIN: config.fit2obs" | ||
|
||
# Get task specific resources | ||
. "${EXPDIR}/config.resources" fit2obs | ||
|
||
export fit_ver="wflow.1.0" | ||
export fitdir="${BASE_GIT}/Fit2Obs/${fit_ver}" | ||
|
||
export HOMEcfs=${fitdir} | ||
export EXECcfs=${HOMEcfs}/exec | ||
export USHcfs=${HOMEcfs}/ush | ||
|
||
export PRVT=${HOMEgfs}/fix/gsi/prepobs_errtable.global | ||
export HYBLEVS=${HOMEgfs}/fix/am/global_hyblev.l${LEVS}.txt | ||
|
||
export VBACKUP_FITS=24 | ||
export OUTPUT_FILETYPE="netcdf" | ||
export CONVNETC="YES" | ||
export ACPROFit="YES" | ||
|
||
if [[ ${netcdf_diag:-".false."} = ".true." ]]; then | ||
export CONVNETC="YES" | ||
fi | ||
|
||
echo "END: config.fit2obs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters