Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
wcoss2 plot updates.
  • Loading branch information
EdwardSafford-NOAA committed Dec 14, 2022
1 parent 8986fd2 commit 5820bd3
Show file tree
Hide file tree
Showing 20 changed files with 245 additions and 1,806 deletions.
5 changes: 2 additions & 3 deletions src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ this_file=`basename $0`
this_dir=`dirname $0`


gfs_ver=v16.2
gfs_ver=v16.3

echo CONMON_SUFFIX = $CONMON_SUFFIX
export NET=${CONMON_SUFFIX}
Expand Down Expand Up @@ -129,7 +129,7 @@ else
GDATE=`$NDATE -06 $PDATE`
fi

echo GDATE = $GDATE
echo GDATE, PDATE = $GDATE, $PDATE

export PDY=`echo $PDATE|cut -c1-8`
export CYC=`echo $PDATE|cut -c9-10`
Expand Down Expand Up @@ -192,7 +192,6 @@ echo "cnvstat = $cnvstat"
echo "pgrbf00 = $pgrbf00"
echo "pgrbf06 = $pgrbf06"

exit

#---------------------------------------------
# override the default convinfo definition
Expand Down
12 changes: 1 addition & 11 deletions src/Conventional_Monitor/image_gen/gscripts/colorbar.gs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ function colorbar (args)
*
* Check shading information
*
say '--> colorbar.gs'

'query shades'
shdinfo = result
say 'shdinfo = 'shdinfo

if (subwrd(shdinfo,1)='None')
say 'Cannot plot color bar: No shading information'
Expand Down Expand Up @@ -74,14 +73,10 @@ function colorbar (args)
*
'set strsiz 0.12 0.13'
num = 0
say 'cnum = 'cnum
while (num<cnum)
rec = sublin(shdinfo,num+2)
say 'rec = 'rec
col = subwrd(rec,1)
say 'col = 'col
hi = subwrd(rec,3)
say 'hi = 'hi

'set line 'col
if (vert)
Expand All @@ -94,10 +89,6 @@ function colorbar (args)
if (vert)
'draw string '%(xr+0.05)%' 'yt' 'hi
else
say 'drawing string for horiz bar'
say 'xr = 'xr
say 'yb - 'yb
say 'hi - 'hi
'draw string 'xr' '%(yb-0.05)%' 'hi
endif
endif
Expand All @@ -106,7 +97,6 @@ function colorbar (args)
else; xl = xr; endif;
endwhile

say '<-- colorbar.gs'

return
endfile
1 change: 0 additions & 1 deletion src/Conventional_Monitor/image_gen/gscripts/page.gs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ if (nx >= 1 & nx <= 9 & ny >= 1 & ny <= 9)
y0 = ylo + (yhi - ylo) * (iy - 1) / ny
y1 = ylo + (yhi - ylo) * (iy ) / ny
'set vpage ' x0 ' ' x1 ' ' y0 ' ' y1
say 'set vpage ' x0 ' ' x1 ' ' y0 ' ' y1
endif

'set grads off'
Expand Down
2 changes: 0 additions & 2 deletions src/Conventional_Monitor/image_gen/gscripts/plot_hist.gs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ debug=0
lin1=sublin(result,1)
dtype=subwrd(lin1,4)
cycle=subwrd(lin1,5)
say 'dtype=' dtype
say 'cycle='cycle
histplot(dtype,cycle,plotfile,xsize,ysize,cdate)
if (debug = 1)
say 'hit enter to continue'
Expand Down
19 changes: 9 additions & 10 deletions src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ function usage {
echo " "
echo " "
echo "Usage: ConMon_IG.sh suffix [-p|--pdate pdate -r|--run gdas|gfs -n|--ncyc]"
echo " "
echo " Suffix is the indentifier for this data source."
echo " "
echo " -p | --pdate yyyymmddcc to specify the cycle to be plotted."
echo " If unspecified pdate will be set using the "
echo " If not specified pdate will be set using the "
echo " C_IMGNDIR/last_plot_time file, and if that doesn't"
echo " exist, then the last available date will be plotted."
echo " "
echo " -r | --run the gdas|gfs run to be processed."
echo " Use only if data in TANKdir stores both runs, gdas"
echo " gdas is the default value."
echo " Use only if data in TANKdir stores both runs."
echo " Default value is gdas"
echo " "
echo " -n | --ncyc is the number of cycles to be used in time series plots. If"
echo " not specified the default value in parm/RadMon_user_settins will be used"
Expand All @@ -50,6 +51,7 @@ fi
#
export RUN=gdas
num_cycles=""
PDATE=""

while [[ $# -ge 1 ]]
do
Expand All @@ -66,7 +68,7 @@ do
shift # past argument
;;
-n|--ncyc)
export num_cycles="$2"
num_cycles="$2"
shift # past argument
;;
*)
Expand All @@ -90,9 +92,7 @@ if [[ ${#num_cycles} -gt 0 ]]; then
fi


export JOBNAME=${JOBNAME:-ConMon_plt_${CONMON_SUFFIX}}
export grib2=${grib2:-1} # 1 = grib2 (true), 0 = grib
# should this move to config?
export JOBNAME=${JOBNAME:-CM_IG_${CONMON_SUFFIX}}

#--------------------------------------------------------------------
# Run config files to load environment variables,
Expand Down Expand Up @@ -157,9 +157,7 @@ fi
# Set the START_DATE for the plot
#--------------------------------------------------------------------
ncycles=`expr $NUM_CYCLES - 1`

hrs=`expr $ncycles \\* -6`
echo "hrs = $hrs"

export START_DATE=`$NDATE ${hrs} $PDATE`
echo "START_DATE, last_cycle, PDATE = $START_DATE $last_cycle $PDATE"
Expand All @@ -184,7 +182,7 @@ if [[ $PDATE -le ${last_cycle} ]]; then
cd $C_PLOT_WORKDIR

#--------------------------------------------------------------------
# Run the two setup scripts
# Run the two plot setup scripts
#--------------------------------------------------------------------
${C_IG_SCRIPTS}/mk_horz_hist.sh

Expand All @@ -193,6 +191,7 @@ if [[ $PDATE -le ${last_cycle} ]]; then
#--------------------------------------------------------------------
# Update the last_plot_time file if found
#--------------------------------------------------------------------
echo C_IMGNDIR = $C_IMGNDIR
if [[ -e ${C_IMGNDIR}/last_plot_time ]]; then
echo "update last_plot_time file"
echo ${PDATE} > ${C_IMGNDIR}/last_plot_time
Expand Down
31 changes: 18 additions & 13 deletions src/Conventional_Monitor/image_gen/ush/Transfer.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash

#--------------------------------------------------------------------
# usage
Expand All @@ -12,11 +12,6 @@ function usage {
echo " "
}


set -ax
mybin=`ls ~/bin`
echo "test: $mybin"

nargs=$#
if [[ $nargs -lt 1 || $nargs -gt 3 ]]; then
usage
Expand Down Expand Up @@ -48,7 +43,6 @@ do
done


CMON_SUFFIX=$CONMON_SUFFIX
this_file=`basename $0`
this_dir=`dirname $0`

Expand All @@ -64,12 +58,20 @@ else
fi


logfile=${C_LOGDIR}/transfer_${CMON_SUFFIX}.log
logfile=${C_LOGDIR}/transfer_${CONMON_SUFFIX}.log
if [[ -e ${logfile} ]]; then
rm ${logfile}
fi

errfile=${C_LOGDIR}/transfer_${CONMON_SUFFIX}.err
if [[ -e ${errfile} ]]; then
rm ${errfile}
fi

export JOB_QUEUE=dev_transfer
WEBDIR=${WEBDIR}/${CMON_SUFFIX}/${RUN}
WEBDIR=${WEBDIR}/${CONMON_SUFFIX}/${RUN}

export jobname=transfer_${CMON_SUFFIX}_conmon
export jobname=transfer_${CONMON_SUFFIX}_conmon

#--------------------------------------------------------
# Note that transfers from hera are not straightforward,
Expand All @@ -78,13 +80,16 @@ export jobname=transfer_${CMON_SUFFIX}_conmon
# and leave it to the user to manually transfer files to
# the server.
#
if [[ $MY_MACHINE == "wcoss_d" || $MY_MACHINE == "wcoss_c" ]]; then
$SUB -P $PROJECT -q $JOB_QUEUE -o ${logfile} -M 80 -W 1:30 \
-R affinity[core] -J ${jobname} -cwd ${PWD} \
if [[ $MY_MACHINE = "wcoss2" ]]; then

$SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${errfile} \
-V -l select=1:mem=500M -l walltime=45:00 -N ${jobname} \
${C_IG_SCRIPTS}/transfer_imgs.sh

else
echo "Unable to transfer files from $MY_MACHINE to $WEBSVR."
echo "Manual intervention is required."

fi


Expand Down
Loading

0 comments on commit 5820bd3

Please sign in to comment.