Skip to content

Commit

Permalink
Merge pull request #10 from EdwardSafford-NOAA/master
Browse files Browse the repository at this point in the history
GitHub Issue #3.  Port RadMon to Hera.
  • Loading branch information
MichaelLueken committed Jun 12, 2020
2 parents c489ff4 + e5ce559 commit e2a33cc
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 180 deletions.
6 changes: 2 additions & 4 deletions util/Radiance_Monitor/get_hostname.pl
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,12 @@
my $my_os = "export MY_OS=$arch";

#
# Determine if installation is on WCOSS, Theia, or Zeus.
# Determine if installation is on cray, wcoss_d, or hera
#
if( $arch ne "linux" && $arch ne "aix" ) {
die( "only linux and aix are supported, $arch is not\n" );
}
# print "\n";
# print "arch = $arch\n";


my $machine = "";

Expand All @@ -32,7 +31,6 @@
# while ccs and (perhaps) wcoss return [hostname].ncep.noaa.gov. Keep only the
# actual hostname and see if it matches the node names for zeus, tide, or gyre.
#
my $host_zeus = 0;
my $host = "";
$host = ` hostname `;
chomp( $host );
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@

set -x

export MY_MACHINE=hera

#export PDATE=${PDATE:-2018091712} #binary
export PDATE=${PDATE:-2018110206} #NetCDF

#############################################################
# Specify whether the run is production or development
#############################################################
Expand All @@ -21,8 +24,8 @@ export job=gdas_verfrad.${cyc}
export pid=${pid:-$$}
export jobid=${job}.${pid}
export envir=para
export DATAROOT=${DATAROOT:-/scratch4/NCEPDEV/da/noscrub/Edward.Safford/test_data}
export COMROOT=${COMROOT:-/scratch4/NCEPDEV/stmp3/$LOGNAME/com}
export DATAROOT=${DATAROOT:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_data}
export COMROOT=${COMROOT:-/scratch2/NCEPDEV/stmp3/${LOGNAME}/com}


#############################################################
Expand All @@ -34,21 +37,12 @@ export gdas_radmon_ver=v3.0.0
export radmon_shared_ver=v3.0.0


#############################################################
# Add nwpara tools to path
#############################################################
NWPROD=${NWPROD:-/scratch4/NCEPDEV/global/save/glopara/nwpara/util}
NWPRODush=${NWPRODush:=${NWPROD}/ush}
NWPRODexec=${NWPRODexec:=${NWPROD}/exec}
export PATH=${PATH}:${NWPRODush}:${NWPRODexec}

#############################################################
# Set user specific variables
#############################################################

export RADMON_SUFFIX=${RADMON_SUFFIX:-testrad}
#export NWTEST=${NWTEST:-/scratch4/NCEPDEV/da/noscrub/${LOGNAME}/gfs_q3fy17}
export NWTEST=${NWTEST:-/scratch4/NCEPDEV/da/noscrub/Edward.Safford/ProdGSI/util/Radiance_Monitor/nwprod}
export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/GSI/util/Radiance_Monitor/nwprod}

export HOMEgdas=${HOMEgdas:-${NWTEST}/gdas_radmon.${gdas_radmon_ver}}
export HOMEgfs=$HOMEgdas
Expand All @@ -59,28 +53,19 @@ export HOMEradmon=${HOMEradmon:-${NWTEST}/radmon_shared.${radmon_shared_ver}}
export COM_IN=${COM_IN:-${DATAROOT}}
export TANKverf=${TANKverf:-${COMROOT}/${RADMON_SUFFIX}}

export SUB=${SUB:-/apps/torque/default/bin/qsub}
export NDATE=${NDATE:-ndate}
export SUB=${SUB:-/apps/slurm/default/bin/sbatch}
export NDATE=${NDATE:-/home/Edward.Safford/bin/ndate}

export parm_file=${HOMEgdas}/parm/gdas_radmon.parm

#######################################################################
# theia specific hacks for no prod_utils module & no setpdy.sh script
#######################################################################
export MY_MACHINE=theia

prevday=`$NDATE -24 $PDATE`
export PDYm1=`echo $prevday | cut -c1-8`
ln -s ${NWPRODush}/startmsg.sh ${COMROOT}/startmsg
ln -s ${NWPRODush}/postmsg.sh ${COMROOT}/postmsg
ln -s ${NWPRODush}/prep_step.sh ${COMROOT}/prep_step
ln -s ${NWPRODush}/err_chk.sh ${COMROOT}/err_chk
export PATH=$PATH:${COMROOT}
export utilscript=${utilscript:-${NWPRODush}} # err_chk calls postmsg.sh
# directly so need to override
# utilscript location for theia


#############################################################
# Execute job
#############################################################
#
$JOBGLOBAL/JGDAS_VERFRAD

exit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ export job=gdas_verfrad.${cyc}
export pid=${pid:-$$}
export jobid=${job}.${pid}
export envir=prod
#export DATAROOT=/gpfs/dell2/emc/modeling/noscrub/${LOGNAME}/test_data
#export DATAROOT=/gpfs/dell3/ptmp/emc.glopara/ROTDIRS/v16rt0
export DATAROOT=/gpfs/dell1/nco/ops/com/gfs/prod
export DATAROOT=/gpfs/dell2/emc/modeling/noscrub/${LOGNAME}/test_data
export COMROOT=/gpfs/dell2/ptmp/${LOGNAME}

if [[ ! -d ${COMROOT}/logs/jlogfiles ]]; then
Expand Down Expand Up @@ -75,7 +73,7 @@ if [[ -d ${DATA} ]]; then
fi
export jlogfile=${COMROOT}/logs/jlogfiles/${RADMON_SUFFIX}_jlog

export NWTEST=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Radiance_Monitor/nwprod
export NWTEST=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Radiance_Monitor/nwprod

export HOMEgdas=${NWTEST}/gdas_radmon.${gdas_radmon_ver}
export HOMEgfs=${HOMEgdas}
Expand Down
Binary file not shown.
16 changes: 11 additions & 5 deletions util/Radiance_Monitor/nwprod/gdas_radmon.v3.0.0/jobs/JGDAS_VERFRAD
Original file line number Diff line number Diff line change
Expand Up @@ -94,17 +94,23 @@ export RAD_AREA=${RAD_AREA:-glb}
export biascr=${biascr:-$COMIN/gdas.t${cyc}z.abias}
export radstat=${radstat:-$COMIN/gdas.t${cyc}z.radstat}

msg="JOB HAS STARTED"
postmsg "$jlogfile" "$msg"
echo " "
echo "JOB HAS STARTED"
echo " "


########################################################
# Execute the script.
${RADMONSH:-${SCRgfs}/exgdas_vrfyrad.sh.ecf} ${PDY} ${cyc}
err=$?
[[ $err -ne 0 ]] && exit $err

msg="JOB COMPLETED NORMALLY"
postmsg "$jlogfile" "$msg"
if [[ $err -ne 0 ]] ; then
exit $err
else
echo " "
echo "JOB HAS COMPLETED NORMALLY"
echo " "
fi

################################
# Remove the Working Directory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ if [[ "$VERBOSE" = "YES" ]]; then
echo "end exgdas_vrfyrad.sh.ecf, exit value = ${err}"
fi

msg="${scr} HAS ENDED"
postmsg "$jlogfile" "$msg"
echo "${scr} HAS ENDED"


set +x
exit ${err}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ rgnTM=${rgnTM:-}

export PDATE=${1:-${PDATE:?}}

scr=radmon_verf_angle.sh
msg="${scr} HAS STARTED"
postmsg "$jlogfile" "$msg"
echo " REGIONAL_RR, rgnHH, rgnTM = $REGIONAL_RR, $rgnHH, $rgnTM"
netcdf_boolean=".false."
if [[ $RADMON_NETCDF -eq 1 ]]; then
Expand Down Expand Up @@ -263,8 +260,6 @@ if [[ "$VERBOSE" = "YES" ]]; then
echo $(date) EXITING $0 error code ${err} >&2
fi

msg="${scr} HAS ENDED"
postmsg "$jlogfile" "$msg"

echo "<-- radmon_verf_angle.sh"
exit ${err}
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,6 @@
# Command line arguments.
export PDATE=${1:-${PDATE:?}}

scr=radmon_verf_bcoef.sh
msg="${scr} HAS STARTED"
postmsg "$jlogfile" "$msg"

netcdf_boolean=".false."
if [[ $RADMON_NETCDF -eq 1 ]]; then
netcdf_boolean=".true."
Expand Down Expand Up @@ -246,7 +242,5 @@ if [[ "$VERBOSE" = "YES" ]]; then
echo $(date) EXITING $0 with error code ${err} >&2
fi

msg="${scr} HAS ENDED"
postmsg "$jlogfile" "$msg"

exit ${err}
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@
# Command line arguments.
export PDATE=${1:-${PDATE:?}}

scr=radmon_verf_bcor.sh
msg="${scr} HAS STARTED"
postmsg "$jlogfile" "$msg"


if [[ "$VERBOSE" = "YES" ]]; then
set -ax
Expand Down Expand Up @@ -239,8 +235,5 @@ if [[ "$VERBOSE" = "YES" ]]; then
echo $(date) EXITING $0 error code ${err} >&2
fi

msg="${scr} HAS ENDED"
postmsg "$jlogfile" "$msg"

exit ${err}

48 changes: 14 additions & 34 deletions util/Radiance_Monitor/parm/RadMon_config
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ export MONITOR=radmon
# you checked out only the Radiance_Monitor portion of the branch then
# MY_RADMON should point to that.
#
export MY_RADMON=${MY_RADMON:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Radiance_Monitor}
export MY_RADMON=${MY_RADMON:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/ProdGSI/util/Radiance_Monitor}

#
# The MY_TANKDIR will be the location for the extracted data files and
# the control files used for image plotting. This is the base definition
# and the succedding scripts will construct and use subdirectories under
# this location.
#
export MY_TANKDIR=${MY_TANKDIR:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/nbns}
export MY_TANKDIR=${MY_TANKDIR:-/scratch1/NCEPDEV/da/Edward.Safford/nbns}

export RUN=${RUN:-gdas}

Expand Down Expand Up @@ -67,16 +67,16 @@ export WEBDIR=${WEBDIR:-/home/people/emc/www/htdocs/gmb/gdas/radiance/esafford}
###############################################################################
###############################################################################

export MY_MACHINE=wcoss_d
export MY_MACHINE=hera
export LITTLE_ENDIAN=${LITTLE_ENDIAN:-0}


#
# Log and work space definitions
#
export MY_PTMP=${MY_PTMP:-/gpfs/dell2/ptmp}
export MY_PTMP=${MY_PTMP:-/scratch2/NCEPDEV/stmp3}
export PTMP_USER=${PTMP_USER:-${MY_PTMP}/${LOGNAME}}
export MY_STMP=${MY_STMP:-/gpfs/dell2/stmp}
export MY_STMP=${MY_STMP:-/scratch2/NCEPDEV/stmp1}
export STMP_USER=${STMP_USER:-${MY_STMP}/${LOGNAME}}

export LOGSverf_rad=${LOGSverf_rad:-${PTMP_USER}/logs}
Expand Down Expand Up @@ -184,39 +184,19 @@ elif [[ $MY_MACHINE = "cray" ]]; then
export COMPRESS="gzip -f"
export UNCOMPRESS="gunzip -f"

elif [[ $MY_MACHINE = "theia" ]]; then
elif [[ $MY_MACHINE = "hera" ]]; then

export GRADS=/apps/grads/2.0.2/bin/grads
export STNMAP=/apps/grads/2.0.2/bin/stnmap

export SUB=/apps/slurm/default/bin/sbatch
NWPROD=${NWPROD:-/scratch4/NCEPDEV/global/save/glopara/nwpara/util}
NWPRODush=${NWPRODush:=${NWPROD}/ush}
NWPRODexec=${NWPRODexec:=${NWPROD}/exec}
export NDATE=${NDATE:-${NWPRODexec}/ndate}
export COMPRESS=gzip
export UNCOMPRESS="gunzip -f"
export LOADLQ="squeue -u $LOGNAME"

#------------------------------------------------------------------------
# The links below are a hack around the modules that are available
# on the wcoss ibm & cray machines but not here on theia. The alternative
# was a bunch of contitional executions within the scripts to avoid the
# nco mandated log and error requirements.
#------------------------------------------------------------------------
export NDATE=/home/Edward.Safford/bin/ndate
export COMPRESS=${COMPRESS:-gzip}
export UNCOMPRESS=${UNCOMPRESS:-"gunzip -f"}

prevday=`$NDATE -24 $PDATE`
export PDYm1=`echo $prevday | cut -c1-8`
ln -s ${NWPRODush}/startmsg.sh ${STMP_USER}/startmsg
ln -s ${NWPRODush}/postmsg.sh ${STMP_USER}/postmsg
ln -s ${NWPRODush}/prep_step.sh ${STMP_USER}/prep_step
ln -s ${NWPRODush}/err_chk.sh ${STMP_USER}/err_chk
export PATH=$PATH:${STMP_USER}

#------------------------------------------------------------------------
# err_chk "helpfully" calls postmsg.sh directly so we need to override
# the utilscript location on theia to defeat err_chk's helpfulness and
# avoid a fatal error.
#------------------------------------------------------------------------
export utilscript=${utilscript:-${NWPRODush}}



fi


Expand Down

0 comments on commit e2a33cc

Please sign in to comment.