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

Update fit2obs for COM refactor #1719

Merged
merged 8 commits into from
Jul 14, 2023
Merged
12 changes: 8 additions & 4 deletions jobs/JGDAS_FIT2OBS
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,15 @@ export CDATE
vday=${CDATE:0:8}
vcyc=${CDATE:8:2}

export COM_INA=${ROTDIR}/gdas.${vday}/${vcyc}/atmos
YMD=${vday} HH=${vcyc} generate_com -rx COM_ATMOS_ANALYSIS_VERIF:COM_ATMOS_ANALYSIS_TMPL
Copy link
Contributor

Choose a reason for hiding this comment

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

Is COM_ATMOS_ANALYSIS_VERIF used in the fit2obs scripts? Or is it being used to set COM_INA on line 24?
Same with COM_OBS_VERIF

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just to set COM_INA and COM_PRP below. We can cut out the middle man if you want, but I believe I followed this same pattern in other j-jobs that had to set variables for external packages.

Copy link
Contributor

Choose a reason for hiding this comment

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

Just to set COM_INA and COM_PRP below. We can cut out the middle man if you want, but I believe I followed this same pattern in other j-jobs that had to set variables for external packages.

Then we should atleast eliminate -x.
I would rather directly set COM_INA and COM_PRP and cut out the middle man. There is no reason to call 2 things with the same name.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

RUN=${CDUMP} YMD=${vday} HH=${vcyc} generate_com -rx COM_OBS_VERIF:COM_OBS_TMPL

# These are used by fit2obs, so we can't change them to the standard COM variable names
export COM_INA=${COM_ATMOS_ANALYSIS_VERIF}
# 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 COM_PRP=${COM_OBS_VERIF}

export PRPI=${COM_PRP}/${RUN}.t${vcyc}z.prepbufr
export sig1=${COM_INA}/${RUN}.t${vcyc}z.atmanl.nc
Expand All @@ -37,8 +41,8 @@ export HORZ_DIR=${ARCDIR}/horiz
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
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
Expand Down
2 changes: 1 addition & 1 deletion parm/config/gfs/config.base.emc.dyn
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ export binary_diag=".false."

# Verification options
export DO_METP="YES" # Run METPLUS jobs - set METPLUS settings in config.metp
export DO_FIT2OBS="NO" # Run fit to observations package
export DO_FIT2OBS="YES" # Run fit to observations package

# Archiving options
export HPSSARCH="@HPSSARCH@" # save data to HPSS archive
Expand Down
4 changes: 2 additions & 2 deletions scripts/exglobal_archive.sh
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ if [[ "${RUN}" == "gfs" ]] && [[ "${FITSARC}" = "YES" ]]; then
fhr=0
while [[ ${fhr} -le ${fhmax} ]]; do
fhr3=$(printf %03i "${fhr}")
sfcfile="${COM_ATMOS_MASTER}/${prefix}.sfcf${fhr3}.nc"
sigfile="${COM_ATMOS_MASTER}/${prefix}.atmf${fhr3}.nc"
sfcfile="${COM_ATMOS_HISTORY}/${prefix}.sfcf${fhr3}.nc"
sigfile="${COM_ATMOS_HISTORY}/${prefix}.atmf${fhr3}.nc"
nb_copy "${sfcfile}" "${VFYARC}/${RUN}.${PDY}/${cyc}/"
nb_copy "${sigfile}" "${VFYARC}/${RUN}.${PDY}/${cyc}/"
(( fhr = 10#${fhr} + 6 ))
Expand Down