Skip to content

Commit

Permalink
GitHub Issue NOAA-EMC#215 Ported the MinMon to S4 and Jet. Improvemen…
Browse files Browse the repository at this point in the history
…ts made for the workflow.

The MinMon will now look for data files in the location specified by the
global global workflow vrfy.sh script.  The MinMon will also now copy
the images into the TANKDIR.
  • Loading branch information
DavidHuber-NOAA committed Oct 14, 2021
1 parent 369df8b commit 9a32400
Show file tree
Hide file tree
Showing 14 changed files with 964 additions and 11 deletions.
14 changes: 14 additions & 0 deletions util/Minimization_Monitor/image_gen/ush/MinMon_Plt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,9 @@ cyc=`echo $PDATE|cut -c9-10`
echo TANKDIR = ${TANKDIR}

gnorm_dir=${TANKDIR}/${RUN}.${pdy}/${cyc}/minmon
if [[ ! -d ${gnorm_dir} ]]; then
gnorm_dir=${TANKDIR}/${RUN}.${pdy}
fi

gnorm_file=${gnorm_dir}/gnorm_data.txt

Expand Down Expand Up @@ -187,6 +190,10 @@ while [[ $cdate -le $edate ]]; do

gnorm_dir=${TANKDIR}/${RUN}.${pdy}/${cyc}/minmon

if [[ ! -d ${gnorm_dir} ]]; then
gnorm_dir=${TANKDIR}/${RUN}.${pdy}
fi

gnorms_file=${gnorm_dir}/${cdate}.gnorms.ieee_d
local_gnorm=${cdate}.gnorms.ieee_d

Expand Down Expand Up @@ -360,6 +367,13 @@ fi
${WEBUSER}@${WEBSERVER}:${WEBDIR}/$run_suffix/
fi

if [[ ! -d ${MIN_IMGN_TANKDIR} ]]; then
mkdir -p ${MIN_IMGN_TANKDIR}
fi

cd ./tmp
cp *.png ${MIN_IMGN_TANKDIR}

#--------------------------------------------------------------------
# Call nu_make_archive.sh to write archive files to hpss and
# update the prod machine with any missing M_TANKDIR directories.
Expand Down
31 changes: 31 additions & 0 deletions util/Minimization_Monitor/parm/MinMon_config
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ if [[ $MINMON_CONFIG -ne 1 ]]; then

export MY_TANKDIR=${MY_TANKDIR:-/scratch1/NCEPDEV/da/Edward.Safford/nbns}
export M_TANKverf=${M_TANKverf:-${MY_TANKDIR}}
export MIN_IMGN_TANKDIR=${MY_TANKDIR}/imgn/${MINMON_SUFFIX}

export WEBUSER=${WEBUSER:-esafford}
export WEBSERVER=${WEBSERVER:-emcrzdm}
Expand Down Expand Up @@ -135,6 +136,36 @@ if [[ $MINMON_CONFIG -ne 1 ]]; then
export NDATE=${NWPROD}/ndate
export COMPRESS=gzip
export UNCOMPRESS="gunzip -f"
elif [[ $MY_MACHINE = "s4" ]]; then
shell=sh
. $MODULESHOME/init/$shell
module load grads/2.2.1
module load license_intel/S4
module use /data/prod/hpc-stack/modulefiles/stack
module load hpc/1.1.0 hpc-intel/18.0.4 prod_util/1.2.2

export GRADS=`which grads`
export STNMAP=`which stnmap`

export SUB=/usr/bin/sbatch
export NWPROD=/data/prod/hpc-stack/intel-18.0.4/prod_util/1.2.2/bin
export COMPRESS=gzip
export UNCOMPRESS="gunzip -f"

elif [[ $MY_MACHINE = "jet" ]]; then
shell=sh
. $MODULESHOME/init/$shell
module load grads/2.2.1
module use /lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/modulefiles/stack
module load hpc/1.1.0 hpc-intel/18.0.5.274 prod_util/1.2.2

export GRADS=`which grads`
export STNMAP=`which stnmap`

export SUB=/apps/slurm/default/bin/sbatch
export NWPROD=/lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/intel-18.0.5.274/prod_util/1.2.2/bin
export COMPRESS=gzip
export UNCOMPRESS="gunzip -f"
fi

export NDATE=${NDATE:-${NWPROD}/util/exec/ndate}
Expand Down
11 changes: 9 additions & 2 deletions util/Ozone_Monitor/build_OznMon_cmake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ elif [[ -d /scratch1 ]] ; then
elif [[ -d /work ]]; then
. $MODULESHOME/init/sh
target=orion
elif [[ -d /data/prod ]]; then
. $MODULESHOME/init/sh
target=s4
elif [[ -d /jetmon ]]; then
. /apps/lmod/lmod/init/sh
target=jet
else
echo "unknown target = $target"
exit 9
Expand All @@ -64,7 +70,8 @@ fi
#---------------------------------------------------

if [[ ${target} = "hera" || ${target} = "wcoss_c" \
|| ${target} = "wcoss_d" || ${target} = "orion" ]]; then
|| ${target} = "wcoss_d" || ${target} = "orion" \
|| ${target} = "jet" || ${target} = "s4" ]]; then
echo Building nwprod executables on ${target}
echo

Expand All @@ -79,7 +86,7 @@ if [[ ${target} = "hera" || ${target} = "wcoss_c" \
elif [ $target = gaea ]; then
module purge
module load $dir_modules/modulefile.ProdGSI.$target
elif [ $target = hera -o $target = orion ]; then
elif [ $target = hera -o $target = orion -o $target = s4 -o $target = jet ]; then
module purge
module use $dir_modules
module load modulefile.ProdGSI.$target
Expand Down
10 changes: 9 additions & 1 deletion util/Ozone_Monitor/image_gen/ush/OznMon_Plt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ nargs=$#
echo nargs = $nargs



while [[ $# -ge 1 ]]
do
key="$1"
Expand Down Expand Up @@ -161,6 +160,15 @@ if [[ ! -d ${OZN_IMGN_TANKDIR} ]]; then
mkdir -p ${OZN_IMGN_TANKDIR}
fi

#---------------------------------------------------------------
# Create any missing directories.
#---------------------------------------------------------------
if [[ ! -d $OZN_LOGdir ]]; then
mkdir -p $OZN_LOGdir
fi




#--------------------------------------------------------------------
# Determine cycle to plot. Exit if cycle is > last available
Expand Down
9 changes: 7 additions & 2 deletions util/Ozone_Monitor/image_gen/ush/mk_horiz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ for dsrc in ${data_source}; do
list="obs anl obsanl"
fi

if [[ ${MY_MACHINE} = "hera" ]]; then
if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "jet" || ${MY_MACHINE} = "s4" ]]; then
echo "$ctr ${OZN_IG_SCRIPTS}/plot_horiz.sh $type $suffix '$list' $dsrc" >> $cmdfile
else
echo "${OZN_IG_SCRIPTS}/plot_horiz.sh $type $suffix '$list' $dsrc" >> $cmdfile
Expand All @@ -79,11 +79,16 @@ for dsrc in ${data_source}; do
fi


if [[ ${MY_MACHINE} = "hera" ]]; then
if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "s4" ]]; then

$SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} \
--time=10 --wrap "srun -l --multi-prog ${cmdfile}"

elif [[ ${MY_MACHINE} = "jet" ]]; then

$SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} \
--time=10 --partition=$PARTITION_OZNMON --wrap "srun -l --multi-prog ${cmdfile}"

elif [[ ${MY_MACHINE} = "wcoss_c" ]]; then

$SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \
Expand Down
9 changes: 7 additions & 2 deletions util/Ozone_Monitor/image_gen/ush/mk_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ for ptype in ${process_type}; do
#
if [[ $type != "omi_aura" && $type != "gome_metop-a" && \
$type != "gome_metop-b" && $type != "ompstc8_npp" ]]; then
if [[ ${MY_MACHINE} = "hera" ]]; then
if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "jet" || ${MY_MACHINE} = "s4" ]]; then
echo "${ctr} ${OZN_IG_SCRIPTS}/plot_summary.sh $type $ptype" >> $cmdfile
else
echo "${OZN_IG_SCRIPTS}/plot_summary.sh $type $ptype" >> $cmdfile
Expand All @@ -94,11 +94,16 @@ for ptype in ${process_type}; do
rm -f $errf
fi

if [[ ${MY_MACHINE} = "hera" ]]; then
if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "s4" ]]; then

$SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} --time=10 \
--wrap "srun -l --multi-prog ${cmdfile}"

elif [[ ${MY_MACHINE} = "jet" ]]; then

$SUB --account ${ACCOUNT} -n $ctr -p ${PARTITION_OZNMON} -o ${logf} -D . -J ${job} --time=10 \
--wrap "srun -l --multi-prog ${cmdfile}"

elif [[ ${MY_MACHINE} = "wcoss_c" ]]; then

$SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \
Expand Down
9 changes: 7 additions & 2 deletions util/Ozone_Monitor/image_gen/ush/mk_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ for dsrc in ${data_source}; do

>$cmdfile
for type in ${SATYPE}; do
if [[ ${MY_MACHINE} = "hera" ]]; then
if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "jet" || ${MY_MACHINE} = "s4" ]]; then
echo "${ctr} ${OZN_IG_SCRIPTS}/plot_time.sh $type $suffix '$list' $dsrc" >> $cmdfile
((ctr=ctr+1))
else
Expand All @@ -72,11 +72,16 @@ for dsrc in ${data_source}; do
rm -f $errf
fi

if [[ ${MY_MACHINE} = "hera" ]]; then
if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "s4" ]]; then

$SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} --time=10 \
--wrap "srun -l --multi-prog ${cmdfile}"

elif [[ ${MY_MACHINE} = "jet" ]]; then

$SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} --time=10 \
-p ${PARTITION_OZNMON} --wrap "srun -l --multi-prog ${cmdfile}"

elif [[ ${MY_MACHINE} = "wcoss_c" ]]; then

$SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \
Expand Down
3 changes: 3 additions & 0 deletions util/Ozone_Monitor/image_gen/ush/plot_horiz.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ while [[ $ctr -le 3 ]]; do
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/atmos/oznmon/horiz
if [[ ! -d ${tankdir_cdate} ]]; then
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/horiz
if [[ ! -d ${tankdir_cdate} ]]; then
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/horiz
fi
fi

$NCP ${tankdir_cdate}/${SATYPE}.${dsrc}.ctl ./
Expand Down
3 changes: 3 additions & 0 deletions util/Ozone_Monitor/image_gen/ush/plot_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ while [[ $ctr -le 120 ]]; do
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/atmos/oznmon/time
if [[ ! -d ${tankdir_cdate} ]]; then
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/time
if [[ ! -d ${tankdir_cdate} ]]; then
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/time
fi
fi

if [[ ! -e ./${SATYPE}.${ptype}.ctl ]]; then
Expand Down
3 changes: 3 additions & 0 deletions util/Ozone_Monitor/image_gen/ush/plot_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ while [[ $ctr -le 119 ]]; do
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/atmos/oznmon/time
if [[ ! -d ${tankdir_cdate} ]]; then
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/time
if [[ ! -d ${tankdir_cdate} ]]; then
tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/time
fi
fi

if [[ ! -e ./${SATYPE}.${dsrc}.ctl ]]; then
Expand Down
Loading

0 comments on commit 9a32400

Please sign in to comment.