diff --git a/jobs/rocoto/vrfy.sh b/jobs/rocoto/vrfy.sh index dd3f8efdf6..3c3040a861 100755 --- a/jobs/rocoto/vrfy.sh +++ b/jobs/rocoto/vrfy.sh @@ -17,12 +17,14 @@ source "${HOMEgfs}/ush/jjob_header.sh" -e "vrfy" -c "base vrfy" ############################################################### export COMPONENT="atmos" -export CDATEm1=$(${NDATE} -24 ${CDATE}) -export PDYm1=$(echo ${CDATEm1} | cut -c1-8) +CDATEm1=$(${NDATE} -24 "${CDATE}") +export CDATEm1 +PDYm1=$(echo "${CDATEm1}" | cut -c1-8) +export PDYm1 -CDATEm1c=$(${NDATE} -06 ${CDATE}) -PDYm1c=$(echo ${CDATEm1c} | cut -c1-8) -pcyc=$(echo ${CDATEm1c} | cut -c9-10) +CDATEm1c=$(${NDATE} -06 "${CDATE}") +PDYm1c=$(echo "${CDATEm1c}" | cut -c1-8) +pcyc=$(echo "${CDATEm1c}" | cut -c9-10) export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" @@ -30,20 +32,21 @@ export COMIN="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" ############################################################### echo echo "=============== START TO GENERATE QUARTER DEGREE GRIB1 FILES ===============" -if [ ${MKPGB4PRCP} = "YES" -a ${CDUMP} = "gfs" ]; then - if [ ! -d ${ARCDIR} ]; then mkdir -p ${ARCDIR} ; fi +if [[ ${MKPGB4PRCP} = "YES" && ${CDUMP} = "gfs" ]]; then + if [[ ! -d "${ARCDIR}" ]]; then mkdir -p "${ARCDIR}" ; fi nthreads_env=${OMP_NUM_THREADS:-1} # get threads set in env export OMP_NUM_THREADS=1 - cd ${COMIN} + set -e + cd "${COMIN}" fhmax=${vhr_rain:-${FHMAX_GFS}} fhr=0 - while [ ${fhr} -le ${fhmax} ]; do - fhr2=$(printf %02i ${fhr}) - fhr3=$(printf %03i ${fhr}) + while [[ ${fhr} -le ${fhmax} ]]; do + fhr2=$(printf %02i "${fhr}") + fhr3=$(printf %03i "${fhr}") fname=${CDUMP}.t${cyc}z.sfluxgrbf${fhr3}.grib2 fileout=${ARCDIR}/pgbq${fhr2}.${CDUMP}.${CDATE}.grib2 - ${WGRIB2} ${fname} -match "(:PRATE:surface:)|(:TMP:2 m above ground:)" -grib ${fileout} - (( fhr = ${fhr} + 6 )) + ${WGRIB2} "${fname}" -match "(:PRATE:surface:)|(:TMP:2 m above ground:)" -grib "${fileout}" + (( fhr = fhr + 6 )) done export OMP_NUM_THREADS=${nthreads_env} # revert to threads set in env fi @@ -52,32 +55,34 @@ fi ############################################################### echo echo "=============== START TO RUN MOS ===============" -if [ ${RUNMOS} = "YES" -a ${CDUMP} = "gfs" ]; then - ${RUNGFSMOSSH} ${PDY}${cyc} +if [[ ${RUNMOS} = "YES" && ${CDUMP} = "gfs" ]]; then + ${RUNGFSMOSSH} "${PDY}${cyc}" fi ############################################################### echo echo "=============== START TO RUN FIT2OBS VERIFICATION ===============" -if [ ${VRFYFITS} = "YES" -a ${CDUMP} = ${CDFNL} -a ${CDATE} != ${SDATE} ]; then +if [[ ${VRFYFITS} = "YES" && ${CDUMP} = "${CDFNL}" && ${CDATE} != "${SDATE}" ]]; then export CDUMPFCST=${VDUMP} export TMPDIR="${RUNDIR}/${CDATE}/${CDUMP}" - [[ ! -d ${TMPDIR} ]] && mkdir -p ${TMPDIR} + [[ ! -d ${TMPDIR} ]] && mkdir -p "${TMPDIR}" - xdate=$(${NDATE} -${VBACKUP_FITS} ${CDATE}) + xdate=$(${NDATE} -"${VBACKUP_FITS} ${CDATE}") - export vday=$(echo ${xdate} | cut -c1-8) - export vcyc=$(echo ${xdate} | cut -c9-10) + vday=$(echo "${xdate}" | cut -c1-8) + export vday + vcyc=$(echo "${xdate}" | cut -c9-10) + export vcyc export COMDAY=${ROTDIR}/logs/${xdate} export COM_INA=${ROTDIR}/gdas.${vday}/${vcyc}/atmos - export COM_INF='$ROTDIR/vrfyarch/gfs.$fdy/$fzz' - export COM_PRP='$ROTDIR/gdas.$pdy/$cyc/obs' + export COM_INF="${ROTDIR}/vrfyarch/gfs.${fdy}/${fzz}" + export COM_PRP="${ROTDIR}/gdas.${pdy}/${cyc}/obs" export OUTPUT_FILETYPE_SAVE=${OUTPUT_FILETYPE} - ${PREPQFITSH} ${PSLOT} ${xdate} ${ROTDIR} ${ARCDIR} ${TMPDIR} + ${PREPQFITSH} "${PSLOT} ${xdate} ${ROTDIR} ${ARCDIR} ${TMPDIR}" export OUTPUT_FILETYPE=${OUTPUT_FILETYPE_SAVE} @@ -87,7 +92,7 @@ fi ############################################################### echo echo "=============== START TO RUN RADMON DATA EXTRACTION ===============" -if [ ${VRFYRAD} = "YES" -a "${CDUMP}" = "${CDFNL}" -a "${CDATE}" != "${SDATE}" ]; then +if [[ ${VRFYRAD} = "YES" && ${CDUMP} = "${CDFNL}" && ${CDATE} != "${SDATE}" ]]; then export EXP=${PSLOT} export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" @@ -103,7 +108,7 @@ fi ############################################################### echo echo "=============== START TO RUN OZMON DATA EXTRACTION ===============" -if [ "${VRFYOZN}" = "YES" -a "${CDUMP}" = "${CDFNL}" -a "${CDATE}" != "${SDATE}" ]; then +if [[ ${VRFYOZN} = "YES" && ${CDUMP} = "${CDFNL}" && ${CDATE} != "${SDATE}" ]]; then export EXP=${PSLOT} export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" @@ -119,7 +124,7 @@ fi ############################################################### echo echo "=============== START TO RUN MINMON ===============" -if [ "${VRFYMINMON}" = "YES" -a "${CDATE}" != "${SDATE}" ]; then +if [[ ${VRFYMINMON} = "YES" && ${CDATE} != "${SDATE}" ]]; then export COMOUT="${ROTDIR}/${CDUMP}.${PDY}/${cyc}/${COMPONENT}" export M_TANKverfM0="${M_TANKverf}/stats/${PSLOT}/${CDUMP}.${PDY}/${cyc}" @@ -134,9 +139,10 @@ fi ################################################################################ echo echo "=============== START TO RUN CYCLONE TRACK VERIFICATION ===============" -if [ ${VRFYTRAK} = "YES" ]; then +if [[ ${VRFYTRAK} = "YES" ]]; then - export COMINsyn=${COMINsyn:-$(compath.py ${envir}/com/gfs/${gfs_ver})/syndat} + COMINsyn=${COMINsyn:-$(compath.py "${envir}/com/gfs/${gfs_ver}")/syndat} + export COMINsyn ${TRACKERSH} fi @@ -145,7 +151,7 @@ fi ################################################################################ echo echo "=============== START TO RUN CYCLONE GENESIS VERIFICATION ===============" -if [ ${VRFYGENESIS} = "YES" -a "${CDUMP}" = "gfs" ]; then +if [[ ${VRFYGENESIS} = "YES" && "${CDUMP}" = "gfs" ]]; then ${GENESISSH} fi @@ -153,15 +159,15 @@ fi ################################################################################ echo echo "=============== START TO RUN CYCLONE GENESIS VERIFICATION (FSU) ===============" -if [ ${VRFYFSU} = "YES" -a "${CDUMP}" = "gfs" ]; then +if [[ ${VRFYFSU} = "YES" && "${CDUMP}" = "gfs" ]]; then ${GENESISFSU} fi ############################################################### # Force Exit out cleanly -cd ${DATAROOT} -if [ ${KEEPDATA:-"NO"} = "NO" ] ; then rm -rf ${DATA} ; fi +cd "${DATAROOT}" +if [[ ${KEEPDATA:-"NO"} = "NO" ]] ; then rm -rf "${DATA}" ; fi exit 0 diff --git a/parm/config/config.metp b/parm/config/config.metp index d432a52937..8fb55f275f 100644 --- a/parm/config/config.metp +++ b/parm/config/config.metp @@ -6,17 +6,11 @@ echo "BEGIN: config.metp" # Get task specific resources -. $EXPDIR/config.resources metp +. "${EXPDIR}"/config.resources metp -if [[ $machine == "JET" ]]; then - export RUN_GRID2GRID_STEP1="NO" - export RUN_GRID2OBS_STEP1="NO" - export RUN_PRECIP_STEP1="NO" -else - export RUN_GRID2GRID_STEP1="YES" # Run grid-to-grid verification using METplus - export RUN_GRID2OBS_STEP1="YES" # Run grid-to-obs verification using METplus - export RUN_PRECIP_STEP1="YES" # Run precip verification using METplus -fi +export RUN_GRID2GRID_STEP1="YES" # Run grid-to-grid verification using METplus +export RUN_GRID2OBS_STEP1="YES" # Run grid-to-obs verification using METplus +export RUN_PRECIP_STEP1="YES" # Run precip verification using METplus #---------------------------------------------------------- @@ -24,15 +18,15 @@ fi #---------------------------------------------------------- ## EMC_VERIF_GLOBAL SETTINGS export HOMEverif_global=${HOMEgfs}/sorc/verif-global.fd -export VERIF_GLOBALSH=$HOMEverif_global/ush/run_verif_global_in_global_workflow.sh +export VERIF_GLOBALSH=${HOMEverif_global}/ush/run_verif_global_in_global_workflow.sh ## INPUT DATA SETTINGS -export model=$PSLOT +export model=${PSLOT} export model_file_format="pgbf{lead?fmt=%2H}.${CDUMP}.{init?fmt=%Y%m%d%H}.grib2" -export model_hpss_dir=$ATARDIR/.. +export model_hpss_dir=${ATARDIR}/.. export get_data_from_hpss="NO" export hpss_walltime="10" ## OUTPUT SETTINGS -export model_stat_dir=$ARCDIR/.. +export model_stat_dir=${ARCDIR}/.. export make_met_data_by="VALID" export SENDMETVIEWER="NO" ## DATE SETTINGS @@ -45,20 +39,20 @@ export log_MET_output_to_METplus="yes" export g2g1_type_list="anom pres sfc" export g2g1_anom_truth_name="self_anl" export g2g1_anom_truth_file_format="pgbanl.${CDUMP}.{valid?fmt=%Y%m%d%H}.grib2" -export g2g1_anom_fhr_min=$FHMIN_GFS -export g2g1_anom_fhr_max=$FHMAX_GFS +export g2g1_anom_fhr_min=${FHMIN_GFS} +export g2g1_anom_fhr_max=${FHMAX_GFS} export g2g1_anom_grid="G002" export g2g1_anom_gather_by="VSDB" export g2g1_pres_truth_name="self_anl" export g2g1_pres_truth_file_format="pgbanl.${CDUMP}.{valid?fmt=%Y%m%d%H}.grib2" -export g2g1_pres_fhr_min=$FHMIN_GFS -export g2g1_pres_fhr_max=$FHMAX_GFS +export g2g1_pres_fhr_min=${FHMIN_GFS} +export g2g1_pres_fhr_max=${FHMAX_GFS} export g2g1_pres_grid="G002" export g2g1_pres_gather_by="VSDB" export g2g1_sfc_truth_name="self_f00" export g2g1_sfc_truth_file_format="pgbf00.${CDUMP}.{valid?fmt=%Y%m%d%H}.grib2" -export g2g1_sfc_fhr_min=$FHMIN_GFS -export g2g1_sfc_fhr_max=$FHMAX_GFS +export g2g1_sfc_fhr_min=${FHMIN_GFS} +export g2g1_sfc_fhr_max=${FHMAX_GFS} export g2g1_sfc_grid="G002" export g2g1_sfc_gather_by="VSDB" export g2g1_mv_database_name="mv_${PSLOT}_grid2grid_metplus" @@ -68,19 +62,19 @@ export g2g1_mv_database_desc="Grid-to-grid METplus data for global workflow expe export g2o1_type_list="upper_air conus_sfc" export g2o1_upper_air_msg_type_list="ADPUPA" export g2o1_upper_air_vhr_list="00 06 12 18" -export g2o1_upper_air_fhr_min=$FHMIN_GFS +export g2o1_upper_air_fhr_min=${FHMIN_GFS} export g2o1_upper_air_fhr_max="240" export g2o1_upper_air_grid="G003" export g2o1_upper_air_gather_by="VSDB" export g2o1_conus_sfc_msg_type_list="ONLYSF ADPUPA" export g2o1_conus_sfc_vhr_list="00 03 06 09 12 15 18 21" -export g2o1_conus_sfc_fhr_min=$FHMIN_GFS +export g2o1_conus_sfc_fhr_min=${FHMIN_GFS} export g2o1_conus_sfc_fhr_max="240" export g2o1_conus_sfc_grid="G104" export g2o1_conus_sfc_gather_by="VSDB" export g2o1_polar_sfc_msg_type_list="IABP" export g2o1_polar_sfc_vhr_list="00 03 06 09 12 15 18 21" -export g2o1_polar_sfc_fhr_min=$FHMIN_GFS +export g2o1_polar_sfc_fhr_min=${FHMIN_GFS} export g2o1_polar_sfc_fhr_max="240" export g2o1_polar_sfc_grid="G219" export g2o1_polar_sfc_gather_by="VSDB" @@ -93,7 +87,7 @@ export precip1_type_list="ccpa_accum24hr" export precip1_ccpa_accum24hr_model_bucket="06" export precip1_ccpa_accum24hr_model_var="APCP" export precip1_ccpa_accum24hr_model_file_format="pgbf{lead?fmt=%2H}.${CDUMP}.{init?fmt=%Y%m%d%H}.grib2" -export precip1_ccpa_accum24hr_fhr_min="$FHMIN_GFS" +export precip1_ccpa_accum24hr_fhr_min=${FHMIN_GFS} export precip1_ccpa_accum24hr_fhr_max="180" export precip1_ccpa_accum24hr_grid="G211" export precip1_ccpa_accum24hr_gather_by="VSDB" diff --git a/parm/config/config.vrfy b/parm/config/config.vrfy index f650ec2573..8a921554e3 100644 --- a/parm/config/config.vrfy +++ b/parm/config/config.vrfy @@ -6,18 +6,14 @@ echo "BEGIN: config.vrfy" # Get task specific resources -. $EXPDIR/config.resources vrfy +. "${EXPDIR}/config.resources vrfy" export VDUMP="gfs" # Verifying dump export CDUMPFCST="gdas" # Fit-to-obs with GDAS/GFS prepbufr export CDFNL="gdas" # Scores verification against GDAS/GFS analysis export MKPGB4PRCP="YES" # Make 0.25-deg pgb files in ARCDIR for precip verification -if [[ $machine == "JET" ]]; then - export VRFYFITS="NO" # Fit to observations -else - export VRFYFITS="YES" # Fit to observations -fi +export VRFYFITS="YES" # Fit to observations export VRFYRAD="YES" # Radiance data assimilation monitoring export VRFYOZN="YES" # Ozone data assimilation monitoring export VRFYMINMON="YES" # GSI minimization monitoring @@ -30,7 +26,7 @@ export RUNMOS="NO" # whether to run entire MOS package # Fit to Observations #------------------------------------------------- -if [ $VRFYFITS = "YES" ]; then +if [[ ${VRFYFITS} = "YES" ]]; then export fit_ver="newm.1.7" export fitdir="${BASE_GIT}/verif/global/Fit2Obs/${fit_ver}/batrun" @@ -43,20 +39,20 @@ if [ $VRFYFITS = "YES" ]; then export CONVNETC="YES" export ACPROFit="YES" - if [ ${netcdf_diag:-".false."} = ".true." ]; then + if [[ ${netcdf_diag:-".false."} = ".true." ]]; then export CONVNETC="YES" fi - if [ $machine = "WCOSS2" ]; then - export PREPQFITSH="$fitdir/subfits_wcoss2" - elif [ $machine = "HERA" ]; then - export PREPQFITSH="$fitdir/subfits_hera" - elif [ $machine = "ORION" ]; then - export PREPQFITSH="$fitdir/subfits_orion" - elif [ $machine = "S4" ]; then - export PREPQFITSH="$fitdir/subfits_s4_slurm" - elif [ $machine = "JET" ]; then - export PREPQFITSH="$fitdir/subfits_jet" + if [[ ${machine} = "WCOSS2" ]]; then + export PREPQFITSH="${fitdir}/subfits_wcoss2" + elif [[ ${machine} = "HERA" ]]; then + export PREPQFITSH="${fitdir}/subfits_hera" + elif [[ ${machine} = "ORION" ]]; then + export PREPQFITSH="${fitdir}/subfits_orion" + elif [[ ${machine} = "S4" ]]; then + export PREPQFITSH="${fitdir}/subfits_s4_slurm" + elif [[ ${machine} = "JET" ]]; then + export PREPQFITSH="${fitdir}/subfits_jet" else echo "Fit2Obs NOT supported on this machine" fi @@ -67,40 +63,40 @@ fi # Minimization, Radiance and Ozone Monitoring #---------------------------------------------------------- -if [ $VRFYRAD = "YES" -o $VRFYMINMON = "YES" -o $VRFYOZN = "YES" ]; then +if [[ ${VRFYRAD} = "YES" || ${VRFYMINMON} = "YES" || ${VRFYOZN} = "YES" ]]; then export envir="para" - export COM_IN=$ROTDIR + export COM_IN=${ROTDIR} # Radiance Monitoring - if [[ "$VRFYRAD" == "YES" && "$CDUMP" == "$CDFNL" ]] ; then + if [[ "${VRFYRAD}" == "YES" && "${RUN}" == "${CDFNL}" ]] ; then - export RADMON_SUFFIX=$PSLOT - export TANKverf="$NOSCRUB/monitor/radmon" - export VRFYRADSH="$HOMEgfs/jobs/JGDAS_ATMOS_VERFRAD" + export RADMON_SUFFIX=${PSLOT} + export TANKverf="${NOSCRUB}/monitor/radmon" + export VRFYRADSH="${HOMEgfs}/jobs/JGDAS_ATMOS_VERFRAD" fi # Minimization Monitoring - if [[ "$VRFYMINMON" = "YES" ]] ; then - - export MINMON_SUFFIX=$PSLOT - export M_TANKverf="$NOSCRUB/monitor/minmon" - if [[ "$CDUMP" = "gdas" ]] ; then - export VRFYMINSH="$HOMEgfs/jobs/JGDAS_ATMOS_VMINMON" - elif [[ "$CDUMP" = "gfs" ]] ; then - export VRFYMINSH="$HOMEgfs/jobs/JGFS_ATMOS_VMINMON" + if [[ "${VRFYMINMON}" = "YES" ]] ; then + + export MINMON_SUFFIX=${PSLOT} + export M_TANKverf="${NOSCRUB}/monitor/minmon" + if [[ "${RUN}" = "gdas" ]] ; then + export VRFYMINSH="${HOMEgfs}/jobs/JGDAS_ATMOS_VMINMON" + elif [[ "${RUN}" = "gfs" ]] ; then + export VRFYMINSH="${HOMEgfs}/jobs/JGFS_ATMOS_VMINMON" fi fi # Ozone Monitoring - if [[ "$VRFYOZN" == "YES" && "$CDUMP" == "$CDFNL" ]] ; then + if [[ "${VRFYOZN}" == "YES" && "${RUN}" == "${CDFNL}" ]] ; then - export HOMEgfs_ozn="$HOMEgfs" - export OZNMON_SUFFIX=$PSLOT - export TANKverf_ozn="$NOSCRUB/monitor/oznmon" - export VRFYOZNSH="$HOMEgfs/jobs/JGDAS_ATMOS_VERFOZN" + export HOMEgfs_ozn="${HOMEgfs}" + export OZNMON_SUFFIX=${PSLOT} + export TANKverf_ozn="${NOSCRUB}/monitor/oznmon" + export VRFYOZNSH="${HOMEgfs}/jobs/JGDAS_ATMOS_VERFOZN" fi @@ -111,34 +107,36 @@ fi # Cyclone genesis and cyclone track verification #------------------------------------------------- -export ens_tracker_ver=v1.1.15.5 -export HOMEens_tracker=$BASE_GIT/TC_tracker/${ens_tracker_ver} +export ens_tracker_ver=v1.1.15.6 +export HOMEens_tracker=/mnt/lfs4/HFIP/hwrfv3/Jiayi.Peng/ens_tracker.${ens_tracker_ver} -if [ "$VRFYTRAK" = "YES" ]; then +if [[ "${VRFYTRAK}" = "YES" ]]; then - export TRACKERSH="$HOMEgfs/jobs/JGFS_ATMOS_CYCLONE_TRACKER" - export COMINsyn=${COMINsyn:-$(compath.py "${envir}"/com/gfs/"${gfs_ver}")/syndat} - if [ "$CDUMP" = "gdas" ]; then + export TRACKERSH="${HOMEgfs}/jobs/JGFS_ATMOS_CYCLONE_TRACKER" + COMINsyn=${COMINsyn:-$(compath.py "${envir}"/com/gfs/"${gfs_ver}")/syndat} + export COMINsyn + if [[ "${RUN}" = "gdas" ]]; then export FHOUT_CYCLONE=3 - export FHMAX_CYCLONE=$FHMAX + export FHMAX_CYCLONE=${FHMAX} else export FHOUT_CYCLONE=6 - export FHMAX_CYCLONE=$(( FHMAX_GFS<240 ? FHMAX_GFS : 240 )) + FHMAX_CYCLONE=$(( FHMAX_GFS<240 ? FHMAX_GFS : 240 )) + export FHMAX_CYCLONE fi fi -if [[ "$VRFYGENESIS" == "YES" && "$CDUMP" == "gfs" ]]; then +if [[ "${VRFYGENESIS}" == "YES" && "${RUN}" == "gfs" ]]; then - export GENESISSH="$HOMEgfs/jobs/JGFS_ATMOS_CYCLONE_GENESIS" + export GENESISSH="${HOMEgfs}/jobs/JGFS_ATMOS_CYCLONE_GENESIS" fi -if [[ "${VRFYFSU}" == "YES" && "${CDUMP}" == "gfs" ]]; then +if [[ "${VRFYFSU}" == "YES" && "${RUN}" == "gfs" ]]; then export GENESISFSU="${HOMEgfs}/jobs/JGFS_ATMOS_FSU_GENESIS" fi -if [[ "${RUNMOS}" == "YES" && "${CDUMP}" == "gfs" ]]; then +if [[ "${RUNMOS}" == "YES" && "${RUN}" == "gfs" ]]; then if [[ "${machine}" = "HERA" ]] ; then export RUNGFSMOSSH="${HOMEgfs}/scripts/run_gfsmos_master.sh.hera" diff --git a/ush/load_fv3gfs_modules.sh b/ush/load_fv3gfs_modules.sh index d2172f56d5..2899e69514 100755 --- a/ush/load_fv3gfs_modules.sh +++ b/ush/load_fv3gfs_modules.sh @@ -10,10 +10,10 @@ fi ulimit_s=$( ulimit -S -s ) # Find module command and purge: -source "$HOMEgfs/modulefiles/module-setup.sh.inc" +source "${HOMEgfs}/modulefiles/module-setup.sh.inc" # Load our modules: -module use "$HOMEgfs/modulefiles" +module use "${HOMEgfs}/modulefiles" if [[ -d /lfs/f1 ]]; then # We are on WCOSS2 (Cactus or Dogwood) @@ -43,7 +43,7 @@ fi module list # Restore stack soft limit: -ulimit -S -s "$ulimit_s" +ulimit -S -s "${ulimit_s}" unset ulimit_s set_trace