Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
OznMon changes from hera.
  • Loading branch information
EdwardSafford-NOAA committed Jul 21, 2022
1 parent 5dd3d9b commit 6680092
Show file tree
Hide file tree
Showing 13 changed files with 125 additions and 502 deletions.
6 changes: 5 additions & 1 deletion parm/Mon_config
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,15 @@ case $MY_MACHINE in
module load wgrib2/2.0.8
module load grads/2.2.1
module load prod_util/1.2.2
module load netcdf/4.7.4

export SUB=/usr/bin/sbatch
export SERVICE_PARTITION="serial"
;;

#rstprod data is not allowed on S4
CHGRP_CMD=echo
;;

jet)
module use /lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/modulefiles/stack
module load hpc/1.1.0 hpc-intel/18.0.5.274 hpc-impi/2018.4.274
Expand Down
1 change: 1 addition & 0 deletions src/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ fi
#-----------------------------------------------
# Process command line arguments
#
RUN=gdas
while [[ $# -ge 1 ]]
do
key="$1"
Expand Down
12 changes: 0 additions & 12 deletions src/Ozone_Monitor/image_gen/ush/OznMon_Plt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -133,17 +133,6 @@ else
fi


#--------------------------------------------------------------------
# Check for my monitoring use. Abort if running on prod machine.
#--------------------------------------------------------------------
if [[ RUN_ONLY_ON_DEV = 1 ]]; then
is_prod=`${OZN_IG_SCRIPTS}/onprod.sh`
if [[ $is_prod = 1 ]]; then
exit 10
fi
fi


#--------------------------------------------------------------------
# Specify TANKDIR for this suffix
#--------------------------------------------------------------------
Expand Down Expand Up @@ -237,7 +226,6 @@ if [[ ${pdate} -le ${latest_data} ]]; then
export SATYPE=${SATYPE:-`cat ${HOMEgdas_ozn}/fix/${RUN}_oznmon_satype.txt`}
fi


${OZN_IG_SCRIPTS}/mk_horiz.sh
${OZN_IG_SCRIPTS}/mk_time.sh
${OZN_IG_SCRIPTS}/mk_summary.sh
Expand Down
13 changes: 2 additions & 11 deletions src/Ozone_Monitor/image_gen/ush/mk_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,8 @@ for ptype in ${process_type}; do
$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} \
-R "select[mem>100] rusage[mem=100]" \
-M 100 -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile}

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

$SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \
-o ${logf} -e ${errf} -W 0:05 -J ${job} \
-cwd ${WORKDIR} ${WORKDIR}/${cmdfile}
elif [[ $MY_MACHINE = "wcoss2" ]]; then
echo "add job submission here"

fi

Expand Down
13 changes: 4 additions & 9 deletions src/Ozone_Monitor/image_gen/ush/mk_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,11 @@ for dsrc in ${data_source}; do
$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
elif [[ ${MY_MACHINE} = "wcoss2" ]]; then

$SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \
-R "select[mem>100] rusage[mem=100]" \
-M 100 -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile}

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

$SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \
-o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile}
echo "placeholder for wcoss2 submission"
# $SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \
# -o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile}

fi

Expand Down
44 changes: 25 additions & 19 deletions src/Ozone_Monitor/image_gen/ush/plot_summary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,37 +63,43 @@ while [[ $ctr -le 120 ]]; do
ctr=`expr $ctr + 1`
done

ndataf=`ls -1 *.ieee_d | wc -l`
if [[ $ndataf -le 0 ]]; then
echo "Unable to locate data files for $SATYPE"

else

#----------------------------------------------------------------
# Modify tdef line in .ctl file to start at bdate. tdef line
# should be 1 more than the total number of cycles so the last
# cycle will be the cycle specified by $PDATE.
#
if [[ -e ${SATYPE}.${ptype}.ctl ]]; then
bdate=`$NDATE -720 $PDATE`
${OZN_IG_SCRIPTS}/update_ctl_tdef.sh ${SATYPE}.${ptype}.ctl ${bdate} 121
fi

#----------------------------------------------------------------
# Modify tdef line in .ctl file to start at bdate. tdef line
# should be 1 more than the total number of cycles so the last
# cycle will be the cycle specified by $PDATE.
#
if [[ -e ${SATYPE}.${ptype}.ctl ]]; then
bdate=`$NDATE -720 $PDATE`
${OZN_IG_SCRIPTS}/update_ctl_tdef.sh ${SATYPE}.${ptype}.ctl ${bdate} 121
fi

cat << EOF > ${SATYPE}.gs
cat << EOF > ${SATYPE}.gs
'open ${SATYPE}.${ptype}.ctl'
'run ${OZN_IG_GSCRPTS}/plot_summary.gs ${OZNMON_SUFFIX} ${RUN} ${SATYPE} ${ptype} x750 y700'
'quit'
EOF

$GRADS -bpc "run ${tmpdir}/${SATYPE}.gs"
$GRADS -bpc "run ${tmpdir}/${SATYPE}.gs"


#--------------------------------------------------------------------
# copy image files to TANKDIR
#
${NCP} *.png ${OZN_IMGN_TANKDIR}/.
#--------------------------------------------------------------------
# copy image files to TANKDIR
#
${NCP} *.png ${OZN_IMGN_TANKDIR}/.

fi

#--------------------------------------------------------------------
# Clean $tmpdir.
#cd $tmpdir
#cd ../
#rm -rf $tmpdir
cd $tmpdir
cd ../
rm -rf $tmpdir

exit

3 changes: 3 additions & 0 deletions src/Ozone_Monitor/image_gen/ush/plot_time.sh
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ if [[ -e ${SATYPE}.${dsrc}.ctl ]]; then
if [[ $ADD_COMP -eq 1 ]]; then
${OZN_IG_SCRIPTS}/update_ctl_tdef.sh ${COMP2}.${dsrc}.ctl ${edate} 121
fi
else
echo "unable to locate ${SATYPE}.${dsrc}.ctl, exiting"
exit
fi


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
#SBATCH --account=fv3-cpu
#SBATCH -D .

set -x
set -ax

export OZNMON_NEW_HDR=${OZN_NEW_HDR:-0}

export PDATE=${PDATE:-2020032106} # netcdf
export PDATE=${PDATE:-2022071900} # netcdf
#export PDATE=${PDATE:-2020013000} # bin
export NET=${NET:-gfs}
export RUN=${RUN:-gdas}
Expand All @@ -31,10 +31,11 @@ export OZN_WORK_DIR=${OZN_WORK_DIR:-/scratch2/NCEPDEV/stmp3/${LOGNAME}/oznmon.${
# Set package definitions.
#
export OZNMON_SUFFIX=${OZNMON_SUFFIX:-testozn}
export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/update/util/Ozone_Monitor/nwprod}
export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/GSI-monitor/src/Ozone_Monitor/nwprod}
export HOMEgdas_ozn=${HOMEgdas_ozn:-${NWTEST}/gdas_oznmon}
export PARMgdas_ozn=${PARMgdas_ozn:-${HOMEgdas_ozn}/parm}
export FIXgdas_ozn=${FIXgdas_ozn:-${HOMEgdas_ozn}/fix}
export EXECoznmon=${EXECoznmon:-/scratch1/NCEPDEV/da/${LOGNAME}/noscrub/GSI-monitor/install/bin}

export HOMEgfs=${HOMEgfs:-${HOMEgdas_ozn}}
export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgfs}}
Expand Down

This file was deleted.

This file was deleted.

5 changes: 3 additions & 2 deletions src/Ozone_Monitor/nwprod/oznmon_shared/ush/ozn_xtrct.sh
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,12 @@ else
#--------------------------------------------------------------------
# Copy extraction programs to working directory
#
${NCP} ${HOMEoznmon}/exec/oznmon_time.x ./oznmon_time.x
${NCP} ${EXECoznmon}/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} ${EXECoznmon}/oznmon_horiz.x ./oznmon_horiz.x
if [[ ! -e oznmon_horiz.x ]]; then
iret=3
exit ${iret}
Expand Down Expand Up @@ -170,6 +170,7 @@ else
idd=`echo ${PDATE} | cut -c7-8`
ihh=`echo ${PDATE} | cut -c9-10`


for type in ${satype}; do
echo "processing ptype, type: ${ptype}, ${type}"
rm -f input
Expand Down
Loading

0 comments on commit 6680092

Please sign in to comment.