diff --git a/jobs/JGDAS_ATMOS_VERFOZN b/jobs/JGDAS_ATMOS_VERFOZN index 294ca01832..c59c43fa5c 100755 --- a/jobs/JGDAS_ATMOS_VERFOZN +++ b/jobs/JGDAS_ATMOS_VERFOZN @@ -6,22 +6,6 @@ source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "verfozn" -c "base verfozn" -export OZNMON_SUFFIX=${OZNMON_SUFFIX:-${NET}} - -#--------------------------------------------- -# Specify Execution Areas -# -export HOMEgfs_ozn=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} -export HOMEgdas_ozn=${HOMEgfs_ozn:-${NWROOT}/gfs.${gfs_ver}} -export PARMgdas_ozn=${PARMgfs_ozn:-${HOMEgfs_ozn}/parm/mon} -export SCRgdas_ozn=${SCRgfs_ozn:-${HOMEgfs_ozn}/scripts} -export FIXgdas_ozn=${FIXgfs_ozn:-${HOMEgfs_ozn}/fix/mon} - -export HOMEoznmon=${HOMEoznmon:-${HOMEgfs_ozn}} -export EXECoznmon=${EXECoznmon:-${HOMEoznmon}/exec} -export FIXoznmon=${FIXoznmon:-${HOMEoznmon}/fix} -export USHoznmon=${USHoznmon:-${HOMEoznmon}/ush} - ############################################# # determine PDY and cyc for previous cycle ############################################# @@ -35,37 +19,19 @@ export gcyc=${GDATE:8:2} YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_OZNMON +export oznstat="${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.oznstat" export TANKverf_ozn=${TANKverf_ozn:-${COM_ATMOS_OZNMON}} if [[ ! -d ${TANKverf_ozn} ]]; then mkdir -p -m 775 ${TANKverf_ozn} ; fi -#----------------------------------- -# Other variables -# -export OZN_AREA=${OZN_AREA:-glb} -export oznstat=${oznstat:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.oznstat} -export SATYPE_FILE=${SATYPE_FILE:-${FIXgdas_ozn}/gdas_oznmon_satype.txt} -export PDATE=${PDY}${cyc} -export DO_DATA_RPT=${DO_DATA_RPT:-1} - -#----------------------------------- -# source the parm file -# -. ${PARMgdas_ozn}/gdas_oznmon.parm - -#--------------------------------------- -# Set up validation file -# -if [[ ${VALIDATE_DATA} -eq 1 ]]; then - export ozn_val_file=${ozn_val_file:-${FIXgdas_ozn}/gdas_oznmon_base.tar} -fi - #------------------------------------------------------- # Execute the script. # -${OZNMONSH:-${SCRgdas_ozn}/exgdas_atmos_verfozn.sh} ${PDY} ${cyc} +"${SCRgfs}/exgdas_atmos_verfozn.sh" err=$? -[[ ${err} -ne 0 ]] && exit ${err} +if (( err != 0 )); then + exit "${err}" +fi ################################ diff --git a/jobs/JGDAS_ATMOS_VERFRAD b/jobs/JGDAS_ATMOS_VERFRAD index c44ef42bb3..a60dc7c47a 100755 --- a/jobs/JGDAS_ATMOS_VERFRAD +++ b/jobs/JGDAS_ATMOS_VERFRAD @@ -6,30 +6,10 @@ source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "verfrad" -c "base verfrad" -############################################## -# Specify Execution Areas -############################################## -export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} -export SCRgfs=${SCRgfs:-${HOMEgfs}/scripts} - -export FIXgdas=${FIXgdas:-${HOMEgfs}/fix/mon} -export PARMmon=${PARMmon:-${HOMEgfs}/parm/mon} - -export HOMEradmon=${HOMEradmon:-${HOMEgfs}} -export EXECradmon=${EXECradmon:-${HOMEradmon}/exec} -export FIXradmon=${FIXradmon:-${FIXgfs}} -export USHradmon=${USHradmon:-${HOMEradmon}/ush} - -################################### -# source the parm file -################################### -parm_file=${parm_file:-${PARMmon}/da_mon.parm} -. ${parm_file} - ############################################# # determine PDY and cyc for previous cycle ############################################# -GDATE=$(${NDATE} -"${assim_freq}" "${PDY}${cyc}") +GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") export gPDY=${GDATE:0:8} export gcyc=${GDATE:8:2} @@ -41,34 +21,17 @@ YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_RADMON YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ATMOS_RADMON_PREV:COM_ATMOS_RADMON_TMPL +export biascr="${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.abias" +export radstat="${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.radstat" export TANKverf_rad=${TANKverf_rad:-${COM_ATMOS_RADMON}} export TANKverf_radM1=${TANKverf_radM1:-${COM_ATMOS_RADMON_PREV}} if [[ ! -d ${TANKverf_rad} ]]; then mkdir -p -m 775 ${TANKverf_rad} ; fi if [[ ! -d ${TANKverf_radM1} ]]; then mkdir -p -m 775 ${TANKverf_radM1} ; fi -############################################# -# Filenames -export biascr=${biascr:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.abias} -export radstat=${radstat:-${COM_ATMOS_ANALYSIS}/gdas.t${cyc}z.radstat} -export satype_file=${satype_file:-${FIXgdas}/gdas_radmon_satype.txt} - -# Other variables -export RAD_AREA=${RAD_AREA:-glb} -export MAKE_CTL=${MAKE_CTL:-1} -export MAKE_DATA=${MAKE_DATA:-1} -export USE_ANL=${USE_ANL:-1} -export PDATE=${PDY}${cyc} -export DO_DIAG_RPT=${DO_DIAG_RPT:-1} -export DO_DATA_RPT=${DO_DATA_RPT:-1} - -export RADMON_SUFFIX=${RADMON_SUFFIX:-${RUN}} -export CYCLE_INTERVAL=${assim_freq:-6} -export VERBOSE=${VERBOSE:-YES} - ######################################################## # Execute the script. -${RADMONSH:-${SCRgfs}/exgdas_atmos_verfrad.sh} ${PDY} ${cyc} +"${SCRgfs}/exgdas_atmos_verfrad.sh" err=$? if (( err != 0 )); then exit "${err}" diff --git a/jobs/JGLOBAL_ATMOS_VMINMON b/jobs/JGLOBAL_ATMOS_VMINMON index c8073b3321..b1d4835018 100755 --- a/jobs/JGLOBAL_ATMOS_VMINMON +++ b/jobs/JGLOBAL_ATMOS_VMINMON @@ -6,17 +6,10 @@ source "${HOMEgfs}/ush/preamble.sh" source "${HOMEgfs}/ush/jjob_header.sh" -e "vminmon" -c "base vminmon" -############################################## -# Specify Package Areas -############################################## -export M_FIX=${M_FIX:-${HOMEgfs}/fix/mon} -export SCRgfs=${SCRgfs:-${HOMEgfs}/scripts} -export USHgfs=${USHgfs:-${HOMEgfs}/ush} - ############################################# # Determine PDY and cyc for previous cycle ############################################# -GDATE=$(${NDATE} -"${assim_freq}" "${PDY}${cyc}") +GDATE=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") export gPDY=${GDATE:0:8} export gcyc=${GDATE:8:2} @@ -27,31 +20,20 @@ YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_ANALYSIS YMD=${PDY} HH=${cyc} generate_com -rx COM_ATMOS_MINMON YMD=${gPDY} HH=${gcyc} generate_com -rx COM_ATMOS_MINMON_PREV:COM_ATMOS_MINMON_TMPL +export gsistat="${COM_ATMOS_ANALYSIS}/${RUN}.t${cyc}z.gsistat" export M_TANKverf=${M_TANKverf:-${COM_ATMOS_MINMON}} export M_TANKverfM1=${M_TANKverfM1:-${COM_ATMOS_MINMON_PREV}} if [[ ! -d ${M_TANKverf} ]]; then mkdir -p -m 775 ${M_TANKverf} ; fi if [[ ! -d ${M_TANKverfM1} ]]; then mkdir -p -m 775 ${M_TANKverfM1} ; fi -######################################## -# Set necessary environment variables -######################################## -export MINMON_SUFFIX=${MINMON_SUFFIX:-${NET}} -export CYCLE_INTERVAL=${assim_freq} - -######################################## -# Filenames -######################################## -export gsistat=${gsistat:-${COM_ATMOS_ANALYSIS}/${RUN}.t${cyc}z.gsistat} -export mm_gnormfile=${gnormfile:-${M_FIX}/${RUN}_minmon_gnorm.txt} -export mm_costfile=${costfile:-${M_FIX}/${RUN}_minmon_cost.txt} - ######################################################## # Execute the script. -"${GMONSH:-${SCRgfs}/exglobal_atmos_vminmon.sh}" +"${SCRgfs}/exglobal_atmos_vminmon.sh" err=$? -[[ ${err} -ne 0 ]] && exit ${err} - +if (( err != 0 )); then + exit "${err}" +fi ################################ # Remove the Working Directory diff --git a/parm/config/gfs/config.verfozn b/parm/config/gfs/config.verfozn index 4091db3a11..ad6a927c29 100644 --- a/parm/config/gfs/config.verfozn +++ b/parm/config/gfs/config.verfozn @@ -6,4 +6,19 @@ echo "BEGIN: config.verfozn" # Get task specific resources . "${EXPDIR}/config.resources" verfozn +export DO_DATA_RPT=1 +export OZN_AREA="glb" +export OZNMON_SUFFIX=${NET} +export PARMmonitor=${PARMgfs}/monitor +export SATYPE_FILE=${PARMmonitor}/gdas_oznmon_satype.txt + +# Source the parm file +export parm_file=${PARMmonitor}/gdas_oznmon.parm +. "${parm_file}" + +# Set up validation file +if [[ ${VALIDATE_DATA} -eq 1 ]]; then + export ozn_val_file=${PARMmonitor}/gdas_oznmon_base.tar +fi + echo "END: config.verfozn" diff --git a/parm/config/gfs/config.verfrad b/parm/config/gfs/config.verfrad index e6dffcaa45..09c0d2f2da 100644 --- a/parm/config/gfs/config.verfrad +++ b/parm/config/gfs/config.verfrad @@ -6,4 +6,23 @@ echo "BEGIN: config.verfrad" # Get task specific resources . "${EXPDIR}/config.resources" verfrad +export PARMmonitor=${PARMgfs}/monitor +export satype_file=${PARMmonitor}/gdas_radmon_satype.txt + +# Source the parm file +export parm_file=${PARMmonitor}/da_mon.parm +. "${parm_file}" + +# Other variables +export RAD_AREA="glb" +export MAKE_CTL=1 +export MAKE_DATA=1 +export USE_ANL=1 +export DO_DIAG_RPT=1 +export DO_DATA_RPT=1 + +export RADMON_SUFFIX=${RUN} +export CYCLE_INTERVAL=${assim_freq:-6} +export VERBOSE="YES" + echo "END: config.verfrad" diff --git a/parm/config/gfs/config.vminmon b/parm/config/gfs/config.vminmon index d8888a7cb6..8929c36e0e 100644 --- a/parm/config/gfs/config.vminmon +++ b/parm/config/gfs/config.vminmon @@ -6,4 +6,11 @@ echo "BEGIN: config.vminmon" # Get task specific resources . "${EXPDIR}/config.resources" vminmon +export MINMON_SUFFIX=${MINMON_SUFFIX:-${NET}} +export CYCLE_INTERVAL=${assim_freq:-6} + +export PARMmonitor=${PARMgfs}/monitor +export mm_gnormfile=${PARMmonitor}/${RUN}_minmon_gnorm.txt +export mm_costfile=${PARMmonitor}/${RUN}_minmon_cost.txt + echo "END: config.vminmon" diff --git a/scripts/exgdas_atmos_verfozn.sh b/scripts/exgdas_atmos_verfozn.sh index 3c4e4f2c80..b0e3144701 100755 --- a/scripts/exgdas_atmos_verfozn.sh +++ b/scripts/exgdas_atmos_verfozn.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ################################################################################ # exgdas_atmos_verfozn.sh @@ -21,10 +21,10 @@ if [[ -s ${oznstat} ]]; then # Untar oznstat file. #------------------------------------------------------------------ - $NCP $oznstat ./oznstat.$PDATE + $NCP $oznstat ./oznstat.${PDY}${cyc} - tar -xvf oznstat.$PDATE - rm oznstat.$PDATE + tar -xvf oznstat.${PDY}${cyc} + rm oznstat.${PDY}${cyc} netcdf=0 count=$(ls diag* | grep ".nc4" | wc -l) @@ -38,7 +38,7 @@ if [[ -s ${oznstat} ]]; then export OZNMON_NETCDF=${netcdf} - ${HOMEoznmon}/ush/ozn_xtrct.sh + ${USHgfs}/ozn_xtrct.sh err=$? else diff --git a/scripts/exgdas_atmos_verfrad.sh b/scripts/exgdas_atmos_verfrad.sh index dae46c91e2..a5e4fda9cb 100755 --- a/scripts/exgdas_atmos_verfrad.sh +++ b/scripts/exgdas_atmos_verfrad.sh @@ -1,6 +1,6 @@ #! /usr/bin/env bash -source "$HOMEgfs/ush/preamble.sh" +source "${HOMEgfs}/ush/preamble.sh" ################################################################################ #### UNIX Script Documentation Block @@ -29,11 +29,11 @@ if [[ -s ${radstat} && -s ${biascr} ]]; then # Untar radstat file. #------------------------------------------------------------------ - $NCP $biascr ./biascr.$PDATE - $NCP $radstat ./radstat.$PDATE + $NCP $biascr ./biascr.${PDY}${cyc} + $NCP $radstat ./radstat.${PDY}${cyc} - tar -xvf radstat.$PDATE - rm radstat.$PDATE + tar -xvf radstat.${PDY}${cyc} + rm radstat.${PDY}${cyc} #------------------------------------------------------------------ # SATYPE is the list of expected satellite/instrument sources @@ -92,23 +92,23 @@ if [[ -s ${radstat} && -s ${biascr} ]]; then for type in ${SATYPE}; do - if [[ netcdf -eq 0 && -e diag_${type}_ges.${PDATE}.nc4.${Z} ]]; then + if [[ netcdf -eq 0 && -e diag_${type}_ges.${PDY}${cyc}.nc4.${Z} ]]; then netcdf=1 fi - if [[ $(find . -maxdepth 1 -type f -name "diag_${type}_ges.${PDATE}*.${Z}" | wc -l) -gt 0 ]]; then - mv diag_${type}_ges.${PDATE}*.${Z} ${type}.${Z} + if [[ $(find . -maxdepth 1 -type f -name "diag_${type}_ges.${PDY}${cyc}*.${Z}" | wc -l) -gt 0 ]]; then + mv diag_${type}_ges.${PDY}${cyc}*.${Z} ${type}.${Z} ${UNCOMPRESS} ./${type}.${Z} else - echo "WARNING: diag_${type}_ges.${PDATE}*.${Z} not available, skipping" + echo "WARNING: diag_${type}_ges.${PDY}${cyc}*.${Z} not available, skipping" fi if [[ $USE_ANL -eq 1 ]]; then - if [[ $(find . -maxdepth 1 -type f -name "diag_${type}_anl.${PDATE}*.${Z}" | wc -l) -gt 0 ]]; then - mv diag_${type}_anl.${PDATE}*.${Z} ${type}_anl.${Z} + if [[ $(find . -maxdepth 1 -type f -name "diag_${type}_anl.${PDY}${cyc}*.${Z}" | wc -l) -gt 0 ]]; then + mv diag_${type}_anl.${PDY}${cyc}*.${Z} ${type}_anl.${Z} ${UNCOMPRESS} ./${type}_anl.${Z} else - echo "WARNING: diag_${type}_anl.${PDATE}*.${Z} not available, skipping" + echo "WARNING: diag_${type}_anl.${PDY}${cyc}*.${Z} not available, skipping" fi fi done @@ -117,18 +117,18 @@ if [[ -s ${radstat} && -s ${biascr} ]]; then #------------------------------------------------------------------ - # Run the child sccripts. + # Run the child scripts. #------------------------------------------------------------------ - ${USHradmon}/radmon_verf_angle.sh ${PDATE} + ${USHgfs}/radmon_verf_angle.sh rc_angle=$? - ${USHradmon}/radmon_verf_bcoef.sh ${PDATE} + ${USHgfs}/radmon_verf_bcoef.sh rc_bcoef=$? - ${USHradmon}/radmon_verf_bcor.sh "${PDATE}" + ${USHgfs}/radmon_verf_bcor.sh rc_bcor=$? - ${USHradmon}/radmon_verf_time.sh "${PDATE}" + ${USHgfs}/radmon_verf_time.sh rc_time=$? #-------------------------------------- diff --git a/ush/ozn_xtrct.sh b/ush/ozn_xtrct.sh index 3f6b3fed19..e6d27b9c73 100755 --- a/ush/ozn_xtrct.sh +++ b/ush/ozn_xtrct.sh @@ -11,9 +11,9 @@ source "$HOMEgfs/ush/preamble.sh" # $TANKverf_ozn. # # Calling scripts must define: -# $TANKverf_ozn -# $HOMEoznmon -# $PDATE +# $TANKverf_ozn +# $PDY +# $cyc # # Return values are # 0 = normal @@ -28,7 +28,7 @@ source "$HOMEgfs/ush/preamble.sh" # gdas_oznmon_satype.txt to $avail_satype which is # determined by the contents of the oznstat file. # Report any missing diag files in a file named -# bad_diag.$PDATE +# bad_diag.$PDY$cyc # check_diag_files() { pdate=$1 @@ -107,7 +107,7 @@ avail_satype=$(ls -1 d*ges* | sed -e 's/_/ /g;s/\./ /' | gawk '{ print $2 "_" $3 if [[ ${DO_DATA_RPT} -eq 1 ]]; then if [[ -e ${SATYPE_FILE} ]]; then satype=$(cat ${SATYPE_FILE}) - check_diag_files ${PDATE} "${satype}" "${avail_satype}" + check_diag_files "${PDY}${cyc}" "${satype}" "${avail_satype}" else echo "WARNING: missing ${SATYPE_FILE}" fi @@ -132,12 +132,12 @@ else #-------------------------------------------------------------------- # Copy extraction programs to working directory # - ${NCP} ${HOMEoznmon}/exec/oznmon_time.x ./oznmon_time.x + ${NCP} ${HOMEgfs}/exec/oznmon_time.x ./oznmon_time.x if [[ ! -e oznmon_time.x ]]; then iret=2 exit ${iret} fi - ${NCP} ${HOMEoznmon}/exec/oznmon_horiz.x ./oznmon_horiz.x + ${NCP} ${HOMEgfs}/exec/oznmon_horiz.x ./oznmon_horiz.x if [[ ! -e oznmon_horiz.x ]]; then iret=3 exit ${iret} @@ -149,14 +149,14 @@ else # for ptype in ${ozn_ptype}; do - iyy=$(echo ${PDATE} | cut -c1-4) - imm=$(echo ${PDATE} | cut -c5-6) - idd=$(echo ${PDATE} | cut -c7-8) - ihh=$(echo ${PDATE} | cut -c9-10) + iyy=$(echo ${PDY} | cut -c1-4) + imm=$(echo ${PDY} | cut -c5-6) + idd=$(echo ${PDY} | cut -c7-8) + ihh=${cyc} for type in ${avail_satype}; do - if [[ -f "diag_${type}_${ptype}.${PDATE}.gz" ]]; then - mv diag_${type}_${ptype}.${PDATE}.gz ${type}.${ptype}.gz + if [[ -f "diag_${type}_${ptype}.${PDY}${cyc}.gz" ]]; then + mv diag_${type}_${ptype}.${PDY}${cyc}.gz ${type}.${ptype}.gz gunzip ./${type}.${ptype}.gz echo "processing ptype, type: ${ptype}, ${type}" @@ -196,7 +196,7 @@ EOF mkdir -p ${TANKverf_ozn}/time fi $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/time/ - $NCP ${type}.${ptype}.${PDATE}.ieee_d ${TANKverf_ozn}/time/ + $NCP ${type}.${ptype}.${PDY}${cyc}.ieee_d ${TANKverf_ozn}/time/ $NCP bad* ${TANKverf_ozn}/time/ @@ -228,8 +228,8 @@ EOF fi $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/horiz/ - $COMPRESS ${type}.${ptype}.${PDATE}.ieee_d - $NCP ${type}.${ptype}.${PDATE}.ieee_d.${Z} ${TANKverf_ozn}/horiz/ + $COMPRESS ${type}.${ptype}.${PDY}${cyc}.ieee_d + $NCP ${type}.${ptype}.${PDY}${cyc}.ieee_d.${Z} ${TANKverf_ozn}/horiz/ echo "finished processing ptype, type: ${ptype}, ${type}" @@ -255,7 +255,7 @@ fi # Conditionally remove data files older than 40 days # if [[ ${CLEAN_TANKDIR:-0} -eq 1 ]]; then - ${HOMEoznmon}/ush/clean_tankdir.sh glb 40 + ${HOMEgfs}/ush/clean_tankdir.sh glb 40 fi exit ${iret} diff --git a/ush/radmon_verf_angle.sh b/ush/radmon_verf_angle.sh index b2dab0825a..507fb72ef7 100755 --- a/ush/radmon_verf_angle.sh +++ b/ush/radmon_verf_angle.sh @@ -20,17 +20,17 @@ source "$HOMEgfs/ush/preamble.sh" # other supporting files into a temporary working directory. # # -# Usage: radmon_verf_angle.sh PDATE +# Usage: radmon_verf_angle.sh # # Input script positional parameters: -# PDATE processing date +# PDYcyc processing date # yyyymmddcc format; required # # Imported Shell Variables: # RADMON_SUFFIX data source suffix # defauls to opr -# EXECradmon executable directory -# defaults to current directory +# EXECgfs executable directory +# PARMmonitor parm directory # RAD_AREA global or regional flag # defaults to global # TANKverf_rad data repository @@ -72,8 +72,6 @@ REGIONAL_RR=${REGIONAL_RR:-0} # rapid refresh model flag rgnHH=${rgnHH:-} rgnTM=${rgnTM:-} -export PDATE=${1:-${PDATE:?}} - echo " REGIONAL_RR, rgnHH, rgnTM = $REGIONAL_RR, $rgnHH, $rgnTM" netcdf_boolean=".false." if [[ $RADMON_NETCDF -eq 1 ]]; then @@ -84,11 +82,6 @@ echo " RADMON_NETCDF, netcdf_boolean = ${RADMON_NETCDF}, $netcdf_boolean" which prep_step which startmsg -# Directories -FIXgdas=${FIXgdas:-$(pwd)} -EXECradmon=${EXECradmon:-$(pwd)} -TANKverf_rad=${TANKverf_rad:-$(pwd)} - # File names export pgmout=${pgmout:-${jlogfile}} touch $pgmout @@ -108,13 +101,13 @@ fi err=0 angle_exec=radmon_angle.x -shared_scaninfo=${shared_scaninfo:-$FIXgdas/gdas_radmon_scaninfo.txt} +shared_scaninfo=${shared_scaninfo:-${PARMmonitor}/gdas_radmon_scaninfo.txt} scaninfo=scaninfo.txt #-------------------------------------------------------------------- # Copy extraction program and supporting files to working directory -$NCP ${EXECradmon}/${angle_exec} ./ +$NCP ${EXECgfs}/${angle_exec} ./ $NCP $shared_scaninfo ./${scaninfo} if [[ ! -s ./${angle_exec} || ! -s ./${scaninfo} ]]; then @@ -125,10 +118,10 @@ else export pgm=${angle_exec} - iyy=$(echo $PDATE | cut -c1-4) - imm=$(echo $PDATE | cut -c5-6) - idd=$(echo $PDATE | cut -c7-8) - ihh=$(echo $PDATE | cut -c9-10) + iyy=$(echo ${PDY} | cut -c1-4) + imm=$(echo ${PDY} | cut -c5-6) + idd=$(echo ${PDY} | cut -c7-8) + ihh=${cyc} ctr=0 fail=0 @@ -150,11 +143,11 @@ else ctr=$(expr $ctr + 1) if [[ $dtype == "anl" ]]; then - data_file=${type}_anl.${PDATE}.ieee_d + data_file=${type}_anl.${PDY}${cyc}.ieee_d ctl_file=${type}_anl.ctl angl_ctl=angle.${ctl_file} else - data_file=${type}.${PDATE}.ieee_d + data_file=${type}.${PDY}${cyc}.ieee_d ctl_file=${type}.ctl angl_ctl=angle.${ctl_file} fi @@ -207,7 +200,7 @@ EOF done # for type in ${SATYPE} loop - ${USHradmon}/rstprod.sh + ${USHgfs}/rstprod.sh tar_file=radmon_angle.tar if compgen -G "angle*.ieee_d*" > /dev/null || compgen -G "angle*.ctl*" > /dev/null; then diff --git a/ush/radmon_verf_bcoef.sh b/ush/radmon_verf_bcoef.sh index 374c8db7b2..4485f81786 100755 --- a/ush/radmon_verf_bcoef.sh +++ b/ush/radmon_verf_bcoef.sh @@ -20,23 +20,19 @@ source "$HOMEgfs/ush/preamble.sh" # other supporting files into a temporary working directory. # # -# Usage: radmon_verf_bcoef.sh PDATE +# Usage: radmon_verf_bcoef.sh # # Input script positional parameters: -# PDATE processing date +# PDYcyc processing date # yyyymmddcc format; required # # Imported Shell Variables: # RADMON_SUFFIX data source suffix # defauls to opr -# EXECradmon executable directory -# defaults to current directory -# FIXradmon fixed data directory -# defaults to current directory +# EXECgfs executable directory # RAD_AREA global or regional flag # defaults to global # TANKverf_rad data repository -# defaults to current directory # SATYPE list of satellite/instrument sources # defaults to none # LITTLE_ENDIAN flag for LE machine @@ -65,8 +61,6 @@ source "$HOMEgfs/ush/preamble.sh" # >0 - some problem encountered # #################################################################### -# Command line arguments. -export PDATE=${1:-${PDATE:?}} netcdf_boolean=".false." if [[ $RADMON_NETCDF -eq 1 ]]; then @@ -74,11 +68,6 @@ if [[ $RADMON_NETCDF -eq 1 ]]; then fi echo " RADMON_NETCDF, netcdf_boolean = ${RADMON_NETCDF}, $netcdf_boolean" -# Directories -FIXgdas=${FIXgdas:-$(pwd)} -EXECradmon=${EXECradmon:-$(pwd)} -TANKverf_rad=${TANKverf_rad:-$(pwd)} - # File names pgmout=${pgmout:-${jlogfile}} touch $pgmout @@ -105,7 +94,7 @@ fi #-------------------------------------------------------------------- # Copy extraction program and supporting files to working directory -$NCP $EXECradmon/${bcoef_exec} ./${bcoef_exec} +$NCP $EXECgfs/${bcoef_exec} ./${bcoef_exec} $NCP ${biascr} ./biascr.txt if [[ ! -s ./${bcoef_exec} || ! -s ./biascr.txt ]]; then @@ -118,10 +107,10 @@ else export pgm=${bcoef_exec} - iyy=$(echo $PDATE | cut -c1-4) - imm=$(echo $PDATE | cut -c5-6) - idd=$(echo $PDATE | cut -c7-8) - ihh=$(echo $PDATE | cut -c9-10) + iyy=$(echo ${PDY} | cut -c1-4) + imm=$(echo ${PDY} | cut -c5-6) + idd=$(echo ${PDY} | cut -c7-8) + ihh=${cyc} ctr=0 fail=0 @@ -143,11 +132,11 @@ else ctr=$(expr $ctr + 1) if [[ $dtype == "anl" ]]; then - data_file=${type}_anl.${PDATE}.ieee_d + data_file=${type}_anl.${PDY}${cyc}.ieee_d ctl_file=${type}_anl.ctl bcoef_ctl=bcoef.${ctl_file} else - data_file=${type}.${PDATE}.ieee_d + data_file=${type}.${PDY}${cyc}.ieee_d ctl_file=${type}.ctl bcoef_ctl=bcoef.${ctl_file} fi @@ -204,7 +193,7 @@ EOF done # type in $SATYPE loop - ${USHradmon}/rstprod.sh + ${USHgfs}/rstprod.sh if compgen -G "bcoef*.ieee_d*" > /dev/null || compgen -G "bcoef*.ctl*" > /dev/null; then tar_file=radmon_bcoef.tar diff --git a/ush/radmon_verf_bcor.sh b/ush/radmon_verf_bcor.sh index 3e267f018c..a01238e6ca 100755 --- a/ush/radmon_verf_bcor.sh +++ b/ush/radmon_verf_bcor.sh @@ -20,16 +20,16 @@ source "$HOMEgfs/ush/preamble.sh" # other supporting files into a temporary working directory. # # -# Usage: radmon_verf_bcor.sh PDATE +# Usage: radmon_verf_bcor.sh # # Input script positional parameters: -# PDATE processing date +# PDYcyc processing date # yyyymmddcc format; required # # Imported Shell Variables: # RADMON_SUFFIX data source suffix # defauls to opr -# EXECradmon executable directory +# EXECgfs executable directory # defaults to current directory # RAD_AREA global or regional flag # defaults to global @@ -64,13 +64,6 @@ source "$HOMEgfs/ush/preamble.sh" # #################################################################### -# Command line arguments. -export PDATE=${1:-${PDATE:?}} - -# Directories -EXECradmon=${EXECradmon:-$(pwd)} -TANKverf_rad=${TANKverf_rad:-$(pwd)} - # File names pgmout=${pgmout:-${jlogfile}} touch $pgmout @@ -99,7 +92,7 @@ fi #-------------------------------------------------------------------- # Copy extraction program to working directory -$NCP ${EXECradmon}/${bcor_exec} ./${bcor_exec} +$NCP ${EXECgfs}/${bcor_exec} ./${bcor_exec} if [[ ! -s ./${bcor_exec} ]]; then err=6 @@ -111,10 +104,10 @@ else export pgm=${bcor_exec} - iyy=$(echo $PDATE | cut -c1-4) - imm=$(echo $PDATE | cut -c5-6) - idd=$(echo $PDATE | cut -c7-8) - ihh=$(echo $PDATE | cut -c9-10) + iyy=$(echo ${PDY} | cut -c1-4) + imm=$(echo ${PDY} | cut -c5-6) + idd=$(echo ${PDY} | cut -c7-8) + ihh=${cyc} ctr=0 fail=0 @@ -129,7 +122,7 @@ else ctr=$(expr $ctr + 1) if [[ $dtype == "anl" ]]; then - data_file=${type}_anl.${PDATE}.ieee_d + data_file=${type}_anl.${PDY}${cyc}.ieee_d bcor_file=bcor.${data_file} ctl_file=${type}_anl.ctl bcor_ctl=bcor.${ctl_file} @@ -137,7 +130,7 @@ else bcor_stdout=bcor.${stdout_file} input_file=${type}_anl else - data_file=${type}.${PDATE}.ieee_d + data_file=${type}.${PDY}${cyc}.ieee_d bcor_file=bcor.${data_file} ctl_file=${type}.ctl bcor_ctl=bcor.${ctl_file} @@ -197,7 +190,7 @@ EOF done # type in $SATYPE loop - ${USHradmon}/rstprod.sh + ${USHgfs}/rstprod.sh tar_file=radmon_bcor.tar if compgen -G "bcor*.ieee_d*" > /dev/null || compgen -G "bcor*.ctl*" > /dev/null; then diff --git a/ush/radmon_verf_time.sh b/ush/radmon_verf_time.sh index 51743277c9..c2d454dd29 100755 --- a/ush/radmon_verf_time.sh +++ b/ush/radmon_verf_time.sh @@ -22,10 +22,10 @@ source "$HOMEgfs/ush/preamble.sh" # other supporting files into a temporary working directory. # # -# Usage: radmon_verf_time.sh PDATE +# Usage: radmon_verf_time.sh ${PDY}${cyc} # # Input script positional parameters: -# PDATE processing date +# PDYcyc processing date # yyyymmddcc format; required # # Imported Shell Variables: @@ -33,14 +33,11 @@ source "$HOMEgfs/ush/preamble.sh" # defaults to 1 (on) # RADMON_SUFFIX data source suffix # defauls to opr -# EXECradmon executable directory -# defaults to current directory -# FIXgdas fixed data directory -# defaults to current directory +# EXECgfs executable directory +# PARMmonitor parm data directory # RAD_AREA global or regional flag # defaults to global # TANKverf_rad data repository -# defaults to current directory # SATYPE list of satellite/instrument sources # defaults to none # VERBOSE Verbose flag (YES or NO) @@ -77,20 +74,12 @@ source "$HOMEgfs/ush/preamble.sh" # #################################################################### -# Command line arguments. -export PDATE=${1:-${PDATE:?}} - -# Directories -FIXgdas=${FIXgdas:-$(pwd)} -EXECradmon=${EXECradmon:-$(pwd)} -TANKverf_rad=${TANKverf_rad:-$(pwd)} - # File names #pgmout=${pgmout:-${jlogfile}} #touch $pgmout -radmon_err_rpt=${radmon_err_rpt:-${USHradmon}/radmon_err_rpt.sh} -base_file=${base_file:-$FIXgdas/gdas_radmon_base.tar} +radmon_err_rpt=${radmon_err_rpt:-${USHgfs}/radmon_err_rpt.sh} +base_file=${base_file:-${PARMmonitor}/gdas_radmon_base.tar} report=report.txt disclaimer=disclaimer.txt @@ -137,17 +126,16 @@ fi #-------------------------------------------------------------------- # Copy extraction program and base files to working directory #------------------------------------------------------------------- -$NCP ${EXECradmon}/${time_exec} ./ +$NCP ${EXECgfs}/${time_exec} ./ if [[ ! -s ./${time_exec} ]]; then err=8 fi -iyy=$(echo $PDATE | cut -c1-4) -imm=$(echo $PDATE | cut -c5-6) -idd=$(echo $PDATE | cut -c7-8) -ihh=$(echo $PDATE | cut -c9-10) -cyc=$ihh -CYCLE=$cyc +iyy=$(echo $PDY | cut -c1-4) +imm=$(echo $PDY | cut -c5-6) +idd=$(echo $PDY | cut -c7-8) +ihh=${cyc} +CYCLE=${cyc} local_base="local_base" if [[ $DO_DATA_RPT -eq 1 ]]; then @@ -190,11 +178,11 @@ if [[ $err -eq 0 ]]; then if [[ -f input ]]; then rm input; fi if [[ $dtype == "anl" ]]; then - data_file=${type}_anl.${PDATE}.ieee_d + data_file=${type}_anl.${PDY}${cyc}.ieee_d ctl_file=${type}_anl.ctl time_ctl=time.${ctl_file} else - data_file=${type}.${PDATE}.ieee_d + data_file=${type}.${PDY}${cyc}.ieee_d ctl_file=${type}.ctl time_ctl=time.${ctl_file} fi @@ -250,7 +238,7 @@ EOF done - ${USHradmon}/rstprod.sh + ${USHgfs}/rstprod.sh if compgen -G "time*.ieee_d*" > /dev/null || compgen -G "time*.ctl*" > /dev/null; then tar_file=radmon_time.tar @@ -302,7 +290,7 @@ EOF # tmp_satype="./tmp_satype.txt" echo ${SATYPE} > ${tmp_satype} - ${USHradmon}/radmon_diag_ck.sh --rad ${radstat} --sat ${tmp_satype} --out ${diag} + ${USHgfs}/radmon_diag_ck.sh --rad ${radstat} --sat ${tmp_satype} --out ${diag} if [[ -s ${diag} ]]; then cat << EOF > ${diag_hdr} @@ -332,7 +320,7 @@ EOF if [[ $lines -gt 0 ]]; then cat ${diag_report} - cp ${diag} ${TANKverf_rad}/bad_diag.${PDATE} + cp ${diag} ${TANKverf_rad}/bad_diag.${PDY}${cyc} else rm ${diag_report} fi @@ -344,11 +332,11 @@ EOF # Identify bad_pen and bad_chan files for this cycle and # previous cycle - bad_pen=bad_pen.${PDATE} - bad_chan=bad_chan.${PDATE} - low_count=low_count.${PDATE} + bad_pen=bad_pen.${PDY}${cyc} + bad_chan=bad_chan.${PDY}${cyc} + low_count=low_count.${PDY}${cyc} - qdate=$($NDATE -${CYCLE_INTERVAL} $PDATE) + qdate=$(date --utc +%Y%m%d%H -d "${PDY} ${cyc} - ${assim_freq} hours") pday=$(echo $qdate | cut -c1-8) prev_bad_pen=bad_pen.${qdate} @@ -419,21 +407,21 @@ EOF echo "calling radmon_err_rpt for pen" ${radmon_err_rpt} ${prev_bad_pen} ${bad_pen} pen ${qdate} \ - ${PDATE} ${diag_report} ${pen_err} + ${PDY}${cyc} ${diag_report} ${pen_err} fi if [[ $do_chan -eq 1 ]]; then echo "calling radmon_err_rpt for chan" ${radmon_err_rpt} ${prev_bad_chan} ${bad_chan} chan ${qdate} \ - ${PDATE} ${diag_report} ${chan_err} + ${PDY}${cyc} ${diag_report} ${chan_err} fi if [[ $do_cnt -eq 1 ]]; then echo "calling radmon_err_rpt for cnt" ${radmon_err_rpt} ${prev_low_count} ${low_count} cnt ${qdate} \ - ${PDATE} ${diag_report} ${count_err} + ${PDY}${cyc} ${diag_report} ${count_err} fi #------------------------------------------------------------------- @@ -450,7 +438,7 @@ Radiance Monitor warning report Net: ${RADMON_SUFFIX} Run: ${RUN} - Cycle: $PDATE + Cycle: ${PDY}${cyc} EOF @@ -526,7 +514,7 @@ EOF if [[ $lines -gt 2 ]]; then cat ${report} - $NCP ${report} ${TANKverf_rad}/warning.${PDATE} + $NCP ${report} ${TANKverf_rad}/warning.${PDY}${cyc} fi fi