From 200cd37c18ee03c35bf013580a0a19b88d314d04 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Thu, 3 Nov 2022 14:43:37 +0000 Subject: [PATCH 1/8] Ref #28 Begin overhaul of ConMon_config. --- src/Conventional_Monitor/parm/ConMon_config | 236 ++++++++------------ 1 file changed, 94 insertions(+), 142 deletions(-) diff --git a/src/Conventional_Monitor/parm/ConMon_config b/src/Conventional_Monitor/parm/ConMon_config index 629dcc7e..2f707255 100644 --- a/src/Conventional_Monitor/parm/ConMon_config +++ b/src/Conventional_Monitor/parm/ConMon_config @@ -3,44 +3,66 @@ # #------------------------------------------------------- -if [[ $CONMON_CONFIG -ne 1 ]]; then +echo "begin ConMon_config" - echo "begin ConMon_config" +#------------------------------------------------------- +# Source Mon_config for GSI-monitor definitions common +# to all monitors. +# +readonly dir_root=$(cd "$(dirname "$(readlink -f -n "${BASH_SOURCE[0]}" )" )/.." && pwd -P) - export CONMON_CONFIG=1 +MON_CONFIG=$dir_root/../../parm/Mon_config +source $MON_CONFIG - export MY_MACHINE=wcoss_d +export MONITOR=conmon +export RUN=${RUN:-gdas} +export WEBDIR=${WEBDIR:-/home/people/emc/www/htdocs/gmb/gdas/es_conv} - #----------------------------------------------------- - # DO_DATA_RPT controls the generation of automated - # warning messages to detect and report potential - # low counts by data type_subtype. - # - # MAIL_TO and MAIL_CC specifies the default - # distribution for warning messages. - # - export DO_DATA_RPT=${DO_DATA_RPT:-1} +#--------------------------------------------------------------------------- +# TANKDIR is the location for the extracted data files and +# the control files used for image plotting. +# +#export CONMON_TANKDIR=/u/Edward.Safford/nbns +#export C_TANKverf=${C_TANKverf:-${CONMON_TANKDIR}} + +export C_TANKDIR=${TANKDIR}/stats/${CONMON_SUFFIX} +export C_IMGNDIR=${CTANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon + + + +#----------------------------------------------------- +# DO_DATA_RPT controls the generation of automated +# warning messages to detect and report potential +# low counts by data type_subtype. +# +# MAIL_TO and MAIL_CC specifies the default +# distribution for warning messages. +# +# export DO_DATA_RPT=${DO_DATA_RPT:-1} + +# export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} +# if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then +# cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${CONMON_SUFFIX}_${RUN} --mon ConMon` +# else +# cc_list="" +# fi +# export MAIL_CC=${MAIL_CC:=${cc_list}} - export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} - if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then - cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${CONMON_SUFFIX}_${RUN} --mon ConMon` - else - cc_list="" - fi - export MAIL_CC=${MAIL_CC:=${cc_list}} #----------------------------------------------------- # The grib2 flag indicates if the data files are in # grib2 format (1) or grib (0) # - export grib2=${grib2:-1} +# export grib2=${grib2:-1} - #--------------------------------------------------------------------- - # MY_CONMON should point to your working directory which contains the - # top level directory to the ConMon package. - # - export MY_CONMON=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Conventional_Monitor + + +#-------------------------------------- +# Definitions for internal reference +# + +export MY_CONMON=${MY_GSI_MONITOR}/src/Conventional_Monitor #--------------------------------------------------------------------- @@ -49,63 +71,10 @@ if [[ $CONMON_CONFIG -ne 1 ]]; then # The CONMON_RESTRICT_PLOT_AREAS reduces the regions to Global, # N. America, S. America, Tropics, Europe, and Asia. # - export CONMON_RESTRICT_PLOT_AREAS=1 +# export CONMON_RESTRICT_PLOT_AREAS=1 - #--------------------------------------------------------------------------- - # The CONMON_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 CONMON_TANKDIR=/u/Edward.Safford/nbns - export C_TANKverf=${C_TANKverf:-${CONMON_TANKDIR}} - - export C_TANKDIR=${CONMON_TANKDIR}/stats/${CONMON_SUFFIX} - export C_IMGNDIR=${CONMON_TANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon - - - if [[ $MY_MACHINE = "wcoss_c" ]]; then - module load prod_util # defines $NDATE among other things - module load prod_envir - module load grib_util/1.0.5 # note 1.1.0 and 1.1.1 report runtime errors - module load util_shared - - export SUB="bsub" - export COMPRESS=gzip - export UNCOMPRESS="gunzip -f" - - elif [[ $MY_MACHINE = "wcoss_d" ]]; then - shell=sh - source /usrx/local/prod/lmod/lmod/init/${shell} - - MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core - MODULEPATH=${MODULEPATH}:/usrx/local/prod/modulefiles/core_third - MODULEPATH=${MODULEPATH}:/usrx/local/prod/modulefiles/defs - MODULEPATH=${MODULEPATH}:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod - export MODULEPATH=${MODULEPATH}:/usrx/local/dev/modulefiles - - module load ips/18.0.1.163 - module load metplus/2.1 - module load lsf/10.1 - module load prod_util/1.1.2 - module load GrADS/2.2.0 - module load grib_util/1.1.1 - module load prod_envir/1.0.3 - -# module prod_envir won't load at the moment. Maybe -# that's file system problems, maybe it's worse. -# Either way I need COMROOTp3 defined, so I'll do it -# manually for the moment. -# module load prod_envir/1.0.3 - export COMROOTp3="/gpfs/dell1/nco/ops/com" - - export GRADS=`which grads` - export SUB="bsub" - export COMPRESS=/usr/bin/gzip - export UNCOMPRESS="/usr/bin/gunzip -f" - - elif [[ $MY_MACHINE = "s4" ]]; then + if [[ $MY_MACHINE = "s4" ]]; then module load license_intel module use /data/prod/hpc-stack/modulefiles/stack module load hpc/1.1.0 hpc-intel/18.0.4 hpc-impi/18.0.4 @@ -113,11 +82,6 @@ if [[ $CONMON_CONFIG -ne 1 ]]; then module load grads/2.2.1 module load prod_util/1.2.2 - export WGRIB2=`which wgrib2` - - export GRADS=`which grads` - export STNMAP=`which stnmap` - export SUB=/usr/bin/sbatch export NDATE=/data/prod/hpc-stack/intel-18.0.4/prod_util/1.2.2/bin/ndate export COMPRESS=${COMPRESS:-gzip} @@ -131,11 +95,6 @@ if [[ $CONMON_CONFIG -ne 1 ]]; then module load grads/2.2.1 module load prod_util/1.2.2 - export WGRIB2=`which wgrib2` - - export GRADS=`which grads` - export STNMAP=`which stnmap` - export SUB=/apps/slurm/default/bin/sbatch export NDATE=/lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/intel-18.0.5.274/prod_util/1.2.2/bin/ndate export COMPRESS=${COMPRESS:-gzip} @@ -143,14 +102,6 @@ if [[ $CONMON_CONFIG -ne 1 ]]; then export SERVICE_PARTITION="service" elif [[ $MY_MACHINE = "hera" ]]; then - module use -a /apps/modules/modulefamilies/intel - module load wgrib2/2.0.8 - module load grads/2.2.1 - - export WGRIB2=`which wgrib2` - - export GRADS=`which grads` - export STNMAP=`which stnmap` #/apps/grads/2.0.2/bin/stnmap export SUB=/apps/slurm/default/bin/sbatch export NDATE=/home/Edward.Safford/bin/ndate @@ -163,71 +114,72 @@ if [[ $CONMON_CONFIG -ne 1 ]]; then export UNCOMPRESS="/usr/bin/gunzip -f" fi - export Z="gz" + export WGRIB2=`which wgrib2` + export GRADS=`which grads` + export STNMAP=`which stnmap` - export ACCOUNT=${ACCOUNT:-} - export PROJECT= - export JOB_QUEUE= - - export C_STMP=${C_STMP:-/gpfs/dell2/stmp} - export C_STMP_USER=${C_STMP_USER:-${C_STMP}/${LOGNAME}} - export C_PTMP=${C_PTMP:-/gpfs/dell2/ptmp} - export C_PTMP_USER=${C_PTMP_USER:-${C_PTMP}/${LOGNAME}} - export C_LOGDIR=${C_PTMP_USER}/logs/${CONMON_SUFFIX}/${RUN}/conmon - export WORK_conmon=${WORK_conmon:-${C_STMP_USER}/${CONMON_SUFFIX}/${RUN}/ConMon} +# export Z="gz" +# +# export ACCOUNT=${ACCOUNT:-} +# export PROJECT= +# export JOB_QUEUE= +# +# export C_STMP=${C_STMP:-/gpfs/dell2/stmp} +# export C_STMP_USER=${C_STMP_USER:-${C_STMP}/${LOGNAME}} +# export C_PTMP=${C_PTMP:-/gpfs/dell2/ptmp} +# export C_PTMP_USER=${C_PTMP_USER:-${C_PTMP}/${LOGNAME}} +# +# export C_LOGDIR=${C_PTMP_USER}/logs/${CONMON_SUFFIX}/${RUN}/conmon +# export WORK_conmon=${WORK_conmon:-${C_STMP_USER}/${CONMON_SUFFIX}/${RUN}/ConMon} # # NUM_CYCLES is the number of cycles to be used time series plots. # - export NUM_CYCLES=${NUM_CYCLES:-121} +# export NUM_CYCLES=${NUM_CYCLES:-121} # # Automatically remove old, extracted data files # - export CLEAN_TANKDIR=${CLEAN_TANKDIR:-1} +# export CLEAN_TANKDIR=${CLEAN_TANKDIR:-1} # # Number of cycles worth of image data to be retained in tankdir # - export NUM_IMG_CYCLES=${NUM_IMG_CYCLES:-4} +# export NUM_IMG_CYCLES=${NUM_IMG_CYCLES:-4} # # Web server resources include the sever name (WEB_SVR), the user name # on the web server (WEB_USER), and location of the top level directory # for the html on the web server (WEBDIR). # - export WEBDIR=/home/people/emc/www/htdocs/gmb/gdas/es_conv - export WEBUSER=esafford - export WEBSVR=emcrzdm +# export WEBUSER=esafford +# export WEBSVR=emcrzdm # # Definitions for internal reference # - export CONMON_DATA_EXTRACT=${CONMON_DATA_EXTRACT:-${MY_CONMON}/data_extract} - export C_DE_EXEC=${C_DE_EXEC:-${CONMON_DATA_EXTRACT}/exec} - export C_DE_PARM=${C_DE_PARM:-${CONMON_DATA_EXTRACT}/parm} - export C_DE_SCRIPTS=${C_DE_SCRIPTS:-${CONMON_DATA_EXTRACT}/ush} - - export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen} - export C_IG_EXEC=${C_IG_EXEC:-${CONMON_IMAGE_GEN}/exec} - export C_IG_GSCRIPTS=${C_IG_GSCRIPTS:-${CONMON_IMAGE_GEN}/gscripts} - export C_IG_PARM=${C_IG_PARM:-${CONMON_IMAGE_GEN}/parm} - export C_IG_SCRIPTS=${C_IG_SCRIPTS:-${CONMON_IMAGE_GEN}/ush} - export C_IG_FIX=${C_IG_FIX:-${CONMON_IMAGE_GEN}/fix} - export C_IG_HTML=${C_IG_HTML:-${CONMON_IMAGE_GEN}/html} - export C_IG_SAVE_WORK=${C_IG_SAVE_WORK:-1} # switch to save plot work directories - - export CONMON_PARM=${CONMON_PARM:-${MY_CONMON}/parm} - - export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} - export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} - export HOMEgfs_conmon=$HOMEgdas_conmon - - export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} - export EXECconmon=${EXECconmon:-${HOMEconmon_shared}/exec} - -else - echo "ConMon_config is already loaded" -fi +# export CONMON_DATA_EXTRACT=${CONMON_DATA_EXTRACT:-${MY_CONMON}/data_extract} +# export C_DE_EXEC=${C_DE_EXEC:-${CONMON_DATA_EXTRACT}/exec} +# export C_DE_PARM=${C_DE_PARM:-${CONMON_DATA_EXTRACT}/parm} +# export C_DE_SCRIPTS=${C_DE_SCRIPTS:-${CONMON_DATA_EXTRACT}/ush} +# +# export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen} +# export C_IG_EXEC=${C_IG_EXEC:-${CONMON_IMAGE_GEN}/exec} +# export C_IG_GSCRIPTS=${C_IG_GSCRIPTS:-${CONMON_IMAGE_GEN}/gscripts} +# export C_IG_PARM=${C_IG_PARM:-${CONMON_IMAGE_GEN}/parm} +# export C_IG_SCRIPTS=${C_IG_SCRIPTS:-${CONMON_IMAGE_GEN}/ush} +# export C_IG_FIX=${C_IG_FIX:-${CONMON_IMAGE_GEN}/fix} +# export C_IG_HTML=${C_IG_HTML:-${CONMON_IMAGE_GEN}/html} +# export C_IG_SAVE_WORK=${C_IG_SAVE_WORK:-1} # switch to save plot work directories +# +# export CONMON_PARM=${CONMON_PARM:-${MY_CONMON}/parm} +# +# export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} +# export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} +# export HOMEgfs_conmon=$HOMEgdas_conmon +# +# export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} +# export EXECconmon=${EXECconmon:-${HOMEconmon_shared}/exec} + From 34e174a3209d09b29f83f1245650056b3e04be0d Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Mon, 7 Nov 2022 14:57:05 +0000 Subject: [PATCH 2/8] Ref #28 Initial changes for use of Mon_config. --- .../data_extract/ush/ConMon_DE.sh | 11 +- src/Conventional_Monitor/parm/ConMon_config | 134 +++++------------- 2 files changed, 38 insertions(+), 107 deletions(-) diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index a93e595e..bf9e48cf 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -132,12 +132,11 @@ fi echo GDATE = $GDATE -PDY=`echo $PDATE|cut -c1-8` +export PDY=`echo $PDATE|cut -c1-8` export CYC=`echo $PDATE|cut -c9-10` export GCYC=`echo $GDATE|cut -c9-10` export PDYm6h=`echo $GDATE|cut -c1-8` -echo PDYm6h = $PDYm6h if [[ $MY_MACHINE == "hera" ]]; then @@ -191,6 +190,7 @@ if [[ ! -s ${pgrbf06} ]]; then export pgrbf06="${C_GDATDIR}/gdas.t${GCYC}z.pgrb2.1p00.f006" fi + #--------------------------------------------- # override the default convinfo definition # if there's a copy in C_TANKDIR/info @@ -228,12 +228,7 @@ if [ -s $cnvstat -a -s $pgrbf00 -a -s $pgrbf06 ]; then rm -f ${logfile} fi - if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then - $SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} -M 1500 \ - -R affinity[core] -W 0:50 -J ${jobname} \ - -cwd $PWD ${HOMEgdas_conmon}/jobs/JGDAS_ATMOS_CONMON - - elif [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" ]]; then $SUB -A $ACCOUNT --ntasks=1 --time=00:30:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o $C_LOGDIR/DE.${PDY}.${CYC}.log \ ${HOMEgdas_conmon}/jobs/JGDAS_ATMOS_CONMON diff --git a/src/Conventional_Monitor/parm/ConMon_config b/src/Conventional_Monitor/parm/ConMon_config index 2f707255..5db07c98 100644 --- a/src/Conventional_Monitor/parm/ConMon_config +++ b/src/Conventional_Monitor/parm/ConMon_config @@ -27,7 +27,7 @@ export WEBDIR=${WEBDIR:-/home/people/emc/www/htdocs/gmb/gdas/es_conv} #export C_TANKverf=${C_TANKverf:-${CONMON_TANKDIR}} export C_TANKDIR=${TANKDIR}/stats/${CONMON_SUFFIX} -export C_IMGNDIR=${CTANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon +export C_IMGNDIR=${TANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon @@ -57,109 +57,45 @@ export C_IMGNDIR=${CTANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon # export grib2=${grib2:-1} +#--------------------------------------------------------------------- +# The ConMon time and vert plots include 10 regions, some of which +# include others. This takes up an inordinate amount of server space. +# The CONMON_RESTRICT_PLOT_AREAS reduces the regions to Global, +# N. America, S. America, Tropics, Europe, and Asia. +# +export CONMON_RESTRICT_PLOT_AREAS=1 -#-------------------------------------- -# Definitions for internal reference # +# NUM_CYCLES is the number of cycles to be used time series plots. +# +export NUM_CYCLES=${NUM_CYCLES:-121} + +# +# Automatically remove old, extracted data files +# +export CLEAN_TANKDIR=${CLEAN_TANKDIR:-1} -export MY_CONMON=${MY_GSI_MONITOR}/src/Conventional_Monitor +# +# Number of cycles worth of image data to be retained in tankdir +# +export NUM_IMG_CYCLES=${NUM_IMG_CYCLES:-4} - - #--------------------------------------------------------------------- - # The ConMon time and vert plots include 10 regions, some of which - # include others. This takes up an inordinate amount of server space. - # The CONMON_RESTRICT_PLOT_AREAS reduces the regions to Global, - # N. America, S. America, Tropics, Europe, and Asia. - # -# export CONMON_RESTRICT_PLOT_AREAS=1 - - - if [[ $MY_MACHINE = "s4" ]]; then - module load license_intel - module use /data/prod/hpc-stack/modulefiles/stack - module load hpc/1.1.0 hpc-intel/18.0.4 hpc-impi/18.0.4 - module load wgrib2/2.0.8 - module load grads/2.2.1 - module load prod_util/1.2.2 - - export SUB=/usr/bin/sbatch - export NDATE=/data/prod/hpc-stack/intel-18.0.4/prod_util/1.2.2/bin/ndate - export COMPRESS=${COMPRESS:-gzip} - export UNCOMPRESS=${UNCOMPRESS:-"gunzip -f"} - export SERVICE_PARTITION="serial" - - elif [[ $MY_MACHINE = "jet" ]]; then - 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 - module load wgrib2/2.0.8 - module load grads/2.2.1 - module load prod_util/1.2.2 - - export SUB=/apps/slurm/default/bin/sbatch - export NDATE=/lfs4/HFIP/hfv3gfs/nwprod/hpc-stack/libs/intel-18.0.5.274/prod_util/1.2.2/bin/ndate - export COMPRESS=${COMPRESS:-gzip} - export UNCOMPRESS=${UNCOMPRESS:-"gunzip -f"} - export SERVICE_PARTITION="service" - - elif [[ $MY_MACHINE = "hera" ]]; then - - export SUB=/apps/slurm/default/bin/sbatch - export NDATE=/home/Edward.Safford/bin/ndate - export COMPRESS=${COMPRESS:-gzip} - export UNCOMPRESS=${UNCOMPRESS:-"gunzip -f"} - export SERVICE_PARTITION="service" - - elif [[ $MY_MACHINE = "wcoss2" ]]; then - export COMPRESS=/usr/bin/gzip - export UNCOMPRESS="/usr/bin/gunzip -f" - fi - - export WGRIB2=`which wgrib2` - export GRADS=`which grads` - export STNMAP=`which stnmap` - - -# export Z="gz" -# -# export ACCOUNT=${ACCOUNT:-} -# export PROJECT= -# export JOB_QUEUE= -# -# export C_STMP=${C_STMP:-/gpfs/dell2/stmp} -# export C_STMP_USER=${C_STMP_USER:-${C_STMP}/${LOGNAME}} -# export C_PTMP=${C_PTMP:-/gpfs/dell2/ptmp} -# export C_PTMP_USER=${C_PTMP_USER:-${C_PTMP}/${LOGNAME}} -# -# export C_LOGDIR=${C_PTMP_USER}/logs/${CONMON_SUFFIX}/${RUN}/conmon -# export WORK_conmon=${WORK_conmon:-${C_STMP_USER}/${CONMON_SUFFIX}/${RUN}/ConMon} +export WGRIB2=`which wgrib2` +export GRADS=`which grads` +export STNMAP=`which stnmap` - # - # NUM_CYCLES is the number of cycles to be used time series plots. - # -# export NUM_CYCLES=${NUM_CYCLES:-121} - - # - # Automatically remove old, extracted data files - # -# export CLEAN_TANKDIR=${CLEAN_TANKDIR:-1} - # - # Number of cycles worth of image data to be retained in tankdir - # -# export NUM_IMG_CYCLES=${NUM_IMG_CYCLES:-4} +#-------------------------------------- +# Definitions for internal reference +# +export MY_CONMON=${MY_GSI_MONITOR}/src/Conventional_Monitor - # - # Web server resources include the sever name (WEB_SVR), the user name - # on the web server (WEB_USER), and location of the top level directory - # for the html on the web server (WEBDIR). - # -# export WEBUSER=esafford -# export WEBSVR=emcrzdm +export C_STMP_USER=${C_STMP_USER:-${MON_STMP}/${LOGNAME}} +export C_PTMP_USER=${C_PTMP_USER:-${MON_PTMP}/${LOGNAME}} +export C_LOGDIR=${MON_LOGDIR}/${CONMON_SUFFIX}/${RUN}/conmon +#export WORK_conmon=${WORK_conmon:-${C_STMP_USER}/${CONMON_SUFFIX}/${RUN}/ConMon} - # - # Definitions for internal reference - # # export CONMON_DATA_EXTRACT=${CONMON_DATA_EXTRACT:-${MY_CONMON}/data_extract} # export C_DE_EXEC=${C_DE_EXEC:-${CONMON_DATA_EXTRACT}/exec} # export C_DE_PARM=${C_DE_PARM:-${CONMON_DATA_EXTRACT}/parm} @@ -176,10 +112,10 @@ export MY_CONMON=${MY_GSI_MONITOR}/src/Conventional_Monitor # # export CONMON_PARM=${CONMON_PARM:-${MY_CONMON}/parm} # -# export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} -# export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} + export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} + export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} # export HOMEgfs_conmon=$HOMEgdas_conmon # -# export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} -# export EXECconmon=${EXECconmon:-${HOMEconmon_shared}/exec} + export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} + export EXECconmon=${EXECconmon:-${GSI_MON_BIN}} From 1abeba0aed1ab04e30f6f74d74ea45336618e9e2 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Thu, 1 Dec 2022 13:32:36 +0000 Subject: [PATCH 3/8] Ref #28 Work in progress. --- modulefiles/wcoss2-run.lua | 1 + src/Conventional_Monitor/ConMon_install.pl | 326 ------------------ .../data_extract/ush/ConMon_DE.sh | 49 +-- src/Conventional_Monitor/get_hostname.pl | 35 -- ush/find_last_cycle.sh | 8 +- 5 files changed, 31 insertions(+), 388 deletions(-) delete mode 100755 src/Conventional_Monitor/ConMon_install.pl delete mode 100755 src/Conventional_Monitor/get_hostname.pl diff --git a/modulefiles/wcoss2-run.lua b/modulefiles/wcoss2-run.lua index 78729264..4e410e90 100644 --- a/modulefiles/wcoss2-run.lua +++ b/modulefiles/wcoss2-run.lua @@ -11,6 +11,7 @@ load ("GrADS/2.2.2") prepend_path("MODULEPATH", "/apps/ops/para/nco/modulefiles/core/") load ("prod_util/2.0.13") +load ("prod_envir/2.0.6") load("common-run") diff --git a/src/Conventional_Monitor/ConMon_install.pl b/src/Conventional_Monitor/ConMon_install.pl deleted file mode 100755 index 0100f3dd..00000000 --- a/src/Conventional_Monitor/ConMon_install.pl +++ /dev/null @@ -1,326 +0,0 @@ -#! /usr/bin/perl - -#------------------------------------------------------------------- -# -# ConMon_install.pl -# -# This script makes sets all necessary configuration definitions -# and calls the makeall.sh script to build all the necessary -# executables. This script works for wcoss, theia, and cray -# machines. -#------------------------------------------------------------------- - - use IO::File; - use File::Copy qw(move); - - print "--> ConMon_install.sh\n"; - - my $machine = `/usr/bin/perl ./get_hostname.pl`; - my $my_machine="export MY_MACHINE=$machine"; - - if( $machine ne "hera" && $machine ne "wcoss" && $machine ne "wcoss_c" - && $machine ne "wcoss_d" && $machine ne "wcoss2" ) { - die( "ERROR --- Unrecognized machine hostname, $machine. Exiting now...\n" ); - } - else { - print "machine = $machine\n"; - } - - #--------------------------------------------------------------------------------- - # - # All 3 currently supported platforms are little endian machines and linux OSes. - # I'm keeping these switches though because that will surely change at some - # point and I'll just have to re-introduce the same switches. - # - my $little_endian = "export LITTLE_ENDIAN=1"; - - my $os = "linux"; - my $my_os = "export MY_OS=$os"; - - - #--------------------------------------------------------------- - # - # Idenfity basedir location of package - # - print "\n"; - print "locating and saving ConMon package location\n"; - my $conmon_dir; - $conmon_dir = `dirname $0`; - $conmon_dir =~ s/^\s+|\s+$//g; - - if( $conmon_dir eq "." ) { - $conmon_dir = `pwd`; - $conmon_dir =~ s/^\s+|\s+$//g; - } - my $my_conmon = "export MY_CONMON=$conmon_dir"; - print "my_conmon = $my_conmon \n"; - print"\n\n"; - - sleep( 1 ); - - #--------------------------------------------------------------- - # - # TANKDIR location - # - my $user_name = $ENV{ 'USER' }; - - if( $machine eq "hera" ) { - $tankdir = "/scratch1/NCEPDEV/da/$user_name/save/nbns"; - } - elsif( $machine eq "wcoss" ) { - $tankdir = "/global/save/$user_name/nbns"; - } - elsif( $machine eq "wcoss_c" ) { - $tankdir = "/gpfs/hps/emc/da/noscrub/$user_name" - } - elsif( $machine eq "wcoss_d" ) { - $tankdir = "/gpfs/dell2/emc/modeling/noscrub/$user_name/nbns"; - } - elsif( $machine eq "wcoss2" ){ - $tankdir = "/lfs/h2/emc/da/noscrub/$user_name/nbns"; - } - - print "Please specify TANKDIR location for storage of data and image files.\n"; - print " Return to accept default location or enter new location now.\n"; - print "\n"; - print " Default TANKDIR: $tankdir \n"; - print " ?\n"; - my $new_tankdir = <>; - $new_tankdir =~ s/^\s+|\s+$//g; - - if( length($new_tankdir ) > 0 ) { - $tankdir = $new_tankdir; - } - my $my_tankdir="export CONMON_TANKDIR=$tankdir"; - print "my_tankdir = $my_tankdir\n"; - print "\n\n"; - sleep( 1 ); - - - #--------------------------------------------------------------- - # - # Web sever name - # - my $server = "emcrzdm"; - print "Please specify web server name.\n"; - print " Return to accept default server name or enter new server name.\n"; - print " \n"; - print " Default web server: $server\n"; - print " ?\n"; - my $new_server =<>; - $new_server =~ s/^\s+|\s+$//g; - if( length($new_server ) > 0 ) { - $server = $new_server; - } - my $my_server="export WEBSVR=$server"; - print "my_server = $my_server\n"; - print "\n\n"; - sleep( 1 ); - - - #--------------------------------------------------------------- - # - # Web server user name - # - my $webuser = $ENV{ 'USER' }; - print "Please specify your user name on the $server server.\n"; - print " Return to accept default user name or enter new user name.\n"; - print " \n"; - print " Default user name on $server: $webuser\n"; - print " ?\n"; - my $new_webuser =<>; - $new_webuser =~ s/^\s+|\s+$//g; - if( length($new_webuser ) > 0 ) { - $webuser = $new_webuser; - } - my $my_webuser="export WEBUSER=$webuser"; - print "my_webuser = $my_webuser\n"; - print "\n\n"; - sleep( 1 ); - - - #--------------------------------------------------------------- - # - # Web directory - # - my $webdir = "/home/people/emc/www/htdocs/gmb/gdas/es_conv"; - print "Please specify the top level web site directory $server.\n"; - print " Return to accept default directory location or enter new location.\n"; - print " \n"; - print " Default directory on $server: $webdir\n"; - print " ?\n"; - my $new_webdir =<>; - $new_webdir =~ s/^\s+|\s+$//g; - if( length($new_webdir ) > 0 ) { - $webdir = $new_webdir; - } - my $my_webdir="export WEBDIR=$webdir"; - print "my_webdir = $my_webdir\n"; - print "\n\n"; - sleep( 1 ); - - - #---------------------------------------------------- - # Set up ptmp and stmp locations according to $arch. - # - my $ptmp = "/ptmpd1"; - my $stmp = "/stmpd1"; - my $my_ptmp = "export C_PTMP=\${C_PTMP:-$ptmp}"; - my $my_stmp = "export C_STMP=\${C_STMP:-$stmp}"; - - if( $machine eq "hera" ) { - $my_ptmp="export C_PTMP=\${C_PTMP:-/scratch2/NCEPDEV/stmp3}"; - $my_stmp="export C_STMP=\${C_STMP:-/scratch2/NCEPDEV/stmp1}"; - } - elsif( $machine eq "wcoss_c" ) { - $my_ptmp="export C_PTMP=\${C_PTMP:-/gpfs/hps/ptmp}"; - $my_stmp="export C_STMP=\${C_STMP:-/gpfs/hps/stmp}"; - } - elsif( $machine eq "wcoss_d" ) { - $my_ptmp="export C_PTMP=\${C_PTMP:-/gpfs/dell2/ptmp}"; - $my_stmp="export C_STMP=\${C_STMP:-/gpfs/dell2/stmp}"; - } - elsif( $machine eq "wcoss2" ){ - $my_ptmp="export MY_PTMP=\${MY_PTMP:-/lfs/h2/emc/ptmp}"; - $my_stmp="export MY_STMP=\${MY_STMP:-/lfs/h2/emc/stmp}"; - } - - #--------------------------------------- - # - # wcoss has several options available: - # - else { - print "Please specify PTMP location. This is used for temporary work space.\n"; - print " Available options are: \n"; - print " /ptmpd1 (default)\n"; - print " /ptmpd2\n"; - print " /ptmpd3\n"; - print " /ptmpp1\n"; - print " /ptmpp2\n"; - - print " Return to accept default location or enter new location now.\n"; - print "\n"; - print " Default PTMP: $ptmp \n"; - print " ?\n"; - my $new_ptmp = <>; - $new_ptmp =~ s/^\s+|\s+$//g; - - if( length($new_ptmp ) > 0 ) { - $ptmp = $new_ptmp; - } - $my_ptmp="export C_PTMP=\${C_PTMP:-$ptmp}"; - print "\n\n"; - sleep( 1 ); - - - print "Please specify STMP location. This is used for temporary work space.\n"; - print " Available options are: \n"; - print " /stmpd1 (default)\n"; - print " /stmpd2\n"; - print " /stmpd3\n"; - print " /stmpp1\n"; - print " /stmpp2\n"; - - print " Return to accept default location or enter new location now.\n"; - print "\n"; - print " Default STMP: $stmp \n"; - print " ?\n"; - my $new_stmp = <>; - $new_stmp =~ s/^\s+|\s+$//g; - - if( length($new_stmp ) > 0 ) { - $stmp = $new_stmp; - } - $my_stmp="export C_STMP=\${C_STMP:-$stmp}"; - print "my_stmp = $my_stmp\n"; - print "\n\n"; - sleep( 1 ); - } - - print "my_ptmp = $my_ptmp\n"; - print "my_stmp = $my_stmp\n"; - print "\n"; - - - my $account = "export ACCOUNT=\${ACCOUNT:-}"; - if( $machine eq "hera" ) { - $account = "export ACCOUNT=\${ACCOUNT:-fv3-cpu}"; - } elsif( $machine eq "wcoss2" ){ - $account = "export ACCOUNT=\${ACCOUNT:-GFS-DEV}"; - } - - my $project = "export PROJECT=\${PROJECT:-GDAS-T2O}"; - if( $machine eq "wcoss2" ){ - $project = "export PROJECT=\${PROJECT:-GDAS-DEV}"; - } elsif( $machine ne "wcoss" && $machine ne "cray" && $machine ne "wcoss_d" ) { - $project="export PROJECT="; - } - - my $job_queue="export JOB_QUEUE="; - if( $machine eq "cray" || $machine eq "wcoss2" ) { - $job_queue="export JOB_QUEUE=\${JOB_QUEUE:-dev}"; - } elsif( $machine eq "wcoss" || $machine eq "wcoss_d" ){ - $job_queue = "export JOB_QUEUE=\${JOB_QUEUE:-dev_shared}"; - } - - #------------------------------------------------------------ - # - # Update the config file with the configuration information - # - my $config = "parm/ConMon_config"; - open my $in, '<', $config or die "Can't read $config $!"; - open my $out, '>', "$config.new" or die "Can't write $config.new: $!"; - - while( <$in> ) { - if( $_ =~ "MY_CONMON=" ) { - print $out "$my_conmon\n"; - } - elsif( $_ =~ "ACCOUNT=" ) { - print $out "$account\n"; - } - elsif( $_ =~ "PROJECT=" ) { - print $out "$project\n"; - } - elsif( $_ =~ "JOB_QUEUE=" ) { - print $out "$job_queue\n"; - } - elsif( $_ =~ "CONMON_TANKDIR=" ) { - print $out "$my_tankdir\n"; - } - elsif( $_ =~ "WEBSVR=" ) { - print $out "$my_server\n"; - } - elsif( $_ =~ "WEBUSER=" ) { - print $out "$my_webuser\n"; - } - elsif( $_ =~ "WEBDIR=" ) { - print $out "$my_webdir\n"; - } - elsif( $_ =~ "LITTLE_ENDIAN=" ) { - print $out "$little_endian\n"; - } - elsif( $_ =~ "MY_OS=" ) { - print $out "$my_os\n"; - } - elsif( $_ =~ "MY_MACHINE=" ) { - print $out "$my_machine\n"; - } - elsif( $_ =~ "C_PTMP=" ) { - print $out "$my_ptmp\n"; - } - elsif( $_ =~ "C_STMP=" ) { - print $out "$my_stmp\n"; - } - else { - print $out $_; - } - } - close $out; - close $in; - - move "$config.new", $config; - - - print "<-- ConMon_install.sh\n"; - -exit 0; diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index bf9e48cf..df1a0b64 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -1,4 +1,4 @@ -#!/bin/sh -l +#!/bin/bash #-------------------------------------------------------------------- # @@ -31,7 +31,7 @@ function usage { #-------------------------------------------------------------------- # ConMon_DE.sh begins here #-------------------------------------------------------------------- -set -ax + echo "Begin ConMon_DE.sh" nargs=$# @@ -46,6 +46,8 @@ fi # export RUN=gdas +PDATE="" +cnvstat_location="" while [[ $# -ge 1 ]] do @@ -62,7 +64,7 @@ do shift # past argument ;; -c|--cnv) - export CNVSTAT_LOCATION="$2" + cnvstat_location="$2" shift # past argument ;; *) @@ -79,14 +81,9 @@ this_file=`basename $0` this_dir=`dirname $0` -#-------------------------------------------------------------------- -# RUN_ENVIR: can be "dev", "para", or "prod". -#-------------------------------------------------------------------- -export RUN_ENVIR=${RUN_ENVIR:-"prod"} - +gfs_ver=v16.2 echo CONMON_SUFFIX = $CONMON_SUFFIX -echo RUN_ENVIR = $RUN_ENVIR export NET=${CONMON_SUFFIX} top_parm=${this_dir}/../../parm @@ -109,6 +106,8 @@ jobname=ConMon_DE_${CONMON_SUFFIX} echo "C_TANKDIR = ${C_TANKDIR}" echo "C_LOGDIR = ${C_LOGDIR}" echo "C_IMGNDIR = ${C_IMGNDIR}" +echo "MON_USH = $MON_USH" + if [[ ! -d ${C_TANKDIR} ]]; then mkdir -p ${C_TANKDIR} fi @@ -123,8 +122,8 @@ fi #-------------------------------------------------------------------- # Get date of cycle to process and/or previous cycle processed. # -if [[ $PDATE = "" ]]; then - GDATE=`${C_DE_SCRIPTS}/find_cycle.pl --cyc 1 --dir ${C_TANKDIR} --run $RUN ` +if [[ ${#PDATE} -le 0 ]]; then + GDATE=`${MON_USH}/find_last_cycle.sh --net ${CONMON_SUFFIX} --run ${RUN} --tank ${TANKDIR} --mon conmon` PDATE=`$NDATE +06 $GDATE` else GDATE=`$NDATE -06 $PDATE` @@ -138,24 +137,23 @@ export CYC=`echo $PDATE|cut -c9-10` export GCYC=`echo $GDATE|cut -c9-10` export PDYm6h=`echo $GDATE|cut -c1-8` - -if [[ $MY_MACHINE == "hera" ]]; then - export CNVSTAT_LOCATION=${CNVSTAT_LOCATION:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_data} -else - export CNVSTAT_LOCATION=${CNVSTAT_LOCATION:-${COMROOTp3}/gfs/${RUN_ENVIR}} +if [[ ${#cnvstat_location} -le 0 ]]; then + export cnvstat_location=${COMROOT}/gfs/${gfs_ver} fi +export CNVSTAT_LOCATION=${cnvstat_location} +echo "CNVSTAT_LOCATION = $CNVSTAT_LOCATION" export COMPONENT=${COMPONENT:-atmos} -export C_DATDIR=${C_DATDIR:-${CNVSTAT_LOCATION}/${RUN}.${PDY}/${CYC}/${COMPONENT}} -if [[ ! -d ${C_DATDIR} ]]; then - export C_DATDIR=${CNVSTAT_LOCATION}/${RUN}.${PDY}/${CYC} -fi +# +# Is there any difference in location from ops to wkfl? +# +export C_DATDIR=${C_DATDIR:-${CNVSTAT_LOCATION}/${RUN}.${PDY}/${CYC}/${COMPONENT}} export C_GDATDIR=${C_GDATDIR:-${CNVSTAT_LOCATION}/${RUN}.${PDYm6h}/${GCYC}/${COMPONENT}} -if [[ ! -d ${C_GDATDIR} ]]; then - export C_GDATDIR=${CNVSTAT_LOCATION}/${RUN}.${PDYm6h}/${GCYC} -fi + +echo "C_DATDIR = $C_DATDIR" +echo "C_GDATDIR = $C_GDATDIR" export C_COMIN=${C_DATDIR} export C_COMINm6h=${C_GDATDIR} @@ -190,6 +188,11 @@ if [[ ! -s ${pgrbf06} ]]; then export pgrbf06="${C_GDATDIR}/gdas.t${GCYC}z.pgrb2.1p00.f006" fi +echo "cnvstat = $cnvstat" +echo "pgrbf00 = $pgrbf00" +echo "pgrbf06 = $pgrbf06" + +exit #--------------------------------------------- # override the default convinfo definition diff --git a/src/Conventional_Monitor/get_hostname.pl b/src/Conventional_Monitor/get_hostname.pl deleted file mode 100755 index 1d6e9316..00000000 --- a/src/Conventional_Monitor/get_hostname.pl +++ /dev/null @@ -1,35 +0,0 @@ -#! /usr/bin/perl - -#----------------------------------------------------------------------- -# get_hostname.pl -# -# This script determines the hostname of the current machine. The -# possiblities are wcoss, wcoss_c, wcoss_d, or hera. A null -# string ("") if the machine is not recognized. -# -# NOTE: shell scripts call this and then read the output string -# which is in $machine. So don't leave uncommented debug -# statements in place here; that will confuse calling scripts. -#----------------------------------------------------------------------- - - my $machine = ""; - - if (-d "/dcom" and -d "/hwrf") { - $machine = "wcoss"; - } - elsif( -d "/cm" ) { - $machine = "wcoss_c"; - } - elsif( -d "/ioddev_dell" ) { - $machine = "wcoss_d"; - } - elsif( -d "/scratch1" ) { - $machine = "hera"; - } - elsif( -d "/lfs/h2" ) { - $machine = "wcoss2"; - } - - print "$machine"; - - exit 0; diff --git a/ush/find_last_cycle.sh b/ush/find_last_cycle.sh index 9842913b..fdcef2a5 100755 --- a/ush/find_last_cycle.sh +++ b/ush/find_last_cycle.sh @@ -79,7 +79,7 @@ if [[ ${#path} -gt 0 ]]; then # options for ops, wkfl, and mon, halting when the first valid # output files are found. # - flist=`find "${path}" -maxdepth 1 -mindepth 1 -type d -name "${run}.*" -printf "%f\n" 2>/dev/null` + flist=`find -L "${path}" -maxdepth 1 -mindepth 1 -type d -name "${run}.*" -printf "%f\n" 2>/dev/null` sorted=`echo ${flist[@]} | awk 'BEGIN{RS=" ";} {print $1}' | sort -r` lcyc="" @@ -87,9 +87,9 @@ if [[ ${#path} -gt 0 ]]; then for hr in $hrs; do - mon_test=`find "${path}/${file}/${hr}/${monitor}" -maxdepth 2 -mindepth 1 -name "*.ieee_d" -printf "%f\n" 2>/dev/null` - wkfl_test=`find "${path}/${file}/${hr}/" -maxdepth 2 -mindepth 1 -name "*.ieee_d" -printf "%f\n" 2>/dev/null` - ops_test=`find "${path}/${file}/${hr}/atmos/${monitor}" -maxdepth 2 -mindepth 1 -name "*.ieee_d" -printf "%f\n" 2>/dev/null` + mon_test=`find -L "${path}/${file}/${hr}/${monitor}" -maxdepth 2 -mindepth 1 -name "*.ieee_d" -printf "%f\n" 2>/dev/null` + wkfl_test=`find -L "${path}/${file}/${hr}/" -maxdepth 2 -mindepth 1 -name "*.ieee_d" -printf "%f\n" 2>/dev/null` + ops_test=`find -L "${path}/${file}/${hr}/atmos/${monitor}" -maxdepth 2 -mindepth 1 -name "*.ieee_d" -printf "%f\n" 2>/dev/null` if [[ ${#mon_test} -gt 0 || ${#ops_test} -gt 0 || ${#wkfl_test} -gt 0 ]]; then lcyc=`echo $file | gawk -F. '{print $2}'` From 5820bd3011b2cd69f6db3d7749d0f752438ea155 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Wed, 14 Dec 2022 21:34:11 +0000 Subject: [PATCH 4/8] Ref #28 wcoss2 plot updates. --- .../data_extract/ush/ConMon_DE.sh | 5 +- .../image_gen/gscripts/colorbar.gs | 12 +- .../image_gen/gscripts/page.gs | 1 - .../image_gen/gscripts/plot_hist.gs | 2 - .../image_gen/ush/ConMon_IG.sh | 19 +- .../image_gen/ush/Transfer.sh | 31 +- .../image_gen/ush/grib2ctl.pl | 1458 ----------------- .../image_gen/ush/make_tdef.sh | 2 +- .../image_gen/ush/mk_horz_hist.sh | 60 +- .../image_gen/ush/mk_time_vert.sh | 80 +- .../image_gen/ush/plot_hist.sh | 64 +- .../image_gen/ush/plot_horz.sh | 52 +- .../image_gen/ush/plot_horz_uv.sh | 68 +- .../image_gen/ush/plot_time.sh | 43 +- .../image_gen/ush/plot_time_ps.sh | 36 +- .../image_gen/ush/plot_vert.sh | 47 +- .../image_gen/ush/read_scatter.sh | 24 +- .../image_gen/ush/transfer_imgs.sh | 6 +- src/Conventional_Monitor/parm/ConMon_config | 38 +- ush/find_last_cycle.sh | 3 + 20 files changed, 245 insertions(+), 1806 deletions(-) delete mode 100755 src/Conventional_Monitor/image_gen/ush/grib2ctl.pl diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index df1a0b64..46e56e11 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -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} @@ -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` @@ -192,7 +192,6 @@ echo "cnvstat = $cnvstat" echo "pgrbf00 = $pgrbf00" echo "pgrbf06 = $pgrbf06" -exit #--------------------------------------------- # override the default convinfo definition diff --git a/src/Conventional_Monitor/image_gen/gscripts/colorbar.gs b/src/Conventional_Monitor/image_gen/gscripts/colorbar.gs index 1291728d..338e9f92 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/colorbar.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/colorbar.gs @@ -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' @@ -74,14 +73,10 @@ function colorbar (args) * 'set strsiz 0.12 0.13' num = 0 - say 'cnum = 'cnum while (num= 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' diff --git a/src/Conventional_Monitor/image_gen/gscripts/plot_hist.gs b/src/Conventional_Monitor/image_gen/gscripts/plot_hist.gs index 273246eb..d2a91e08 100755 --- a/src/Conventional_Monitor/image_gen/gscripts/plot_hist.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plot_hist.gs @@ -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' diff --git a/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh b/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh index 7b1377d5..f36a790d 100755 --- a/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh +++ b/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh @@ -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" @@ -50,6 +51,7 @@ fi # export RUN=gdas num_cycles="" +PDATE="" while [[ $# -ge 1 ]] do @@ -66,7 +68,7 @@ do shift # past argument ;; -n|--ncyc) - export num_cycles="$2" + num_cycles="$2" shift # past argument ;; *) @@ -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, @@ -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" @@ -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 @@ -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 diff --git a/src/Conventional_Monitor/image_gen/ush/Transfer.sh b/src/Conventional_Monitor/image_gen/ush/Transfer.sh index 53079bd7..2ed5b4cb 100755 --- a/src/Conventional_Monitor/image_gen/ush/Transfer.sh +++ b/src/Conventional_Monitor/image_gen/ush/Transfer.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #-------------------------------------------------------------------- # usage @@ -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 @@ -48,7 +43,6 @@ do done -CMON_SUFFIX=$CONMON_SUFFIX this_file=`basename $0` this_dir=`dirname $0` @@ -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, @@ -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 diff --git a/src/Conventional_Monitor/image_gen/ush/grib2ctl.pl b/src/Conventional_Monitor/image_gen/ush/grib2ctl.pl deleted file mode 100755 index 31f7cf01..00000000 --- a/src/Conventional_Monitor/image_gen/ush/grib2ctl.pl +++ /dev/null @@ -1,1458 +0,0 @@ -#!/usr/bin/perl -w -# makes a GrADS control file for grib files -# -# requires wgrib and Perl5 -# -# usage: grib2ctl [options] [grib file] [optional index file] >[control file] -# -# note: this script does not make the index file .. you have to run gribmap -# -# Analyses: (using initial time) -# -# $ grib2ctl.pl example.grib >example.ctl -# $ gribmap -i example.ctl -0 -# -# Forecasts: (using verifiation time) -# -# $ grib2ctl.pl -verf example.grib >example.ctl -# $ gribmap -i example.ctl -# -# bugs: -# many -# will fail under number of situations -# finite number of NCEP grids are supported -# -# requires wgrib 1.7.4 or higher -# wesley ebisuzaki, -# http://www.cpc.ncep.noaa.gov/products/wesley/grib2ctl.html -# -# -# added output for rotated LatLon grids -# Helmut P. Frank, Helmut.Frank@dwd.de -# Fri Sep 14 13:54:00 GMT 2001 -# -ts, -lc options: Ag Stephens, BADC 3/2003 - -$version="0.9.12.5p39a"; -use POSIX; - -# ***** if wgrib is not on path, add it here -# $wgrib='/u/wx51we/home/bin/wgrib'; -#$wgrib='wgrib'; -$wgrib=(system("wgrib --v > /dev/null 2>&1") == 0) ? 'wgrib' : '/gpfs/dell1/nco/ops/nwprod/grib_util.v1.1.1/exec/wgrib' ; # NCEP only -print STDERR "*** wgrib = $wgrib \n\n"; - -# **** directory of interpolation files -$pdef_dir='/usr/local/lib/grads'; -#$pdef_dir='/u/wx51we/home/grads'; - -$wflag=""; -$file=""; -$index=""; -$pdef=""; -$prs="prs"; -$suffix=""; -$model="GFS"; -$calendar=""; -$lc=""; -$global_map=""; -$timestep=""; -$rr=""; -$nearest_neighbor=""; -$kludge=""; -$no235z=""; -$template=""; - -$raw="no"; - -# vertical levels allowd, index = grib level number -# 100 = mb, 103=m above msl 105-m above ground 107=sigma 109=hybrid level 111=cm down 113=K -# 115=mb above ground 125=cm above ground 160=m below sea level -$allow_profile[20] = '+'; -$allow_profile[100] = '-'; -$allow_profile[103] = '+'; -$allow_profile[105] = '+'; -$allow_profile[107] = '-'; -$allow_profile[109] = '+'; -$allow_profile[111] = '-'; -$allow_profile[113] = '+'; -$allow_profile[115] = '+'; -$allow_profile[125] = '-'; -$allow_profile[160] = '-'; -$allow_profile[235] = '-'; - - -foreach $_ (@ARGV) { - SWITCH: { - /^-verf/ && do { $wflag="$wflag -verf" ; last SWITCH; }; - /^-ncep_opn/ && do { $wflag="$wflag -ncep_opn" ; last SWITCH; }; - /^-ncep_rean/ && do { $wflag="$wflag -ncep_rean" ; last SWITCH; }; - /^-no_prs/ && do { $prs="" ; last SWITCH; }; - /^-no_suffix/ && do { $suffix="no" ; last SWITCH; }; - /^-rev_z/ && do { last SWITCH; }; - /^-365/ && do { $calendar="365"; last SWITCH; }; - /^-ts(\d+\w+)/ && do { $timestep=$1; last SWITCH; }; - /^-lc$/ && do { $lc="on"; last SWITCH; }; - /^-rr_nn$/ && do { $rr="on"; $nearest_neighbor="on"; $model="ETA"; last SWITCH; }; - /^-rr$/ && do { $rr="on"; $model="ETA"; last SWITCH; }; - /^-eta$/ && do { $model="ETA"; last SWITCH; }; - /^-mrf$/ && do { $model="GFS"; last SWITCH; }; - /^-gfs$/ && do { $model="GFS"; last SWITCH; }; - /^-ruc$/ && do { $model="RUC"; last SWITCH; }; - /^-global$/ && do { $global_map = "on"; last SWITCH; }; - /^-noah$/ && do { $wflag="$wflag -ncep_opn"; last SWITCH; }; - /^-osu/ && do { last SWITCH; }; - /^-kludge/ && do { $kludge="on"; last SWITCH; }; - /^-no_235z/ && do { $no235z="on"; last SWITCH; }; - - /^-iso_profile/ && do { undef @allow_profile; $allow_profile[235]='yes'; last SWITCH }; - /^-prs_profile/ && do { undef @allow_profile; $allow_profile[100]='yes'; last SWITCH }; - /^-m_profile/ && do { undef @allow_profile; $allow_profile[103]='yes'; - $allow_profile[105]='yes' ; last SWITCH }; - - /^-raw/ && do { $raw="yes" ; last SWITCH }; - /^-/ && do { print STDERR "unknown option: $_\n"; exit 8; }; - if ($file eq "") { - $file = $_; - } - elsif ($index eq "") { - $index = $_; - } - else { - $pdef = $_; - } - } -} - -if ($file eq "") { - if ($#ARGV >= 0) { - print STDERR "*** missing grib file ***\n\n\n"; - } - print STDERR "$0 $version wesley ebisuzaki\n"; - print STDERR " makes a Grads control file for grib files\n"; - print STDERR " usage: $0 [options] [grib_file] [optional index file] [optional pdef file] >[ctl file]\n"; - print STDERR " -ncep_opn .. use NCEP opn grib table for T62 NCEP fields\n"; - print STDERR " -ncep_rean .. use NCEP reanalysis grib table for T62 NCEP fields\n"; - print STDERR " -verf .. use forecast verification times\n"; - print STDERR " -no_prs .. no prs suffix on variable name\n"; - print STDERR " -no_suffix .. no suffix on variable name\n"; - print STDERR " -365 .. 365 day calendar\n"; - print STDERR " -ts[timestep] .. set timestep for individual time files (e.g. -ts6hr)\n"; - print STDERR " -lc .. set lowercase option for parameter names\n"; - print STDERR " -iso_profile .. set z coordinate to ocean isotherms\n"; - print STDERR " -m_profile .. set z coordinate to meters above ground/msl\n"; - print STDERR " -prs_profile .. set z coordinate to pressure (mb)\n"; -# print STDERR " -eta .. ETA model levels\n"; -# print STDERR " -gfs .. GFS (MRF) model level (default)\n"; -# print STDERR " -noah .. NOAH model levels (default)\n"; -# print STDERR " -osu .. OSU model levels\n"; - print STDERR " -raw .. raw grid\n"; -# print STDERR " -ruc .. RUC levels\n"; - print STDERR " -iso_profile .. make profile using subsurface isoterms\n"; - print STDERR "\n"; - print STDERR "Note 1: the index file will be generated by the gribmap program, default: grib_file.idx\n"; - print STDERR "Note 2: the pdef file is only generated for thinned lat-lon grids, default: grib_file.pdef\n"; - exit 8; -} - -$_ = $file; -if (/%y4/ || /%y2/ || /%m2/ || /%m1/ || /%d2/ || /%d1/ || /%h2/ || - /%h1/ || /%f2/ || /%f3/) { $template='on'; } - -if (-d "c:\\") { - $ListA="c:\\g$$.tmp"; - $TmpFile="c:\\h$$.tmp"; - unlink ($ListA, $TmpFile); - $sys="win"; -} -else { - $ListA="/tmp/grib2ctl.$$.tmp"; - $TmpFile="/dev/null"; - unlink $ListA; - $sys="unix"; -} - -# ctlfilename = name used by control file (different for template option( -# file = file name (of first matching file) -$ctlfilename=$file; - - -# inventory of All records -if ($template eq "on") { - $gfile=$file; - - if ($sys eq 'win') { - $gfile =~ s=\\=/=g; - } - $gfile =~ s/%y4/\\d{4}/g; - $gfile =~ s/%y2/\\d{2}/g; - $gfile =~ s/%m2/\\d{2}/g; - $gfile =~ s/%m1/\\d{1,2}/g; - $gfile =~ s/%d2/\\d{2}/g; - $gfile =~ s/%d1/\\d{1,2}/g; - $gfile =~ s/%h2/\\d{2}/g; - $gfile =~ s/%h1/\\d{1,2}/g; - $gfile =~ s/%h3/\\d{3}/g; - $gfile =~ s/%f2/\\d{2,3}/g; - $gfile =~ s/%f3/\\d{3}/g; - - $dir=$gfile; - $dir =~ s=(/*)[^/]*$=$1=; - - $head=$gfile; - $head =~ s=\\d\{.*==; - $tail=$gfile; - $tail =~ s=.*\\d\{.*\}==; - - if ($dir eq "") { - opendir(DIR,'.'); - } - else { - opendir(DIR,$dir); - } - - @allfiles = grep /^$gfile$/, readdir DIR; - closedir DIR; - - if ($#allfiles <= -1 ) { - print STDERR "\nError: could not find any files in directory: $dir\n"; - exit 8; - } - -# allfiles has the name of all the files -# need to find times: t0, t1, .. t-las - - for ($i = 0; $i <= $#allfiles; $i++) { - $_ = $allfiles[$i]; - $_ =~ s/$head//; - $_ =~ s/$tail//; -# now $_ has the date code / forecast hour - - if ($i == 0) { - $min_tval = $_; - $min_t2val = $_; - $max_tval = $_; - } - elsif ($min_tval eq $min_t2val && $min_tval eq $max_tval) { - if ($_ > $min_tval) { - $min_t2val = $_; - $max_tval = $_; - } - else { - $min_tval = $_; - } - } - else { - if ($_ > $max_tval) { $max_tval = $_; } - elsif ($_ < $min_tval) { - $min_t2val = $min_tval; - $min_tval = $_; - } - elsif ($_ < $min_t2val && $_ > $min_tval) { - $min_t2val = $_; - } - } - } - - $file="$dir$head$min_tval$tail"; - if ($sys eq 'win') { - $file =~ s=/=\\=g; - } - -# make inventory of first two files and last file -# need to get dt and last date - - system "$wgrib $wflag -v $dir$head$min_tval$tail >$ListA"; - if ($#allfiles >= 1) { - system "$wgrib $wflag -v $dir$head$min_t2val$tail >>$ListA"; - } - if ($#allfiles >= 2) { - system "$wgrib $wflag -v $dir$head$max_tval$tail >>$ListA"; - } -} -else { - system "$wgrib $wflag -v $file >$ListA"; -} - -if ( ! -s $ListA ) { - print STDERR "Big problem:\n"; - print STDERR " either $file is missing or not a grib file\n"; - print STDERR " or wgrib is not on your path\n"; - unlink $ListA; - exit 8; -} - -# make table of dates and variables - -open (FileDate, "<$ListA"); -while (defined($_ = )) { - - # date table - - $_ =~ s/^.*D=//; - $d=substr($_, 0, 10); - $dates{$d}=""; - - # variable/level list - @Fld = split(':', $_, 99); - $kpds=substr($Fld[3],5); - ($kpds5,$kpds6,$kpds7) = split(/,/,$kpds); - $varname = "$Fld[1]:$kpds6"; - if (defined $flevels{$varname}) { - if (!($flevels{$varname} =~ / $kpds7 /)) { - $flevels{$varname} .= "$kpds7 "; - } - } - else { - $flevels{$varname} = " $kpds7 "; - $fcomments{$varname} = "$kpds5:$Fld[$#Fld]"; - } -} -close (FileDate); -@sdates=sort keys(%dates); - -# number of time 1 or greater -$ntime=$#sdates + 1; - -$time=$sdates[0]; - -$year = substr($time,0,4); -$mo = substr($time,4,2); -$day = substr($time,6,2); -$hour = substr($time,8,2); - -if ($mo < 0 || $mo > 12) { - print "illegal date code $time\n"; - unlink $ListA; - exit 8; -} - -$month=substr("janfebmaraprmayjunjulaugsepoctnovdec",$mo*3-3,3); - -if ($ntime > 1) { - $year1 = substr($sdates[1],0,4); - $mo1 = substr($sdates[1],4,2); - $day1 = substr($sdates[1],6,2); - $hour1 = substr($sdates[1],8,2); - - $year_last = substr($sdates[$#sdates],0,4); - $mo_last = substr($sdates[$#sdates],4,2); - $day_last = substr($sdates[$#sdates],6,2); - $hour_last = substr($sdates[$#sdates],8,2); -} - -# ---------------intro------------------------------------ - -if ("$index" eq "") {$index="$file.idx";} -if ("$pdef" eq "") { $pdef = "$file.pdef";} - - -if ($sys eq "unix") { - $caret1 = (substr($file,0,1) eq "/") ? "" : '^'; - $caret2 = (substr($index,0,1) eq "/") ? "" : '^'; - $caret3 = (substr($pdef,0,1) eq "/") ? "" : '^'; -} -else { - $caret1 = (substr($file,1,1) eq ":") ? "" : '^'; - $caret2 = (substr($index,1,1) eq ":") ? "" : '^'; - $caret3 = (substr($pdef,1,1) eq ":") ? "" : '^'; -} - -print "dset $caret1$ctlfilename\nindex $caret2$index\n"; - -print "undef 9.999E+20\ntitle $file\n* produced by grib2ctl v$version\n"; - -# ------------------- grid ----------------------- -$griddef = `$wgrib $wflag -V $file -d 1 -o $TmpFile`; -$_=$griddef; - -/ center (\S*) /; -$center=$1; -/ grid=(\S*) /; -$grid=$1; - -print "dtype grib $grid\n"; -if ($template eq "on") { - print "options template\n"; -} - -if ($raw eq 'yes') { - / nx (\S*) ny (\S*) /; - $nx=$1; - $ny=$2; - print "xdef $nx linear 0 0.1\n"; - print "ydef $ny linear 0 0.1\n"; -} -elsif (/ thinned latlon: /) { - / lat *(\S*) to (\S*) by (\S*) /; - $lat0 = $1; - $lat1 = $2; - $dy = $3; - / long (\S*) to (\S*), (\S*) grid pts \(-1 x (\S*)\) /; - $lon0=$1; - $lon1=$2; - $nxny = $3; - $ny = $4; - if ($lat0 > $lat1) { - $yrev = 1; - print "ydef $ny linear $lat1 ", abs($dy), "\n" - } - else { - $yrev = 0; - print "ydef $ny linear $lat0 ", abs($dy), "\n" - } - - - $t=$_; - s/\n//g; - / bdsgrid \S* (.*) min/; - $list=$1; - $i = 1; - foreach $t (split(' ',$list)) { - $nlon[$i++] = $t; - } - $nx=$nlon[1]; - if ($nx < $nlon[$ny]) { $nx = $nlon[$ny]; } - if ($lon1 <= $lon0) { $lon1 += 360.0; } - $dx = ($lon1 - $lon0) / ($nx - 1); - print "xdef $nx linear $lon0 $dx\n"; - -# now to create the pdef file - - open (PDEF, ">$pdef"); - binmode PDEF; - - print "pdef $nxny 1 file 1 stream binary $caret3$pdef\n"; - - if ($yrev == 0) { - $offset = 0; - for ($j = 1; $j <= $ny; $j++) { - for ($i = 0; $i < $nx; $i++) { - $x = $i / ($nx - 1.0) * ($nlon[$j] - 1); - $x = floor($x + 0.5) + $offset; - print PDEF pack("L", $x); - } - $offset += $nlon[$j]; - } - } - else { - $offset = $nxny; - for ($j = $ny; $j >= 1; $j--) { - $offset -= $nlon[$j]; - for ($i = 0; $i < $nx; $i++) { - $x = $i / ($nx - 1.0) * ($nlon[$j] - 1); - $x = floor($x + 0.5) + $offset; - print PDEF pack("L", $x); - } - } - } - - -# print weights - $x = pack("f", 1.0); - for ($i = 0; $i < $nx*$ny; $i++) { - print PDEF $x; - } -# print wind rotation - $x = pack("L", -999); - for ($i = 0; $i < $nx*$ny; $i++) { - print PDEF $x; - } - close(PDEF); -} -elsif (/ latlon: /) { - / lat (\S*) to (\S*) by (\S*) /; - $lat0=$1; - $lat1=$2; - $dlat=$3; - - / long (\S*) to (\S*) by (\S*), \((\S*) x (\S*)\)/; - $lon0=$1; - # $lon1=$2; - $dlon=$3; - $nx =$4; - $ny =$5; - - if ($lat0 > $lat1) { - print "options yrev\n"; - print "ydef $ny linear $lat1 ", abs($dlat), "\n" - } - else { - print "ydef $ny linear $lat0 ", abs($dlat), "\n" - } - print "xdef $nx linear $lon0 $dlon\n"; -} -elsif ($grid == 5 && $center == 7) { - print "pdef 53 57 nps 27 49 -105 190.5\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 6 && $center == 7) { - print "pdef 53 45 nps 27 49 -105 190.5\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 87 && $center == 7) { - print "pdef 81 62 nps 31.9 112.53 -105 68.513\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 96 && $kludge eq "on" && $center == 7) { - # quick and dirty pdef for eta 12 km - # use -kludge option - print "pdef 606 1067 eta.u -111 50 0.17520661 0.075046904\n"; - print "xdef 1440 linear -200 0.125\n"; - print "ydef 721 linear 0 0.125\n"; -} -elsif ($grid == 101 && $center == 7) { - print "pdef 113 91 nps 58.5 92.5 -105 91.452\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 104 && $center == 7) { - print "pdef 147 110 nps 75.5 109.5 -105 90.75464\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 105 && $center == 7) { - print "pdef 83 83 nps 40.5 88.5 -105 90.75464\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 106 && $center == 7) { - print "pdef 165 117 nps 80 176 -105 45.37732\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 107 && $center == 7) { - print "pdef 120 92 nps 46 167 -105 45.37732\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 192 && $rr ne "" && $center == 7) { - # quick and dirty pdef for RR egrid - # need -rr option to use - print "pdef 237 387 eta.u -111 50 0.4491525 0.2072539\n"; - print "xdef 360 linear -180 0.5\n"; - print "ydef 181 linear 0 0.5\n"; -} -elsif ($grid == 201 && $center == 7) { - print "pdef 65 65 nps 33 33 -105 381\n"; - print "xdef 180 linear -180 2\n"; - print "ydef 51 linear -10 2\n"; -} -elsif ($grid == 202 && $center == 7) { - print "pdef 65 43 nps 33 45 -105 190.5\n"; - print "xdef 91 linear -200 2\n"; - print "ydef 41 linear 10 2\n"; -} -elsif ($grid == 203 && $center == 7) { - print "pdef 45 39 nps 27 37 -150 190.5\n"; - print "xdef 103 linear -250 2\n"; - print "ydef 33 linear 26 2\n"; -} -elsif ($grid == 205 && $center == 7) { - print "pdef 45 39 nps 27 57 -60 190.5\n"; - print "xdef 50 linear -120 2\n"; - print "ydef 46 linear 0 2\n"; -} -elsif ($grid == 207 && $center == 7) { - print "pdef 49 35 nps 25 51 -150 95.25\n"; - print "xdef 51 linear -200 2\n"; - print "ydef 30 linear 45 1\n"; -} -elsif ($grid == 211 && $center == 7) { - # awips lambert conformal - print "pdef 93 65 lcc 12.19 -133.459 1 1 25 25 -95 81270.5 81270.5\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -elsif ($grid == 212 && $center == 7) { - # awips lambert conformal - print "pdef 185 129 lcc 35.0 -95.0 105 49 25 25 -95 40635 40635\n"; - print "xdef 181 linear -140 0.5\n"; - print "ydef 91 linear 15 0.5\n"; -} -elsif ($grid == 213 && $center == 7) { - print "pdef 129 85 nps 65 89 -105 95.25\n"; - print "xdef 170 linear -190 1\n"; - print "ydef 81 linear 10 1\n"; -} -elsif ($grid == 215 && $center == 7) { - # lambert conformal - print "pdef 369 257 lcc 12.19 -133.46 1 1 25 25 -95 20318 20318\n"; - print "xdef 289 linear -136 0.25\n"; - print "ydef 157 linear 18 0.25\n"; -} -elsif ($grid == 216 && $center == 7) { - print "pdef 147 110 nps 75.5 109.5 -105 91.452\n"; - print "xdef 181 linear -180 1\n"; - print "ydef 91 linear 0 1\n"; -} -elsif ($grid == 221 && $nearest_neighbor eq "on" && $center == 7) { - # awips lambert conformal nearest neighbor - print "pdef 96673 1 file 1 sequential binary-little $pdef_dir/grib221nn.pdef\n"; - print "xdef 1111 linear -250 0.333333\n"; - print "ydef 247 linear 8 0.333333\n"; -} -elsif ($grid == 221 && $center == 7) { - # awips lambert conformal - print "pdef 349 277 lcc 1 -145.5 1 1 50 50 -107 32463 32463\n"; - print "xdef 1111 linear -250 0.333333\n"; - print "ydef 247 linear 8 0.333333\n"; -} -# old grid 240 -#elsif ($grid == 240) { -# # nps usa -# print "pdef 1160 880 nps 441 1601 255 4.763\n"; -# print "xdef 801 linear -130 0.1\n"; -# print "ydef 401 linear 20 0.1\n"; -#} -# new grid 240 -elsif ($grid == 240 && $center == 7) { - # nps usa - print "pdef 1121 881 nps 401 1601 255 4.7625\n"; - print "xdef 1601 linear -130 0.05\n"; - print "ydef 801 linear 20 0.05\n"; -} -elsif ($grid == 241 && $center == 7) { - print "pdef 386 293 nps 147.315 534.0 -105 14.2875\n"; - print "xdef 161 linear -140 0.5\n"; - print "ydef 81 linear 20 0.5\n"; -} -else { - # unknown grid - - $_ = $griddef; - GRD: { - - / polar stereo: Lat1 16.125000 Long1 234.983000 Orient -100.0/ && do { - print "options yrev\n"; - print "pdef 129 86 nps 64 136 -100 60\n"; - print "xdef 720 linear 0 0.5\n"; - print "ydef 148 linear 16 0.5\n"; - last GRD; }; - - / polar stereo: Lat1 -4.860000 Long1 -122.614000 Orient -80.000000/ && do { - print "pdef 49 51 nps 24 26 -80 381\n"; - print "xdef 144 linear 0 2.5\n"; - print "ydef 45 linear -20 2.5\n"; - last GRD; }; - - / Lambert Conf:.* Lov 265.*\(151 x 113\)/s && do { - print "options yrev\n"; - print "pdef 151 113 lcc 16.281 233.8622 1 1 25 25 265 40635 40635\n"; - print "xdef 141 linear -130 0.5\n"; - print "ydef 71 linear 20 0.5\n"; - last GRD; }; - - # beta: mercator - # scan modes .. assumes west to east - / Mercator: / && do { - /lat *(\S*) to (\S*) /; - $lat1 = $1; - $lat2 = $2; - /long (\S*) to (\S*) /; - $lon1 = $1; - $lon2 = $2; - / nx (\S*) ny (\S*) /; - $nx = $1; - $ny = $2; - - if ($lat1 > $lat2) { - print "options yrev\n"; - $t = $lat2; - $lat2 = $lat1; - $lat1 = $t; - } - print "ydef $ny levels\n"; - $i = 0; - $n1 = log(tan((45+$lat1/2)*3.1415927/180)); - $n2 = log(tan((45+$lat2/2)*3.1415927/180)); - $dy = ($n2 - $n1) / ($ny - 1); - - while ($i < $ny) { - $nn = $n1 + $dy * $i; - $lat = (atan(exp($nn))*180/3.1415927-45)*2; - printf ("%9.4f ", $lat); - $i++; - if ($i % 7 == 0) { print "\n"; } - } - if ($i % 7 != 0) { print "\n"; } - - $dlon = $lon2 - $lon1; - if ($dlon < 0) { - $dlon = $dlon + 360; - } - $dlon = $dlon / ($nx - 1); - print "xdef $nx linear $lon1 $dlon\n"; - - last GRD; }; - - - # beta: generalized lambert conformal pdef/xdef/ydef - # not very good .. needs to calculate the all - # vertices for better xdef and ydef - # for improvements .. pull out code from lcgrib - - / Lambert Conf: / && do { - / Lat1 (\S*) Lon1 (\S*) Lov (\S*)/; - $lat1 = $1; - $lon1 = $2; - $lov = $3; - - /Latin1 (\S*) Latin2 (\S*) /; - $latin1 = $1; - $latin2 = $2; - - /Pole \((\S*) x (\S*)\) Dx (\S*) Dy (\S*) /; - $nx = $1; - $ny = $2; - $dx = 1000*$3; - $dy = 1000*$4; - - print "pdef $nx $ny lcc $lat1 $lon1 1 1 $latin1 $latin2 $lov $dx $dy\n"; - if ($global_map eq "") { - $dx = $dx / (110000.0 * cos($lat1*3.141592654/180.0)); - $dy = $dy / 110000.0; - if ($lon1 > 180) { - $lon1 = $lon1 - 360.0; - } - print "xdef $nx linear $lon1 $dx\n"; - print "ydef $ny linear $lat1 $dy\n"; - } - else { - print "xdef 360 linear 0 1\n"; - print "ydef 181 linear -90 1\n"; - } - - last GRD; }; - - / thinned gaussian:/ && do { - - / lat *(\S*) to (\S*)/; - $lat0 = $1; - $lat1 = $2; - - / long (\S*) to (\S*), (\S*) grid pts \(-1 x (\S*)\) /; - $lon0=$1; - $lon1=$2; - $nxny = $3; - $ny = $4; - print "ydef $ny levels\n"; - $yrev = 0; - if ($lat0 > $lat1) { $yrev = 1; } - - $eps = 3e-14; - $m=int(($ny+1)/2); - - $i=1; - while ($i <= $m) { - $z=cos(3.141592654*($i-0.25)/($ny+0.5)); - do { - $p1 = 1; - $p2 = 0; - $j = 1; - while ($j <= $ny) { - $p3 = $p2; - $p2 = $p1; - $p1=((2*$j-1)*$z*$p2-($j-1)*$p3)/$j; - $j++; - } - $pp = $ny*($z*$p1-$p2)/($z*$z-1); - - $z1 = $z; - $z = $z1 - $p1/$pp; - } until abs($z-$z1) < $eps; - $x[$i] = -atan2($z,sqrt(1-$z*$z))*180/3.141592654; - $x[$ny+1-$i] = -$x[$i]; - $i++; - } - $i = 1; - while ($i < $ny) { - printf " %7.3f", $x[$i]; - if (($i % 10) == 0) { print "\n"; } - $i++; - } - printf " %7.3f\n", $x[$ny]; - - $t=$_; - - s/\n//g; - / bdsgrid \S* (.*) min/; - $list=$1; - $i = 1; - $nx = 0; - foreach $t (split(' ',$list)) { - $nlon[$i++] = $t; - if ($nx < $t) { $nx = $t; } - } - if ($lon1 <= $lon0) { $lon1 += 360.0; } - $dx = ($lon1 - $lon0) / ($nx - 1); - print "xdef $nx linear $lon0 $dx\n"; - -# now to create the pdef file - - open (PDEF, ">$pdef"); - binmode PDEF; - - print "pdef $nxny 1 file 1 stream binary $caret3$pdef\n"; - - if ($yrev == 0) { - $offset = 0; - for ($j = 1; $j <= $ny; $j++) { - for ($i = 0; $i < $nx; $i++) { - $x = $i / ($nx - 1.0) * ($nlon[$j] - 1); - $x = floor($x + 0.5) + $offset; - print PDEF pack("L", $x); - } - $offset += $nlon[$j]; - } - } - else { - $offset = $nxny; - for ($j = $ny; $j >= 1; $j--) { - $offset -= $nlon[$j]; - for ($i = 0; $i < $nx; $i++) { - $x = $i / ($nx - 1.0) * ($nlon[$j] - 1); - $x = floor($x + 0.5) + $offset; - print PDEF pack("L", $x); - } - } - } - -# print weights - $x = pack("f", 1.0); - for ($i = 0; $i < $nx*$ny; $i++) { - print PDEF $x; - } -# print wind rotation - $x = pack("L", -999); - for ($i = 0; $i < $nx*$ny; $i++) { - print PDEF $x; - } - close(PDEF); - last GRD; }; - - / gaussian:/ && do { - / lat (\S*) to (\S*)/; - $lat0=$1; - $lat1=$2; - - / long (\S*) to (\S*) by (\S*), \((\S*) x (\S*)\)/; - $lon0=$1; - # $lon1=$2; - $dlon=$3; - $nx =$4; - $ny =$5; - $dlon = 360 / $nx; - - if ($lat0 > $lat1) { - print "options yrev\n"; - } - print "xdef $nx linear $lon0 $dlon\n"; - print "ydef $ny levels\n"; - - $eps = 3e-14; - $m=int(($ny+1)/2); - - $i=1; - while ($i <= $m) { - $z=cos(3.141592654*($i-0.25)/($ny+0.5)); - do { - $p1 = 1; - $p2 = 0; - $j = 1; - while ($j <= $ny) { - $p3 = $p2; - $p2 = $p1; - $p1=((2*$j-1)*$z*$p2-($j-1)*$p3)/$j; - $j++; - } - $pp = $ny*($z*$p1-$p2)/($z*$z-1); - - $z1 = $z; - $z = $z1 - $p1/$pp; - } until abs($z-$z1) < $eps; - $x[$i] = -atan2($z,sqrt(1-$z*$z))*180/3.141592654; - $x[$ny+1-$i] = -$x[$i]; - $i++; - } - $i = 1; - while ($i < $ny) { - printf " %7.3f", $x[$i]; - if (($i % 10) == 0) { print "\n"; } - $i++; - } - printf " %7.3f\n", $x[$ny]; - - last GRD; }; -# rotated LatLon grid - / rotated LatLon grid/ && do { - / LatLon grid lat (\S*) to (\S*) lon (\S*) to (\S*)/; - $lat0 = $1; - $lat1 = $2; - $lon0 = $3; - $lon1 = $4; - /nxny \S+ \((\S*) x (\S*)\)/; - $nx = $1; - $ny = $2; - / south pole lat (\S*) lon (\S*) rot angle (\S*)/; - $lat_sp = $1; - $lon_sp = $2; - $rot_angle = $3; - print "* Rotated LatLon grid: South pole lat $lat_sp lon $lon_sp", - " rot angle $rot_angle\n"; - $dlon = ( $lon1-$lon0)/($nx-1); - $dlat = ( $lat1-$lat0)/($ny-1); - if ($lat0 > $lat1) { - print "options yrev\n"; - print "ydef $ny linear $lat1 ", abs($dlat), "\n" - } - else { - print "ydef $ny linear $lat0 ", abs($dlat), "\n" - } - print "xdef $nx linear $lon0 $dlon\n"; - last GRD; }; - -# polar stereographic - / polar stereo: / && do { - / Lat1 (\S*) Long1 (\S*) Orient (\S*)/; - $lat1=$1; - $lon1=$2; - $orient=$3; - - / (\S*) pole \((\S*) x (\S*)\) Dx (\S*) Dy (\S*) scan (\S*)/; - $pole=$1; - $nx=$2; - $ny=$3; - $dx=$4; - $dy=$5; - $scan=$6; - - # probably only works for scan=64 - - $dpr=3.14159265358979/180.0; - $rearth=6.3712e6; - - $h=1; - $proj="nps"; - if ($pole eq "south") { - $h=-1; - $proj="sps"; - } - $hi=1; - $hj=-1; - if (($scan/128 % 2) == 1) { - $hi=-1; - } - if (($scan/64 % 2) == 1) { - $hj=1; - } - $dxs=$dx*$hi; - $dys=$dy*$hj; - $de=(1+sin(60*$dpr))*$rearth; - $dr=$de*cos($lat1*$dpr)/(1+$h*sin($lat1*$dpr)); - $xp=1-$h*sin(($lon1-$orient)*$dpr)*$dr/$dxs; - $yp=1+cos(($lon1-$orient)*$dpr)*$dr/$dys; - $dx=$h*$dx/1000; - - printf "pdef $nx $ny $proj $xp $yp $orient $dx\n"; - - # need to do a better job here - # need to find lat/lon of end points to right domain - # for now, just do simple stuff - $dx=abs($dx)*1000; - $nx = int($rearth * 3.14 / $dx + 1); - $dx = 360/$nx; - printf "xdef $nx linear 0 $dx\n"; - if ($proj eq 'sps') { - $ny=int(($lat1+90)/$dx)+1; - printf "ydef $ny linear -90 $dx\n", - } - else { - $ny=int((90-$lat1)/$dx)+1; - $l=90-($ny-1)*$dx; - printf "ydef $ny linear $l $dx\n", - } - last GRD; }; - - - print STDERR "*** script needs to be modified ***\n"; - print STDERR "unknown user-defined grid\n"; - } -} - - -# make the tdef statement - -&tdef; - -# ------------------var-------------------------------------; - -%tails =( - '1' => 'sfc', - '2' => 'clb', - '3' => 'clt', - '4' => 'zdg', - '5' => 'adcl', - '6' => 'mwl', - '7' => 'trp', - '8' => 'toa', - '9' => 'bos', - '10' => 'clm', - '12' => 'lcb', - '13' => 'lct', - '14' => 'loc', - '20' => 'tmpl', - '22' => 'mcb', - '23' => 'mct', - '24' => 'mdc', - '32' => 'hcb', - '33' => 'hct', - '34' => 'hic', - '100' => 'prs', - '101' => 'plr', - '102' => 'msl', - '103' => 'hml', - '104' => 'zlr', - '105' => 'hag', - '106' => 'hlr', - '107' => 'sig', - '108' => 'slr', - '109' => 'hbl', - '110' => 'blr', - '111' => 'dpl', - '112' => 'dlr', - '113' => 'tht', - '114' => 'tlr', - '116' => 'plg', - '117' => 'pv', - '121' => 'plr', - '126' => 'pa', - '128' => 'slr', - '141' => 'plr', - '160' => 'dsl', - '200' => 'clm', - '201' => 'oclm', - '204' => 'htfl', - '206' => 'gcbl', - '207' => 'gctl', - '209' => 'bcb', - '210' => 'bct', - '211' => 'bcl', - '212' => 'lcb', - '213' => 'lct', - '214' => 'lcl', - '222' => 'mcb', - '223' => 'mct', - '224' => 'mcl', - '232' => 'hcb', - '233' => 'hct', - '234' => 'hcl', - '235' => 'tmp', - '237' => 'bmxl', - '238' => 'bitl', - '242' => 'cvb', - '243' => 'cvt', - '244' => 'cvl', - '248' => 'sccb', - '249' => 'scct', - '251' => 'dccb', - '252' => 'dcct', - ); - -# Find the vertical profile - -$nlevelmax=0; -$levelsmax=0; -$profile_kpds6=-1; - -foreach $fname (sort keys(%flevels)) { - ($name, $kpds6) = split(/:/, $fname); - $_=$flevels{$fname}; - $nlev = (tr/ / /) - 1; - if ($nlev > $nlevelmax) { - if (defined($allow_profile[$kpds6])) { - $nlevelmax = $nlev; - $levelsmax = $flevels{$fname}; - $profile_kpds6 = $kpds6; - } - } -} - -if ($nlevelmax <= 1) { - print "zdef 1 linear 1 1\n"; -} -else { - print "* z has $nlevelmax levels, for $tails{$profile_kpds6}\n"; - print "zdef $nlevelmax levels\n"; - ($_ = $levelsmax) =~ s/.//; - chop($_); - if ($allow_profile[$profile_kpds6] eq '+') { - print join ' ', sort {$a <=> $b} split(/ /,$_); - } - else { - print join ' ', sort {$b <=> $a} split(/ /,$_); - } - print "\n"; -} -if ($nlevelmax == 1) { $profile_kpds6 = -1; } - -$tails{'100'} = "$prs"; -$nvar = 0; - -foreach $fname (sort keys(%flevels)) { - ($name, $kpds6) = split(/:/, $fname); - ($kpds5, $comment) = split(/:/, $fcomments{$fname}); - $comment = substr($comment,1); - - $_=$flevels{$fname}; - $nlev = (tr/ / /) - 1; - $kpds7s = $_; - - # fix names to be grads compatible - # eliminate dashes, underscores, blanks and put no in front of leading digits - - $_ = $name; - $_ =~ tr/_\- //d; - if ($lc) { $_ =~ s/(.*)/\L$1/gi; } - if ( /^\d/ ) { $_ = "no$_"; } - $name = $_; - - $tail = $suffix eq 'no' ? "" : $tails{$kpds6}; - if (! defined $tail) { $tail="l$kpds6"; } - - # convert profile variable - - if ($profile_kpds6 == $kpds6 && $nlev != 1) { - $out[$nvar++] = "$name$tail $nlev $kpds5,$kpds6,0 ** (profile) $comment"; - } - - # convert profiles to individual layers - elsif ($kpds6 == 100) { - foreach $ll (sort {$b <=> $a} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}${ll}mb 0 $kpds5,$kpds6,$ll ** $ll mb $comment"; - } - } - elsif ($kpds6 == 101) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256); - $lev2 = $ll % 256; - $out[$nvar++] = "${name}${lev1}0_${lev2}0mb 0 $kpds5,$kpds6,$ll ** ${lev1}0-${lev2}0 mb $comment"; - } - } - elsif ($kpds6 == 103) { - foreach $ll (sort {$b <=> $a} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}${ll}m 0 $kpds5,$kpds6,$ll ** $ll m above msl $comment"; - } - } - elsif ($kpds6 == 105) { - foreach $ll (sort {$b <=> $a} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}${ll}m 0 $kpds5,$kpds6,$ll ** $ll m above ground $comment"; - } - } - elsif ($kpds6 == 106) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256); - $lev2 = $ll % 256; - $lev1f=100*$lev1; - $lev2f=100*$lev2; - $out[$nvar++] = "${name}${lev2f}_${lev1f}m 0 $kpds5,$kpds6,$ll ** ${lev2f}-${lev1f} m above ground $comment"; - } - } - elsif ($kpds6 == 107) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - if ($ll < 10) {$ll="0$ll";} - if ($ll < 100) {$ll="0$ll";} - if ($ll < 1000) {$ll="0$ll";} - $lev1 = $ll; - $lev1 =~ s/0+$/ /; - $out[$nvar++] = "${name}sig$lev1 0 $kpds5,$kpds6,$ll ** sigma=.${lev1} $comment"; - } - } - elsif ($kpds6 == 108) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256); - $lev2 = $ll % 256; - $lev1f = $lev1 / 100; - $lev2f = $lev2 / 100; - $out[$nvar++] = "${name}sg${lev1}_${lev2} 0 $kpds5,$kpds6,$ll ** sigma=${lev1f}-${lev2f} layer $comment"; - } - } - elsif ($kpds6 == 109) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}hlev$ll 0 $kpds5,$kpds6,$ll ** hybrid level $ll $comment"; - } - } - elsif ($kpds6 == 110) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256); - $lev2 = $ll % 256; - $out[$nvar++] = "${name}hg${lev1}_${lev2} 0 $kpds5,$kpds6,$ll ** hybrid=${lev1}-${lev2} layer $comment"; - } - } - elsif ($kpds6 == 111) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}_${ll}cm 0 $kpds5,$kpds6,$ll ** $ll cm underground $comment"; - } - } - elsif ($kpds6 == 112) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256); - $lev2 = $ll % 256; - $out[$nvar++] = "${name}${lev1}_${lev2}cm 0 $kpds5,$kpds6,$ll ** $lev1-$lev2 cm underground $comment"; - } - } - elsif ($kpds6 == 20) { - foreach $ll (sort {$b <=> $a} split(' ',$kpds7s)) { - $flt = $ll / 100.0; - # cK = centi-Kelvins - $out[$nvar++] = "${name}${ll}cK 0 $kpds5,$kpds6,$ll ** ${flt}K level $comment"; - } - } - elsif ($kpds6 == 113) { - foreach $ll (sort {$b <=> $a} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}${ll}K 0 $kpds5,$kpds6,$ll ** ${ll}K level $comment"; - } - } - elsif ($kpds6 == 116) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256); - $lev2 = $ll % 256; - $out[$nvar++] = "${name}${lev1}_${lev2}mb 0 $kpds5,$kpds6,$ll ** ${lev1}-${lev2} mb above gnd $comment"; - } - } - elsif ($kpds6 == 235) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $val = $ll; - if ($val > 32768) { $val = 32768 - $val; } - $iso=$val/10; - $isovar=$iso; - $isovar =~ s/-/neg/; - $isovar =~ s/[.]/p/; - $out[$nvar++] = "${name}t${isovar}c 0 $kpds5,$kpds6,$ll ** ${iso}C isotherm $comment"; - } - } - elsif ($kpds6 == 236) { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $lev1 = int($ll / 256)*10; - $lev2 = ($ll % 256)*10; - $out[$nvar++] = "${name}${lev1}_${lev2}m 0 $kpds5,$kpds6,$ll ** $lev1-$lev2 m under water $comment"; - } - } - elsif ($kpds6 == 1) { - $kpds7s =~ s/^ //; - $out[$nvar++] = "${name}sfc 0 $kpds5,$kpds6,$kpds7s ** surface $comment"; - } - elsif ($kpds6 == 2) { - $out[$nvar++] = "${name}clb 0 $kpds5,$kpds6,0 ** cloud base $comment"; - } - elsif ($kpds6 == 3) { - $out[$nvar++] = "${name}clt 0 $kpds5,$kpds6,0 ** cloud top $comment"; - } - elsif ($kpds6 == 4) { - $out[$nvar++] = "${name}0deg 0 $kpds5,$kpds6,0 ** 0C isotherm level $comment"; - } - elsif ($kpds6 == 5) { - $out[$nvar++] = "${name}adcl 0 $kpds5,$kpds6,0 ** adiabatic lifting condensation level $comment"; - } - elsif ($kpds6 == 6) { - $out[$nvar++] = "${name}mwl 0 $kpds5,$kpds6,0 ** max wind level $comment"; - } - elsif ($kpds6 == 7) { - $out[$nvar++] = "${name}trp 0 $kpds5,$kpds6,0 ** tropopause $comment"; - } - elsif ($kpds6 == 8) { - $out[$nvar++] = "${name}toa 0 $kpds5,$kpds6,0 ** top of atmos $comment"; - } - elsif ($kpds6 == 200) { - $out[$nvar++] = "${name}clm 0 $kpds5,$kpds6,0 ** atmos column $comment"; - } - elsif ($kpds6 == 201) { - $out[$nvar++] = "${name}oclm 0 $kpds5,$kpds6,0 ** ocean column $comment"; - } - elsif ($kpds6 == 204) { - $out[$nvar++] = "${name}htfl 0 $kpds5,$kpds6,0 ** highest trop freezing level $comment"; - } - elsif ($kpds6 == 206) { - $out[$nvar++] = "${name}gcbl 0 $kpds5,$kpds6,0 ** grid-scale cloud bottom level $comment"; - } - elsif ($kpds6 == 207) { - $out[$nvar++] = "${name}gctl 0 $kpds5,$kpds6,0 ** grid-scale cloud top level $comment"; - } - elsif ($kpds6 == 209) { - $out[$nvar++] = "${name}bcb 0 $kpds5,$kpds6,0 ** boundary cld base $comment"; - } - elsif ($kpds6 == 210) { - $out[$nvar++] = "${name}bct 0 $kpds5,$kpds6,0 ** boundary cld top $comment"; - } - elsif ($kpds6 == 211) { - $out[$nvar++] = "${name}bcl 0 $kpds5,$kpds6,0 ** boundary cld layer $comment"; - } - elsif ($kpds6 == 212) { - $out[$nvar++] = "${name}lcb 0 $kpds5,$kpds6,0 ** low cloud base $comment"; - } - elsif ($kpds6 == 213) { - $out[$nvar++] = "${name}lct 0 $kpds5,$kpds6,0 ** low cloud top $comment"; - } - elsif ($kpds6 == 214) { - $out[$nvar++] = "${name}lcl 0 $kpds5,$kpds6,0 ** low cloud level $comment"; - } - elsif ($kpds6 == 222) { - $out[$nvar++] = "${name}mcb 0 $kpds5,$kpds6,0 ** mid-cloud base $comment"; - } - elsif ($kpds6 == 223) { - $out[$nvar++] = "${name}mct 0 $kpds5,$kpds6,0 ** mid-cloud top $comment"; - } - elsif ($kpds6 == 224) { - $out[$nvar++] = "${name}mcl 0 $kpds5,$kpds6,0 ** mid-cloud level $comment"; - } - elsif ($kpds6 == 232) { - $out[$nvar++] = "${name}hcb 0 $kpds5,$kpds6,0 ** high cloud base $comment"; - } - elsif ($kpds6 == 233) { - $out[$nvar++] = "${name}hct 0 $kpds5,$kpds6,0 ** high cloud top $comment"; - } - elsif ($kpds6 == 234) { - $out[$nvar++] = "${name}hcl 0 $kpds5,$kpds6,0 ** high cloud level $comment"; - } - elsif ($kpds6 == 237) { - $out[$nvar++] = "${name}${tail} 0 $kpds5,$kpds6,0 ** bottom ocn mixed layer $comment"; - } - elsif ($kpds6 == 238) { - $out[$nvar++] = "${name}${tail} 0 $kpds5,$kpds6,0 ** bottom ocn isothermal layer $comment"; - } - elsif ($kpds6 == 242) { - $out[$nvar++] = "${name}cvb 0 $kpds5,$kpds6,0 ** convective cld base $comment"; - } - elsif ($kpds6 == 243) { - $out[$nvar++] = "${name}cvt 0 $kpds5,$kpds6,0 ** convective cld top $comment"; - } - elsif ($kpds6 == 244) { - $out[$nvar++] = "${name}cvl 0 $kpds5,$kpds6,0 ** convective cld layer $comment"; - } - elsif ($kpds6 == 246) { - $out[$nvar++] = "${name}cvl 0 $kpds5,$kpds6,0 ** max e-pot-t level $comment"; - } - elsif ($kpds6 == 248) { - $out[$nvar++] = "${name}sccb 0 $kpds5,$kpds6,0 ** shallow convective cloud base $comment"; - } - elsif ($kpds6 == 249) { - $out[$nvar++] = "${name}scct 0 $kpds5,$kpds6,0 ** shallow convective cloud top $comment"; - } - elsif ($kpds6 == 251) { - $out[$nvar++] = "${name}dccb 0 $kpds5,$kpds6,0 ** deep convective cloud base $comment"; - } - elsif ($kpds6 == 252) { - $out[$nvar++] = "${name}dcct 0 $kpds5,$kpds6,0 ** deep convective cloud top $comment"; - } - elsif ($kpds6 == 117) { - if ($kpds7s =~ s/ 2 / /) { - $out[$nvar++] = "${name}pv2 0 $kpds5,$kpds6,2 ** pot vorticity = 2 units level $comment"; - } - if ($kpds7s =~ s/ 32770 / /) { - $out[$nvar++] = "${name}pvneg2 0 $kpds5,$kpds6,32770 ** pot vorticity = -2 units level $comment"; - } - if ($kpds7s =~ s/ 2000 / /) { - $out[$nvar++] = "${name}pv2 0 $kpds5,$kpds6,2000 ** pot vorticity = 2000 units level $comment"; - } - if ($kpds7s =~ s/ 34768 / /) { - $out[$nvar++] = "${name}pvneg2 0 $kpds5,$kpds6,34768 ** pot vorticity = -2000 units level $comment"; - } - } - elsif ($nlev == 1) { - # unknown single level - $kpds7s =~ s/^ //; - $out[$nvar++] = "${name}$tail 0 $kpds5,$kpds6,$kpds7s ** unknown level $comment"; - } - else { - foreach $ll (sort {$a <=> $b} split(' ',$kpds7s)) { - $out[$nvar++] = "${name}$tail$ll 0 $kpds5,$kpds6,$ll **level=$ll $comment"; - } - } -} - -print "vars $nvar\n"; -for ($i = 0; $i < $nvar; $i++) { - print $out[$i]; -} -print "ENDVARS\n"; - -if ($sys eq "win") { - unlink $TmpFile; -} -unlink $ListA; -exit 0; - -#------------------ jday -------------------- -# jday(year,mo,day) return the julian day relative to jan 0 -# mo=1..12 -# -sub jday { - - local($n); - local($nleap); - local($year1); - $n=substr(" 000 031 059 090 120 151 181 212 243 273 304 334",($_[1]-1)*4,4); - $n = $n + $_[2]; - $year1 = $_[0] - 1905; - - if ($calendar eq '365') { - $n += $year1 * 365; - } - else { - if ($_[1] > 2 && $_[0] % 4 == 0) { - if ($_[0] % 400 == 0 || $_[0] % 100 != 0) { - $n++; - } - } - $nleap = int($year1 / 4); - $n = $n + $nleap + $year1 * 365; - } - $n; -} - -#------------------ write tdef statement ------------------ -# still not great but better than before - -sub tdef { - - local($tmp); - local($n); - $n=$ntime; - if ($timestep) { $dt=$timestep } - else { - if ($ntime == 1) { - if ($timestep) { $dt=$timestep } - else { $dt="1mo"; } - } - elsif ($hour != $hour1) { - $tmp= (&jday($year1,$mo1,$day1) - &jday($year,$mo,$day)) * 24 + $hour1 - $hour; - $dt="${tmp}hr"; - $n = (&jday($year_last,$mo_last,$day_last) - &jday($year,$mo,$day)) * 24 + $hour_last - $hour; - $n = int($n / $tmp) + 1; - } - elsif ($day != $day1) { - # assume that dt < 365 days - $tmp = &jday($year1,$mo1,$day1) - &jday($year,$mo,$day); - $dt="${tmp}dy"; - $n=int((&jday($year_last,$mo_last,$day_last) - &jday($year,$mo,$day))/$tmp)+1; - } - elsif ($mo != $mo1) { - # assume that dt < 12 months - $tmp = $year1*12+$mo1 - $year*12-$mo; - $dt="${tmp}mo"; - $n = int(($year_last*12+$mo_last - $year*12 - $mo) / $tmp) + 1; - } - else { - $tmp = $year1 - $year; - $dt="${tmp}yr"; - $n = int(($year_last - $year) / $tmp) + 1; - } - } - if ($calendar eq "365") { - print "options 365_day_calendar\n"; - } - print "tdef $n linear ${hour}Z$day$month$year $dt\n"; -} - diff --git a/src/Conventional_Monitor/image_gen/ush/make_tdef.sh b/src/Conventional_Monitor/image_gen/ush/make_tdef.sh index b0d2018a..d46f04d9 100755 --- a/src/Conventional_Monitor/image_gen/ush/make_tdef.sh +++ b/src/Conventional_Monitor/image_gen/ush/make_tdef.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash #------------------ # make_tdef.sh diff --git a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh index cd18e190..c6053882 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh @@ -1,17 +1,12 @@ -#!/bin/sh +#!/bin/bash #------------------------------------------------------------------ # # mk_horz_hist.sh # #------------------------------------------------------------------ -set -ax - - echo "--> mk_horz_hist.sh" - rc=0 - echo "CONMON_SUFFIX = $CONMON_SUFFIX" echo "C_TANKDIR = $C_TANKDIR" @@ -42,19 +37,20 @@ set -ax #------------------------------ # submit the plot_hist job #------------------------------ - jobname="${JOBNAME}_hist" plot_hist="${C_IG_SCRIPTS}/plot_hist.sh" + logfile="${C_LOGDIR}/plothist_${CONMON_SUFFIX}.${PDY}.${CYC}.log" - errfile="${C_LOGDIR}/plothist_${CONMON_SUFFIX}.${PDY}.${CYC}.err" - rm -f $logfile - rm -f $errfile + if [[ -e ${logfile} ]]; then + rm -f ${logfile} + fi - if [[ ${MY_MACHINE} = "wcoss_d" || ${MY_MACHINE} = "wcoss_c" ]]; then - ${SUB} -q ${JOB_QUEUE} -P ${PROJECT} -o ${logfile} -M 100 \ - -R affinity[core] -W 0:20 -J ${jobname} -cwd ${PWD} ${plot_hist} + errfile="${C_LOGDIR}/plothist_${CONMON_SUFFIX}.${PDY}.${CYC}.err" + if [[ -e ${errfile} ]]; then + rm -f ${errfile} + fi - elif [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_hist} @@ -67,19 +63,20 @@ set -ax #------------------------------ # submit the plot_horz job #------------------------------ - jobname="${JOBNAME}_horz" plot_horz="${C_IG_SCRIPTS}/plot_horz.sh" + logfile="${C_LOGDIR}/plothorz_${CONMON_SUFFIX}.${PDY}.${CYC}.log" - errfile="${C_LOGDIR}/plothorz_${CONMON_SUFFIX}.${PDY}.${CYC}.err" - rm -f $logfile - rm -f $errfile + if [[ -e ${logfile} ]]; then + rm -f ${logfile} + fi - if [[ $MY_MACHINE = "wcoss_d" || ${MY_MACHINE} = "wcoss_c" ]]; then - $SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} -M 300 \ - -R affinity[core] -W 0:20 -J ${jobname} -cwd ${PWD} ${plot_horz} + errfile="${C_LOGDIR}/plothorz_${CONMON_SUFFIX}.${PDY}.${CYC}.err" + if [[ -e ${errfile} ]]; then + rm -f ${errfile} + fi - elif [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_horz} @@ -92,19 +89,20 @@ set -ax #------------------------------ # submit the plot_horz_uv job #------------------------------ - jobname="${JOBNAME}_horz_uv" plot_horz_uv="${C_IG_SCRIPTS}/plot_horz_uv.sh" + logfile="${C_LOGDIR}/plothorz_uv_${CONMON_SUFFIX}.${PDY}.${CYC}.log" - errfile="${C_LOGDIR}/plothorz_uv_${CONMON_SUFFIX}.${PDY}.${CYC}.err" - rm -f $logfile - rm -f $errfile + if [[ -e ${logfile} ]]; then + rm -f ${logfile} + fi - if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then - $SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} -M 300 \ - -R affinity[core] -W 1:00 -J ${jobname} ${plot_horz_uv} + errfile="${C_LOGDIR}/plothorz_uv_${CONMON_SUFFIX}.${PDY}.${CYC}.err" + if [[ -e ${errfile} ]]; then + rm -f ${errfile} + fi - elif [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=01:30:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_horz_uv} @@ -115,5 +113,5 @@ set -ax echo "<-- mk_horz_hist.sh" -exit ${rc} +exit diff --git a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh index b4b6f361..a233a9cb 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh @@ -1,5 +1,4 @@ -#!/bin/sh -set -xa +#!/bin/bash #-------------------------------------------------- # @@ -9,37 +8,32 @@ set -xa echo "--> mk_time_vert.sh" - export nregion=10 - - echo "CONMON_SUFFIX = $CONMON_SUFFIX" - echo "C_TANKDIR = $C_TANKDIR" - echo "PDATE = $PDATE" - export PDY=`echo ${PDATE}|cut -c1-8` export CYC=`echo ${PDATE}|cut -c9-10` - - #-------------------------------------------- # submit time ps plots #-------------------------------------------- jobname="${JOBNAME}_time_ps" - logfile="${C_LOGDIR}/plot_time_ps_${CONMON_SUFFIX}.${PDY}.${CYC}.log" - errfile="${C_LOGDIR}/plot_time_ps_${CONMON_SUFFIX}.${PDY}.${CYC}.err" pltfile="${C_IG_SCRIPTS}/plot_time_ps.sh" - rm -f $logfile - rm -f $errfile - if [[ $MY_MACHINE == "wcoss_d" || ${MY_MACHINE} = "wcoss_c" ]]; then - $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logfile} -R affinity[core] \ - -M 100 -W 0:50 -J ${jobname} -cwd ${PWD} ${pltfile} + logfile="${C_LOGDIR}/plot_time_ps_${CONMON_SUFFIX}.${PDY}.${CYC}.log" + if [[ -e ${logfile} ]]; then + rm -f $logfile + fi + + errfile="${C_LOGDIR}/plot_time_ps_${CONMON_SUFFIX}.${PDY}.${CYC}.err" + if [[ -e ${errfile} ]]; then + rm -f $errfile + fi - elif [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then + if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:15:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} elif [[ $MY_MACHINE = "wcoss2" ]]; then - $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 -N ${jobname} \ + echo "submitting $jobname" + $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 -N ${jobname} \ -l select=1:mem=200M ${pltfile} fi @@ -48,25 +42,20 @@ echo "--> mk_time_vert.sh" #-------------------------------------------- for type in gps q t uv; do jobname="${JOBNAME}_time_${type}" - logfile="${C_LOGDIR}/plot_time_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.log" - errfile="${C_LOGDIR}/plot_time_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.err" - pltfile="${C_IG_SCRIPTS}/plot_time.sh " export TYPE=${type} - rm -f $logfile - rm -f $errfile - - if [[ $MY_MACHINE == "wcoss_d" || ${MY_MACHINE} = "wcoss_c" ]]; then + pltfile="${C_IG_SCRIPTS}/plot_time.sh " - if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then - walltime="02:30" - else - walltime="00:50" - fi + logfile="${C_LOGDIR}/plot_time_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.log" + if [[ -e ${logfile} ]]; then + rm -f $logfile + fi - $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logfile} -R affinity[core] \ - -M 100 -W ${walltime} -J ${jobname} -cwd ${PWD} ${pltfile} + errfile="${C_LOGDIR}/plot_time_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.err" + if [[ -e ${errfile} ]]; then + rm -f $errfile + fi - elif [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then + if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="02:30:00" else @@ -77,12 +66,12 @@ echo "--> mk_time_vert.sh" -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} elif [[ $MY_MACHINE = "wcoss2" ]]; then - if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="01:30:00" else walltime="50:00" fi + echo "submitting $jobname" $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=${walltime}\ -N ${jobname} -l select=1:mem=200M ${pltfile} @@ -96,19 +85,21 @@ echo "--> mk_time_vert.sh" #-------------------------------------------- for type in q t uv u v; do + export TYPE=${type} jobname="${JOBNAME}_vert_${type}" - logfile="${C_LOGDIR}/plot_vert_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.log" - errfile="${C_LOGDIR}/plot_vert_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.err" pltfile="${C_IG_SCRIPTS}/plot_vert.sh " - export TYPE=${type} - rm -f $logfile - rm -f $errfile - if [[ $MY_MACHINE == "wcoss_d" || ${MY_MACHINE} = "wcoss_c" ]]; then - $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logfile} -R affinity[core] \ - -M 100 -W 1:30 -J ${jobname} -cwd ${PWD} ${pltfile} + logfile="${C_LOGDIR}/plot_vert_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.log" + if [[ -e ${logfile} ]]; then + rm -f $logfile + fi + + errfile="${C_LOGDIR}/plot_vert_${type}_${CONMON_SUFFIX}.${PDY}.${CYC}.err" + if [[ -e ${errfile} ]]; then + rm -f $errfile + fi - elif [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then + if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="00:50:00" else @@ -119,6 +110,7 @@ echo "--> mk_time_vert.sh" -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} elif [[ $MY_MACHINE == "wcoss2" ]]; then + echo "submitting $jobname" $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 \ -N ${jobname} -l select=1:mem=500M ${pltfile} diff --git a/src/Conventional_Monitor/image_gen/ush/plot_hist.sh b/src/Conventional_Monitor/image_gen/ush/plot_hist.sh index dbe19e4a..ef5774c9 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_hist.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_hist.sh @@ -1,5 +1,4 @@ -#!/bin/sh -set -ax +#!/bin/bash #------------------------------------------------------------ # Function getField returns the corresponding value for @@ -8,7 +7,6 @@ set -ax getField () { field='default' - echo "getField $1 $2" file=$1 field=$2 @@ -55,29 +53,32 @@ set -ax # plot scater image histographs # #--------------------------------------------------- - echo "---> plot_hist.sh" - export workdir=${C_PLOT_WORKDIR}/plothist - - export xsize=800 # add standard plot sizes to parms file? export ysize=600 - export PDY=`echo $PDATE|cut -c1-8` - export CYC=`echo $PDATE|cut -c9-10` - + export PDY=`echo ${PDATE}|cut -c1-8` + export CYC=`echo ${PDATE}|cut -c9-10` - rm -rf $workdir - mkdir -p $workdir - cd $workdir + workdir=${C_PLOT_WORKDIR}/plothist + if [[ -d ${workdir} ]]; then + rm -rf ${workdir} + fi + mkdir -p ${workdir} + cd ${workdir} - echo "C_TANKDIR = $C_TANKDIR" - hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist + hh_tankdir=`$MON_USH/get_stats_path.sh --run $RUN --pdate ${PDATE} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` + hh_tankdir=${hh_tankdir}/horz_hist $UNCOMPRESS ${hh_tankdir}/anl/*.scater.*${Z} $UNCOMPRESS ${hh_tankdir}/ges/*.scater.*${Z} + outdir=${C_IMGNDIR}/pngs/hist/ + if [[ ! -d ${outdir} ]]; then + mkdir -p ${outdir} + fi for type in ps q t uv; do @@ -85,17 +86,12 @@ set -ax eval nreal=\${nreal_${type}} exec=conmon_read_${type}_IG.x - echo "stype, nreal, exec = $stype, $nreal, $exec" - - for dtype in ${stype}; do mtype=`echo ${dtype} | cut -f1 -d_` subtype=`echo ${dtype} | cut -f2 -d_` rm -f ./fileout - tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon - #------------------------------------------ # The GrADS plot scripts for horiz plots @@ -113,10 +109,10 @@ set -ax # Read scatter data and create a GrADS # data file for histogram generation. # - /bin/sh ${C_IG_SCRIPTS}/read_scatter.sh $CONMON_SUFFIX \ + /bin/bash ${C_IG_SCRIPTS}/read_scatter.sh $CONMON_SUFFIX \ $dtype $mtype $subtype $PDATE ${HOMEgdas_conmon}/fix \ ${nreal} ${exec} ${type} ${cycle} \ - ${hh_tankdir}/${cycle} ${C_IG_EXEC} + ${hh_tankdir}/${cycle} ${EXECconmon} #------------------------------------------ @@ -126,7 +122,6 @@ set -ax nlev_str=`cat grads_info_${dtype}_${cycle}.${PDATE} | grep nlev` nlev=`echo $nlev_str | gawk '{print $3}'` - echo "DEBUG: nlev = $nlev" sdir=" dset ^out_${dtype}_${cycle}.${PDATE}" title="title ${dtype} ${cycle}" @@ -195,11 +190,6 @@ set -ax -e "s/SDATE/$PDATE/" \ plot_hist.gs >plothist_${dtype}.gs - if [[ ! -d ${C_IMGNDIR}/pngs/hist/${CYC} ]]; then - mkdir -p ${C_IMGNDIR}/pngs/hist/${CYC} - fi - - if [ "${type}" = 'uv' ]; then @@ -303,22 +293,16 @@ set -ax echo 'quit' | grads -blc " run plothist_${dtype}.gs" rm fileout - img_files=`ls *hist*.png` - for imgf in $img_files; do - newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` - echo $newf - cp $imgf $newf - mv $newf ${C_IMGNDIR}/pngs/hist/. - done - -# if [[ $CONMON_SUFFIX != "v16rt2" ]]; then -# mv -f *hist*.png ${C_IMGNDIR}/pngs/hist/${CYC}/. -# fi - done ### dtype loop done ### type loop + img_files=`ls *hist*.png` + for imgf in $img_files; do + newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` + mv $imgf ${outdir}/$newf + done + $COMPRESS ${hh_tankdir}/anl/*.scater.* $COMPRESS ${hh_tankdir}/ges/*.scater.* diff --git a/src/Conventional_Monitor/image_gen/ush/plot_horz.sh b/src/Conventional_Monitor/image_gen/ush/plot_horz.sh index ca890d1d..9245dbb9 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_horz.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_horz.sh @@ -1,27 +1,23 @@ -#!/bin/sh +#!/bin/bash #---------------------------------------------------------------------------------------- # plot_horz.sh # # This produces the horizontal temperature images. #---------------------------------------------------------------------------------------- - - set -ax - date - echo "--> plot_horz.sh" - - rc=0 hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist export xsize=x800 export ysize=y600 - export tmpdir_plothorz=${C_PLOT_WORKDIR}/plothorz - rm -rf $tmpdir_plothorz - mkdir -p $tmpdir_plothorz - cd $tmpdir_plothorz + workdir=${C_PLOT_WORKDIR}/plothorz + if [[ -d ${workdir} ]]; then + rm -rf ${workdir} + fi + mkdir -p ${workdir} + cd ${workdir} #---------------------------------------------------------------------- @@ -35,23 +31,12 @@ #---------------------------------------------------------------------- - # create the idx and ctl files for ges|anl grib|grib2 files + # create the idx and ctl files for ges|anl grib2 files #---------------------------------------------------------------------- - echo "grib2 = $grib2" - - if [[ $grib2 -eq 0 ]]; then # grib files - echo "handling grib files" - ${C_IG_SCRIPTS}/grib2ctl.pl anal.${PDATE} > anal.ctl - gribmap -i anal.ctl -0 - ${C_IG_SCRIPTS}/grib2ctl.pl -verf guess.${PDATE} > guess.ctl - gribmap -i guess.ctl - else # grib2 - echo "handling grib2 files" - ${C_IG_SCRIPTS}/g2ctl.pl -0 anal.$PDATE > anal.ctl - gribmap -0 -i anal.ctl - ${C_IG_SCRIPTS}/g2ctl.pl guess.$PDATE > guess.ctl - gribmap -i guess.ctl - fi + ${C_IG_SCRIPTS}/g2ctl.pl -0 anal.$PDATE > anal.ctl + gribmap -0 -i anal.ctl + ${C_IG_SCRIPTS}/g2ctl.pl guess.$PDATE > guess.ctl + gribmap -i guess.ctl #---------------------------------------------------------------------- @@ -70,7 +55,6 @@ eval stype=\${${type}_TYPE} eval nreal=\${nreal_${type}} - for dtype in ${stype}; do mtype=`echo ${dtype} | cut -f1 -d_` subtype=`echo ${dtype} | cut -f2 -d_` @@ -186,10 +170,10 @@ mkdir -p ${outdir} img_files=`ls *.png` - for imgf in $img_files; do + for imgf in ${img_files}; do newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` - cp $imgf $newf - mv $newf ${outdir}/. + cp ${imgf} ${newf} + mv ${newf} ${outdir}/. done done ### dtype loop @@ -198,13 +182,13 @@ if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then - cd $workdir + cd ${workdir} cd .. - rm -rf $workdir + rm -rf ${workdir} fi echo "<-- plot_horz.sh" -exit $rc +exit diff --git a/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh b/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh index cbe0d890..ad5686e5 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh @@ -1,55 +1,41 @@ -#!/bin/sh -set -ax +#!/bin/bash #--------------------------------------------------------------------- # # plot_horz_uv.sh # - # plot scater image for temperature #--------------------------------------------------------------------- echo "--> plot_horz_uv.sh" - rc=0 hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist - export savedir=${hh_tankdir} - export workdir=${C_PLOT_WORKDIR}/plothorz_uv - rm -rf $workdir - mkdir -p $workdir - cd $workdir + workdir=${C_PLOT_WORKDIR}/plothorz_uv + if [[ -d ${workdir} ]]; then + rm -rf ${workdir} + fi + mkdir -p ${workdir} + cd ${workdir} export xsize=x800 export ysize=y600 - export NCP="cp -f" #---------------------------------------------------------------------- # Link in the analysis and guess data files #---------------------------------------------------------------------- - ${UNCOMPRESS} ${hh_tankdir}/anl/anal.${PDATE}.${Z} - ${UNCOMPRESS} ${hh_tankdir}/ges/guess.${PDATE}.${Z} + ${UNCOMPRESS} ${hh_tankdir}/anl/anal.${PDATE}.gz + ${UNCOMPRESS} ${hh_tankdir}/ges/guess.${PDATE}.gz ln -s ${hh_tankdir}/anl/anal.${PDATE} anal.${PDATE} ln -s ${hh_tankdir}/ges/guess.${PDATE} guess.${PDATE} #---------------------------------------------------------------------- - # create the idx and ctl files for ges|anl grib|grib2 files + # create the idx and ctl files for ges|anl grib2 files #---------------------------------------------------------------------- - echo "grib2 = $grib2" - - if [[ $grib2 -eq 0 ]]; then # grib files - echo "handling grib files" - ${C_IG_SCRIPTS}/grib2ctl.pl anal.${PDATE} > anal.ctl - gribmap -i anal.ctl -0 - ${C_IG_SCRIPTS}/grib2ctl.pl -verf guess.${PDATE} > guess.ctl - gribmap -i guess.ctl - else # grib2 - echo "handling grib2 files" - ${C_IG_SCRIPTS}/g2ctl.pl -0 anal.$PDATE > anal.ctl - gribmap -0 -i anal.ctl - ${C_IG_SCRIPTS}/g2ctl.pl guess.$PDATE > guess.ctl - gribmap -i guess.ctl - fi + ${C_IG_SCRIPTS}/g2ctl.pl -0 anal.$PDATE > anal.ctl + gribmap -0 -i anal.ctl + ${C_IG_SCRIPTS}/g2ctl.pl guess.$PDATE > guess.ctl + gribmap -i guess.ctl #---------------------------------------------------------------------- @@ -137,8 +123,8 @@ set -ax #-------------------------------------------------------------- grads_file=${hh_tankdir}/${cycle}/${dtype}.grads.${cycle}.${PDATE} - if [ -s ${grads_file}.${Z} ]; then - ${UNCOMPRESS} ${grads_file}.${Z} + if [ -s ${grads_file}.gz ]; then + ${UNCOMPRESS} ${grads_file}.gz ln -s ${grads_file} ${dtype}.grads.${cycle}.${PDATE} elif [ -s ${grads_file} ]; then @@ -153,7 +139,7 @@ set -ax done ## done with cycle - if [ ! -s $savedir/$cycle/${dtype}.grads.${cycle}.${PDATE} ]; then + if [ ! -s ${hh_tankdir}/$cycle/${dtype}.grads.${cycle}.${PDATE} ]; then continue fi @@ -174,27 +160,29 @@ set -ax outdir=${C_IMGNDIR}/pngs/horz - mkdir -p ${outdir} - + if [[ ! -d ${outdir} ]]; then + mkdir -p ${outdir} + fi + img_files=`ls *.png` for imgf in $img_files; do - newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` - cp $imgf ${C_IMGNDIR}/pngs/horz/${newf} + newf=`echo ${imgf} | sed -e "s/\./.${PDATE}./g"` + cp ${imgf} ${C_IMGNDIR}/pngs/horz/${newf} done done ### dtype loop done ### type loop - ${COMPRESS} ${hh_tankdir}/ges/* - ${COMPRESS} ${hh_tankdir}/anl/* + ${COMPRESS} ${hh_tankdir}/ges/*grads* + ${COMPRESS} ${hh_tankdir}/anl/*grads* if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then - cd $workdir + cd ${workdir} cd .. - rm -rf $workdir + rm -rf ${workdir} fi echo "<-- plot_horz_uv.sh" -exit $rc +exit diff --git a/src/Conventional_Monitor/image_gen/ush/plot_time.sh b/src/Conventional_Monitor/image_gen/ush/plot_time.sh index 8cdf0a73..fec54171 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_time.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_time.sh @@ -1,5 +1,4 @@ -#!/bin/sh -set -ax +#!/bin/bash #---------------------------------------------------------- # @@ -24,16 +23,15 @@ function large_mv () { } - type=${TYPE} + echo "--> plot_time.sh, type=${TYPE}" - echo "--> plot_time.sh, type=${type}" - - workdir=${C_PLOT_WORKDIR}/plottime_${type} - rm -rf $workdir - mkdir -p $workdir - cd $workdir + workdir=${C_PLOT_WORKDIR}/plottime_${TYPE} + if [[ -d ${workdir} ]]; then + rm -rf ${workdir} + fi + mkdir -p ${workdir} + cd ${workdir} - rc=0 pdy=`echo $PDATE|cut -c1-8` cyc=`echo $PDATE|cut -c9-10` tv_tankdir=${C_TANKDIR}/${RUN}.${pdy}/${cyc}/conmon/time_vert @@ -57,7 +55,7 @@ function large_mv () { if [[ -d ${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon ]]; then for cycle in ges anl; do - data_file=${cycle}_${type}_stas.${cdate} + data_file=${cycle}_${TYPE}_stas.${cdate} data_fp=${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon/time_vert/${data_file} if [[ -e ${data_fp}.${Z} ]]; then cp -f ${data_fp}.${Z} ./${data_file}.${Z} @@ -79,7 +77,7 @@ function large_mv () { #--------------------------------------------------- for cycle in ges anl; do - ctl_file=${tv_tankdir}/${cycle}_${type}_stas.ctl + ctl_file=${tv_tankdir}/${cycle}_${TYPE}_stas.ctl if [[ -e ${ctl_file}.${Z} ]]; then cp -f ${ctl_file}.${Z} tmp.ctl.${Z} ${UNCOMPRESS} tmp.ctl.${Z} @@ -87,13 +85,13 @@ function large_mv () { cp -f ${ctl_file} tmp.ctl fi - new_dset="dset ${cycle}_${type}_stas.%y4%m2%d2%h2" + new_dset="dset ${cycle}_${TYPE}_stas.%y4%m2%d2%h2" tdef=`${C_IG_SCRIPTS}/make_tdef.sh ${START_DATE} ${NUM_CYCLES} 06` echo "tdef = $tdef" sed -e "s/^dset*/${new_dset}/" tmp.ctl >tmp2.ctl - sed -e "s/^tdef.*/${tdef}/" tmp2.ctl >${cycle}_${type}_stas.ctl + sed -e "s/^tdef.*/${tdef}/" tmp2.ctl >${cycle}_${TYPE}_stas.ctl rm -f tmp.ctl rm -f tmp2.ctl done @@ -112,7 +110,7 @@ function large_mv () { #--------------------------------------------------- for script in plotstas_time_count.gs plotstas_time_bias.gs ;do - if [[ ${type} = 'gps' && ${script} = 'plotstas_time_bias.gs' ]]; then + if [[ ${TYPE} = 'gps' && ${script} = 'plotstas_time_bias.gs' ]]; then continue fi @@ -121,17 +119,16 @@ function large_mv () { if [[ -s ${plot_script} ]]; then cp -f ${plot_script} . else - rc=9 echo "unable to find ${plot_script}, exiting" - exit ${rc} + exit 9 fi #-------------------------------- - # modify plot script for type + # modify plot script for TYPE #-------------------------------- base_name=`echo "${script}" | awk -F. '{print $1}'` - local_plot_script=${base_name}_${type}.gs - sed -e "s/DTYPE/$type/" \ + local_plot_script=${base_name}_${TYPE}.gs + sed -e "s/DTYPE/$TYPE/" \ ${script} > ${local_plot_script} #------------------------- @@ -151,12 +148,12 @@ function large_mv () { if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then - cd $workdir + cd ${workdir} cd .. - rm -rf $workdir + rm -rf ${workdir} fi - echo "<-- plot_time.sh, type=${type}" + echo "<-- plot_time.sh" exit diff --git a/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh b/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh index 71489d2f..de97b4fa 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh @@ -1,5 +1,4 @@ -#!/bin/sh -set -ax +#!/bin/bash #---------------------------------------------------------------------- # plot_time_ps.sh @@ -13,11 +12,12 @@ set -ax echo "NDATE = $NDATE" workdir=${C_PLOT_WORKDIR}/plottime_ps - rm -rf $workdir - mkdir -p $workdir - cd $workdir + if [[ -d ${workdir} ]]; then + rm -rf ${workdir} + fi + mkdir -p ${workdir} + cd ${workdir} - rc=0 pdy=`echo $PDATE|cut -c1-8` cyc=`echo $PDATE|cut -c9-10` tv_tankdir=${C_TANKDIR}/${RUN}.${pdy}/${cyc}/conmon/time_vert @@ -29,9 +29,9 @@ set -ax # plot surface pressure time series counts #--------------------------------------------------- - cp -f ${C_IG_GSCRIPTS}/plotstas_time_count_ps.gs . - cp -f ${C_IG_GSCRIPTS}/plotstas_time_bias_ps.gs . -# cp -f ${C_IG_GSCRIPTS}/plotstas_time_bias2_ps.gs . + ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_count_ps.gs . + ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_bias_ps.gs . +# ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_bias2_ps.gs . #--------------------------------------------------- # Link in the data files. @@ -98,31 +98,27 @@ set -ax #------------------------- grads -bpc "run ./plotstas_time_count_ps.gs" -# mv -f *.png ${outdir}/. grads -bpc "run ./plotstas_time_bias_ps.gs" -# mv -f *.png ${outdir}/. # grads -bpc "run ./plotstas_time_bias2_ps.gs" img_files=`ls *.png` - for imgf in $img_files; do - newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` - cp $imgf $newf - mv $newf ${C_IMGNDIR}/pngs/time/. + for imgf in ${img_files}; do + newf=`echo ${imgf} | sed -e "s/\./.${PDATE}./g"` + cp ${imgf} ${newf} + mv ${newf} ${C_IMGNDIR}/pngs/time/. done - if [[ $CONMON_SUFFIX != "v16rt2" ]]; then - mv -f *.png ${outdir}/. - fi + mv -f *.png ${outdir}/. if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then - cd $workdir + cd ${workdir} cd .. - rm -rf $workdir + rm -rf ${workdir} fi echo "<--- plot_time_ps.sh" diff --git a/src/Conventional_Monitor/image_gen/ush/plot_vert.sh b/src/Conventional_Monitor/image_gen/ush/plot_vert.sh index 2b677660..fb942bb8 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_vert.sh @@ -1,22 +1,19 @@ -#!/bin/sh -set -ax +#!/bin/bash #------------------------------------------------------- # # plot_vert.sh # #------------------------------------------------------- - echo "--> plot_vert.sh " - type=${TYPE} - - workdir=${C_PLOT_WORKDIR}/plotvert_${type} - rm -rf $workdir - mkdir -p $workdir - cd $workdir + workdir=${C_PLOT_WORKDIR}/plotvert_${TYPE} + if [[ -d ${workdir} ]]; then + rm -rf ${workdir} + fi + mkdir -p ${workdir} + cd ${workdir} - rc=0 pdy=`echo ${PDATE}|cut -c1-8` dday=`echo $PDATE|cut -c7-8` cyc=`echo ${PDATE}|cut -c9-10` @@ -38,7 +35,7 @@ set -ax if [[ -d ${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon ]]; then for cycle in ges anl; do - stas_file=${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon/time_vert/${cycle}_${type}_stas.${cdate} + stas_file=${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon/time_vert/${cycle}_${TYPE}_stas.${cdate} if [[ -s ${stas_file}.${Z} ]]; then ${UNCOMPRESS} ${stas_file}.${Z} @@ -60,7 +57,7 @@ set -ax #--------------------------------------------------- for cycle in ges anl; do - ctl_file=${tv_tankdir}/${cycle}_${type}_stas.ctl + ctl_file=${tv_tankdir}/${cycle}_${TYPE}_stas.ctl if [[ -e ${ctl_file}.${Z} ]]; then cp -f ${ctl_file}.${Z} tmp.ctl.${Z} @@ -69,14 +66,14 @@ set -ax cp -f ${ctl_file} tmp.ctl fi - new_dset=" dset ${cycle}_${type}_stas.%y4%m2%d2%h2" + new_dset=" dset ${cycle}_${TYPE}_stas.%y4%m2%d2%h2" num_cycles=${NUM_CYCLES} tdef=`${C_IG_SCRIPTS}/make_tdef.sh ${START_DATE} ${num_cycles} 06` echo "tdef = $tdef" sed -e "s/^dset*/${new_dset}/" tmp.ctl >tmp2.ctl - sed -e "s/^tdef.*/${tdef}/" tmp2.ctl >${cycle}_${type}_stas.ctl + sed -e "s/^tdef.*/${tdef}/" tmp2.ctl >${cycle}_${TYPE}_stas.ctl rm -f tmp.ctl rm -f tmp2.ctl done @@ -92,16 +89,14 @@ set -ax #--------------------------------------------------- # copy plots scripts locally, modify, and run #--------------------------------------------------- - for script in page.gs rgbset2.gs setvpage.gs ;do plot_script=${C_IG_GSCRIPTS}/${script} if [[ -s ${plot_script} ]]; then cp -f ${plot_script} . else - rc=10 echo "unable to find ${plot_script}, exiting" - exit ${rc} + exit 10 fi done @@ -111,17 +106,16 @@ set -ax if [[ -s ${plot_script} ]]; then cp -f ${plot_script} . else - rc=11 echo "unable to find ${plot_script}, exiting" - exit ${rc} + exit 11 fi #-------------------------------- - # modify plot script for type + # modify plot script for TYPE #-------------------------------- base_name=`echo "${script}" | awk -F. '{print $1}'` - local_plot_script=${base_name}_${type}.gs - sed -e "s/DTYPE/${type}/" \ + local_plot_script=${base_name}_${TYPE}.gs + sed -e "s/DTYPE/${TYPE}/" \ -e "s/HOUR/${cyc}/" \ -e "s/DDAY/${dday}/" \ ${script} > ${local_plot_script} @@ -137,15 +131,12 @@ set -ax mv $newf ${C_IMGNDIR}/pngs/vert/. done - if [[ $CONMON_SUFFIX != "v16rt2" ]]; then - mv -f *.png ${outdir}/. - fi - + mv -f *.png ${outdir}/. if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then - cd $workdir + cd ${workdir} cd .. - rm -rf $workdir + rm -rf ${workdir} fi diff --git a/src/Conventional_Monitor/image_gen/ush/read_scatter.sh b/src/Conventional_Monitor/image_gen/ush/read_scatter.sh index 302cf8e1..c25efd52 100755 --- a/src/Conventional_Monitor/image_gen/ush/read_scatter.sh +++ b/src/Conventional_Monitor/image_gen/ush/read_scatter.sh @@ -1,5 +1,5 @@ -#!/bin/sh -set -xa +#!/bin/bash + #----------------------------------------------------------------------------------- # # read_scatter.sh @@ -8,34 +8,18 @@ set -xa # and generate an out_${mtype) data file and # control file for GrADS. #----------------------------------------------------------------------------------- - -echo "---> read_scatter.sh" -echo " CONMON_SUFFIX = $CONMON_SUFFIX" - exp=$1 -echo "exp set to $exp" dtype=$2 -echo "dtype set to $dtype" mtype=$3 -echo "mtype set to $mtype" subtype=$4 -echo "subtype set to $subtype" rdate=$5 -echo "rdate set to $rdate" fixdir=$6 -echo "fixdir set to $fixdir" nreal=$7 -echo "nreal set to $nreal" exec=$8 -echo "exec set to $exec" type=$9 -echo "type set to $type" cycle=${10} -echo "cycle set to $cycle" datadir=${11} -echo "datadir set to $datadir" sorcdir=${12} -echo "sorcdir set to $sorcdir" ## set up the directory with excutable files @@ -69,9 +53,6 @@ cp $sorcdir/$exec ./$exec ./$exec stdout_${dtype}_${cycle}.${rdate} 2>&1 -#rm -f $exec -#rm -f input - if [ "${type}" = 'uv' ]; then mv out_u out_${dtype}_u_${cycle}.${rdate} @@ -85,5 +66,4 @@ if [ "${type}" = 'uv' ]; then fi -echo "<--- read_scatter.sh" exit diff --git a/src/Conventional_Monitor/image_gen/ush/transfer_imgs.sh b/src/Conventional_Monitor/image_gen/ush/transfer_imgs.sh index 2107e795..ac170618 100755 --- a/src/Conventional_Monitor/image_gen/ush/transfer_imgs.sh +++ b/src/Conventional_Monitor/image_gen/ush/transfer_imgs.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash echo begin transfer_imgs.sh @@ -8,8 +8,8 @@ if [[ ${C_IMGNDIR} != "/" ]]; then echo "WEBUSER = $WEBUSER" echo "WEBSVR = $WEBSVR" echo "WEBDIR = $WEBDIR" - - if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "cray" ]]; then + + if [[ $MY_MACHINE = "wcoss2" ]]; then /usr/bin/rsync -ave ssh --exclude *.ctl.${Z} --delete-during ${C_IMGNDIR}/ \ ${WEBUSER}@${WEBSVR}.ncep.noaa.gov:${WEBDIR}/ fi diff --git a/src/Conventional_Monitor/parm/ConMon_config b/src/Conventional_Monitor/parm/ConMon_config index 5db07c98..201b4cbd 100644 --- a/src/Conventional_Monitor/parm/ConMon_config +++ b/src/Conventional_Monitor/parm/ConMon_config @@ -39,22 +39,16 @@ export C_IMGNDIR=${TANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon # MAIL_TO and MAIL_CC specifies the default # distribution for warning messages. # -# export DO_DATA_RPT=${DO_DATA_RPT:-1} + export DO_DATA_RPT=${DO_DATA_RPT:-1} -# export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} -# if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then -# cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${CONMON_SUFFIX}_${RUN} --mon ConMon` -# else -# cc_list="" -# fi -# export MAIL_CC=${MAIL_CC:=${cc_list}} - - - #----------------------------------------------------- - # The grib2 flag indicates if the data files are in - # grib2 format (1) or grib (0) - # -# export grib2=${grib2:-1} + export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} + if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then + cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${CONMON_SUFFIX}_${RUN} --mon ConMon` + else + cc_list="" + fi + MAIL_CC="" + export MAIL_CC=${MAIL_CC:=${cc_list}} #--------------------------------------------------------------------- @@ -101,21 +95,21 @@ export C_LOGDIR=${MON_LOGDIR}/${CONMON_SUFFIX}/${RUN}/conmon # export C_DE_PARM=${C_DE_PARM:-${CONMON_DATA_EXTRACT}/parm} # export C_DE_SCRIPTS=${C_DE_SCRIPTS:-${CONMON_DATA_EXTRACT}/ush} # -# export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen} + export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen} # export C_IG_EXEC=${C_IG_EXEC:-${CONMON_IMAGE_GEN}/exec} -# export C_IG_GSCRIPTS=${C_IG_GSCRIPTS:-${CONMON_IMAGE_GEN}/gscripts} + export C_IG_GSCRIPTS=${C_IG_GSCRIPTS:-${CONMON_IMAGE_GEN}/gscripts} # export C_IG_PARM=${C_IG_PARM:-${CONMON_IMAGE_GEN}/parm} -# export C_IG_SCRIPTS=${C_IG_SCRIPTS:-${CONMON_IMAGE_GEN}/ush} -# export C_IG_FIX=${C_IG_FIX:-${CONMON_IMAGE_GEN}/fix} + export C_IG_SCRIPTS=${C_IG_SCRIPTS:-${CONMON_IMAGE_GEN}/ush} + export C_IG_FIX=${C_IG_FIX:-${CONMON_IMAGE_GEN}/fix} # export C_IG_HTML=${C_IG_HTML:-${CONMON_IMAGE_GEN}/html} # export C_IG_SAVE_WORK=${C_IG_SAVE_WORK:-1} # switch to save plot work directories # # export CONMON_PARM=${CONMON_PARM:-${MY_CONMON}/parm} -# + export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} -# export HOMEgfs_conmon=$HOMEgdas_conmon -# + export HOMEgfs_conmon=$HOMEgdas_conmon + export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} export EXECconmon=${EXECconmon:-${GSI_MON_BIN}} diff --git a/ush/find_last_cycle.sh b/ush/find_last_cycle.sh index 4b9af5f6..d6663926 100755 --- a/ush/find_last_cycle.sh +++ b/ush/find_last_cycle.sh @@ -85,6 +85,9 @@ case $monitor in oznmon) search="*ieee_d*" ;; + conmon) + search="time_vert" + ;; esac From ad569dd0e3fa47a53fd55795eb7527e161edeab4 Mon Sep 17 00:00:00 2001 From: "edward.safford" Date: Mon, 19 Dec 2022 08:36:40 -0600 Subject: [PATCH 5/8] Ref #28 Changes for orion. --- .../data_extract/ush/ConMon_DE.sh | 2 +- .../image_gen/ush/mk_horz_hist.sh | 12 +++++++----- .../image_gen/ush/mk_time_vert.sh | 19 +++++++++++-------- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index 46e56e11..e02b9387 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -230,7 +230,7 @@ if [ -s $cnvstat -a -s $pgrbf00 -a -s $pgrbf06 ]; then rm -f ${logfile} fi - if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "orion" ]]; then $SUB -A $ACCOUNT --ntasks=1 --time=00:30:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o $C_LOGDIR/DE.${PDY}.${CYC}.log \ ${HOMEgdas_conmon}/jobs/JGDAS_ATMOS_CONMON diff --git a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh index c6053882..3c255c74 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh @@ -50,7 +50,7 @@ rm -f ${errfile} fi - if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" || $MY_MACHINE = "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_hist} @@ -76,7 +76,7 @@ rm -f ${errfile} fi - if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then + if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" || $MY_MACHINE = "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_horz} @@ -102,12 +102,14 @@ rm -f ${errfile} fi - if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" ]]; then + if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "s4" || \ + ${MY_MACHINE} = "jet" || ${MY_MACHINE} = "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=01:30:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_horz_uv} - elif [[ $MY_MACHINE = "wcoss2" ]]; then - $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \ + elif [[ ${MY_MACHINE} = "wcoss2" ]]; then + $SUB -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} \ + -l walltime=30:00 -N ${jobname} \ -l select=1:mem=500M ${plot_horz_uv} fi diff --git a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh index a233a9cb..691f6d1e 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh @@ -27,11 +27,12 @@ echo "--> mk_time_vert.sh" rm -f $errfile fi - if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then + if [[ ${MY_MACHINE} == "hera" || ${MY_MACHINE} == "s4" || \ + ${MY_MACHINE} == "jet" || ${MY_MACHINE} == "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:15:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} - elif [[ $MY_MACHINE = "wcoss2" ]]; then + elif [[ ${MY_MACHINE} = "wcoss2" ]]; then echo "submitting $jobname" $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 -N ${jobname} \ -l select=1:mem=200M ${pltfile} @@ -55,7 +56,8 @@ echo "--> mk_time_vert.sh" rm -f $errfile fi - if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then + if [[ ${MY_MACHINE} == "hera" || ${MY_MACHINE} == "s4" || \ + ${MY_MACHINE} == "jet" || ${MY_MACHINE} = "orion" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="02:30:00" else @@ -65,7 +67,7 @@ echo "--> mk_time_vert.sh" ${SUB} -A ${ACCOUNT} --ntasks=1 --time=${walltime} \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} - elif [[ $MY_MACHINE = "wcoss2" ]]; then + elif [[ ${MY_MACHINE} = "wcoss2" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="01:30:00" else @@ -73,7 +75,7 @@ echo "--> mk_time_vert.sh" fi echo "submitting $jobname" - $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=${walltime}\ + $SUB -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} -l walltime=${walltime}\ -N ${jobname} -l select=1:mem=200M ${pltfile} fi @@ -99,7 +101,8 @@ echo "--> mk_time_vert.sh" rm -f $errfile fi - if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || $MY_MACHINE == "jet" ]]; then + if [[ ${MY_MACHINE} == "hera" || ${MY_MACHINE} == "s4" || \ + ${MY_MACHINE} == "jet" || ${MY_MACHINE} = "orion" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="00:50:00" else @@ -109,9 +112,9 @@ echo "--> mk_time_vert.sh" ${SUB} -A ${ACCOUNT} --ntasks=1 --time=${walltime} \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} - elif [[ $MY_MACHINE == "wcoss2" ]]; then + elif [[ ${MY_MACHINE} == "wcoss2" ]]; then echo "submitting $jobname" - $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 \ + ${SUB} -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} -l walltime=50:00 \ -N ${jobname} -l select=1:mem=500M ${pltfile} fi From 2f3d435ca51170bc611a60553fcfd84d9c668616 Mon Sep 17 00:00:00 2001 From: "edward.safford" Date: Mon, 19 Dec 2022 10:14:58 -0600 Subject: [PATCH 6/8] Ref #28 More cleanup. --- .../data_extract/ush/ConMon_DE.sh | 7 - .../image_gen/ush/ConMon_IG.sh | 9 +- .../image_gen/ush/Transfer.sh | 6 +- .../image_gen/ush/find_cycle.pl | 208 ------------------ .../image_gen/ush/mk_time_vert.sh | 7 +- src/Conventional_Monitor/parm/ConMon_config | 33 +-- 6 files changed, 17 insertions(+), 253 deletions(-) delete mode 100755 src/Conventional_Monitor/image_gen/ush/find_cycle.pl diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index e02b9387..461add5b 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -145,16 +145,9 @@ echo "CNVSTAT_LOCATION = $CNVSTAT_LOCATION" export COMPONENT=${COMPONENT:-atmos} -# -# Is there any difference in location from ops to wkfl? -# - export C_DATDIR=${C_DATDIR:-${CNVSTAT_LOCATION}/${RUN}.${PDY}/${CYC}/${COMPONENT}} export C_GDATDIR=${C_GDATDIR:-${CNVSTAT_LOCATION}/${RUN}.${PDYm6h}/${GCYC}/${COMPONENT}} -echo "C_DATDIR = $C_DATDIR" -echo "C_GDATDIR = $C_GDATDIR" - export C_COMIN=${C_DATDIR} export C_COMINm6h=${C_GDATDIR} diff --git a/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh b/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh index f36a790d..9ecda11b 100755 --- a/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh +++ b/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh @@ -20,7 +20,7 @@ function usage { echo " Suffix is the indentifier for this data source." echo " " echo " -p | --pdate yyyymmddcc to specify the cycle to be plotted." - echo " If not specified 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 " " @@ -137,9 +137,8 @@ fi echo "C_IG_SCRIPTS = ${C_IG_SCRIPTS}" echo "C_TANKDIR = ${C_TANKDIR}" -last_cycle=`${C_IG_SCRIPTS}/find_cycle.pl \ - --cyc 1 --dir ${C_TANKDIR} --run ${RUN}` - +last_cycle=`${MON_USH}/find_last_cycle.sh --net ${CONMON_SUFFIX} \ + --run ${RUN} --tank ${TANKDIR} --mon conmon` if [[ ${PDATE} = "" ]]; then @@ -191,9 +190,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 fi diff --git a/src/Conventional_Monitor/image_gen/ush/Transfer.sh b/src/Conventional_Monitor/image_gen/ush/Transfer.sh index 2ed5b4cb..f9d58142 100755 --- a/src/Conventional_Monitor/image_gen/ush/Transfer.sh +++ b/src/Conventional_Monitor/image_gen/ush/Transfer.sh @@ -80,14 +80,14 @@ export jobname=transfer_${CONMON_SUFFIX}_conmon # and leave it to the user to manually transfer files to # the server. # -if [[ $MY_MACHINE = "wcoss2" ]]; then +if [[ ${MY_MACHINE} = "wcoss2" ]]; then - $SUB -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${errfile} \ + ${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 "Unable to transfer files from ${MY_MACHINE} to ${WEBSVR}." echo "Manual intervention is required." fi diff --git a/src/Conventional_Monitor/image_gen/ush/find_cycle.pl b/src/Conventional_Monitor/image_gen/ush/find_cycle.pl deleted file mode 100755 index 0fbd5393..00000000 --- a/src/Conventional_Monitor/image_gen/ush/find_cycle.pl +++ /dev/null @@ -1,208 +0,0 @@ -#! /usr/bin/perl - -#----------------------------------------------------------------------- -# find_cycle.pl -# -# Arguments: -# --dir : Required string value containing $TANKdir/$SUFFIX. -# --cyc : Optional integer value: -# 1 = last cycle (default) -# 0 = first cycle -# --run : Run name, generally 'gdas' or 'gfs'. -# If not specified 'gdas' will be used. -# -# Return that first/last cycle as a text string in YYYYMMDDHH format, -# or return nothing if none of the expected data files are found. -# -# Note that this is designed to be used by a shell script which will -# pick up the returned cycle string. If debug statements are left -# in this perl script then the calling shell script will have -# problems. -#----------------------------------------------------------------------- - - use strict; - use warnings; - use Getopt::Long; - use Scalar::Util qw(looks_like_number); - - - #------------------------------------------------------------------- - # - # Subroutine uniq - # - # Given an input array, return all unique values in an array. - # - #------------------------------------------------------------------- - sub uniq { - my %seen; - return grep { !$seen{$_}++ } @_; - } - - - ##------------------------------------------------------------------ - ##------------------------------------------------------------------ - ## - ## begin main - ## - ##------------------------------------------------------------------ - ##------------------------------------------------------------------ - - my $run = 'gdas'; - my $dir = ''; - my $lcm = 'conmon'; - my $cyc = '1'; - - GetOptions( 'cyc:i' => \$cyc, - 'run:s' => \$run, - 'dir=s' => \$dir, - 'lcm:s' => \$lcm ); - - my @alldirs; - my $dirpath = $dir; - - #-------------------------------------------------------------------- - # Get list of $run.* directories which contain conmon subdirectories - # - opendir(DIR, $dirpath) or die "Cannot open directory $!"; - while (my $file = readdir(DIR)) { - next unless (-d "$dirpath/$file"); - push( @alldirs, $file ); - } - closedir DIR; - - my $search_string; - - if( length($run) == 0 ){ - $search_string = $lcm; - } else { - $search_string = $run; - } - - my @mmdirs = grep { /$search_string/ } @alldirs; - #----------------------------------------------------------------------- - # If there are no $run.yyyymmdd subdirectories, then exit without - # returning any date string. - # - if( $#mmdirs < 0 ) { - print "exiting with 0 mmdirs\n"; - exit; - } - - - #----------------------------------------------------------------------- - # Sort the mmdirs array and loop through it from end to beginning - # - - my @sortmm = sort( @mmdirs ); - - my $ctr; - my $incr; - my $end_ctr; - my @hrs; - - #----------------------------------------------------------------------- - # Arrange the logic here for accessing either the first or last - # cycle. If we're after the first cycle the directories will be - # processed from 0 to max. Note below the cycle hours are processed - # from max to 0, so the cycle order is reversed (18..00) when looking - # for the first cycle. - # - if( $cyc == 0 ){ - $ctr = -1; - $incr = 1; - $end_ctr = $#sortmm; - @hrs = qw( 18 12 06 00 ); - } else { - $ctr = $#sortmm + 1; - $incr = -1; - @hrs = qw( 00 06 12 18 ); - $end_ctr = 0; - } - - - my $found_cycle = 0; - - # Start with the latest directory and attempt to locate monitor - # subdirectories. - # - - my $exit_flag = 0; - - do { - $ctr = $ctr + $incr; - - # In each subdirectory attempt to locate all *stas* files - # and parse out all unique date values. The latest is the answer - # we're looking for. - # - # If there are no *stas* files, step to the next iteration. - # - - my $newdir; - my $hr_ctr = $#hrs + 1; - - do { - - $hr_ctr = $hr_ctr - 1; - - $newdir = "${dirpath}/${sortmm[$ctr]}/${hrs[$hr_ctr]}/${lcm}/time_vert"; - - - if( -d $newdir ) { - opendir DIR, $newdir or die "Cannot open the current directory: $!"; - - my @timefiles = grep { /stas/ && !/ctl/ } readdir DIR; - - if( $#timefiles >= 0 ) { - my @sorttime = sort( @timefiles ); - my @times; - my $idx = 0; - - # Find the first string of 10 digits; that's the date. Use that - # $idx number to process all files. - # - my @vals = split( '\.', $timefiles[0] ); - for ( my $ii=$#vals; $ii >= 0; $ii-- ) { - if( looks_like_number( $vals[$ii] ) && length($vals[$ii] ) == 10 ){ - $idx = $ii; - } - } - - for ( my $ii=$#sorttime; $ii >= 0; $ii-- ) { - my $teststr = $sorttime[$ii]; - - my @values = split( '\.', $teststr ); - if( length($values[$idx] ) == 10 ){ - push( @times, $values[$idx] ); - } - } - - if ( $#times >= 0 ) { - my @utimes = sort( uniq( @times ) ); - if( $cyc == 1 ) { - print "$utimes[$#utimes]"; - $found_cycle = 1; - } elsif( $cyc == 2 && $#utimes >= 1 ) { - print "$utimes[$#utimes-1]"; - $found_cycle = 1; - } else { - print "$utimes[0]"; - $found_cycle = 1; - } - } - } - - } - - } while $hr_ctr > 0 && $found_cycle == 0; - - - if( $cyc == 0 && $ctr >= $end_ctr ){ - $exit_flag = 1; - } elsif( $cyc == 1 && $ctr <= $end_ctr ){ - $exit_flag = 1; - } - - - } while $found_cycle == 0 && $exit_flag == 0; - diff --git a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh index 691f6d1e..3429c2c4 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh @@ -33,7 +33,6 @@ echo "--> mk_time_vert.sh" -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} elif [[ ${MY_MACHINE} = "wcoss2" ]]; then - echo "submitting $jobname" $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 -N ${jobname} \ -l select=1:mem=200M ${pltfile} fi @@ -57,7 +56,7 @@ echo "--> mk_time_vert.sh" fi if [[ ${MY_MACHINE} == "hera" || ${MY_MACHINE} == "s4" || \ - ${MY_MACHINE} == "jet" || ${MY_MACHINE} = "orion" ]]; then + ${MY_MACHINE} == "jet" || ${MY_MACHINE} == "orion" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="02:30:00" else @@ -69,11 +68,10 @@ echo "--> mk_time_vert.sh" elif [[ ${MY_MACHINE} = "wcoss2" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then - walltime="01:30:00" + walltime="02:00:00" else walltime="50:00" fi - echo "submitting $jobname" $SUB -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} -l walltime=${walltime}\ -N ${jobname} -l select=1:mem=200M ${pltfile} @@ -113,7 +111,6 @@ echo "--> mk_time_vert.sh" -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} elif [[ ${MY_MACHINE} == "wcoss2" ]]; then - echo "submitting $jobname" ${SUB} -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} -l walltime=50:00 \ -N ${jobname} -l select=1:mem=500M ${pltfile} diff --git a/src/Conventional_Monitor/parm/ConMon_config b/src/Conventional_Monitor/parm/ConMon_config index 201b4cbd..395b858a 100644 --- a/src/Conventional_Monitor/parm/ConMon_config +++ b/src/Conventional_Monitor/parm/ConMon_config @@ -23,9 +23,6 @@ export WEBDIR=${WEBDIR:-/home/people/emc/www/htdocs/gmb/gdas/es_conv} # TANKDIR is the location for the extracted data files and # the control files used for image plotting. # -#export CONMON_TANKDIR=/u/Edward.Safford/nbns -#export C_TANKverf=${C_TANKverf:-${CONMON_TANKDIR}} - export C_TANKDIR=${TANKDIR}/stats/${CONMON_SUFFIX} export C_IMGNDIR=${TANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon @@ -88,28 +85,16 @@ export C_STMP_USER=${C_STMP_USER:-${MON_STMP}/${LOGNAME}} export C_PTMP_USER=${C_PTMP_USER:-${MON_PTMP}/${LOGNAME}} export C_LOGDIR=${MON_LOGDIR}/${CONMON_SUFFIX}/${RUN}/conmon -#export WORK_conmon=${WORK_conmon:-${C_STMP_USER}/${CONMON_SUFFIX}/${RUN}/ConMon} +export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen} -# export CONMON_DATA_EXTRACT=${CONMON_DATA_EXTRACT:-${MY_CONMON}/data_extract} -# export C_DE_EXEC=${C_DE_EXEC:-${CONMON_DATA_EXTRACT}/exec} -# export C_DE_PARM=${C_DE_PARM:-${CONMON_DATA_EXTRACT}/parm} -# export C_DE_SCRIPTS=${C_DE_SCRIPTS:-${CONMON_DATA_EXTRACT}/ush} -# - export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen} -# export C_IG_EXEC=${C_IG_EXEC:-${CONMON_IMAGE_GEN}/exec} - export C_IG_GSCRIPTS=${C_IG_GSCRIPTS:-${CONMON_IMAGE_GEN}/gscripts} -# export C_IG_PARM=${C_IG_PARM:-${CONMON_IMAGE_GEN}/parm} - export C_IG_SCRIPTS=${C_IG_SCRIPTS:-${CONMON_IMAGE_GEN}/ush} - export C_IG_FIX=${C_IG_FIX:-${CONMON_IMAGE_GEN}/fix} -# export C_IG_HTML=${C_IG_HTML:-${CONMON_IMAGE_GEN}/html} -# export C_IG_SAVE_WORK=${C_IG_SAVE_WORK:-1} # switch to save plot work directories -# -# export CONMON_PARM=${CONMON_PARM:-${MY_CONMON}/parm} +export C_IG_GSCRIPTS=${C_IG_GSCRIPTS:-${CONMON_IMAGE_GEN}/gscripts} +export C_IG_SCRIPTS=${C_IG_SCRIPTS:-${CONMON_IMAGE_GEN}/ush} +export C_IG_FIX=${C_IG_FIX:-${CONMON_IMAGE_GEN}/fix} - export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} - export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} - export HOMEgfs_conmon=$HOMEgdas_conmon +export HOMEconmon_shared=${HOMEconmon_shared:-${MY_CONMON}/nwprod/conmon_shared} +export HOMEgdas_conmon=${HOMEgdas_conmon:-${MY_CONMON}/nwprod/gdas_conmon} +export HOMEgfs_conmon=$HOMEgdas_conmon - export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} - export EXECconmon=${EXECconmon:-${GSI_MON_BIN}} +export USHconmon=${USHconmon:-${HOMEconmon_shared}/ush} +export EXECconmon=${EXECconmon:-${GSI_MON_BIN}} From 918f346b8ceb680111767553f0a963041d245ee8 Mon Sep 17 00:00:00 2001 From: "edward.safford" Date: Mon, 19 Dec 2022 11:42:56 -0600 Subject: [PATCH 7/8] Ref #28 Still more cleanup. --- .../data_extract/ush/find_cycle.pl | 218 ------------------ .../image_gen/ush/mk_horz_hist.sh | 16 +- .../image_gen/ush/mk_time_vert.sh | 4 +- .../image_gen/ush/plot_time_ps.sh | 6 - src/Conventional_Monitor/parm/ConMon_config | 20 +- 5 files changed, 21 insertions(+), 243 deletions(-) delete mode 100755 src/Conventional_Monitor/data_extract/ush/find_cycle.pl diff --git a/src/Conventional_Monitor/data_extract/ush/find_cycle.pl b/src/Conventional_Monitor/data_extract/ush/find_cycle.pl deleted file mode 100755 index 6a64d2f3..00000000 --- a/src/Conventional_Monitor/data_extract/ush/find_cycle.pl +++ /dev/null @@ -1,218 +0,0 @@ -#! /usr/bin/perl - -#----------------------------------------------------------------------- -# find_cycle.pl -# -# Arguments: -# --dir : Required string value containing $TANKdir/$SUFFIX. -# --cyc : Optional integer value: -# 1 = last cycle (default) -# 0 = first cycle -# --run : Run name, generally 'gdas' or 'gfs'. -# If not specified 'gdas' will be used. -# -# Return that first/last cycle as a text string in YYYYMMDDHH format, -# or return nothing if none of the expected data files are found. -# -# Note that this is designed to be used by a shell script which will -# pick up the returned cycle string. If debug statements are left -# in this perl script then the calling shell script will have -# problems. -# -# Note further: this utility is designed to replace find_cycle.pl, -# which has been intentionally retained. There are older TANKdir -# directory structures in use, which the find_cycle.pl utility can -# support. But integrating support for all types of TANKdir -# structures within a single script was -# more complicated than simply adding a new version of the utility. -# So if TANK_USE_RUN is 1, then this is the script to use because -# it knows to look in $TANKdir/$NET/$run.$pdy/$cyc/conmon. -#----------------------------------------------------------------------- - - use strict; - use warnings; - use Getopt::Long; - use Scalar::Util qw(looks_like_number); - - - #------------------------------------------------------------------- - # - # Subroutine uniq - # - # Given an input array, return all unique values in an array. - # - #------------------------------------------------------------------- - sub uniq { - my %seen; - return grep { !$seen{$_}++ } @_; - } - - - ##------------------------------------------------------------------ - ##------------------------------------------------------------------ - ## - ## begin main - ## - ##------------------------------------------------------------------ - ##------------------------------------------------------------------ - - my $run = 'gdas'; - my $dir = ''; - my $lcm = 'conmon'; - my $cyc = '1'; - - GetOptions( 'cyc:i' => \$cyc, - 'run:s' => \$run, - 'dir=s' => \$dir, - 'lcm:s' => \$lcm ); - - - my @alldirs; - my $dirpath = $dir; - - #-------------------------------------------------------------------- - # Get list of $run.* directories which contain conmon subdirectories - # - opendir(DIR, $dirpath) or die "Cannot open directory $!"; - while (my $file = readdir(DIR)) { - next unless (-d "$dirpath/$file"); - push( @alldirs, $file ); - } - closedir DIR; - - my $search_string; - - if( length($run) == 0 ){ - $search_string = $lcm; - } else { - $search_string = $run; - } - - my @mmdirs = grep { /$search_string/ } @alldirs; - #----------------------------------------------------------------------- - # If there are no $run.yyyymmdd subdirectories, then exit without - # returning any date string. - # - if( $#mmdirs < 0 ) { - print "exiting with 0 mmdirs\n"; - exit; - } - - - #----------------------------------------------------------------------- - # Sort the mmdirs array and loop through it from end to beginning - # - - my @sortmm = sort( @mmdirs ); - - my $ctr; - my $incr; - my $end_ctr; - my @hrs; - - #----------------------------------------------------------------------- - # Arrange the logic here for accessing either the first or last - # cycle. If we're after the first cycle the directories will be - # processed from 0 to max. Note below the cycle hours are processed - # from max to 0, so the cycle order is reversed (18..00) when looking - # for the first cycle. - # - if( $cyc == 0 ){ - $ctr = -1; - $incr = 1; - $end_ctr = $#sortmm; - @hrs = qw( 18 12 06 00 ); - } else { - $ctr = $#sortmm + 1; - $incr = -1; - @hrs = qw( 00 06 12 18 ); - $end_ctr = 0; - } - - - my $found_cycle = 0; - - # Start with the latest directory and attempt to locate monitor - # subdirectories. - # - - my $exit_flag = 0; - - do { - $ctr = $ctr + $incr; - - # In each subdirectory attempt to locate all *stas* files - # and parse out all unique date values. The latest is the answer - # we're looking for. - # - # If there are no *stas* files, step to the next iteration. - # - - my $newdir; - my $hr_ctr = $#hrs + 1; - - do { - - $hr_ctr = $hr_ctr - 1; - - $newdir = "${dirpath}/${sortmm[$ctr]}/${hrs[$hr_ctr]}/${lcm}/time_vert"; - - - if( -d $newdir ) { - opendir DIR, $newdir or die "Cannot open the current directory: $!"; - - my @timefiles = grep { /stas/ && !/ctl/ } readdir DIR; - - if( $#timefiles >= 0 ) { - my @sorttime = sort( @timefiles ); - my @times; - my $idx = 0; - - # Find the first string of 10 digits; that's the date. Use that - # $idx number to process all files. - # - my @vals = split( '\.', $timefiles[0] ); - for ( my $ii=$#vals; $ii >= 0; $ii-- ) { - if( looks_like_number( $vals[$ii] ) && length($vals[$ii] ) == 10 ){ - $idx = $ii; - } - } - - for ( my $ii=$#sorttime; $ii >= 0; $ii-- ) { - my $teststr = $sorttime[$ii]; - - my @values = split( '\.', $teststr ); - if( length($values[$idx] ) == 10 ){ - push( @times, $values[$idx] ); - } - } - - if ( $#times >= 0 ) { - my @utimes = sort( uniq( @times ) ); - if( $cyc == 1 ) { - print "$utimes[$#utimes]"; - $found_cycle = 1; - } elsif( $cyc == 2 && $#utimes >= 1 ) { - print "$utimes[$#utimes-1]"; - $found_cycle = 1; - } else { - print "$utimes[0]"; - $found_cycle = 1; - } - } - } - - } - - } while $hr_ctr > 0 && $found_cycle == 0; - - - if( $cyc == 0 && $ctr >= $end_ctr ){ - $exit_flag = 1; - } elsif( $cyc == 1 && $ctr <= $end_ctr ){ - $exit_flag = 1; - } - - - } while $found_cycle == 0 && $exit_flag == 0; - diff --git a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh index 3c255c74..80e8c43d 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh @@ -50,11 +50,12 @@ rm -f ${errfile} fi - if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" || $MY_MACHINE = "orion" ]]; then + if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || \ + $MY_MACHINE == "jet" || $MY_MACHINE == "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_hist} - elif [[ $MY_MACHINE = "wcoss2" ]]; then + elif [[ $MY_MACHINE == "wcoss2" ]]; then $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \ -l select=1:mem=500M ${plot_hist} fi @@ -76,11 +77,12 @@ rm -f ${errfile} fi - if [[ $MY_MACHINE = "hera" || $MY_MACHINE = "s4" || $MY_MACHINE = "jet" || $MY_MACHINE = "orion" ]]; then + if [[ $MY_MACHINE == "hera" || $MY_MACHINE == "s4" || \ + $MY_MACHINE == "jet" || $MY_MACHINE == "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:20:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_horz} - elif [[ $MY_MACHINE = "wcoss2" ]]; then + elif [[ $MY_MACHINE == "wcoss2" ]]; then $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \ -l select=1:mem=500M ${plot_horz} fi @@ -102,12 +104,12 @@ rm -f ${errfile} fi - if [[ ${MY_MACHINE} = "hera" || ${MY_MACHINE} = "s4" || \ - ${MY_MACHINE} = "jet" || ${MY_MACHINE} = "orion" ]]; then + if [[ ${MY_MACHINE} == "hera" || ${MY_MACHINE} == "s4" || \ + ${MY_MACHINE} == "jet" || ${MY_MACHINE} == "orion" ]]; then ${SUB} -A ${ACCOUNT} --ntasks=1 --time=01:30:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_horz_uv} - elif [[ ${MY_MACHINE} = "wcoss2" ]]; then + elif [[ ${MY_MACHINE} == "wcoss2" ]]; then $SUB -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} \ -l walltime=30:00 -N ${jobname} \ -l select=1:mem=500M ${plot_horz_uv} diff --git a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh index 3429c2c4..30aa44ce 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh @@ -32,7 +32,7 @@ echo "--> mk_time_vert.sh" ${SUB} -A ${ACCOUNT} --ntasks=1 --time=00:15:00 \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} - elif [[ ${MY_MACHINE} = "wcoss2" ]]; then + elif [[ ${MY_MACHINE} == "wcoss2" ]]; then $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=50:00 -N ${jobname} \ -l select=1:mem=200M ${pltfile} fi @@ -66,7 +66,7 @@ echo "--> mk_time_vert.sh" ${SUB} -A ${ACCOUNT} --ntasks=1 --time=${walltime} \ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${pltfile} - elif [[ ${MY_MACHINE} = "wcoss2" ]]; then + elif [[ ${MY_MACHINE} == "wcoss2" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then walltime="02:00:00" else diff --git a/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh b/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh index de97b4fa..beb6e543 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh @@ -6,11 +6,6 @@ echo "---> plot_time_ps.sh" - echo "START_DATE = $START_DATE" - echo "NUM_CYCLES = $NUM_CYCLES" - echo "PDATE = $PDATE" - echo "NDATE = $NDATE" - workdir=${C_PLOT_WORKDIR}/plottime_ps if [[ -d ${workdir} ]]; then rm -rf ${workdir} @@ -31,7 +26,6 @@ ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_count_ps.gs . ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_bias_ps.gs . -# ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_bias2_ps.gs . #--------------------------------------------------- # Link in the data files. diff --git a/src/Conventional_Monitor/parm/ConMon_config b/src/Conventional_Monitor/parm/ConMon_config index 395b858a..2ff67829 100644 --- a/src/Conventional_Monitor/parm/ConMon_config +++ b/src/Conventional_Monitor/parm/ConMon_config @@ -36,16 +36,16 @@ export C_IMGNDIR=${TANKDIR}/imgn/${CONMON_SUFFIX}/${RUN}/conmon # MAIL_TO and MAIL_CC specifies the default # distribution for warning messages. # - export DO_DATA_RPT=${DO_DATA_RPT:-1} - - export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} - if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then - cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${CONMON_SUFFIX}_${RUN} --mon ConMon` - else - cc_list="" - fi - MAIL_CC="" - export MAIL_CC=${MAIL_CC:=${cc_list}} +export DO_DATA_RPT=${DO_DATA_RPT:-1} + +export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} +if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then + cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${CONMON_SUFFIX}_${RUN} --mon ConMon` +else + cc_list="" +fi +MAIL_CC="" +export MAIL_CC=${MAIL_CC:=${cc_list}} #--------------------------------------------------------------------- From 046ff04b41fc7fe9c5a002565c1cb55595c24064 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Tue, 20 Dec 2022 17:06:16 +0000 Subject: [PATCH 8/8] Ref #28 Rm debug statements. --- .../data_extract/ush/ConMon_DE.sh | 7 -- .../image_gen/gscripts/defint.gs | 6 +- .../image_gen/gscripts/plot_qsfc_horz.gs | 8 +- .../image_gen/gscripts/plot_uvallev_horz.gs | 2 - .../image_gen/gscripts/plot_uvsatwind_horz.gs | 2 - .../image_gen/gscripts/plotstas_time_bias.gs | 35 ++---- .../image_gen/gscripts/plotstas_time_bias2.gs | 36 ++---- .../gscripts/plotstas_time_bias2_ps.gs | 16 --- .../{unused => }/plotstas_time_bias_ps.gs | 42 +++---- .../image_gen/gscripts/plotstas_time_count.gs | 38 ++---- .../gscripts/plotstas_time_count_ps.gs | 34 +----- .../image_gen/gscripts/plotstas_vert_bias.gs | 11 +- .../image_gen/gscripts/plotstas_vert_count.gs | 24 +--- .../image_gen/ush/ConMon_IG.sh | 3 +- .../image_gen/ush/mk_horz_hist.sh | 12 +- .../image_gen/ush/mk_time_vert.sh | 6 +- .../image_gen/ush/plot_hist.sh | 60 +++++----- .../image_gen/ush/plot_horz.sh | 92 +++++++++------ .../image_gen/ush/plot_horz_uv.sh | 108 ++++++++++-------- .../image_gen/ush/plot_time.sh | 22 ++-- .../image_gen/ush/plot_time_ps.sh | 38 +++--- .../image_gen/ush/plot_vert.sh | 11 +- .../image_gen/ush/rm_img_files.pl | 10 +- src/Conventional_Monitor/parm/ConMon_config | 4 +- 24 files changed, 255 insertions(+), 372 deletions(-) rename src/Conventional_Monitor/image_gen/gscripts/{unused => }/plotstas_time_bias_ps.gs (85%) diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index 461add5b..af5210cd 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -106,7 +106,6 @@ jobname=ConMon_DE_${CONMON_SUFFIX} echo "C_TANKDIR = ${C_TANKDIR}" echo "C_LOGDIR = ${C_LOGDIR}" echo "C_IMGNDIR = ${C_IMGNDIR}" -echo "MON_USH = $MON_USH" if [[ ! -d ${C_TANKDIR} ]]; then mkdir -p ${C_TANKDIR} @@ -141,8 +140,6 @@ if [[ ${#cnvstat_location} -le 0 ]]; then export cnvstat_location=${COMROOT}/gfs/${gfs_ver} fi export CNVSTAT_LOCATION=${cnvstat_location} -echo "CNVSTAT_LOCATION = $CNVSTAT_LOCATION" - export COMPONENT=${COMPONENT:-atmos} export C_DATDIR=${C_DATDIR:-${CNVSTAT_LOCATION}/${RUN}.${PDY}/${CYC}/${COMPONENT}} @@ -181,10 +178,6 @@ if [[ ! -s ${pgrbf06} ]]; then export pgrbf06="${C_GDATDIR}/gdas.t${GCYC}z.pgrb2.1p00.f006" fi -echo "cnvstat = $cnvstat" -echo "pgrbf00 = $pgrbf00" -echo "pgrbf06 = $pgrbf06" - #--------------------------------------------- # override the default convinfo definition diff --git a/src/Conventional_Monitor/image_gen/gscripts/defint.gs b/src/Conventional_Monitor/image_gen/gscripts/defint.gs index 20a3506d..2bb7a6b9 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/defint.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/defint.gs @@ -28,12 +28,8 @@ while(i <= 6) endif i=i+1 endwhile -say line + line -*say 'set ccols 49 47 45 44 43 42 99 22 23 24 25 27 29' -*'set ccols 49 47 45 44 43 42 99 22 23 24 25 27 29' -say 'set ccols 9 14 4 11 5 3 99 7 12 8 2 25 29' 'set ccols 9 14 4 11 5 3 99 7 12 8 2 27 6' -*exit 0 return endfile diff --git a/src/Conventional_Monitor/image_gen/gscripts/plot_qsfc_horz.gs b/src/Conventional_Monitor/image_gen/gscripts/plot_qsfc_horz.gs index dcab4f0c..cc220f85 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plot_qsfc_horz.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plot_qsfc_horz.gs @@ -49,7 +49,7 @@ dbug=0 setmap(plotfile,he) 'set gxout shaded' 'defint.gs 0.5 0' -'d 10*(RH2m.1-RH2m.2)/RHprs.1' +'d 10*(RHprs.1-RHprs.2)/RHprs.1' 'colorbar.gs' 'set ccolor 6' 'set digsiz 0.12' @@ -63,7 +63,7 @@ setmap(plotfile,he) setmap(plotfile,he) 'set gxout shaded' 'defint.gs 0.5 0' -'d 10*(RH2m.1-RH2m.2)/RHprs.1' +'d 10*(RHprs.1-RHprs.2)/RHprs.1' 'colorbar.gs' 'set ccolor 6' 'set digsiz 0.12' @@ -77,7 +77,7 @@ setmap(plotfile,he) setmap(plotfile,he) 'set gxout shaded' 'defint.gs 0.5 0' -'d 10*(RH2m.1-RH2m.2)/RHprs.1' +'d 10*(RHprs.1-RHprs.2)/RHprs.1' 'colorbar.gs' 'set ccolor 98' 'draw title Humidity INCT*10/Anal at 'rdate'z' @@ -86,7 +86,7 @@ setmap(plotfile,he) setmap(plotfile,he) 'set gxout shaded' 'defint 10 50' -'d RH2m.1' +'d RHprs.1' 'colorbar.gs' 'draw title Surface Humidity Analysis(RH,%) at 'rdate'z' if(dbug=1) diff --git a/src/Conventional_Monitor/image_gen/gscripts/plot_uvallev_horz.gs b/src/Conventional_Monitor/image_gen/gscripts/plot_uvallev_horz.gs index 1ece1f09..a47c7dee 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plot_uvallev_horz.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plot_uvallev_horz.gs @@ -88,8 +88,6 @@ function plot_horz(plotfile,plotfile2,xsize,ysize,he,rdate,levx,levx1,hint,var) 'set digsiz 0.12' levy=levx-hint ley1=levx+hint+1 - say 'levy='levy - say 'ley1='ley1 'set lev 'levy 'set dfile 4' 'set lev 'levy diff --git a/src/Conventional_Monitor/image_gen/gscripts/plot_uvsatwind_horz.gs b/src/Conventional_Monitor/image_gen/gscripts/plot_uvsatwind_horz.gs index eca9765d..5fc857ca 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plot_uvsatwind_horz.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plot_uvsatwind_horz.gs @@ -135,8 +135,6 @@ function plot_horz(plotfile,plotfile2,xsize,ysize,he,rdate,levx,levx1,hint,var) 'set digsiz 0.12' levy=levx-hint ley1=levx+hint+1 - say 'levy='levy - say 'ley1='ley1 'set lev 'levy 'set dfile 4' 'set lev 'levy diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias.gs index 94af7555..359f5938 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias.gs @@ -14,7 +14,6 @@ function time_bias (args) 'q time' dmy=sublin(result,1) ti=subwrd(dmy,5) - say ti hh=substr(ti,1,2) dd=substr(ti,4,2) @@ -23,13 +22,10 @@ function time_bias (args) ixc=subwrd(size,3) iyc=subwrd(size,6) izc=subwrd(size,9) - say ixc - say 'iyc=' iyc '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'restrict=' restrict ix=1 while(ix <=ixc) @@ -46,6 +42,16 @@ function time_bias (args) endif result=close(info.txt) +* Avoid plotting stypes "uv235" and "all". Stype all is included in the ctl file (from +* which the stypes are taken) but the web site has never included all stypes, so +* eliminating plotting them is a space/time savings. Stype 235 (uv only) produces +* missing data errors on half the plots -- the upper half. This will be +* investigated in a separate fix. + if ( stype = 235 | stype = all ) + ix=ix+1 + continue + endif + iy=1 while(iy <=iyc) @@ -57,7 +63,6 @@ function time_bias (args) endif endif - say 'iy=' iy '!rm -f area.txt' if ( iy <10) @@ -74,7 +79,6 @@ function time_bias (args) area=substr(info,14,25) endif result=close(area.txt) - say 'area = 'area iz=1 while(iz <=izc) @@ -130,22 +134,17 @@ endfile function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,dtype,levz,debug) - 'page' 'clear' nfield=4 field.1.1=bias1.1 field.1.2=bias1.2 - field.1.3=bias1.3 field.2.1=rms1.1 field.2.2=rms1.2 - field.2.3=rms1.3 field.3.1=bias3.1 field.3.2=bias3.2 - field.3.3=bias3.3 field.4.1=rms3.1 field.4.2=rms3.2 - field.4.3=rms3.3 title.1="o-g(used)" title.2="rms(used)" @@ -162,9 +161,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,dtype,levz,debug) y1=10.6-(nf-1)*2.5 y2=y1-1.8 ystring=y1+0.1 - say ' y1='y1 - say ' y2='y2 - say ' ystring='ystring 'set t 1 last' 'query time' dmy=sublin(result,1) @@ -188,14 +184,10 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,dtype,levz,debug) if(maxvar1 > maxvar) maxvar=maxvar1 endif - say ' 'minvar - say ' 'maxvar yrange=maxvar-minvar dy=0.1*yrange minvar=minvar-dy maxvar=maxvar+dy - say ' 'minvar - say ' 'maxvar 'set parea 1.0 8.0 'y2' 'y1 'set gxout line' 'set t 1 last' @@ -205,8 +197,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,dtype,levz,debug) 'set y 'iy 'set x 'ix 'set z 'iz -* 'set axlim 'minvar' 'maxvar -* 'set yaxis 'minvar' 'maxvar' 'dy 'set vrange 'minvar' 'maxvar 'set ccolor 1' 'set cmark 0' @@ -215,9 +205,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,dtype,levz,debug) 'set cmark 1' 'd 'field.nf.2 'set ccolor 3' -* 'set cmark 2' -* 'd 'field.nf.3 -* if(iuse = 1);datause='assimilated';endif if(iuse = -1) datause='mon.' else @@ -231,8 +218,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,dtype,levz,debug) 'set line 2 1' 'draw line 3.1 0.6 3.4 0.6' 'draw string 3.5 0.55 final outloop' -* 'set line 3 1' -* 'draw line 5.1 0.6 5.4 0.6' 'draw string 5.5 0.55 'fti'-'ti nf=nf+1 endwhile diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2.gs index 4e266831..ba40b7d6 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2.gs @@ -7,7 +7,6 @@ function plot_bias2 (args) dtype=DTYPE 'open ges_'dtype'_stas.ctl' 'open anl_'dtype'_stas.ctl' -* 'open 'dtype'_stas_int.ctl' 'set grads off' debug=0 @@ -15,7 +14,6 @@ function plot_bias2 (args) 'q time' dmy=sublin(result,1) ti=subwrd(dmy,5) - say ti hh=substr(ti,1,2) dd=substr(ti,4,2) @@ -24,8 +22,6 @@ function plot_bias2 (args) ixc=subwrd(size,3) iyc=subwrd(size,6) izc=subwrd(size,9) - say ixc - say 'iyc=' iyc iz=1 while(iz <=izc) @@ -63,7 +59,6 @@ function plot_bias2 (args) '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'restrict=' restrict iy=1 while(iy <=iyc) @@ -76,7 +71,6 @@ function plot_bias2 (args) endif endif - say 'iy=' iy '!rm -f area.txt' '!cat ges_'dtype'_stas.ctl |grep "region= 'iy' " > area.txt' result=read(area.txt) @@ -87,7 +81,6 @@ function plot_bias2 (args) area=substr(info,14,25) endif result=close(area.txt) - say 'area = 'area ix=1 while(ix <=ixc) @@ -105,6 +98,16 @@ function plot_bias2 (args) endif result=close(info.txt) +* Avoid plotting syptes "uv235" and "all". Stype all is included in the ctl file (from +* which the stypes are taken) but the web site has never included stype all, so +* eliminating plotting them is a space/time savings. Stype 235 (uv only) produces +* missing data errors on half the plots -- the upper half. This will be +* investigated in a separate fix. + if ( stype = 235 | stype = all ) + ix=ix+1 + continue + endif + plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) ix=ix+1 @@ -122,25 +125,20 @@ endfile function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) - 'page' 'clear' nfield=4 field.1.1=bias2.1 field.1.2=bias2.2 - field.1.3=bias2.3 field.2.1=rms2.1 field.2.2=rms2.2 - field.2.3=rms2.3 field.3.1=bias3.1 field.3.2=bias3.2 - field.3.3=bias3.3 field.4.1=rms3.1 field.4.2=rms3.2 - field.4.3=rms3.3 title.1="o-g for rej. by GC " title.2="rms for rej. by GC" @@ -157,9 +155,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) y1=10.6-(nf-1)*2.5 y2=y1-1.8 ystring=y1+0.1 - say ' y1='y1 - say ' y2='y2 - say ' ystring='ystring 'set t 1 last' 'query time' dmy=sublin(result,1) @@ -186,14 +181,10 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) maxvar=maxvar1 endif - say ' 'minvar - say ' 'maxvar yrange=maxvar-minvar dy=0.1*yrange minvar=minvar-dy maxvar=maxvar+dy - say ' 'minvar - say ' 'maxvar 'set parea 1.0 8.0 'y2' 'y1 'set gxout line' 'set t 1 last' @@ -203,8 +194,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) 'set y 'iy 'set x 'ix 'set z 'iz -* 'set axlim 'minvar' 'maxvar -* 'set yaxis 'minvar' 'maxvar' 'dy 'set vrange 'minvar' 'maxvar 'set ccolor 1' 'set cmark 0' @@ -213,9 +202,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) 'set cmark 1' 'd 'field.nf.2 'set ccolor 3' -* 'set cmark 2' -* 'd 'field.nf.3 -* if(iuse = 1);datause='assimilated';endif if(iuse = -1) datause='mon.' else @@ -229,8 +215,6 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) 'set line 2 1' 'draw line 3.1 0.6 3.4 0.6' 'draw string 3.5 0.55 final outloop' - 'set line 3 1' -* 'draw line 5.1 0.6 5.4 0.6' 'draw string 5.5 0.55 'fti'-'ti nf=nf+1 endwhile diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2_ps.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2_ps.gs index 121f9845..9673fe58 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2_ps.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias2_ps.gs @@ -14,7 +14,6 @@ function time_bias2_ps (args) 'q time' dmy=sublin(result,1) ti=subwrd(dmy,5) - say ti hh=substr(ti,1,2) dd=substr(ti,4,2) @@ -22,13 +21,10 @@ function time_bias2_ps (args) size=sublin(result,5) ixc=subwrd(size,3) iyc=subwrd(size,6) - say ixc - say 'iyc=' iyc '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'restrict=' restrict iy=1 while(iy <=iyc) @@ -41,7 +37,6 @@ function time_bias2_ps (args) endif endif - say 'iy=' iy '!rm -f area.txt' '!cat ges_ps_stas.ctl |grep "region= 'iy' " > area.txt' result=read(area.txt) @@ -88,16 +83,12 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) nfield=4 field.1.1=bias2.1 field.1.2=bias2.2 - field.1.3=bias2.3 field.2.1=rms2.1 field.2.2=rms2.2 - field.2.3=rms2.3 field.3.1=bias3.1 field.3.2=bias3.2 - field.3.3=bias3.3 field.4.1=rms3.1 field.4.2=rms3.2 - field.4.3=rms3.3 title.1="o-g for rej. by GC" title.2="rms for rej. by GC" @@ -114,9 +105,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) y1=10.6-(nf-1)*2.5 y2=y1-1.8 ystring=y1+0.1 - say ' y1='y1 - say ' y2='y2 - say ' ystring='ystring 'set t 1 last' 'query time' 'set y 'iy @@ -140,14 +128,10 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) maxvar=maxvar1 endif - say ' 'minvar - say ' 'maxvar yrange=maxvar-minvar dy=0.1*yrange minvar=minvar-dy maxvar=maxvar+dy - say ' 'minvar - say ' 'maxvar 'set parea 1.0 8.0 'y2' 'y1 'set gxout line' 'set t 1 last' diff --git a/src/Conventional_Monitor/image_gen/gscripts/unused/plotstas_time_bias_ps.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias_ps.gs similarity index 85% rename from src/Conventional_Monitor/image_gen/gscripts/unused/plotstas_time_bias_ps.gs rename to src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias_ps.gs index cd778b41..5aafd54d 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/unused/plotstas_time_bias_ps.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_bias_ps.gs @@ -7,7 +7,6 @@ function time_bias_ps (args) 'open ges_ps_stas.ctl' 'open anl_ps_stas.ctl' -* 'open ps_stas_int.ctl' 'set grads off' debug=0 @@ -15,7 +14,6 @@ function time_bias_ps (args) 'q time' dmy=sublin(result,1) ti=subwrd(dmy,5) - say ti hh=substr(ti,1,2) dd=substr(ti,4,2) @@ -23,13 +21,25 @@ function time_bias_ps (args) size=sublin(result,5) ixc=subwrd(size,3) iyc=subwrd(size,6) - say ixc - say 'iyc=' iyc + + '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' + rest=read(rest.txt) + restrict=subwrd(rest,2) iy=1 while(iy <=iyc) - say 'iy=' iy +* +* In order to save space skip regions N. Hemisphere(2), S. Hemisphere(3), and Canada(6) +* + if ( restrict = 1 ) + say 'restrict true 'restrict + if ( iy = 2 | iy = 3 | iy = 5 | iy = 6 ) + iy=iy+1 + continue + endif + endif + '!rm -f area.txt' if ( iy <10) '!cat ges_ps_stas.ctl |grep "region= 'iy' " > area.txt' @@ -47,11 +57,9 @@ function time_bias_ps (args) endif result=close(area.txt) -* say 'area = 'area ix=1 while(ix <=ixc) - '!rm -f info.txt' '!cat ges_ps_stas.ctl |grep "'ix' dtype=" > info.txt' result=read(info.txt) @@ -87,16 +95,12 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) nfield=4 field.1.1=bias1.1 field.1.2=bias1.2 - field.1.3=bias1.3 field.2.1=rms1.1 field.2.2=rms1.2 - field.2.3=rms1.3 field.3.1=bias3.1 field.3.2=bias3.2 - field.3.3=bias3.3 field.4.1=rms3.1 field.4.2=rms3.2 - field.4.3=rms3.3 title.1="o-g(used)" title.2="rms(used)" @@ -113,9 +117,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) y1=10.6-(nf-1)*2.5 y2=y1-1.8 ystring=y1+0.1 - say ' y1='y1 - say ' y2='y2 - say ' ystring='ystring 'set t 1 last' 'query time' dmy=sublin(result,1) @@ -139,14 +140,10 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) if(maxvar1 > maxvar) maxvar=maxvar1 endif - say ' 'minvar - say ' 'maxvar yrange=maxvar-minvar dy=0.1*yrange minvar=minvar-dy maxvar=maxvar+dy - say ' 'minvar - say ' 'maxvar 'set parea 1.0 8.0 'y2' 'y1 'set gxout line' 'set t 1 last' @@ -156,8 +153,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) 'set y 'iy 'set x 'ix 'set z 1' -* 'set axlim 'minvar' 'maxvar -* 'set yaxis 'minvar' 'maxvar' 'dy 'set vrange 'minvar' 'maxvar 'set ccolor 1' 'set cmark 0' @@ -166,11 +161,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) 'set cmark 1' 'd 'field.nf.2 -* 'set ccolor 3' -* 'set cmark 2' -* 'd 'field.nf.3 -* if(iuse = 1);datause='assimilated';endif - if(iuse = -1) datause='mon.' else @@ -185,8 +175,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) 'draw line 3.1 0.6 3.4 0.6' 'draw string 3.5 0.55 final outloop' -* 'set line 3 1' -* 'draw line 5.1 0.6 5.4 0.6' 'draw string 5.5 0.55 'fti'-'ti nf=nf+1 endwhile diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count.gs index 9e90eac4..33ecea58 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count.gs @@ -15,7 +15,6 @@ function time_cnt_ps (args) 'q time' dmy=sublin(result,1) ti=subwrd(dmy,5) - say ti hh=substr(ti,1,2) dd=substr(ti,4,2) @@ -24,13 +23,10 @@ function time_cnt_ps (args) ixc=subwrd(size,3) iyc=subwrd(size,6) izc=subwrd(size,9) - say ixc - say 'iyc=' iyc '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'restrict=' restrict ix=1 @@ -48,6 +44,17 @@ function time_cnt_ps (args) iuse=subwrd(info,10) endif result=close(info.txt) + +* Avoid plotting uv235 and all stypes. Stype all is included in the ctl file (from +* which the stypes are taken) but the web site has never included stype all, so +* eliminating plotting them is a space/time savings. Stype 235 (uv only) produces +* missing data errors on half the plots -- the upper half. This will be +* investigated in a separate fix. + if ( stype = 235 | stype = all ) + ix=ix+1 + continue + endif + iy=1 while(iy <=iyc) @@ -60,7 +67,6 @@ function time_cnt_ps (args) endif endif - say 'iy=' iy '!rm -f area.txt' if ( iy <10) @@ -70,14 +76,13 @@ function time_cnt_ps (args) endif result=read(area.txt) rc=sublin(result,1) - area="uknown" + area="unknown" if (rc = 0) info=sublin(result,2) area=substr(info,14,25) endif result=close(area.txt) - say 'area = 'area iz=1 while(iz <=izc) @@ -158,16 +163,12 @@ function plottime(ix,iy,iz,dtype,hh,dd,area,stype,subtype,iuse,levz,debug) nfield=4 field.1.1=count1.1 field.1.2=count1.2 -field.1.3=count1.3 field.2.1=count_vqc1.1 field.2.2=count_vqc1.2 -field.2.3=count_vqc1.3 field.3.1=count2.1 field.3.2=count2.2 -field.3.3=count2.3 field.4.1=count3.1 field.4.2=count3.2 -field.4.3=count3.3 title.1="assi. no." title.2="no. rej. by VQC" @@ -179,9 +180,6 @@ while(nf <=nfield) y1=10.6-(nf-1)*2.5 y2=y1-1.8 ystring=y1+0.1 -say ' y1='y1 -say ' y2='y2 -say ' ystring='ystring 'set t 1' 'query time' @@ -211,14 +209,10 @@ ti=subwrd(dmy,5) if(maxvar1 > maxvar) maxvar=maxvar1 endif - say ' 'minvar - say ' 'maxvar yrange=maxvar-minvar dy=0.1*yrange minvar=minvar-dy maxvar=maxvar+dy - say ' 'minvar - say ' 'maxvar 'set parea 1.0 8.0 'y2' 'y1 'set gxout line' 'set t 1 last' @@ -228,8 +222,6 @@ ti=subwrd(dmy,5) 'set y 'iy 'set x 'ix 'set z 'iz -*'set axlim 'minvar' 'maxvar -*'set yaxis 'minvar' 'maxvar' 'dy 'set vrange 'minvar' 'maxvar 'set ccolor 1' 'set cmark 0' @@ -237,10 +229,6 @@ ti=subwrd(dmy,5) 'set ccolor 2' 'set cmark 1' 'd 'field.nf.2 -* 'set ccolor 3' -* 'set cmark 2' -* 'd 'field.nf.3 -* if(iuse = 1);datause='used';endif if(iuse = -1) datause='mon.' else @@ -255,8 +243,6 @@ ti=subwrd(dmy,5) 'set line 2 1' 'draw line 3.1 0.6 3.4 0.6' 'draw string 3.5 0.55 final outloop' -*'set line 3 1' -*'draw line 5.1 0.6 5.4 0.6' 'draw string 5.5 0.55 'fti'-'ti nf=nf+1 endwhile diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count_ps.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count_ps.gs index b26fdef2..0475c295 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count_ps.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_time_count_ps.gs @@ -6,10 +6,8 @@ function ps_time_count (args) -* 'reinit' 'open ges_ps_stas.ctl' 'open anl_ps_stas.ctl' -* 'open ps_stas_int.ctl' 'set grads off' debug=0 @@ -17,7 +15,6 @@ function ps_time_count (args) 'q time' dmy=sublin(result,1) ti=subwrd(dmy,5) - say ti hh=substr(ti,1,2) dd=substr(ti,4,2) @@ -25,13 +22,10 @@ function ps_time_count (args) size=sublin(result,5) ixc=subwrd(size,3) iyc=subwrd(size,6) - say ixc - say 'iyc=' iyc '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'restrict=' restrict iy=1 while(iy <=iyc) @@ -44,7 +38,6 @@ function ps_time_count (args) endif endif - say 'iy=' iy '!rm -f area.txt' if( iy <10) @@ -60,7 +53,6 @@ function ps_time_count (args) area=substr(info,14,25) endif result=close(area.txt) - say 'area = 'area ix=1 while(ix <=ixc) @@ -70,8 +62,6 @@ function ps_time_count (args) result=read(info.txt) rc=sublin(result,1) iuse=0 - say 'dtype= 'dtype - say 'rc = 'rc if (rc = 0) info=sublin(result,2) @@ -79,9 +69,6 @@ function ps_time_count (args) subtype=subwrd(info,8) iuse=subwrd(info,10) endif - say 'stype = 'stype - say 'subtype = 'subtype - say 'iuse = 'iuse result=close(info.txt) plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) @@ -106,19 +93,15 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) nfield=4 field.1.1=count1.1 field.1.2=count1.2 -* field.1.3=count1.3 field.2.1=count_vqc1.1 field.2.2=count_vqc1.2 -* field.2.3=count_vqc1.3 field.3.1=count2.1 field.3.2=count2.2 -* field.3.3=count2.3 field.4.1=count3.1 field.4.2=count3.2 -* field.4.3=count3.3 title.1="ass. no." title.2="no. rej. by VQC" @@ -135,9 +118,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) y1=10.6-(nf-1)*2.5 y2=y1-1.8 ystring=y1+0.1 - say ' y1='y1 - say ' y2='y2 - say ' ystring='ystring 'set t 1 last' 'query time' dmy=sublin(result,1) @@ -165,14 +145,11 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) maxvar=maxvar1 endif - say ' 'minvar - say ' 'maxvar yrange=maxvar-minvar dy=0.1*yrange minvar=minvar-dy maxvar=maxvar+dy - say ' 'minvar - say ' 'maxvar + 'set parea 1.0 8.0 'y2' 'y1 'set gxout line' 'set t 1 last' @@ -183,8 +160,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) 'set x 'ix 'set z 1' -* 'set axlim 'minvar' 'maxvar -* 'set yaxis 'minvar' 'maxvar' 'dy 'set vrange 'minvar' 'maxvar 'set ccolor 1' @@ -195,11 +170,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) 'set cmark 1' 'd 'field.nf.2 -* 'set ccolor 3' -* 'set cmark 2' -* 'd 'field.nf.3 -* if(iuse = 1);datause='assimilated';endif - if(iuse = -1) datause='mon.' else @@ -213,8 +183,6 @@ function plottime(ix,iy,stype,hh,dd,area,stype,subtype,iuse,debug) 'set line 2 1' 'draw line 3.1 0.6 3.4 0.6' 'draw string 3.5 0.55 final outloop' -* 'set line 3 1' -* 'draw line 5.1 0.6 5.4 0.6' 'draw string 5.5 0.55 'fti'-'ti nf=nf+1 endwhile diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_bias.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_bias.gs index 0f87bbea..9acc0935 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_bias.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_bias.gs @@ -20,7 +20,6 @@ function vert_bias (args) 'q time' ti=sublin(result,1) dmy=subwrd(ti,3) - say dmy hh=substr(dmy,1,2) dd=substr(dmy,4,2) @@ -34,7 +33,6 @@ function vert_bias (args) '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'rs=' restrict iy=1 while(iy <=nyc) @@ -67,7 +65,6 @@ function vert_bias (args) else datause='used' endif - plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) ix=ix+1 @@ -110,7 +107,6 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) yp=2 while(nf <=nfield) - say 'nf='nf 'run setvpage 'xp' 'yp' 2 2 0.9' 'set annot 98' 'set line 98' @@ -122,29 +118,24 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) 'set t last' 'set x 'ix - say 'x='ix 'set y 'iy 'set z 1' 'define vmax=max('field.nf.1',z=2,z='nzc')' 'define vmin=min('field.nf.1',z=2,z='nzc')' 'd vmax' - say result cmax=subwrd(result,4) if(cmax=0); cmax=0.1;endif 'd vmin' - say result cmin=subwrd(result,4) if(cmin=0);cmin=-0.1;endif yrange=cmax-cmin - say 'cmax='cmax dy=0.1*yrange cmax=cmax+dy cmin=cmin-dy - say 'cmax='cmax 'set z 2 'nzc 'set vrange 'cmin' 'cmax 'set ccolor 98' @@ -163,7 +154,7 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) outfile=dtype''stype'-'subtype'_bias_vert_region'iy'.png' - 'printim 'outfile' x800 y650 white' + 'printim 'outfile' x800 y650' if(debug=1) say 'enter' pull diff --git a/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_count.gs b/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_count.gs index 64a73bf8..5e10a7cd 100644 --- a/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_count.gs +++ b/src/Conventional_Monitor/image_gen/gscripts/plotstas_vert_count.gs @@ -19,7 +19,6 @@ function vert_count (args) 'q time' ti=sublin(result,1) dmy=subwrd(ti,3) - say dmy hh=substr(dmy,1,2) dd=substr(dmy,4,2) @@ -33,7 +32,6 @@ function vert_count (args) '!echo $CONMON_RESTRICT_PLOT_AREAS > rest.txt' rest=read(rest.txt) restrict=subwrd(rest,2) - say 'rs=' restrict iy=1 while(iy <=nyc) @@ -85,16 +83,12 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) field.1.1=count1.1 field.1.2=count1.2 - field.1.3=count1.3 field.2.1=count_vqc1.1 field.2.2=count_vqc1.2 - field.2.3=count_vqc1.3 field.3.1=count2.1 field.3.2=count2.2 - field.3.3=count2.3 field.4.1=count3.1 field.4.2=count3.2 - field.4.3=count3.3 title.1="no assi." title.2="no rej. by VQC" @@ -107,8 +101,6 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) yp=2 while(nf <=nfield) - say 'nf='nf - 'run setvpage 'xp' 'yp' 2 2 0.9' 'set annot 98' 'set line 98' @@ -118,33 +110,19 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) 'set datawarn off' 'set t last' 'set x 'ix - say 'x='ix 'set y 'iy 'set z 1' 'define vmax=max('field.nf.1',z=2,z='nzc')' 'd vmax' - say result cmax=subwrd(result,4) - say 'cmax='cmax - -* if(cmax <1.0) -* iy=iy+1 -* 'page' -* 'clear' -* say "continue " ix " " iy -* continue -* endif cmax=cmax+10 - say 'cmax='cmax 'set z 2 'nzc 'set vrange 0 'cmax 'set ccolor 98' 'd 'field.nf.1 'set ccolor 2' 'd 'field.nf.2 -* 'set ccolor 3' -* 'd 'field.nf.2 'draw title 'dtype''stype'-'subtype'('datause'):'title.nf' on 'dmy if( nf =2 );xp=xp+1;endif; @@ -156,7 +134,7 @@ function plot_vert(ix,iy,nzc,dmy,dtype,stype,subtype,datause,iuse,debug) outfile=dtype''stype'-'subtype'_count_vert_region'iy'.png' - 'printim 'outfile' x800 y650 white' + 'printim 'outfile' x800 y650' if(debug=1) say 'enter' pull diff --git a/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh b/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh index 9ecda11b..1508627b 100755 --- a/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh +++ b/src/Conventional_Monitor/image_gen/ush/ConMon_IG.sh @@ -109,6 +109,7 @@ else exit 3 fi +module list #-------------------------------------------------------------------- # Create LOGdir as needed @@ -175,7 +176,7 @@ if [[ $PDATE -le ${last_cycle} ]]; then #-------------------------------------------------------------------- # Create workdir and cd to it #-------------------------------------------------------------------- - export C_PLOT_WORKDIR=${C_PLOT_WORKDIR:-${C_STMP_USER}/${CONMON_SUFFIX}/${RUN}/conmon} + export C_PLOT_WORKDIR=${C_PLOT_WORKDIR:-${MON_STMP}/${CONMON_SUFFIX}/${RUN}/conmon} rm -rf $C_PLOT_WORKDIR mkdir -p $C_PLOT_WORKDIR cd $C_PLOT_WORKDIR diff --git a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh index 80e8c43d..11cc3b33 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_horz_hist.sh @@ -25,7 +25,13 @@ export t_TYPE=" t120_00 t130_00 t131_00 t132_00 t133_00 t134_00 t135_00 t180_00 t181_00 t182_00 t183_00 t187_00 " - export uv_TYPE=" uv220_00 uv221_00 uv223_00 uv224_00 uv228_00 uv229_00 uv230_00 uv231_00 uv232_00 uv233_00 uv234_00 uv235_00 uv242_00 uv243_00 uv243_55 uv243_56 uv245_257 uv245_259 uv245_270 uv246_257 uv246_257 uv246_270 uv247_257 uv247_259 uv247_270 uv248_00 uv249_00 uv250_00 uv251_00 uv252_00 uv253_00 uv253_55 uv253_56 uv254_00 uv254_55 uv254_56 uv255_00 uv256_00 uv257_00 uv258_00 uv280_00 uv281_00 uv282_00 uv284_00 uv287_00" + #----------------------------------------------------------------------------------------------------- + # This list has been modified temporarily to remove specific data types/subtypes that produce fatal + # errors when plotting. This is to be corrected in GSI-monitor issue #62. + #----------------------------------------------------------------------------------------------------- +# export uv_TYPE=" uv220_00 uv221_00 uv223_00 uv224_00 uv228_00 uv229_00 uv230_00 uv231_00 uv232_00 uv233_00 uv234_00 uv235_00 uv242_00 uv243_00 uv243_55 uv243_56 uv245_257 uv245_259 uv245_270 uv246_257 uv246_257 uv246_270 uv247_257 uv247_259 uv247_270 uv248_00 uv249_00 uv250_00 uv251_00 uv252_00 uv253_00 uv253_55 uv253_56 uv254_00 uv254_55 uv254_56 uv255_00 uv256_00 uv257_00 uv258_00 uv280_00 uv281_00 uv282_00 uv284_00 uv287_00" + export uv_TYPE=" uv220_00 uv221_00 uv223_00 uv224_00 uv228_00 uv230_00 uv231_00 uv232_00 uv233_00 uv234_00 uv235_00 uv242_00 uv243_00 uv243_55 uv243_56 uv245_257 uv245_259 uv245_270 uv246_257 uv246_257 uv246_270 uv247_257 uv247_259 uv247_270 uv248_00 uv249_00 uv250_00 uv251_00 uv252_00 uv253_00 uv253_55 uv253_56 uv254_00 uv254_55 uv254_56 uv255_00 uv256_00 uv257_00 uv258_00" + export nreal_ps=${nreal_ps:-17} @@ -56,8 +62,8 @@ -p ${SERVICE_PARTITION} -J ${jobname} -o ${logfile} ${plot_hist} elif [[ $MY_MACHINE == "wcoss2" ]]; then - $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \ - -l select=1:mem=500M ${plot_hist} + $SUB -V -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \ + -l select=1:mem=1G ${plot_hist} fi diff --git a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh index 30aa44ce..c4a27765 100755 --- a/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/mk_time_vert.sh @@ -68,13 +68,13 @@ echo "--> mk_time_vert.sh" elif [[ ${MY_MACHINE} == "wcoss2" ]]; then if [[ ${type} == "uv" || ${type} == "u" || ${type} == "v" ]]; then - walltime="02:00:00" + walltime="02:30:00" else walltime="50:00" fi $SUB -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} -l walltime=${walltime}\ - -N ${jobname} -l select=1:mem=200M ${pltfile} + -N ${jobname} -l select=1:mem=1G ${pltfile} fi done @@ -112,7 +112,7 @@ echo "--> mk_time_vert.sh" elif [[ ${MY_MACHINE} == "wcoss2" ]]; then ${SUB} -V -q ${JOB_QUEUE} -A ${ACCOUNT} -o ${logfile} -e ${logfile} -l walltime=50:00 \ - -N ${jobname} -l select=1:mem=500M ${pltfile} + -N ${jobname} -l select=1:mem=500M ${pltfile} fi done diff --git a/src/Conventional_Monitor/image_gen/ush/plot_hist.sh b/src/Conventional_Monitor/image_gen/ush/plot_hist.sh index ef5774c9..1b4666b3 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_hist.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_hist.sh @@ -68,12 +68,12 @@ mkdir -p ${workdir} cd ${workdir} - hh_tankdir=`$MON_USH/get_stats_path.sh --run $RUN --pdate ${PDATE} \ - --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` + hh_tankdir=`${MON_USH}/get_stats_path.sh --run ${RUN} --pdate ${PDATE} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` hh_tankdir=${hh_tankdir}/horz_hist - $UNCOMPRESS ${hh_tankdir}/anl/*.scater.*${Z} - $UNCOMPRESS ${hh_tankdir}/ges/*.scater.*${Z} + $UNCOMPRESS ${hh_tankdir}/anl/*.scater.*.gz + $UNCOMPRESS ${hh_tankdir}/ges/*.scater.*.gz outdir=${C_IMGNDIR}/pngs/hist/ if [[ ! -d ${outdir} ]]; then @@ -259,22 +259,23 @@ cp ${C_IG_GSCRIPTS}/setvpage.gs ./setvpage.gs fi - cat fileout.ges.${dtype}_${uvtype} > fileout - cat fileout.anl.${dtype}_${uvtype} >> fileout - cp fileout fileout_all.${dtype}_${uvtype} - - sed -e "s/XSIZE/$xsize/" \ - -e "s/YSIZE/$ysize/" \ - -e "s/PLOTFILE/${dtype}_${uvtype}/" \ - -e "s/SDATE/$PDATE/" \ - plot_hist.gs > plothist_${dtype}_${uvtype}.gs - - - #------------------------------------- - # run the GrADS plot script - # - echo 'quit' | grads -blc " run plothist_${dtype}_${uvtype}.gs" - + if [[ -e fileout.ges.${dtype} && -e fileout.anl.${dtype} ]]; then + cat fileout.ges.${dtype}_${uvtype} > fileout + cat fileout.anl.${dtype}_${uvtype} >> fileout + cp fileout fileout_all.${dtype}_${uvtype} + + sed -e "s/XSIZE/$xsize/" \ + -e "s/YSIZE/$ysize/" \ + -e "s/PLOTFILE/${dtype}_${uvtype}/" \ + -e "s/SDATE/$PDATE/" \ + plot_hist.gs > plothist_${dtype}_${uvtype}.gs + + + #------------------------------------- + # run the GrADS plot script + # + echo 'quit' | grads -blc " run plothist_${dtype}_${uvtype}.gs" + fi done ### uvtype loop fi @@ -286,13 +287,20 @@ #------------------------------------- # run the GrADS plot script # - cat fileout.ges.${dtype} > fileout - cat fileout.anl.${dtype} >> fileout - cp fileout fileout_all.${dtype} + if [[ -e fileout.ges.${dtype} && -e fileout.anl.${dtype} ]]; then + echo "Plotting ${dtype}"; echo + + cat fileout.ges.${dtype} > fileout + cat fileout.anl.${dtype} >> fileout + cp fileout fileout_all.${dtype} - echo 'quit' | grads -blc " run plothist_${dtype}.gs" - rm fileout - + echo 'quit' | grads -blc " run plothist_${dtype}.gs" + rm fileout + + else + echo "No data for ${dtype}, skipping"; echo + fi + done ### dtype loop done ### type loop diff --git a/src/Conventional_Monitor/image_gen/ush/plot_horz.sh b/src/Conventional_Monitor/image_gen/ush/plot_horz.sh index 9245dbb9..18270b61 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_horz.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_horz.sh @@ -7,7 +7,9 @@ #---------------------------------------------------------------------------------------- echo "--> plot_horz.sh" - hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist + hh_tankdir=`${MON_USH}/get_stats_path.sh --run ${RUN} --pdate ${PDATE} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` + hh_tankdir=${hh_tankdir}/horz_hist export xsize=x800 export ysize=y600 @@ -23,11 +25,18 @@ #---------------------------------------------------------------------- # link in the analysis and guess data files #---------------------------------------------------------------------- - ${UNCOMPRESS} ${hh_tankdir}/anl/anal.${PDATE}.${Z} - ${UNCOMPRESS} ${hh_tankdir}/ges/guess.${PDATE}.${Z} + anl_file=${hh_tankdir}/anl/anal.${PDATE} + ges_file=${hh_tankdir}/ges/guess.${PDATE} - ln -s ${hh_tankdir}/anl/anal.${PDATE} anal.${PDATE} - ln -s ${hh_tankdir}/ges/guess.${PDATE} guess.${PDATE} + if [[ -e ${anl_file}.gz ]]; then + ${UNCOMPRESS} ${anl_file}.gz + fi + if [[ -e ${ges_file}.gz ]]; then + ${UNCOMPRESS} ${ges_file}.gz + fi + + ln -s ${anl_file} anal.${PDATE} + ln -s ${ges_file} guess.${PDATE} #---------------------------------------------------------------------- @@ -65,7 +74,8 @@ #--------------------------------------- # build the control file for the data #--------------------------------------- - if [ "$mtype" = 'ps180' -o "$mtype" = 'ps181' -o "$mtype" = 'ps183' -o "$mtype" = 'ps187' ]; then + if [ "$mtype" = 'ps180' -o "$mtype" = 'ps181' -o \ + "$mtype" = 'ps183' -o "$mtype" = 'ps187' ]; then cp ${C_IG_FIX}/pstime.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_ps_horz.gs ./plot_${dtype}.gs @@ -80,12 +90,14 @@ cp ${C_IG_FIX}/tmandlev.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_tallev_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 't180' -o "$mtype" = 't181' -o "$mtype" = 't182' -o "$mtype" = 't183' -o "$mtype" = 't187' ]; then + elif [ "$mtype" = 't180' -o "$mtype" = 't181' -o "$mtype" = 't182' -o \ + "$mtype" = 't183' -o "$mtype" = 't187' ]; then cp ${C_IG_FIX}/tsfc.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_tsfc_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 't130' -o "$mtype" = 't131' -o "$mtype" = 't132' -o "$mtype" = 't133' -o "$mtype" = 't134' -o "$mtype" = 't135' ]; then + elif [ "$mtype" = 't130' -o "$mtype" = 't131' -o "$mtype" = 't132' -o \ + "$mtype" = 't133' -o "$mtype" = 't134' -o "$mtype" = 't135' ]; then cp ${C_IG_FIX}/tallev.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_tallev_horz.gs ./plot_${dtype}.gs @@ -95,11 +107,13 @@ cp ${C_IG_FIX}/qmandlev.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_qallev_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 'q180' -o "$mtype" = 'q181' -o "$mtype" = 'q182' -o "$mtype" = 'q183' -o "$mtype" = 'q187' ];then + elif [ "$mtype" = 'q180' -o "$mtype" = 'q181' -o "$mtype" = 'q182' -o \ + "$mtype" = 'q183' -o "$mtype" = 'q187' ]; then cp ${C_IG_FIX}/qsfc.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_qsfc_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 'q130' -o "$mtype" = 'q131' -o "$mtype" = 'q132' -o "$mtype" = 'q133' -o "$mtype" = 'q134' -o "$mtype" = 'q135' ]; then + elif [ "$mtype" = 'q130' -o "$mtype" = 'q131' -o "$mtype" = 'q132' -o \ + "$mtype" = 'q133' -o "$mtype" = 'q134' -o "$mtype" = 'q135' ]; then cp ${C_IG_FIX}/qallev.ctl ./${dtype}.ctl cp ${C_IG_GSCRIPTS}/plot_qallev_horz.gs ./plot_${dtype}.gs @@ -113,7 +127,8 @@ cp $CTLDIR/uvsig.ctl ./${dtype}.ctl cp $GSCRIPTS/plot_uvallev_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 'uv221' -o "$mtype" = 'uv230' -o "$mtype" = 'uv231' -o "$mtype" = 'uv232' -o "$mtype" = 'uv233' -o "$mtype" = 'uv234' -o "$mtype" = 'uv235' ]; then + elif [ "$mtype" = 'uv221' -o "$mtype" = 'uv230' -o "$mtype" = 'uv231' -o \ + "$mtype" = 'uv232' -o "$mtype" = 'uv233' -o "$mtype" = 'uv234' -o "$mtype" = 'uv235' ]; then cp $CTLDIR/uvallev.ctl ./${dtype}.ctl cp $GSCRIPTS/plot_uvallev_horz.gs ./plot_${dtype}.gs @@ -143,7 +158,6 @@ ln -s ${grads_file} ${dtype}.grads.${cycle}.${PDATE} else - echo "WARNING: unable to locate ${grads_file}" continue fi @@ -152,29 +166,37 @@ done ## done with cycle - #--------------------------------------------- - # set plot variables in the GrADS script - #--------------------------------------------- - sed -e "s/XSIZE/$xsize/" \ - -e "s/YSIZE/$ysize/" \ - -e "s/PLOTFILE/$mtype/" \ - -e "s/PLOT2/$dtype/" \ - -e "s/RDATE/$PDATE/" \ - -e "s/HINT/${hint}/" \ - -e "s/NT/$nt/" \ - plot_${dtype}.gs >plothorz_${dtype}.gs - - $GRADS -blc "run plothorz_${dtype}.gs" - - outdir=${C_IMGNDIR}/pngs/horz - mkdir -p ${outdir} - - img_files=`ls *.png` - for imgf in ${img_files}; do - newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` - cp ${imgf} ${newf} - mv ${newf} ${outdir}/. - done + # add check for grads_files here, continue if not found + + if [[ -e ${dtype}.grads.ges.${PDATE} && -e ${dtype}.grads.anl.${PDATE} ]]; then + echo "OK to plot ${dtype}" + + #--------------------------------------------- + # set plot variables in the GrADS script + #--------------------------------------------- + sed -e "s/XSIZE/$xsize/" \ + -e "s/YSIZE/$ysize/" \ + -e "s/PLOTFILE/$mtype/" \ + -e "s/PLOT2/$dtype/" \ + -e "s/RDATE/$PDATE/" \ + -e "s/HINT/${hint}/" \ + -e "s/NT/$nt/" \ + plot_${dtype}.gs >plothorz_${dtype}.gs + + $GRADS -blc "run plothorz_${dtype}.gs" + + outdir=${C_IMGNDIR}/pngs/horz + mkdir -p ${outdir} + + img_files=`ls *.png` + for imgf in ${img_files}; do + newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` + mv ${imgf} ${outdir}/${newf} + done + + else + echo "No data for ${dtype}, skipping plot"; echo + fi done ### dtype loop diff --git a/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh b/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh index ad5686e5..a6e86d3a 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_horz_uv.sh @@ -7,7 +7,9 @@ #--------------------------------------------------------------------- echo "--> plot_horz_uv.sh" - hh_tankdir=${C_TANKDIR}/${RUN}.${PDY}/${CYC}/conmon/horz_hist + hh_tankdir=`${MON_USH}/get_stats_path.sh --run ${RUN} --pdate ${PDATE} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` + hh_tankdir=${hh_tankdir}/horz_hist workdir=${C_PLOT_WORKDIR}/plothorz_uv if [[ -d ${workdir} ]]; then @@ -22,11 +24,18 @@ #---------------------------------------------------------------------- # Link in the analysis and guess data files #---------------------------------------------------------------------- - ${UNCOMPRESS} ${hh_tankdir}/anl/anal.${PDATE}.gz - ${UNCOMPRESS} ${hh_tankdir}/ges/guess.${PDATE}.gz + anl_file=${hh_tankdir}/anl/anal.${PDATE} + ges_file=${hh_tankdir}/ges/guess.${PDATE} - ln -s ${hh_tankdir}/anl/anal.${PDATE} anal.${PDATE} - ln -s ${hh_tankdir}/ges/guess.${PDATE} guess.${PDATE} + if [[ -e ${anl_file}.gz ]]; then + ${UNCOMPRESS} ${anl_file}.gz + fi + if [[ -e ${ges_file}.gz ]]; then + ${UNCOMPRESS} ${ges_file}.gz + fi + + ln -s ${anl_file} anal.${PDATE} + ln -s ${ges_file} guess.${PDATE} #---------------------------------------------------------------------- @@ -77,35 +86,31 @@ ${NCP} ${C_IG_FIX}/uvsig.ctl ./${dtype}.ctl ${NCP} ${C_IG_GSCRIPTS}/plot_uvallev_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 'uv221' -o "$mtype" = 'uv230' -o "$mtype" = 'uv231' -o "$mtype" = 'uv232' -o "$mtype" = 'uv233' -o "$mtype" = 'uv234' -o "$mtype" = 'uv235' ]; then + elif [ "$mtype" = 'uv221' -o "$mtype" = 'uv230' -o "$mtype" = 'uv231' -o\ + "$mtype" = 'uv232' -o "$mtype" = 'uv233' -o "$mtype" = 'uv234' -o "$mtype" = 'uv235' ]; then ${NCP} ${C_IG_FIX}/uvallev.ctl ./${dtype}.ctl ${NCP} ${C_IG_GSCRIPTS}/plot_uvallev_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 'uv242' -o "$mtype" = 'uv243' -o "$mtype" = 'uv245' -o "$mtype" = 'uv246' -o "$mtype" = 'uv247' -o "$mtype" = 'uv248' -o "$mtype" = 'uv249' -o "$mtype" = 'uv250' -o "$mtype" = 'uv251' -o "$mtype" = 'uv252' -o "$mtype" = 'uv253' -o "$mtype" = 'uv254' -o "$mtype" = 'uv255' -o "$mtype" = 'uv256' -o "$mtype" = 'uv257' -o "$mtype" = 'uv258' ]; then + elif [ "$mtype" = 'uv242' -o "$mtype" = 'uv243' -o "$mtype" = 'uv245' -o \ + "$mtype" = 'uv246' -o "$mtype" = 'uv247' -o "$mtype" = 'uv248' -o \ + "$mtype" = 'uv249' -o "$mtype" = 'uv250' -o "$mtype" = 'uv251' -o \ + "$mtype" = 'uv252' -o "$mtype" = 'uv253' -o "$mtype" = 'uv254' -o \ + "$mtype" = 'uv255' -o "$mtype" = 'uv256' -o "$mtype" = 'uv257' -o "$mtype" = 'uv258' ]; then ${NCP} ${C_IG_FIX}/uvallev.ctl ./${dtype}.ctl ${NCP} ${C_IG_GSCRIPTS}/plot_uvsatwind_horz.gs ./plot_${dtype}.gs - elif [ "$mtype" = 'uv280' -o "$mtype" = 'uv281' -o "$mtype" = 'uv282' -o "$mtype" = 'uv284' -o "$mtype" = 'uv287' ]; then + elif [ "$mtype" = 'uv280' -o "$mtype" = 'uv281' -o "$mtype" = 'uv282' -o \ + "$mtype" = 'uv284' -o "$mtype" = 'uv287' ]; then ${NCP} ${C_IG_FIX}/uvsfc11.ctl ./${dtype}.ctl ${NCP} ${C_IG_GSCRIPTS}/plot_uvsfc_horz.gs ./plot_${dtype}.gs - if [ -s ${hh_tankdir}/${cycle}/nt_${dtype}.${PDATE} ]; then - echo "LOCATED nt file" - nt=`cat ${hh_tankdir}/${cycle}/nt_${dtype}.${PDATE}` - echo "nt set to $nt" - fi elif [ "$mtype" = 'uv229' ]; then ${NCP} ${C_IG_FIX}/uvsfc7.ctl ./${dtype}.ctl ${NCP} ${C_IG_GSCRIPTS}/plot_uvsfc_horz.gs ./plot_${dtype}.gs - if [ -s ${hh_tankdir}/${cycle}/nt_${dtype}.${PDATE} ]; then - echo "LOCATED nt file" - nt=`cat ${hh_tankdir}/${cycle}/nt_${dtype}.${PDATE}` - echo "nt set to $nt" - fi fi @@ -131,44 +136,46 @@ ln -s ${grads_file} ${dtype}.grads.${cycle}.${PDATE} else - echo "WARNING: unable to locate ${grads_file}" continue fi stnmap -1 -i ${dtype}.grads.${cycle}.ctl done ## done with cycle - - if [ ! -s ${hh_tankdir}/$cycle/${dtype}.grads.${cycle}.${PDATE} ]; then - continue - fi - - #---------------------------------------- - # set plot variables in GrADS script - #---------------------------------------- - sed -e "s/XSIZE/$xsize/" \ - -e "s/YSIZE/$ysize/" \ - -e "s/PLOTFILE/$mtype/" \ - -e "s/PLOT2/$dtype/" \ - -e "s/RDATE/$PDATE/" \ - -e "s/HINT/${hint}/" \ - -e "s/NT/$nt/" \ - -e "s/DINDEX/$dindex/" \ - plot_${dtype}.gs >plothorz_${dtype}.gs - - ${GRADS} -blc "run plothorz_${dtype}.gs" - - - outdir=${C_IMGNDIR}/pngs/horz - if [[ ! -d ${outdir} ]]; then - mkdir -p ${outdir} - fi - - img_files=`ls *.png` - for imgf in $img_files; do - newf=`echo ${imgf} | sed -e "s/\./.${PDATE}./g"` - cp ${imgf} ${C_IMGNDIR}/pngs/horz/${newf} - done + + if [[ -e ${dtype}.grads.ges.${PDATE} && -e ${dtype}.grads.anl.${PDATE} ]]; then + echo "OK to plot ${dtype}" + + #---------------------------------------- + # set plot variables in GrADS script + #---------------------------------------- + sed -e "s/XSIZE/$xsize/" \ + -e "s/YSIZE/$ysize/" \ + -e "s/PLOTFILE/$mtype/" \ + -e "s/PLOT2/$dtype/" \ + -e "s/RDATE/$PDATE/" \ + -e "s/HINT/${hint}/" \ + -e "s/NT/$nt/" \ + -e "s/DINDEX/$dindex/" \ + plot_${dtype}.gs >plothorz_${dtype}.gs + + ${GRADS} -blc "run plothorz_${dtype}.gs" + + + outdir=${C_IMGNDIR}/pngs/horz + if [[ ! -d ${outdir} ]]; then + mkdir -p ${outdir} + fi + + img_files=`ls *.png` + for imgf in $img_files; do + newf=`echo ${imgf} | sed -e "s/\./.${PDATE}./g"` + mv ${imgf} ${C_IMGNDIR}/pngs/horz/${newf} + done + + else + echo "No data for ${dtype}, skipping plot"; echo + fi done ### dtype loop done ### type loop @@ -182,6 +189,7 @@ rm -rf ${workdir} fi + echo "<-- plot_horz_uv.sh" exit diff --git a/src/Conventional_Monitor/image_gen/ush/plot_time.sh b/src/Conventional_Monitor/image_gen/ush/plot_time.sh index fec54171..225d18fc 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_time.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_time.sh @@ -32,10 +32,6 @@ function large_mv () { mkdir -p ${workdir} cd ${workdir} - pdy=`echo $PDATE|cut -c1-8` - cyc=`echo $PDATE|cut -c9-10` - tv_tankdir=${C_TANKDIR}/${RUN}.${pdy}/${cyc}/conmon/time_vert - export xsize=x800 export ysize=y600 @@ -51,12 +47,15 @@ function large_mv () { while [[ $cdate -le $edate ]] ; do day=`echo $cdate | cut -c1-8 ` dcyc=`echo $cdate |cut -c9-10` + test_dir=`${MON_USH}/get_stats_path.sh --run ${RUN} --pdate ${cdate} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` - if [[ -d ${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon ]]; then + if [[ -d ${test_dir} ]]; then for cycle in ges anl; do data_file=${cycle}_${TYPE}_stas.${cdate} - data_fp=${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon/time_vert/${data_file} + data_fp=${test_dir}/time_vert/${data_file} + if [[ -e ${data_fp}.${Z} ]]; then cp -f ${data_fp}.${Z} ./${data_file}.${Z} $UNCOMPRESS ${data_file}.${Z} @@ -77,7 +76,11 @@ function large_mv () { #--------------------------------------------------- for cycle in ges anl; do - ctl_file=${tv_tankdir}/${cycle}_${TYPE}_stas.ctl + test_dir=`$MON_USH/get_stats_path.sh --run $RUN --pdate ${PDATE} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` + + ctl_file=${test_dir}/time_vert/${cycle}_${TYPE}_stas.ctl + if [[ -e ${ctl_file}.${Z} ]]; then cp -f ${ctl_file}.${Z} tmp.ctl.${Z} ${UNCOMPRESS} tmp.ctl.${Z} @@ -109,8 +112,8 @@ function large_mv () { # copy plots scripts locally, modify, and run #--------------------------------------------------- - for script in plotstas_time_count.gs plotstas_time_bias.gs ;do - if [[ ${TYPE} = 'gps' && ${script} = 'plotstas_time_bias.gs' ]]; then + for script in plotstas_time_count.gs plotstas_time_bias.gs plotstas_time_bias2.gs ;do + if [[ ${TYPE} = 'gps' && ${script} != 'plotstas_time_count.gs' ]]; then continue fi @@ -147,6 +150,7 @@ function large_mv () { done + C_IG_SAVE_WORK=1 if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then cd ${workdir} cd .. diff --git a/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh b/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh index beb6e543..674b0f3d 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_time_ps.sh @@ -13,19 +13,16 @@ mkdir -p ${workdir} cd ${workdir} - pdy=`echo $PDATE|cut -c1-8` - cyc=`echo $PDATE|cut -c9-10` - tv_tankdir=${C_TANKDIR}/${RUN}.${pdy}/${cyc}/conmon/time_vert - export xsize=x800 export ysize=y600 - #--------------------------------------------------- - # plot surface pressure time series counts - #--------------------------------------------------- + #------------------------------------------------------- + # copy over surface pressure time-series GrADS scripts + #------------------------------------------------------- ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_count_ps.gs . ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_bias_ps.gs . + ${NCP} ${C_IG_GSCRIPTS}/plotstas_time_bias2_ps.gs . #--------------------------------------------------- # Link in the data files. @@ -37,11 +34,13 @@ while [[ $cdate -le $edate ]] ; do day=`echo $cdate | cut -c1-8 ` dcyc=`echo $cdate | cut -c9-10 ` + test_dir=`${MON_USH}/get_stats_path.sh --run ${RUN} --pdate ${cdate} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` - if [[ -d ${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon ]]; then + if [[ -d ${test_dir} ]]; then for cycle in ges anl; do - stas_file=${C_TANKDIR}/${RUN}.${day}/${dcyc}/conmon/time_vert/${cycle}_ps_stas.${cdate} + stas_file=${test_dir}/time_vert/${cycle}_ps_stas.${cdate} if [[ -e ${stas_file}.${Z} ]]; then ${UNCOMPRESS} ${stas_file}.${Z} fi @@ -59,9 +58,13 @@ #--------------------------------------------------- # Copy over the ctl files, modify dset and tset #--------------------------------------------------- + test_dir=`${MON_USH}/get_stats_path.sh --run ${RUN} --pdate ${PDATE} \ + --net ${CONMON_SUFFIX} --tank ${TANKDIR} --mon conmon` + for cycle in ges anl; do - ctl_file=${tv_tankdir}/${cycle}_ps_stas.ctl + ctl_file=${test_dir}/time_vert/${cycle}_ps_stas.ctl + if [[ -e ${ctl_file}.${Z} ]]; then cp -f ${ctl_file}.${Z} tmp.ctl.${Z} ${UNCOMPRESS} tmp.ctl.${Z} @@ -71,7 +74,6 @@ new_dset=" dset ${cycle}_ps_stas.%y4%m2%d2%h2" tdef=`${C_IG_SCRIPTS}/make_tdef.sh ${START_DATE} ${NUM_CYCLES} 06` - echo "tdef = $tdef" sed -e "s/^dset*/${new_dset}/" tmp.ctl >tmp2.ctl sed -e "s/^tdef.*/${tdef}/" tmp2.ctl >${cycle}_ps_stas.ctl @@ -82,7 +84,7 @@ #------------------------------------------ # ensure the imgn destination dir exists #------------------------------------------ - outdir=${C_IMGNDIR}/pngs/time/${cyc} + outdir=${C_IMGNDIR}/pngs/time if [[ ! -d ${outdir} ]]; then mkdir -p ${outdir} fi @@ -92,23 +94,15 @@ #------------------------- grads -bpc "run ./plotstas_time_count_ps.gs" - grads -bpc "run ./plotstas_time_bias_ps.gs" - -# grads -bpc "run ./plotstas_time_bias2_ps.gs" + grads -bpc "run ./plotstas_time_bias2_ps.gs" img_files=`ls *.png` for imgf in ${img_files}; do newf=`echo ${imgf} | sed -e "s/\./.${PDATE}./g"` - cp ${imgf} ${newf} - mv ${newf} ${C_IMGNDIR}/pngs/time/. + mv ${imgf} ${outdir}/${newf} done - mv -f *.png ${outdir}/. - - - - if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then cd ${workdir} cd .. diff --git a/src/Conventional_Monitor/image_gen/ush/plot_vert.sh b/src/Conventional_Monitor/image_gen/ush/plot_vert.sh index fb942bb8..becf915b 100755 --- a/src/Conventional_Monitor/image_gen/ush/plot_vert.sh +++ b/src/Conventional_Monitor/image_gen/ush/plot_vert.sh @@ -70,7 +70,6 @@ num_cycles=${NUM_CYCLES} tdef=`${C_IG_SCRIPTS}/make_tdef.sh ${START_DATE} ${num_cycles} 06` - echo "tdef = $tdef" sed -e "s/^dset*/${new_dset}/" tmp.ctl >tmp2.ctl sed -e "s/^tdef.*/${tdef}/" tmp2.ctl >${cycle}_${TYPE}_stas.ctl @@ -81,7 +80,7 @@ #------------------------------------------ # ensure the imgn destination dir exists #------------------------------------------ - outdir=${C_IMGNDIR}/pngs/vert/${cyc} + outdir=${C_IMGNDIR}/pngs/vert if [[ ! -d ${outdir} ]]; then mkdir -p ${outdir} fi @@ -125,14 +124,12 @@ done img_files=`ls *vert*.png` - for imgf in $img_files; do + for imgf in ${img_files}; do newf=`echo $imgf | sed -e "s/\./.${PDATE}./g"` - cp $imgf $newf - mv $newf ${C_IMGNDIR}/pngs/vert/. + mv ${imgf} ${outdir}/${newf} + done - mv -f *.png ${outdir}/. - if [[ ${C_IG_SAVE_WORK} -eq 0 ]]; then cd ${workdir} cd .. diff --git a/src/Conventional_Monitor/image_gen/ush/rm_img_files.pl b/src/Conventional_Monitor/image_gen/ush/rm_img_files.pl index e7973655..58cb18ae 100755 --- a/src/Conventional_Monitor/image_gen/ush/rm_img_files.pl +++ b/src/Conventional_Monitor/image_gen/ush/rm_img_files.pl @@ -22,7 +22,7 @@ # Main begins here #-------------------- -print "--> rm_img_files.pl"; +print "--> rm_img_files.pl\n"; #-------------------------------- # load command line argument(s) @@ -70,13 +70,7 @@ my $ii = $nfl; my $end = $#unique; - foreach my $time ( @unique ) { -# print "$time\n"; - } - - print " ii, end = $ii, $end\n"; do { -# print "RM $ii, $unique[$ii]\n"; push( @del_list, $unique[$ii] ); $ii++; } while $ii <= $end; @@ -99,4 +93,4 @@ } } -print "<-- rm_img_files.pl"; +print "<-- rm_img_files.pl\n"; diff --git a/src/Conventional_Monitor/parm/ConMon_config b/src/Conventional_Monitor/parm/ConMon_config index 2ff67829..25954a25 100644 --- a/src/Conventional_Monitor/parm/ConMon_config +++ b/src/Conventional_Monitor/parm/ConMon_config @@ -81,8 +81,8 @@ export STNMAP=`which stnmap` # export MY_CONMON=${MY_GSI_MONITOR}/src/Conventional_Monitor -export C_STMP_USER=${C_STMP_USER:-${MON_STMP}/${LOGNAME}} -export C_PTMP_USER=${C_PTMP_USER:-${MON_PTMP}/${LOGNAME}} +export C_STMP_USER=${C_STMP_USER:-${MON_STMP}} +export C_PTMP_USER=${C_PTMP_USER:-${MON_PTMP}} export C_LOGDIR=${MON_LOGDIR}/${CONMON_SUFFIX}/${RUN}/conmon export CONMON_IMAGE_GEN=${CONMON_IMAGE_GEN:-${MY_CONMON}/image_gen}