diff --git a/util/Minimization_Monitor/MinMon_install.pl b/util/Minimization_Monitor/MinMon_install.pl index d4d35597b9..10ee6b200d 100755 --- a/util/Minimization_Monitor/MinMon_install.pl +++ b/util/Minimization_Monitor/MinMon_install.pl @@ -5,8 +5,8 @@ # # This script makes sets all configuration definitions # and calls the makeall.sh script to build all the necessary -# executables. This script works for wcoss, wcoss_d, cray, and -# hera. +# executables. This script works for wcoss, wcoss_d, cray, hera, +# and wcoss2. # #------------------------------------------------------------------- @@ -16,7 +16,7 @@ my $machine = `/usr/bin/perl get_hostname.pl`; my $my_machine="export MY_MACHINE=$machine"; - if( $machine ne "hera" && $machine ne "wcoss" && + if( $machine ne "hera" && $machine ne "wcoss" && $machine ne "wcoss2" && $machine ne "wcoss_d" && $machine ne "cray" ) { die( "ERROR --- Unrecognized machine hostname, $machine. Exiting now...\n" ); } @@ -61,6 +61,9 @@ 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"; + } else { $tankdir = "/global/save/$user_name/nbns"; } @@ -148,6 +151,10 @@ $my_ptmp="export MY_PTMP=\${MY_PTMP:-/gpfs/dell2/ptmp/$user_name}"; $my_stmp="export MY_STMP=\${MY_STMP:-/gpfs/dell2/stmp/$user_name}"; } + elsif( $machine eq "wcoss2" ) { + $my_ptmp="export MY_PTMP=\${MY_PTMP:-/lfs/h2/emc/ptmp/$user_name}"; + $my_stmp="export MY_STMP=\${MY_STMP:-/lfs/h2/emc/stmp/$user_name}"; + } elsif( $machine eq "hera" ) { $ptmp = "/scratch2/NCEPDEV/stmp3/${user_name}"; print "Please specify PTMP location. This is used for temporary work space.\n"; @@ -185,8 +192,6 @@ print "\n\n"; sleep( 1 ); -# $my_ptmp="export MY_PTMP=\${MY_PTMP:-/scratch2/NCEPDEV/stmp3/${user_name}}"; -# $my_stmp="export MY_STMP=\${MY_STMP:-/scratch2/NCEPDEV/stmp1/${user_name}}"; } # @@ -232,7 +237,7 @@ # # Web directory # - my $webdir = "/home/people/emc/www/htdocs/gmb/gdas/radiance/${webuser}/gsi_stat/pngs"; + my $webdir = "/home/people/emc/www/htdocs/gmb/gdas/gsi_stat/pngs"; 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"; @@ -306,7 +311,13 @@ # # project definition # - my $project = "GDAS-T2O"; + my $project = "GDAS-DEV"; + if( $machine eq "wcoss_d" ) { + $project = "GFS-DEV"; + } elsif( $machine eq "cray" ){ + $project = "GDAS-T2O" + } + my $my_project = ""; if( $machine eq "hera" ) { @@ -333,6 +344,9 @@ # job queue definition # my $job_queue = "dev_shared"; + if( $machine eq "wcoss2" ) { + $job_queue = "dev"; + } my $my_job_queue = ""; if( $machine eq "hera" ) { @@ -348,6 +362,7 @@ if( length($new_queue ) > 0 ) { $job_queue = $new_queue; } + $my_job_queue="export JOB_QUEUE=\${JOB_QUEUE:-$job_queue}"; print "my_job_queue = $my_job_queue\n"; print "\n\n"; @@ -369,7 +384,7 @@ elsif( $_ =~ "export PROJECT" ){ print $out "$my_project\n"; } - elsif( $line =~ "export JOB_QUEUE" ){ + elsif( $_ =~ "export JOB_QUEUE" ){ print $out "$my_job_queue\n"; } else { diff --git a/util/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh b/util/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh new file mode 100755 index 0000000000..ef048e451b --- /dev/null +++ b/util/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh @@ -0,0 +1,128 @@ +#!/bin/bash + +# MinMon data copy script + +#-------------------------------------------------------------------- +# usage +#-------------------------------------------------------------------- +function usage { + echo "Usage: MinMon_CP.sh suffix [-p|--pdate pdate -r|--run gdas|gfs]" + echo " Suffix is the indentifier for this data source." + echo " -p | --pdate yyyymmddcc to specify the cycle to be processed" + echo " if unspecified the last available date will be processed" + echo " -r | --run the gdas|gfs run to be processed" + echo " use only if data in TANKdir stores both runs" + echo " -d | --data base location of minmon data without any" + echo " date-dependent subdirectories" + echo " " +} + +#-------------------------------------------------------------------- +# MinMon_DE.sh begins here +#-------------------------------------------------------------------- + +set -x + +nargs=$# +if [[ $nargs -lt 1 || $nargs -gt 7 ]]; then + usage + exit 1 +fi + +#----------------------------------------------- +# Process command line arguments +# +while [[ $# -ge 1 ]] +do + key="$1" + echo $key + + case $key in + -p|--pdate) + pdate="$2" + shift # past argument + ;; + -r|--run) + run="$2" + shift # past argument + ;; + -d|--data) # base location of minmon data + data="$2" + shift # past argument + ;; + *) + #any unspecified key is MINMON_SUFFIX + export MINMON_SUFFIX=$key + ;; + esac + + shift +done + +if [[ $data = "" ]]; then + data=/gpfs/dell1/nco/ops/com/gfs/prod +fi + +if [[ $run = "" ]]; then + run=gdas +fi + +#----------------------------------- +# source config and settings files +# +this_dir=`dirname $0` +top_parm=${this_dir}/../../parm + +minmon_config=${minmon_config:-${top_parm}/MinMon_config} +if [[ ! -e ${minmon_config} ]]; then + echo "Unable to locate ${minmon_config} file" + exit 3 +fi + +. ${minmon_config} +if [[ $? -ne 0 ]]; then + echo "Error detected while sourcing ${minmon_config} file" + exit $? +fi + + +minmon_user_settings=${minmon_user_settings:-${top_parm}/MinMon_user_settings} +if [[ ! -e ${minmon_user_settings} ]]; then + echo "Unable to locate ${minmon_user_settings} file" + exit 4 +fi + +. ${minmon_user_settings} +if [[ $? -ne 0 ]]; then + echo "Error detected while sourcing ${minmon_user_settings} file" + exit $? +fi + + +tank=${M_TANKverf}/stats/${MINMON_SUFFIX} + +echo NDATE = $NDATE +if [[ $pdate = "" ]]; then + ldate=`${this_dir}/find_cycle.pl --cyc 1 --dir ${tank} --run ${run}` + echo ldate = $ldate + pdate=`${NDATE} +06 $ldate` +fi + +echo pdate = $pdate + +pdy=`echo $pdate|cut -c1-8` +cyc=`echo $pdate|cut -c9-10` + +data_loc=${data}/${run}.${pdy}/${cyc}/atmos/minmon +tank=${tank}/${run}.${pdy}/${cyc}/minmon +mkdir -p ${tank} + +if [[ ! -d ${data_loc} ]]; then + echo "Unable to copy, ${data_loc} not found" + exit 5 +fi + +cp ${data_loc}/*${pdate}* ${tank}/. +cp ${data_loc}/gnorm_data.txt ${tank}/. + + diff --git a/util/Minimization_Monitor/data_xtrct/ush/MinMon_DE.sh b/util/Minimization_Monitor/data_xtrct/ush/MinMon_DE.sh index fbf82bc5bb..51b3d3885e 100755 --- a/util/Minimization_Monitor/data_xtrct/ush/MinMon_DE.sh +++ b/util/Minimization_Monitor/data_xtrct/ush/MinMon_DE.sh @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/bin/bash # MinMon data extraction script @@ -12,6 +12,8 @@ function usage { echo " if unspecified the last available date will be processed" echo " -r | --run the gdas|gfs run to be processed" echo " use only if data in TANKdir stores both runs" + echo " -c | --comin the base directory to the gsistat files" + echo " This does not include any date-derived subdirectories." echo " " } @@ -22,7 +24,7 @@ function usage { set -x nargs=$# -if [[ $nargs -lt 1 || $nargs -gt 5 ]]; then +if [[ $nargs -lt 1 || $nargs -gt 7 ]]; then usage exit 1 fi @@ -31,7 +33,6 @@ fi #----------------------------------------------- # Process command line arguments # -RUN=gdas while [[ $# -ge 1 ]] do @@ -47,6 +48,10 @@ do RUN="$2" shift # past argument ;; + -c|--comin) # comin is base location of dir with gsistat files + COMIN="$2" + shift # past argument + ;; *) #any unspecified key is MINMON_SUFFIX export MINMON_SUFFIX=$key @@ -56,62 +61,52 @@ do shift done +#---------------------------- +# set defaults for arguments +# +if [[ $RUN = "" ]]; then + RUN=gdas +fi export RUN=$RUN -this_dir=`dirname $0` - - -if [[ $COMOUT = "" ]]; then - export RUN_ENVIR="dev" -else - export RUN_ENVIR="para" +if [[ $COMIN = "" ]]; then + COMIN=/gpfs/dell1/nco/ops/com/gfs/prod fi echo MINMON_SUFFIX = $MINMON_SUFFIX -echo RUN_ENVIR = $RUN_ENVIR +echo RUN = $RUN +echo COMIN = $COMIN -top_parm=${this_dir}/../../parm -minmon_version_file=${minmon_version:-${top_parm}/MinMon.ver} -if [[ -s ${minmon_version_file} ]]; then - . ${minmon_version_file} - echo "able to source ${minmon_version_file}" -else - echo "Unable to source ${minmon_version_file} file" - exit 2 -fi +#----------------------------------- +# source config and settings files +# +this_dir=`dirname $0` +top_parm=${this_dir}/../../parm -echo "MINMON_CONFIG = $MINMON_CONFIG" minmon_config=${minmon_config:-${top_parm}/MinMon_config} -if [[ -s ${minmon_config} ]]; then - . ${minmon_config} - echo "able to source ${minmon_config}" -else - echo "Unable to source ${minmon_config} file" +if [[ ! -e ${minmon_config} ]]; then + echo "Unable to locate ${minmon_config} file" exit 3 fi +. ${minmon_config} +if [[ $? -ne 0 ]]; then + echo "Error detected while sourcing ${minmon_config} file" + exit $? +fi + minmon_user_settings=${minmon_user_settings:-${top_parm}/MinMon_user_settings} -if [[ -s ${minmon_user_settings} ]]; then - . ${minmon_user_settings} - echo "able to source ${minmon_user_settings}" -else - echo "Unable to source ${minmon_user_settings} file" +if [[ ! -e ${minmon_user_settings} ]]; then + echo "Unable to locate ${minmon_user_settings} file" exit 4 fi - -#-------------------------------------------------------------------- -# Check setting of RUN_ONLY_ON_DEV and possible abort if on prod and -# not permitted to run there. -#-------------------------------------------------------------------- - -if [[ RUN_ONLY_ON_DEV -eq 1 ]]; then - is_prod=`${M_DE_SCRIPTS}/onprod.sh` - if [[ $is_prod = 1 ]]; then - exit 10 - fi +. ${minmon_user_settings} +if [[ $? -ne 0 ]]; then + echo "Error detected while sourcing ${minmon_user_settings} file" + exit $? fi @@ -119,29 +114,20 @@ if [[ ${RUN} = "gdas" ]]; then export HOMEgfs=${HOMEgdas} fi -########################################## -# expand M_TANKverf for this MINMON_SUFFIX -########################################## NEWtank=${M_TANKverf}/stats/${MINMON_SUFFIX} if [[ $GLB_AREA -eq 0 ]]; then NEWtank=${M_TANKverf}/stats/regional/${MINMON_SUFFIX} fi -export M_TANKverf=$NEWtank -echo "M_TANKverf = $M_TANKverf" - - -############################################################## +#--------------------------------------------------------- # Determine next cycle -# If PDATE wasn't an argument then call find_cycle.pl -# to determine the last processed cycle, and set PDATE to -# the next cycle +# If PDATE wasn't supplied as an argument then call +# find_cycle.pl to determine the last processed cycle, +# and set PDATE to the next cycle # -# NOTE: Need to make gdas the default value to $run -############################################################## if [[ ${#PDATE} -le 0 ]]; then echo "PDATE not specified: setting PDATE using last cycle" - date=`${M_DE_SCRIPTS}/find_cycle.pl --run gdas --cyc 1 --dir ${M_TANKverf}` + date=`${M_DE_SCRIPTS}/find_cycle.pl --run $RUN --cyc 1 --dir ${NEWtank}` export PDATE=`$NDATE +6 $date` else echo "PDATE was specified: $PDATE" @@ -149,7 +135,36 @@ fi export PDY=`echo $PDATE|cut -c1-8` export cyc=`echo $PDATE|cut -c9-10` -echo "PDY, cyc = $PDY, $cyc " + +prev_cycle=`$NDATE -6 $PDATE` +p_pdy=`echo $prev_cycle|cut -c1-8` +p_cyc=`echo $prev_cycle|cut -c9-10` + +#-------------------------------- +# expand M_TANKverf and define +# M_TANKverfM1 (previous cycle) +# +export M_TANKverf=${NEWtank}/${RUN}.${PDY}/${cyc}/minmon +export M_TANKverfM1=${NEWtank}/${RUN}.${p_pdy}/${p_cyc}/minmon + +#----------------------------------------- +# Expand COMIN with date specific subdirs +# +comin_base=${COMIN} +COMIN=${comin_base}/${RUN}.${PDY}/${cyc}/atmos +if [[ ! -d $COMIN ]]; then + COMIN=${comin_base}/${RUN}.${PDY}/${cyc} + if [[ ! -d $COMIN ]]; then + COMIN=${comin_base}/${RUN}.${PDY} + fi +fi +export COMIN=$COMIN + +export gsistat=${COMIN}/${RUN}.t${cyc}z.gsistat +if [[ ! -e $gsistat ]]; then + echo "Unable to locate $gsistat, exiting MinMon_DE.sh" + exit 5 +fi if [[ ! -d ${LOGdir} ]]; then @@ -157,53 +172,51 @@ if [[ ! -d ${LOGdir} ]]; then fi lfile=${LOGdir}/DE.${PDY}.${cyc} -export pid=${pid:-$$} -export jlogfile=${lfile}.o${pid} -export m_jlogfile="${lfile}.log" -echo "m_jlogfile = $m_jlogfile" - -############################################################# +export logfile="${lfile}.log" +echo "logfile = $logfile" +if [[ -e $logfile ]]; then + rm -f $logfile +fi export job=${job:-DE.${RUN}} -export jobid=${jobid:-${job}.${PDY}.${pid}} -export envir=prod export DATAROOT=${DATA_IN:-${WORKDIR}} export COMROOT=${COMROOT:-/com2} - -echo "MY_MACHINE = $MY_MACHINE" - +export jobid=${jobid:-${job}.${PDY}.${pid}} jobname=minmon_de_${MINMON_SUFFIX} -rm -f $m_jlogfile +if [[ $RUN = "gfs" ]]; then + jobfile=${jobfile:-${HOMEgfs}/jobs/JGFS_ATMOS_VMINMON} +else + jobfile=${jobfile:-${HOMEgdas}/jobs/JGDAS_ATMOS_VMINMON} +fi +echo "MY_MACHINE = $MY_MACHINE" echo "SUB = $SUB" echo "JOB_QUEUE = $JOB_QUEUE" echo "PROJECT = $PROJECT" echo "jobname = $jobname" +echo "jobfile = $jobfile" -if [[ $GLB_AREA -eq 0 ]]; then - jobfile=${jobfile:-${HOMEnam}/jobs/JNAM_VMINMON} -else - if [[ $RUN = "gfs" ]]; then - jobfile=${jobfile:-${HOMEgfs}/jobs/JGFS_VMINMON} - else - jobfile=${jobfile:-${HOMEgdas}/jobs/JGDAS_VMINMON} - fi -fi -if [[ $MY_MACHINE = "wcoss" || $MY_MACHINE = "wcoss_d" ]]; then - $SUB -P $PROJECT -q $JOB_QUEUE -o ${m_jlogfile} -M 50 -R affinity[core] -W 0:10 -J ${jobname} $jobfile +if [[ $MY_MACHINE = "wcoss_d" ]]; then + $SUB -P $PROJECT -q $JOB_QUEUE -o ${logfile} -M 50 \ + -R affinity[core] -W 0:10 -J ${jobname} $jobfile elif [[ $MY_MACHINE = "cray" ]]; then - $SUB -q $JOB_QUEUE -P $PROJECT -o ${m_jlogfile} -M 80 -R "select[mem>80] rusage[mem=80]" -W 0:10 -J ${jobname} $jobfile + $SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} -M 80 \ + -R "select[mem>80] rusage[mem=80]" -W 0:10 -J ${jobname} $jobfile elif [[ $MY_MACHINE = "hera" ]]; then $SUB --account=${ACCOUNT} --time=05 -J ${job} -D . \ - -o ${LOGdir}/DE.${PDY}.${cyc}.log \ + -o ${logfile} \ --ntasks=1 --mem=5g \ ${jobfile} +elif [[ $MY_MACHINE = "wcoss2" ]]; then + $SUB -e ${logfile} -N gdas_vminmon -q ${JOB_QUEUE} -V \ + -l select=1:mem=400M -l walltime=05:00 -A GFS-DEV \ + ${jobfile} fi diff --git a/util/Minimization_Monitor/data_xtrct/ush/RunMM_DE.sh b/util/Minimization_Monitor/data_xtrct/ush/RunMM_DE.sh deleted file mode 100755 index f043214cd4..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/RunMM_DE.sh +++ /dev/null @@ -1,209 +0,0 @@ -#!/bin/sh - -#-------------------------------------------------------------------- -# RunMM_DE.sh -# -# Run the MinMon_DE script in a loop from start to end date or -# from start to end of available data. -# -# This script will run the MinMOn data extraction for a given source -# in a loop. The loop can be: -# 1) from the last proceessed date until the available gsistat -# data is exhausted, -# 2) from the input start date until available data is exhausted, -# 3) from the start to the stop date. -# -# -# NOTE: for the moment the script only runs as 3) above. Start and -# end dates must both be specified. -#-------------------------------------------------------------------- - -function usage { - echo "Usage: RunMM_DE.sh suffix [start_date] [end_date]" - echo " File name for RunCopy.sh can be full or relative path" - echo " Suffix is the indentifier for this data source." - echo " Start_date is the optional starting cycle to process (YYYYMMDDHH format)." - echo " End_date is the optional ending cycle to process (YYYYMMDDHH format)." -} - -set -ax -echo start RunMM_DE.sh - - -nargs=$# -if [[ $nargs -lt 3 ]]; then - usage - exit 1 -fi - -this_file=`basename $0` -this_dir=`dirname $0` - -SUFFIX=$1 -START_DATE=$2 -END_DATE=$3 - -echo SUFFIX = $SUFFIX -echo START_DATE = $START_DATE -echo END_DATE = $END_DATE - -#-------------------------------------------------------------------- -# Set environment variables -#-------------------------------------------------------------------- -top_parm=${this_dir}/../../parm -export MINMON_VERSION=${MINMON_VERSION:-${top_parm}/MinMon.ver} -if [[ -s ${MINMON_VERSION} ]]; then - echo "sourcing $MINMON_VERSION" - . ${MINMON_VERSION} -else - echo "Unable to source ${MINMON_VERSION} file" - exit 2 -fi - -export MINMON_CONFIG=${MINMON_CONFIG:-${top_parm}/MinMon_config} -if [[ -s ${MINMON_CONFIG} ]]; then - echo "sourcing $MINMON_CONFIG" - . ${MINMON_CONFIG} -else - echo "Unable to source ${MINMON_CONFIG} file" - exit 3 -fi - -export MINMON_USER_SETTINGS=${MINMON_USER_SETTINGS:-${top_parm}/MinMon_user_settings} -if [[ -s ${MINMON_USER_SETTINGS} ]]; then - echo "sourcing $MINMON_USER_SETTINGS" - . ${MINMON_USER_SETTINGS} -else - echo "Unable to source ${MINMON_USER_SETTINGS} file" - exit 4 -fi - -#-------------------------------------------------------------------- -# Check setting of RUN_ONLY_ON_DEV and possible abort if on prod and -# not permitted to run there. -#-------------------------------------------------------------------- - -if [[ RUN_ONLY_ON_DEV -eq 1 ]]; then - is_prod=`${M_DE_SCRIPTS}/onprod.sh` - if [[ $is_prod = 1 ]]; then - exit 10 - fi -fi - - -#----------------------------------------------------------------------------- -# If start and end dates were specified, confirm the start is before end date. -# NOTE: Start date = end date will result in one cycle (start date) running. -#----------------------------------------------------------------------------- -start_len=`echo ${#START_DATE}` -end_len=`echo ${#END_DATE}` -echo "start, end len = $start_len, $end_len" - -if [[ ${start_len} -gt 0 && ${end_len} -gt 0 ]]; then - if [[ $START_DATE -gt $END_DATE ]]; then - echo ERROR -- start date is greater then end date : $START_DATE $END_DATE - exit 11 - fi -fi - - -#-------------------------------------------------------------------- -# If we have a START_DATE then use it, otherwise use the last entry -# in a ${SUFFIX}_minmon.YYYYMMDD/${SUFFIX}.gnorm_data.txt file to -# determine the last date processed. -#-------------------------------------------------------------------- -start_len=`echo ${#START_DATE}` -verf_dir="${TANKverf}/stats/${SUFFIX}" - -if [[ ${start_len} -le 0 ]]; then - pdate=`${M_DE_SCRIPTS}/find_cycle.pl --run gdas --cyc 1 --dir ${verf_dir}` - pdate_len=`echo ${#pdate}` - if [[ ${pdate_len} -ne 10 ]]; then - exit 12 - fi - START_DATE=`${NDATE} +06 $pdate` -fi - -cdate=$START_DATE -echo "start date = $START_DATE" - -mkdir -p $LOGdir -##-------------------------------------------------------------------- -## Run in a loop until END_DATE is processed, or an error occurs, or -## we run out of data. -##-------------------------------------------------------------------- -done=0 -ctr=0 -while [[ $done -eq 0 ]]; do - - #-------------------------------------------------------------------- - # Check for running jobs - #-------------------------------------------------------------------- - if [[ $MY_MACHINE = "wcoss" || $MY_MACHINE = "wcoss_d" ]]; then - running=`bjobs -l | grep minmon_de_${SUFFIX} | wc -l` - elif [[ $MY_MACHINE = "hera" ]]; then - running=`qstat -u $LOGNAME | grep minmon_de_${SUFFIX} | wc -l` - fi - - if [[ $running -ne 0 ]]; then - #---------------------------------------------------- - # sleep or time-out after 30 tries. - #---------------------------------------------------- - ctr=$(( $ctr + 1 )) - if [[ $ctr -le 30 ]]; then - echo sleeping..... - sleep 60 - else - done=1 - fi - else - - #----------------------------------------------------------------- - # Run the MinMon_DE.sh script - #----------------------------------------------------------------- - log_file=${LOGdir}/MinMon_DE_${SUFFIX}_${cdate}.log - err_file=${LOGdir}/MinMon_DE_${SUFFIX}_${cdate}.err - - echo Processing ${cdate} - # need a switch for glb and rgn - ${M_DE_SCRIPTS}/MinMon_DE.sh ${SUFFIX} dev ${cdate} 1>${log_file} 2>${err_file} - - #----------------------------------------------------------------- - # done is true (1) if the copy_script produced an error code, or - # we're at END_DATE - # - # NOTE: gonna have to do some work to get the correct $rc; this - # job gets submitted to the queue so I'm going to have to dig - # through the log file to find the RC. Alternately, if no END - # is specified, I could calculate that up front. - #----------------------------------------------------------------- -# sleep 60 -# PDY=`echo $cdate|cut -c1-8` -# cyc=`echo $cdate|cut -c9-10` -# logfile="${m_jlogfile}${SUFFIX}.${PDY}.${cyc}.log" -# rc=`grep "exit value" ${logfile} | tail -1 | gawk '{split($0,a," "); print a[6]}'` -# rc_len=`echo ${#rc}` - -# echo "rc = $rc" - -# if [[ $rc -ne 0 ]]; then -# done=1 - if [[ $cdate -eq $END_DATE ]]; then -# elif [[ $cdate -eq $END_DATE ]]; then - done=1 -# elif [[ $rc_len -eq 0 ]]; then -# done=1 - else - #-------------------------------------------------------------- - # If not done advance the cdate to the next cycle - #-------------------------------------------------------------- - cdate=`${NDATE} +06 $cdate` - ctr=0 - fi - fi - -done - - -echo "end RunMM_DE.sh" -exit diff --git a/util/Minimization_Monitor/data_xtrct/ush/find_cycle.pl b/util/Minimization_Monitor/data_xtrct/ush/find_cycle.pl index 46ace9315e..f146f1dbe9 100755 --- a/util/Minimization_Monitor/data_xtrct/ush/find_cycle.pl +++ b/util/Minimization_Monitor/data_xtrct/ush/find_cycle.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl #----------------------------------------------------------------------- # find_cycle.pl @@ -148,8 +148,9 @@ $hr_ctr = $hr_ctr - 1; $newdir = "${dirpath}/${sortmm[$ctr]}/${hrs[$hr_ctr]}/${lcm}"; -# print " newdir = $newdir \n"; - + if( ! -d $newdir ){ + $newdir = "${dirpath}/${sortmm[$ctr]}"; + } if( -d $newdir ) { opendir DIR, $newdir or die "Cannot open the current directory: $!"; @@ -197,13 +198,10 @@ } while $hr_ctr > 0 && $found_cycle == 0; -# print " found_cycle, ctr, end_ctr = $found_cycle, $ctr, $end_ctr \n"; if( $cyc == 0 && $ctr >= $end_ctr ){ -# print " exiting from if\n"; $exit_flag = 1; } elsif( $cyc == 1 && $ctr <= $end_ctr ){ -# print " exiting from elsif\n"; $exit_flag = 1; } diff --git a/util/Minimization_Monitor/data_xtrct/ush/onprod.sh b/util/Minimization_Monitor/data_xtrct/ush/onprod.sh deleted file mode 100755 index b709651389..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/onprod.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# -# Check to determine if this maching is currently -# the production machine. -# -# Return values: -# 1 = prod -# 0 = dev -# - iamprod=0 - machine=`hostname | cut -c1` - if [[ -e /etc/prod ]]; then - prod=`cat /etc/prod | cut -c1` - - if [[ $machine = $prod ]]; then - iamprod=1 - fi - fi - - echo $iamprod - exit diff --git a/util/Minimization_Monitor/data_xtrct/ush/run_cp_v16rt1.sh b/util/Minimization_Monitor/data_xtrct/ush/run_cp_v16rt1.sh deleted file mode 100755 index ca5b2e0d72..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/run_cp_v16rt1.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -#package=MinMon -package=ProdGSI/util/Minimization_Monitor - -net=v16rt1 -run=gdas - -echo "user = $USER" - -export KEEPDATA=YES -export DO_ERROR_RPT=1 -export MAIL_TO="" -export MAIL_CC="" - -scripts=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/data_xtrct/ush -echo "scripts = $scripts" - -shell=bash -source /usrx/local/prod/lmod/lmod/init/${shell} - -MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core:/usrx/local/prod/modulefiles/core_third:/usrx/local/prod/modulefiles/defs:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod:/usrx/local/dev/modulefiles - -module purge -module load ips/18.0.1.163 -module load metplus/2.1 -module load prod_util/1.1.2 - -echo NDATE = $NDATE - - - -tank=~/nbns/stats/${net} - -ldate=`${scripts}/find_cycle.pl --cyc 1 --dir ${tank} --run ${run}` -echo ldate = $ldate -pdate=`${NDATE} +06 $ldate` -#pdate=2019070100 - -echo pdate = $pdate - -pdy=`echo $pdate|cut -c1-8` -cyc=`echo $pdate|cut -c9-10` - -data_loc=/gpfs/dell2/emc/modeling/noscrub/emc.glopara/monitor/minmon/stats/${net}/${run}.${pdy} -#echo data_loc = $data_loc - -tank=${tank}/${run}.${pdy}/${cyc}/minmon -mkdir -p ${tank} - -cp ${data_loc}/*${pdate}* ${tank}/. -cp ${data_loc}/gnorm_data.txt ${tank}/. - - diff --git a/util/Minimization_Monitor/data_xtrct/ush/run_gdas_DE.sh b/util/Minimization_Monitor/data_xtrct/ush/run_gdas_DE.sh deleted file mode 100755 index faf309c805..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/run_gdas_DE.sh +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh - -ch=`hostname | cut -c1` - -#package=MinMon -package=ProdGSI/util/Minimization_Monitor - -suffix=GFS -net=gfs -export RUN=gdas - -scripts=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/data_xtrct/ush -export jobfile=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/nwprod/gdas.v1.0.0/jobs/JGDAS_VMINMON - - -NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.0/exec/ips/ndate - -tank=~/nbns/stats/${suffix} -ldate=`${scripts}/find_cycle.pl ${suffix} --cyc 1 --dir ${tank} --run ${RUN}` - -export PDATE=`${NDATE} +06 $ldate` -#export PDATE=2019083018 - -export PDY=`echo $PDATE|cut -c1-8` -export cyc=`echo $PDATE|cut -c9-10` - - -export COMIN=/gpfs/dell1/nco/ops/com/${net}/prod/${RUN}.${PDY}/${cyc} -export gsistat=${COMIN}/${RUN}.t${cyc}z.gsistat - -tank=~/nbns/stats/${suffix} -logdir=/gpfs/dell2/ptmp/Edward.Safford/logs/${suffix}/${RUN}/minmon - -echo PDATE = $PDATE -echo gsistat = $gsistat - -${scripts}/MinMon_DE.sh ${suffix} --pdate ${PDATE} --run ${RUN} 1>$logdir/MinMon_DE.log 2>$logdir/MinMon_DE.err diff --git a/util/Minimization_Monitor/data_xtrct/ush/run_gfs_DE.sh b/util/Minimization_Monitor/data_xtrct/ush/run_gfs_DE.sh deleted file mode 100755 index dfe7fb6ea3..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/run_gfs_DE.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh - - -#package=MinMon -package=ProdGSI/util/Minimization_Monitor - -suffix=GFS -net=gfs -export RUN=gfs - -scripts=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/data_xtrct/ush -export jobfile=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/nwprod/gfs.v1.0.0/jobs/JGFS_VMINMON - - -NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.0/exec/ips/ndate - -tank=~/nbns/stats/${suffix} -ldate=`${scripts}/find_cycle.pl ${suffix} --cyc 1 --dir ${tank} --run ${RUN}` - -export PDATE=`${NDATE} +06 $ldate` -#export PDATE=2019083018 - -export PDY=`echo $PDATE|cut -c1-8` -export cyc=`echo $PDATE|cut -c9-10` - - -export COMIN=/gpfs/dell1/nco/ops/com/${net}/prod/${RUN}.${PDY}/${cyc} -export gsistat=${COMIN}/${RUN}.t${cyc}z.gsistat - -tank=~/nbns/stats/${suffix} -logdir=/gpfs/dell2/ptmp/Edward.Safford/logs/${suffix}/${RUN}/minmon - -echo PDATE = $PDATE -echo gsistat = $gsistat - -${scripts}/MinMon_DE.sh ${suffix} --pdate ${PDATE} --run ${RUN} 1>$logdir/MinMon_DE.log 2>$logdir/MinMon_DE.err diff --git a/util/Minimization_Monitor/data_xtrct/ush/run_script.sh b/util/Minimization_Monitor/data_xtrct/ush/run_script.sh deleted file mode 100755 index b794b57976..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/run_script.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/ksh - -#---------------------------------------------------------------------- -# -# This is a generic data extraction leader script. -# -# The MinMon_DE.sh script may be called directly, or this script, -# which calls MinMon_DE.sh can be used to overwrite specific -# values in MinMon_DE.sh and/or parm files. -# -# Set MINMON_SUFFIX, RUN to match your data source and run -# value. -# -# COMIN is the location of the gsistat file repository, which -# contains the specific $RUN.$PDATE subdirectories. -# -# Use pdate to run a specific cycle. If commented out then the -# M_TANKverf directory will be examined and the pdate will -# be the last cycle run + 6 hrs. -# -#---------------------------------------------------------------------- - -MINMON_SUFFIX=testmm -RUN=gfs -COMIN=/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_data - -#pdate=2016030700 - - -#---------------------------------------------------------------------- -# No changes should be necessary below this point. -#---------------------------------------------------------------------- - -. ../../parm/MinMon.ver -. ../../parm/MinMon_config - -if [[ $RUN == "gfs" ]]; then - export jobfile=${HOMEgfs}/jobs/JGFS_VMINMON -else - export jobfile=${HOMEgdas}/jobs/JGDAS_VMINMON -fi - -echo NDATE = $NDATE - -echo "LOGdir = ${LOGdir}" -if [[ ! -e ${LOGdir} ]]; then - mkdir -p ${LOGdir} -fi - -if [[ $pdate == "" ]]; then - ldate=`${M_DE_SCRIPTS}/find_cycle.pl --dir ${M_TANKverf}/stats/${MINMON_SUFFIX} --cyc 1 --run ${RUN}` - pdate=`${NDATE} +06 $ldate` -fi - -pdy=`echo $pdate|cut -c1-8` -cyc=`echo $pdate|cut -c9-10` - -export gsistat=${COMIN}/${RUN}.${pdy}/${cyc}/${RUN}.t${cyc}z.gsistat - -if [[ ! -e $gsistat ]]; then - echo " unable to locate $gsistat" -fi - -echo pdate = $pdate -echo gsistat = $gsistat - - -${M_DE_SCRIPTS}/MinMon_DE.sh ${MINMON_SUFFIX} -p ${pdate} -r ${RUN} \ - 1>$LOGdir/MinMon_DE.log 2>$LOGdir/MinMon_DE.err - - diff --git a/util/Minimization_Monitor/data_xtrct/ush/run_v16rt1.sh b/util/Minimization_Monitor/data_xtrct/ush/run_v16rt1.sh deleted file mode 100755 index 842f150d01..0000000000 --- a/util/Minimization_Monitor/data_xtrct/ush/run_v16rt1.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/sh - -idev=`cat /etc/dev | cut -c1` -iprod=`cat /etc/prod | cut -c1` - -package=MinMon -#package=ProdGSI/util/Minimization_Monitor -suffix=v16rt1 -export run=gdas - -echo "user = $USER" - -export KEEPDATA=YES -export DO_ERROR_RPT=1 -export MAIL_TO="" -export MAIL_CC="" - -scripts=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/data_xtrct/ush -echo "scripts = $scripts" - -export jobfile=/gpfs/dell2/emc/modeling/noscrub/${USER}/${package}/nwprod/gdas.v1.0.0/jobs/JGDAS_VMINMON -echo "jobfile = $jobfile" - -shell=sh -source /usrx/local/prod/lmod/lmod/init/${shell} - -MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core:/usrx/local/prod/modulefiles/core_third:/usrx/local/prod/modulefiles/defs:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod:/usrx/local/dev/modulefiles - -module purge -module load ips/18.0.1.163 -module load metplus/2.1 -module load lsf -module load prod_util/1.1.2 - -echo NDATE = $NDATE - -#export COMIN=/gpfs/hps3/emc/global/noscrub/emc.glopara/archive/prfv3rt1 -export COMIN=/gpfs/dell2/emc/modeling/noscrub/emc.glopara/archive/v16rt1 - -tank=~/nbns/stats/${suffix} -logdir=/gpfs/dell2/ptmp/Edward.Safford/logs/${suffix}/${run}/minmon - -ldate=`${scripts}/find_cycle.pl --cyc 1 --dir ${tank} --run ${run}` -echo ldate = $ldate -export PDATE=`${NDATE} +06 $ldate` -#PDATE=2019082806 - -export PDY=`echo $PDATE|cut -c1-8` -export cyc=`echo $PDATE|cut -c9-10` - -#module unload prod_util - -export gsistat=${COMIN}/gsistat.${run}.${PDATE} - -echo PDATE = $PDATE -echo gsistat = $gsistat - -${scripts}/MinMon_DE.sh ${suffix} --pdate ${PDATE} 1>$logdir/MinMon_DE.log 2>$logdir/MinMon_DE.err - - diff --git a/util/Minimization_Monitor/get_hostname.pl b/util/Minimization_Monitor/get_hostname.pl index 47f782d675..56df214223 100755 --- a/util/Minimization_Monitor/get_hostname.pl +++ b/util/Minimization_Monitor/get_hostname.pl @@ -28,6 +28,9 @@ if( $host =~ /hfe/ ) { $machine = "hera"; } + elsif( $host =~ /clogin0/ || $host =~ /dlogin0/ ) { + $machine = "wcoss2"; + } elsif( $host =~ /login/ ) { $machine = "cray"; } diff --git a/util/Minimization_Monitor/image_gen/ush/MinMon_Plt.sh b/util/Minimization_Monitor/image_gen/ush/MinMon_Plt.sh index aa942e65d3..e08edc8c70 100755 --- a/util/Minimization_Monitor/image_gen/ush/MinMon_Plt.sh +++ b/util/Minimization_Monitor/image_gen/ush/MinMon_Plt.sh @@ -13,6 +13,7 @@ function usage { echo " " } + echo start MinMonPlt.sh nargs=$# @@ -21,7 +22,6 @@ if [[ $nargs -lt 1 || $nargs -gt 5 ]]; then exit 1 fi -RUN=gdas while [[ $# -ge 1 ]] do key="$1" @@ -45,56 +45,52 @@ do shift done +if [[ ${#MINMON_SUFFIX} -le 0 ]]; then + echo "No suffix supplied, unable to proceed" + exit 2 +fi + if [[ ${#RUN} -le 0 ]]; then export RUN=gdas fi +run_suffix=${MINMON_SUFFIX}_${RUN} echo "MINMON_SUFFIX = $MINMON_SUFFIX" echo "PDATE = $PDATE" echo "RUN = $RUN" - -if [[ ${#RUN} -gt 0 ]]; then - run_suffix=${MINMON_SUFFIX}_${RUN} -else - run_suffix=${MINMON_SUFFIX} -fi - +#---------------------------------------- +# source config, and user_settings files +#---------------------------------------- this_dir=`dirname $0` - -#-------------------------------------------------- -# source verison, config, and user_settings files -#-------------------------------------------------- top_parm=${this_dir}/../../parm -minmon_version_file=${minmon_version:-${top_parm}/MinMon.ver} -if [[ -s ${minmon_version_file} ]]; then - . ${minmon_version_file} - echo "able to source ${minmon_version_file}" -else - echo "Unable to source ${minmon_version_file} file" - exit 2 -fi - minmon_config=${minmon_config:-${top_parm}/MinMon_config} -if [[ -s ${minmon_config} ]]; then - . ${minmon_config} - echo "able to source ${minmon_config}" -else - echo "Unable to source ${minmon_config} file" +if [[ ! -e ${minmon_config} ]]; then + echo "Unable to locate ${minmon_config} file" exit 3 fi +. ${minmon_config} +if [[ $? -ne 0 ]]; then + echo "Error detected while sourcing ${minmon_config} file" + exit $? +fi + + minmon_user_settings=${minmon_user_settings:-${top_parm}/MinMon_user_settings} -if [[ -s ${minmon_user_settings} ]]; then - . ${minmon_user_settings} - echo "able to source ${minmon_user_settings}" -else - echo "Unable to source ${minmon_user_settings} file" +if [[ ! -e ${minmon_user_settings} ]]; then + echo "Unable to locate ${minmon_user_settings} file" exit 4 fi +. ${minmon_user_settings} +if [[ $? -ne 0 ]]; then + echo "Error detected while sourcing ${minmon_user_settings} file" + exit $? +fi + #-------------------------------------------------------------------- # Specify TANKDIR for this suffix @@ -106,14 +102,44 @@ else fi #-------------------------------------------------------------------- -# If PDATE wasn't specified as an argument then plot the last -# available cycle. +# Determine cycle to plot. Exit if cycle is > last available +# data. +# +# PDATE can be set one of 3 ways. This is the order of priority: +# +# 1. Specified via command line argument +# 2. Read from ${TANKimg}/last_plot_time file and advanced +# one cycle. +# 3. Using the last available cycle for which there is +# data in ${TANKDIR}. +# +# If option 2 has been used the ${IMGNDIR}/last_plot_time file +# will be updated with ${PDATE} if the plot is able to run. #-------------------------------------------------------------------- -if [[ ${#PDATE} -le 0 ]]; then - echo "PDATE not specified: setting PDATE using last cycle" - export PDATE=`${M_IG_SCRIPTS}/find_cycle.pl --cyc 1 --dir ${TANKDIR}` + +echo "MIN_IMGN_TANKDIR = ${MIN_IMGN_TANKDIR}" +last_plot_time=${MIN_IMGN_TANKDIR}/${RUN}/minmon/last_plot_time +echo "last_plot_time file = ${last_plot_time}" + +latest_data=`${M_IG_SCRIPTS}/find_cycle.pl --cyc 1 --dir ${TANKDIR} --run ${RUN}` + +if [[ ${PDATE} = "" ]]; then + if [[ -e ${last_plot_time} ]]; then + echo " USING last_plot_time file" + last_plot=`cat ${last_plot_time}` + PDATE=`$NDATE +6 ${last_plot}` + else + echo " USING find_cycle file" + PDATE=${latest_data} + fi +fi + + +if [[ ${PDATE} -gt ${latest_data} ]]; then + echo " Unable to plot, pdate is > latest_data, ${PDATE}, ${latest_data}" + exit 5 else - echo "PDATE was specified: $PDATE" + echo " OK to plot" fi @@ -133,6 +159,7 @@ if [[ ! -d $WORKDIR ]]; then fi cd $WORKDIR + #-------------------------------------------------------------------- # Copy gnorm_data.txt file to WORKDIR. #-------------------------------------------------------------------- @@ -215,70 +242,49 @@ while [[ $cdate -le $edate ]]; do cdate=$adate done -#-------------------------------------------------------------------- -# Main processing loop. -# Run extract_all_gnorms.pl script and generate single cycle plot. -# -# RM this loop or add an optional end date to the args list and -# process each date in turn. -# -# And alternate plot method might be to simply plot the last -# available cycle if no PDATE is included. Could use find_cycle.pl -# to find the last one and done. -# -# Also should an attempt to plot a date for which there is no data -# produce an error exit? I think so. -#-------------------------------------------------------------------- -not_done=1 -ctr=0 + area=glb if [[ $GLB_AREA -eq 0 ]]; then area=rgn fi -while [ $not_done -eq 1 ] && [ $ctr -le 20 ]; do - - #----------------------------------------------------------------- - # copy over the control files and update the tdef lines - # according to the $suffix - #----------------------------------------------------------------- - if [[ ! -e ${WORKDIR}/allgnorm.ctl ]]; then - cp ${M_IG_GRDS}/${area}_allgnorm.ctl ${WORKDIR}/orig_allgnorm.ctl - cp ${WORKDIR}/orig_allgnorm.ctl ${WORKDIR}/allgnorm.ctl - fi +#----------------------------------------------------------------- +# copy over the control files and update the tdef lines +# according to the $suffix +#----------------------------------------------------------------- +if [[ ! -e ${WORKDIR}/allgnorm.ctl ]]; then + cp ${M_IG_GRDS}/${area}_allgnorm.ctl ${WORKDIR}/orig_allgnorm.ctl + cp ${WORKDIR}/orig_allgnorm.ctl ${WORKDIR}/allgnorm.ctl +fi - if [[ ! -e ${WORKDIR}/reduction.ctl ]]; then - cp ${M_IG_GRDS}/${area}_reduction.ctl ${WORKDIR}/reduction.ctl +if [[ ! -e ${WORKDIR}/reduction.ctl ]]; then + cp ${M_IG_GRDS}/${area}_reduction.ctl ${WORKDIR}/reduction.ctl + if [[ ${RUN} = "gfs" ]]; then + gfs_xdef="xdef 152 linear 1.0 1.0" + sed -i "/xdef/c ${gfs_xdef}" reduction.ctl fi +fi - # - # update the tdef line in the ctl files - # - bdate=`$NDATE -168 $PDATE` - ${M_IG_SCRIPTS}/update_ctl_tdef.sh ${WORKDIR}/allgnorm.ctl ${bdate} - ${M_IG_SCRIPTS}/update_ctl_tdef.sh ${WORKDIR}/reduction.ctl ${bdate} +#--------------------------------------- +# update the tdef line in the ctl files +#--------------------------------------- +bdate=`$NDATE -168 $PDATE` +${M_IG_SCRIPTS}/update_ctl_tdef.sh ${WORKDIR}/allgnorm.ctl ${bdate} +${M_IG_SCRIPTS}/update_ctl_tdef.sh ${WORKDIR}/reduction.ctl ${bdate} - ####################### - # Q: does NDAS really use 101 instead of 102? That can't be somehow.... - ####################### - -# if [[ $MINMON_SUFFIX = "RAP" ]]; then -# ${M_IG_SCRIPTS}/update_ctl_xdef.sh ${WORKDIR}/allgnorm.ctl 102 -# fi - - #----------------------------------------------------------------- - # Copy the plot script and build the plot driver script - #----------------------------------------------------------------- - if [[ ! -e ${WORKDIR}/plot_gnorms.gs ]]; then - cp ${M_IG_GRDS}/plot_gnorms.gs ${WORKDIR}/. - fi - if [[ ! -e ${WORKDIR}/plot_reduction.gs ]]; then - cp ${M_IG_GRDS}/plot_reduction.gs ${WORKDIR}/. - fi - if [[ ! -e ${WORKDIR}/plot_4_gnorms.gs ]]; then - cp ${M_IG_GRDS}/plot_4_gnorms.gs ${WORKDIR}/. - fi +#----------------------------------------------------------------- +# Copy the plot script and build the plot driver script +#----------------------------------------------------------------- +if [[ ! -e ${WORKDIR}/plot_gnorms.gs ]]; then + cp ${M_IG_GRDS}/plot_gnorms.gs ${WORKDIR}/. +fi +if [[ ! -e ${WORKDIR}/plot_reduction.gs ]]; then + cp ${M_IG_GRDS}/plot_reduction.gs ${WORKDIR}/. +fi +if [[ ! -e ${WORKDIR}/plot_4_gnorms.gs ]]; then + cp ${M_IG_GRDS}/plot_4_gnorms.gs ${WORKDIR}/. +fi cat << EOF >${PDATE}_plot_gnorms.gs @@ -299,33 +305,24 @@ cat << EOF >${PDATE}_plot_4_gnorms.gs 'quit' EOF +#----------------------------------------------------------------- +# Run the plot driver script and move the image into ./tmp +#----------------------------------------------------------------- +GRADS=`which grads` - #----------------------------------------------------------------- - # Run the plot driver script and move the image into ./tmp - #----------------------------------------------------------------- - GRADS=`which grads` - - $TIMEX $GRADS -blc "run ${PDATE}_plot_gnorms.gs" - $TIMEX $GRADS -blc "run ${PDATE}_plot_reduction.gs" - $TIMEX $GRADS -blc "run ${PDATE}_plot_4_gnorms.gs" - - if [[ ! -d ${WORKDIR}/tmp ]]; then - mkdir ${WORKDIR}/tmp - fi - mv *.png tmp/. - - #----------------------------------------------------------------- - # copy the modified gnorm_data.txt file to tmp - #----------------------------------------------------------------- - cp gnorm_data.txt tmp/${run_suffix}.gnorm_data.txt +$TIMEX $GRADS -blc "run ${PDATE}_plot_gnorms.gs" +$TIMEX $GRADS -blc "run ${PDATE}_plot_reduction.gs" +$TIMEX $GRADS -blc "run ${PDATE}_plot_4_gnorms.gs" - - ctr=`expr $ctr + 1` -done +if [[ ! -d ${WORKDIR}/tmp ]]; then + mkdir ${WORKDIR}/tmp +fi +mv *.png tmp/. #----------------------------------------------------------------- -# copy all cost files to tmp +# copy the modified gnorm_data.txt and cost files to tmp #----------------------------------------------------------------- +cp gnorm_data.txt tmp/${run_suffix}.gnorm_data.txt cp *cost*.txt tmp/. #-------------------------------------------------------------------- @@ -337,6 +334,12 @@ if [[ ${DO_ERROR_RPT} -eq 1 ]]; then err_msg=${TANKDIR}/${RUN}.${pdy}/${cyc}/minmon/${PDATE}.errmsg.txt + if [[ $MAIL_CC == "" ]]; then + if [[ -e /u/Edward.Safford/bin/get_cc_list.pl ]]; then + MAIL_CC=`/u/Edward.Safford/bin/get_cc_list.pl --nr ${run_suffix} --mon MinMon` + fi + fi + if [[ -e $err_msg ]]; then err_rpt="./err_rpt.txt" `cat $err_msg > $err_rpt` @@ -358,33 +361,33 @@ if [[ ${DO_ERROR_RPT} -eq 1 ]]; then fi #-------------------------------------------------------------------- -# Push the image & txt files over to the server +# Push the image & txt files over to the server +# or move files to $MIN_IMGN_TANKDIR #-------------------------------------------------------------------- - if [[ ${MY_MACHINE} = "wcoss" || ${MY_MACHINE} = "cray" || \ - ${MY_MACHINE} = "wcoss_d" ]]; then - cd ./tmp - $RSYNC -ave ssh --exclude *.ctl* ./ \ - ${WEBUSER}@${WEBSERVER}:${WEBDIR}/$run_suffix/ - fi - - if [[ ! -d ${MIN_IMGN_TANKDIR} ]]; then - mkdir -p ${MIN_IMGN_TANKDIR} +cd ./tmp +if [[ ${MY_MACHINE} = "wcoss" || ${MY_MACHINE} = "cray" || \ + ${MY_MACHINE} = "wcoss_d" || ${MY_MACHINE} = "wcoss2" ]]; then + $RSYNC -ave ssh --exclude *.ctl* ./ \ + ${WEBUSER}@${WEBSERVER}:${WEBDIR}/$run_suffix/ +else + img_dir=${MIN_IMGN_TANKDIR}/${RUN}/minmon + if [[ ! -d ${img_dir} ]]; then + mkdir -p ${img_dir} fi - - cd ./tmp - cp *.png ${MIN_IMGN_TANKDIR} + mv * ${img_dir}/. +fi #-------------------------------------------------------------------- -# Call nu_make_archive.sh to write archive files to hpss and -# update the prod machine with any missing M_TANKDIR directories. +# Update the last_plot_time file if found #-------------------------------------------------------------------- -# if [[ ${DO_ARCHIVE} -eq 1 ]]; then -# ${M_IG_SCRIPTS}/nu_make_archive.sh -# fi +if [[ -e ${last_plot_time} ]]; then + echo "update last_plot_time file" + echo ${PDATE} > ${last_plot_time} +fi -#cd ${WORKDIR} -#cd .. -#rm -rf ${WORKDIR} +cd ${WORKDIR} +cd .. +rm -rf ${WORKDIR} echo "end MinMonPlt.sh" exit diff --git a/util/Minimization_Monitor/image_gen/ush/nu_make_archive.sh b/util/Minimization_Monitor/image_gen/ush/nu_make_archive.sh deleted file mode 100755 index d136a2c47b..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/nu_make_archive.sh +++ /dev/null @@ -1,204 +0,0 @@ -#! /bin/ksh - -#------------------------------------------------------------------ -# -# nu_make_archive.sh -# -# Archive the data files (*.ieee_d) to HPSS. -# -# Note that only full days are archived, so if running for the -# 00, 06, or 12z cycles the previous day will be archived. If -# PDATE = yyyymmdd18 then today (PDATE) will be last day archived. -#------------------------------------------------------------------ -set -ax -export list=$listvar - -#-------------------------------------------------------------------- -# Run config files to load environment variables, -# set default plot conditions -#-------------------------------------------------------------------- -##TESTING BRACKET BEGIN -#PDATE=2015101412 -#SUFFIX=GDAS - -#this_dir=`pwd` -#top_parm=${this_dir}/../../parm -# -#export MINMON_VERSION=${MINMON_VERSION:-${top_parm}/MinMon.ver} -#if [[ -s ${MINMON_VERSION} ]]; then -# . ${MINMON_VERSION} -#else -# echo "Unable to source ${MINMON_VERSION} file" -# exit 2 -#fi - -#export MINMON_CONFIG=${MINMON_CONFIG:-${top_parm}/MinMon_config} -# -#if [[ -s ${MINMON_CONFIG} ]]; then -# . ${MINMON_CONFIG} -#else -# echo "Unable to source ${MINMON_CONFIG}" -# exit -#fi -# -#MINMON_USER_SETTINGS=${MINMON_USER_SETTINGS:-${top_parm}/MinMon_user_settings} -#if [[ -s ${MINMON_USER_SETTINGS} ]]; then -# . ${MINMON_USER_SETTINGS} -#else -# echo "Unable to source ${MINMON_USER_SETTINGS}" -# exit -#fi -##TESTING BRACKET END - - -#------------------------------------------------------------------ -# Determine last full day capable of archiving. -#------------------------------------------------------------------ -CYCLE=`echo $PDATE|cut -c9-10` -if [[ ${CYCLE} = "18" ]]; then - LASTARCH=$PDATE -else - LASTARCH=`$NDATE -24 $PDATE` -fi - -LAST_DAY=`echo $LASTARCH|cut -c1-8` -echo LAST_DAY = $LAST_DAY - -#------------------------------------------------------------------ -# Determine the last archived date for this source. -#------------------------------------------------------------------ -shell=ksh -. /usrx/local/Modules/default/init/${shell} -`module load hpss` - -## -## Need better reference here! -hpss2yr="/NCEPDEV/emc-da/2year" -if [[ $MINMON_SUFFIX = "GDAS" ]]; then - HPSSDIR="${hpss2yr}/${LOGNAME}/nbns/stats/GDAS" -elif [[ $MINMON_SUFFIX = "GFS" ]]; then - HPSSDIR="${hpss2yr}/${LOGNAME}/nbns/stats/GFS" -elif [[ $MINMON_SUFFIX = "4devb" ]]; then - HPSSDIR="${hpss2yr}/${LOGNAME}/nbns/stats/4devb" -elif [[ $MINMON_SUFFIX = "NDAS" ]]; then - HPSSDIR="${hpss2yr}/${LOGNAME}/nbns/stats/regional/NDAS" -elif [[ $MINMON_SUFFIX = "RAP" ]]; then - HPSSDIR="${hpss2yr}/${LOGNAME}/nbns/stats/regional/RAP" -fi - -HTAR="/usrx/local/hpss/htar" -M_TANKDIR=${M_TANKverf}/stats/${MINMON_SUFFIX} -TDATE=$LASTARCH -TDAY=`echo $TDATE|cut -c1-8` -tar_cnt=0 -cntr=0 -max_list=0 -while [[ -d ${M_TANKDIR}/minmon.$TDAY && $max_list -lt 5 && $cntr -lt 31 ]]; do - - tar_cnt=$( $HTAR -tf ${HPSSDIR}/minmon.${TDAY}.tar | wc -l ) - echo "tar_cnt = $tar_cnt" - - if [[ $tar_cnt -lt 5 ]] then - echo "adding $TDAY to list" - tar_list="$tar_list $TDAY" - ((max_list=max_list+1)) - fi - - TDATE=`$NDATE -24 $TDATE` - TDAY=`echo $TDATE|cut -c1-8` - - ((cntr=cntr+1)) -done - -echo "tar_list = $tar_list" - -#------------------------------------------------------------------ -# Archive tar_list to hpss and the $ARCHIVE_DIR -#------------------------------------------------------------------ - -for tar_date in ${tar_list}; do - - $HTAR -cvf ${HPSSDIR}/minmon.${tar_date}.tar ${M_TANKDIR}/minmon.${tar_date} - -done - - - -#------------------------------------------------------------------ -#------------------------------------------------------------------ -# Add new directories to the prod machine -#------------------------------------------------------------------ -#------------------------------------------------------------------ -if [[ $MY_MACHINE = "wcoss" ]]; then - - #------------------------------------------------------------------ - # Generate lists of directories locally and on the prod machine - #------------------------------------------------------------------ - PROD=`cat /etc/prod` - dev_dirs=`ls -d1 $M_TANKDIR/minmon*` - prod_dirs=`ssh $LOGNAME@$PROD "ls -d1 $M_TANKDIR/minmon*"` - - #------------------------------------------------------------------ - # Throw out anything later than LASTARCH in dev_dirs so we don't - # end up with a partial directory on the prod machine. - #------------------------------------------------------------------ - nu_devdirs="" - for tdir in ${dev_dirs}; do - if [[ $tdir != "info" ]]; then - test_date=`echo $tdir | gawk -F. '{print $NF}'` - echo test_date=$test_date - if [[ $test_date -le $LAST_DAY ]]; then - nu_devdirs="$nu_devdirs $tdir" - fi - fi - done - echo nu_devdirs = $nu_devdirs - dev_dirs=$nu_devdirs - - #------------------------------------------------------------------ - # Compare dev_dirs and prod_dirs. Generate a list of any missing - # directories in prod_dirs. - #------------------------------------------------------------------ - xfer_list="" - for tdir in ${dev_dirs}; do - test=`echo $prod_dirs | grep $tdir` - if [[ $test = "" ]]; then - xfer_list="$xfer_list $tdir" - fi - done - echo "xfer_list = $xfer_list" - - #------------------------------------------------------------------ - # For all entries in the xfer_list tar the directory, copy it to - # the prod machine, unpack it, rm both copies of the tar file - #------------------------------------------------------------------ - home=`pwd` - cd $M_TANKDIR - - for tdir in ${xfer_list}; do -# tarfile="$tdir.tar" - mmdir=`echo $tdir | gawk -F/ '{print $NF}'` - tarfile=${mmdir}.tar - - tar -cvf ${tarfile} ${mmdir} - scp ./$tarfile ${LOGNAME}@${PROD}:${M_TANKDIR}/$tarfile - - ssh ${LOGNAME}@${PROD} "cd $M_TANKDIR && tar -xvf ./$tarfile && rm -f ./$tarfile" - rm ./$tarfile - done - cd $home - - #------------------------------------------------------------------ - # Remove any directories in $M_TANKDIR in excess of 120 - #------------------------------------------------------------------ - total=`ls -d1 ${M_TANKDIR}/minmon.* | wc -l` - ((extra=total-121)) - - if [[ $extra -gt 0 ]]; then - `ls -d1 ${M_TANKDIR}/minmon.* | head -n $extra | xargs rm -rf` - fi - -fi - -exit - diff --git a/util/Minimization_Monitor/image_gen/ush/onprod.sh b/util/Minimization_Monitor/image_gen/ush/onprod.sh deleted file mode 100755 index b709651389..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/onprod.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/sh - -# -# Check to determine if this maching is currently -# the production machine. -# -# Return values: -# 1 = prod -# 0 = dev -# - iamprod=0 - machine=`hostname | cut -c1` - if [[ -e /etc/prod ]]; then - prod=`cat /etc/prod | cut -c1` - - if [[ $machine = $prod ]]; then - iamprod=1 - fi - fi - - echo $iamprod - exit diff --git a/util/Minimization_Monitor/image_gen/ush/pen_data_map.xml b/util/Minimization_Monitor/image_gen/ush/pen_data_map.xml deleted file mode 100644 index 501ea916ea..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/pen_data_map.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - glb - /com/gfs/prod - - - /u/${LOGNAME}/nbns/stats - 1 - - - glb - 1 - 2016030706 - - diff --git a/util/Minimization_Monitor/image_gen/ush/query_data_map.pl b/util/Minimization_Monitor/image_gen/ush/query_data_map.pl deleted file mode 100755 index 8800eccbae..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/query_data_map.pl +++ /dev/null @@ -1,73 +0,0 @@ -#! /usr/bin/perl - -#------------------------------------------------------------------- -# query_data_map.pl -# -# This script returns a requested field from the data_map.xml file. -# It takes three items as input: -# 1. data_map.xml file name (full or relative path) -# 2. suffix identifying the data source (an element in the -# data_map.xml file) -# 3. requested field, one of the xml child elements of the -# suffix element. -# -# If the xml element associated with the suffix does not have the -# requested field defined, then the default_global or -# default_regional element's corresponding field will be used. The -# default is default_global, but if the suffix contains an area of -# "rgn" then the regional_default element will be used. -# -# The contents of that field are echoed to stdout for the calling -# script to access. If the field is empty or missing nothing -# will be returned. The calling script should verify a value has -# been returned before use. -# -#------------------------------------------------------------------- - use strict; - use warnings; - use XML::LibXML; - - if( $#ARGV < 2 ) { - exit - } - - my $dmfile = $ARGV[0]; - my $source = $ARGV[1]; - my $field = $ARGV[2]; - my $default="global_default"; - use XML::LibXML; - - my $parser = XML::LibXML->new(); - my $doc = $parser->parse_file($dmfile); - -# Print the contents of the field if it's found in source. -# If the field is not found in source then use the default element -# and output it's value for the requested field. - - my @srcs = $doc->findnodes("/opt/$source"); - if( @srcs <= 0 ) { - @srcs = $doc->findnodes("/opt/$default"); - } - - if ( @srcs > 0 ) { - - my $src = $srcs[0]; - my($answer) = $src->findnodes("./$field"); - my($area) = $src->findnodes("./area"); - my $src_area = $area->to_literal; - - if( $answer ) { - print $answer->to_literal; - } - else { - if( $src_area eq "rgn" ) { - $default = "regional_default"; - } - my($def_src) = $src->findnodes("/opt/$default"); - my($def_answer) = $def_src->findnodes("./$field"); - if( $def_answer ) { - print $def_answer->to_literal; - } - } - } - diff --git a/util/Minimization_Monitor/image_gen/ush/run_gdas_IG.sh b/util/Minimization_Monitor/image_gen/ush/run_gdas_IG.sh deleted file mode 100755 index 51f2da85c0..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/run_gdas_IG.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -set -ax - -#package=MinMon -package=ProdGSI/util/Minimization_Monitor - -suffix=GFS -run=gdas - -NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.0/exec/ips/ndate -echo NDATE = $NDATE -ch=`hostname | cut -c1` - -scripts=/gpfs/dell2/emc/modeling/noscrub/${LOGNAME}/${package}/image_gen/ush -ptmp=/gpfs/dell2/ptmp/Edward.Safford - -export DO_ARCHIVE=0 -export JOB_QUEUE=dev_shared -export DO_ERROR_RPT=1 - -export MAIL_CC="russ.treadon@noaa.gov, andrew.collard@noaa.gov" -export MAIL_TO="edward.safford@noaa.gov" - -data_map=${scripts}/pen_data_map.xml - -tankdir=/u/Edward.Safford/nbns/stats/${suffix} - -imgdate=`${scripts}/query_data_map.pl ${data_map} ${suffix}_${run} imgdate` -idate=`$NDATE +6 $imgdate` -PDY=`echo $idate | cut -c1-8` -cyc=`echo $idate | cut -c9-10` - -prodate=`${scripts}/find_cycle.pl --run $run --cyc 1 --dir ${tankdir}` -echo "imgdate, prodate = $imgdate, $prodate" -if [[ $idate -le $prodate ]]; then - - echo " firing MinMon_Plt.sh" - ${scripts}/MinMon_Plt.sh ${suffix} -p $idate -r $run \ - 1>${ptmp}/logs/${suffix}/${run}/minmon/IG.${run}.${PDY}.${cyc}.log \ - 2>${ptmp}/logs/${suffix}/${run}/minmon/IG.${run}.${PDY}.${cyc}.err - - rc=`${scripts}/update_data_map.pl ${data_map} ${suffix}_${run} imgdate ${idate}` - -fi - - -exit diff --git a/util/Minimization_Monitor/image_gen/ush/run_gfs_IG.sh b/util/Minimization_Monitor/image_gen/ush/run_gfs_IG.sh deleted file mode 100755 index 70b90b2335..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/run_gfs_IG.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/sh - -set -ax - -#package=MinMon -package=ProdGSI/util/Minimization_Monitor - -suffix=GFS -run=gfs - -NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.0/exec/ips/ndate -echo NDATE = $NDATE -ch=`hostname | cut -c1` - -scripts=/gpfs/dell2/emc/modeling/noscrub/${LOGNAME}/${package}/image_gen/ush -ptmp=/gpfs/dell2/ptmp/Edward.Safford - -export DO_ARCHIVE=0 -export JOB_QUEUE=dev_shared -export DO_ERROR_RPT=1 - -export MAIL_CC="russ.treadon@noaa.gov, andrew.collard@noaa.gov" -export MAIL_TO="edward.safford@noaa.gov" - -data_map=${scripts}/pen_data_map.xml - -tankdir=/u/Edward.Safford/nbns/stats/${suffix} - -imgdate=`${scripts}/query_data_map.pl ${data_map} ${suffix}_${run} imgdate` -idate=`$NDATE +6 $imgdate` -PDY=`echo $idate | cut -c1-8` -cyc=`echo $idate | cut -c9-10` - -prodate=`${scripts}/find_cycle.pl --run $run --cyc 1 --dir ${tankdir}` -echo "imgdate, prodate = $imgdate, $prodate" -if [[ $idate -le $prodate ]]; then - - echo " firing MinMon_Plt.sh" - ${scripts}/MinMon_Plt.sh ${suffix} -p $idate -r $run \ - 1>${ptmp}/logs/${suffix}/${run}/minmon/IG.${run}.${PDY}.${cyc}.log \ - 2>${ptmp}/logs/${suffix}/${run}/minmon/IG.${run}.${PDY}.${cyc}.err - - rc=`${scripts}/update_data_map.pl ${data_map} ${suffix}_${run} imgdate ${idate}` - -fi - - -exit diff --git a/util/Minimization_Monitor/image_gen/ush/run_script.sh b/util/Minimization_Monitor/image_gen/ush/run_script.sh deleted file mode 100755 index d55bd586c8..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/run_script.sh +++ /dev/null @@ -1,70 +0,0 @@ -#!/bin/sh - -#---------------------------------------------------------------------- -# -# This is a generic image generation leader script. -# The MinMon_Plt.sh script may be called directly or this script -# may be used to override specific default values in the parm files -# and/or MinMon_Plt.sh script. -# -# MINMON_SUFFIX corresponds to the $NET value -# -# RUN is either gfs or gdas -# -# MAIL_CC list is used if warnings messages are set to on. -# -# idate, if set, will override the next value in the local -# pen_data_map.xml file. -#---------------------------------------------------------------------- - -MINMON_SUFFIX=testmm -RUN=gfs - -#export MAIL_CC= -#idate= - - -#---------------------------------------------------------------------- -# no changes should be necessary below this point. -#---------------------------------------------------------------------- -. ../../parm/MinMon.ver -. ../../parm/MinMon_config - -if [[ $idate == "" ]]; then - data_map=${M_IG_SCRIPTS}/pen_data_map.xml - - imgdate=`${M_IG_SCRIPTS}/query_data_map.pl \ - ${data_map} ${MINMON_SUFFIX}_${RUN} imgdate` - echo "imgdate = $imgdate" - - - idate=`$NDATE +6 $imgdate` -fi - -pdy=`echo $idate | cut -c1-8` -cyc=`echo $idate | cut -c9-10` -echo "idate = $idate" - -echo "tank = ${M_TANKverf}/stats/${MINMON_SUFFIX}" - -prodate=`${M_IG_SCRIPTS}/find_cycle.pl \ - --dir ${M_TANKverf}/stats/${MINMON_SUFFIX} \ - --cyc 1 --run ${RUN}` - -echo "imgdate, prodate = $imgdate, $prodate" - - -if [[ $idate -le $prodate ]]; then - - echo " firing MinMon_Plt.sh" - ${M_IG_SCRIPTS}/MinMon_Plt.sh ${MINMON_SUFFIX} -p $idate -r $RUN \ - 1>${LOGdir}/IG.${run}.${PDY}.${cyc}.log \ - 2>${LOGdir}/IG.${run}.${PDY}.${cyc}.err - - rc=`${M_IG_SCRIPTS}/update_data_map.pl ${data_map} \ - ${MINMON_SUFFIX}_${RUN} imgdate ${idate}` - -fi - - -exit diff --git a/util/Minimization_Monitor/image_gen/ush/run_v16rt1_IG.sh b/util/Minimization_Monitor/image_gen/ush/run_v16rt1_IG.sh deleted file mode 100755 index 5df811a0e1..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/run_v16rt1_IG.sh +++ /dev/null @@ -1,61 +0,0 @@ -#!/bin/sh - -package=MinMon -#package=ProdGSI/util/Minimization_Monitor - -suffix=v16rt1 -run=gdas - -idev=`cat /etc/dev | cut -c1` -iprod=`cat /etc/prod | cut -c1` - - shell=sh - source /usrx/local/prod/lmod/lmod/init/${shell} - - export MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core:/usrx/local/prod/modulefiles/core_third:/usrx/local/prod/modulefiles/defs:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod:/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 - -echo NDATE = $NDATE -ch=`hostname | cut -c1` - -#scripts=/gpfs/${ch}d2/emc/da/noscrub/${LOGNAME}/${package}/image_gen/ush -scripts=/gpfs/dell2/emc/modeling/noscrub/${LOGNAME}/${package}/image_gen/ush - -#export NDATE=/gpfs/hps/nco/ops/nwprod/prod_util.v1.0.14/exec/ndate -export DO_ARCHIVE=0 -export JOB_QUEUE=dev_shared -export DO_ERROR_RPT=1 - -export MAIL_CC="russ.treadon@noaa.gov, andrew.collard@noaa.gov" -export MAIL_TO="edward.safford@noaa.gov" - -data_map=${scripts}/pen_data_map.xml - -tankdir=/u/Edward.Safford/nbns/stats/${suffix} - -imgdate=`${scripts}/query_data_map.pl ${data_map} ${suffix}_${run} imgdate` -idate=`$NDATE +6 $imgdate` -PDY=`echo $idate | cut -c1-8` -cyc=`echo $idate | cut -c9-10` - -ptmp=/gpfs/dell2/ptmp/Edward.Safford - -prodate=`${scripts}/find_cycle.pl --run gdas --cyc 1 --dir ${tankdir}` -echo "imgdate, prodate = $imgdate, $prodate" -if [[ $idate -le $prodate ]]; then - - echo " firing MinMon_Plt.sh" - ${scripts}/MinMon_Plt.sh ${suffix} -p $idate -r $run \ - 1>${ptmp}/logs/${suffix}/${run}/minmon/IG.${run}.${PDY}.${cyc}.log \ - 2>${ptmp}/logs/${suffix}/${run}/minmon/IG.${run}.${PDY}.${cyc}.err - - rc=`${scripts}/update_data_map.pl ${data_map} ${suffix}_${run} imgdate ${idate}` - -fi - - -exit diff --git a/util/Minimization_Monitor/image_gen/ush/update_ctl_tdef.sh b/util/Minimization_Monitor/image_gen/ush/update_ctl_tdef.sh index 2355d13f51..76216cf7cf 100755 --- a/util/Minimization_Monitor/image_gen/ush/update_ctl_tdef.sh +++ b/util/Minimization_Monitor/image_gen/ush/update_ctl_tdef.sh @@ -109,15 +109,12 @@ function usage { tdef=`echo $line | gawk '{print $1}'` if [[ $tdef == "tdef" ]]; then -# echo "found tdef" -# echo "$line" v2=`echo $line | gawk '{print $2}'` v3=`echo $line | gawk '{print $3}'` v5=`echo $line | gawk '{print $5}'` ndate="${ihh}Z${idd}${smon}${iyy}" newline="${tdef} ${v2} ${v3} ${ndate} ${v5}" -# echo "$newline" echo "$newline" >> $tmp_file found_tdef=1 else diff --git a/util/Minimization_Monitor/image_gen/ush/update_ctl_xdef.sh b/util/Minimization_Monitor/image_gen/ush/update_ctl_xdef.sh deleted file mode 100755 index ce9a8efc91..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/update_ctl_xdef.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/ksh - -#------------------------------------------------------------- -# -# update_ctl_xdef.sh -# -# Update the xdef line (iteration definition) in a given control -# file. -# -#------------------------------------------------------------- - -function usage { - echo "Usage: update_ctl_xdef.sh control_file_path_and_name num_iters" -} - - -#------------------------------------------------------------- -# check for correct usage and assign cmd line vars -# - echo "enter update_ctl_xdef.sh" - - if [[ $# -lt 2 ]]; then - usage - exit 1 - fi - - ctl_file=$1 - num_iters=$2 - -# iyy=`echo $datestr | cut -c1-4` -# imm=`echo $datestr | cut -c5-6` -# idd=`echo $datestr | cut -c7-8` -# ihh=`echo $datestr | cut -c9-10` -# -# echo year = $iyy -# echo month= $imm -# echo day = $idd -# echo hour = $ihh - -#------------------------------------------------------------- -# validate ctr_file -# - if [[ ! -s $ctl_file ]]; then - echo $ctl_file not found - exit -1 - fi - -#------------------------------------------------------------- -# Construct tmp_file from ctl_file name (minus any full or -# relative path) -# - - ctl_base=`basename ${ctl_file}` - ctl_dir=`dirname ${ctl_file}` - - tmp_file="${ctl_dir}/tmp_${ctl_base}" - echo "tmp_file = ${tmp_file}" - - if [[ -s $tmp_file ]]; then - rm -f $tmp_file - fi - - found_xdef=0 - while read line; do - - xdef=`echo $line | gawk '{print $1}'` - - if [[ $xdef == "xdef" ]]; then -# echo "found xdef" -# echo "$line" - v3=`echo $line | gawk '{print $3}'` - v4=`echo $line | gawk '{print $4}'` - v5=`echo $line | gawk '{print $5}'` - - newline="${xdef} ${num_iters} ${v3} ${v4} ${v5}" -# echo "$newline" - echo "$newline" >> $tmp_file - found_xdef=1 - else - echo "$line" >> $tmp_file - fi - - done < "$ctl_file" - - if [[ $found_xdef -eq 1 ]]; then - cp -f $tmp_file $ctl_file - rm -f $tmp_file - else - echo "ERROR tdef not found, no update to $ctl_base done" - fi - - echo "exit update_ctl_xdef.sh" -exit diff --git a/util/Minimization_Monitor/image_gen/ush/update_data_map.pl b/util/Minimization_Monitor/image_gen/ush/update_data_map.pl deleted file mode 100755 index 57225465fd..0000000000 --- a/util/Minimization_Monitor/image_gen/ush/update_data_map.pl +++ /dev/null @@ -1,61 +0,0 @@ -#! /usr/bin/perl - -#------------------------------------------------------------------- -# update_data_map.pl -# -# This script updates a requested field in the data_map.xml file. If -# the requested field does not exist in but the parent node (suffix) -# is found then the requested field and value are added to the -# data_map.xml file. -# -# Calling sequence: -# >> update_data_map.pl ./path/to/data_map.xml suffix req_field new_val -# -# 1. data_map.xml file (full or relative path) -# 2. suffix identifying the data source (an element in the -# data_map.xml file) -# 3. requested field, one of the xml child elements of the -# suffix element. -# 4. new value for the requested field -# -# Return codes (sent to stdout): -# 0 update was successful -# 1 the suffix and/or field was not found. -# -# Note: Calling scripts generally assign a variable value to -# output from this script. If diagnostic print messages -# are left uncommented then results will become undefined. -#------------------------------------------------------------------- - use strict; - use warnings; - use XML::LibXML; - - my $dmfile = $ARGV[0]; - my $source = $ARGV[1]; - my $field = $ARGV[2]; - my $value = $ARGV[3]; - my $rc = "1"; - - my $parser = XML::LibXML->new(); - my $doc = $parser->parse_file($dmfile); - - my $query = "//$source/$field/text()"; - - my($node) = $doc->findnodes($query); - - if( $node ) { - $node->setData("$value" ); - $doc->toFile( $dmfile ); - $rc = "0"; - } - else { - my $new_query = "//$source"; - my ($src_node) = $doc->findnodes($new_query); - $src_node->appendTextChild( "$field", "$value" ); - $doc->toFile( $dmfile ); - $rc = "0"; - } - - print "$rc"; - - diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon.sh b/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon.sh deleted file mode 100755 index 916c57d0ee..0000000000 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon.sh +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_vminmon.o%J -#BSUB -e gdas_vminmon.o%J -#BSUB -J gdas_vminmon -#BSUB -q dev_shared -#BSUB -n 1 -#BSUB -R affinity[core] -#BSUB -M 80 -#BSUB -W 00:05 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export PDATE=${PDATE:-2018011112} - -############################################################# -# Specify whether the run is production or development -############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -export job=gdas_vminmon.${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -id=`hostname | cut -c1` -export DATAROOT=${DATAROOT:-/gpfs/${id}d2/emc/da/noscrub/Edward.Safford/test_data} -export COMROOT=${COMROOT:-/ptmpp1/$LOGNAME/com} - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v14.1.0 -export global_shared_ver=v14.1.0 -export gdas_minmon_ver=v1.0.0 -export minmon_shared_ver=v1.0.1 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/modulefiles -module load prod_util -#module load util_shared - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export POE=YES - - -############################################################# -# Set user specific variables -############################################################# -export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gdas} -export NWTEST=${NWTEST:-/da/noscrub/${LOGNAME}/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgdas=${NWTEST}/gdas.${gdas_minmon_ver} -export JOBGLOBAL=${HOMEgdas}/jobs -export HOMEminmon=${NWTEST}/minmon_shared.${minmon_shared_ver} -export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_VMINMON - -exit - diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_hera.sh b/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_hera.sh deleted file mode 100755 index 39c8127199..0000000000 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_hera.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/ksh - -#SBATCH -o gdas_verfrad.o%j -#SBATCH -J gdas_verfrad -#SBATCH --ntasks=1 --mem=5g -#SBATCH --time=20 -#SBATCH --account=fv3-cpu -#SBATCH -D . - -set -x - -export PDATE=${PDATE:-2018070418} - - -############################################################# -# Specify whether the run is production or development -############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -export job=gdas_vminmon.${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=${DATAROOT:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_data} -export COMROOT=${COMROOT:-/scratch2/NCEPDEV/stmp3/$LOGNAME/com} -export STMP_USER=${STMP_USER:-/scratch2/NCEPDEV/stmp3/$LOGNAME} - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v1.0.0 -export global_shared_ver=v1.0.1 - -############################################################# -# Add nwpara tools to path -############################################################# -#NWPROD=${NWPROD:-/scratch4/NCEPDEV/global/save/glopara/nwpara/util} -#NWPRODush=${NWPRODush:=${NWPROD}/ush} -#NWPRODexec=${NWPRODexec:=${NWPROD}/exec} -#export PATH=${PATH}:${NWPRODush}:${NWPRODexec} - - -############################################################# -# Set user specific variables -############################################################# -export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon} - -export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/${LOGNAME}/noscrub/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgdas=${HOMEgdas:-${NWTEST}/gdas.${gdas_ver}} -export HOMEgfs=${HOMEgfs:-${HOMEgdas}} -export JOBGLOBAL=${HOMEgdas}/jobs -export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared.${global_shared_ver}} -export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} -export M_FIXgdas=${M_FIXgdas:-${HOMEgdas}/fix} - -####################################################################### -# theia specific hacks for no prod_utils module (ndate) -####################################################################### -export MY_MACHINE=hera -export NDATE=/home/Edward.Safford/bin/ndate - -export PERL5LIB="/usr/lib64/perl5:/usr/share/perl5" -export VERBOSE=YES -export KEEPDATA=YES - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_VMINMON - -exit - diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_theia.sh b/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_theia.sh deleted file mode 100755 index 118ad3656f..0000000000 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_theia.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/ksh - -#PBS -o gdas_vminmon.log -#PBS -e gdas_vminmon.err -#PBS -N gdas_vminmon -#PBS -A glbss -#PBS -l procs=1,walltime=0:05:00 -#PBS -V - -set -x - -export PDATE=${PDATE:-2016030712} - - -############################################################# -# Specify whether the run is production or development -############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -export job=gdas_vminmon.${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=${DATAROOT:-/scratch4/NCEPDEV/da/noscrub/Edward.Safford/test_data} -export COMROOT=${COMROOT:-/scratch4/NCEPDEV/stmp3/$LOGNAME/com} -export STMP_USER=${STMP_USER:-/scratch4/NCEPDEV/stmp3/$LOGNAME} - - -############################################################# -# Specify versions -############################################################# -export gdas_ver=v1.0.0 -export global_shared_ver=v1.0.1 - -############################################################# -# Add nwpara tools to path -############################################################# -NWPROD=${NWPROD:-/scratch4/NCEPDEV/global/save/glopara/nwpara/util} -NWPRODush=${NWPRODush:=${NWPROD}/ush} -NWPRODexec=${NWPRODexec:=${NWPROD}/exec} -export PATH=${PATH}:${NWPRODush}:${NWPRODexec} - - -############################################################# -# Set user specific variables -############################################################# -export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon} -#export NWTEST=${NWTEST:-/scratch4/NCEPDEV/da/noscrub/${LOGNAME}/gfs_q3fy17} -export NWTEST=${NWTEST:-/scratch4/NCEPDEV/da/noscrub/${LOGNAME}/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgdas=${HOMEgdas:-${NWTEST}/gdas.${gdas_ver}} -export JOBGLOBAL=${HOMEgdas}/jobs -export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared.${global_shared_ver}} -export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} - -####################################################################### -# theia specific hacks for no prod_utils module & no setpdy.sh script -####################################################################### -export MY_MACHINE=theia -NDATE=~/bin/ndate -prevday=`$NDATE -24 $PDATE` -export PDYm1=`echo $prevday | cut -c1-8` -ln -s ${NWPRODush}/startmsg.sh ${STMP_USER}/startmsg -ln -s ${NWPRODush}/postmsg.sh ${STMP_USER}/postmsg -ln -s ${NWPRODush}/prep_step.sh ${STMP_USER}/prep_step -ln -s ${NWPRODush}/err_chk.sh ${STMP_USER}/err_chk -export PATH=$PATH:${STMP_USER} -export utilscript=${utilscript:-${NWPRODush}} # err_chk calls postmsg.sh - # directly so need to override - # utilscript location - -export PERL5LIB="/usr/lib64/perl5:/usr/share/perl5" - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGDAS_VMINMON - -exit - diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/parm/gdas_minmon.parm b/util/Minimization_Monitor/nwprod/gdas.v1.0.0/parm/gdas_minmon.parm deleted file mode 100644 index eabeea8030..0000000000 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/parm/gdas_minmon.parm +++ /dev/null @@ -1,21 +0,0 @@ -##################################### -# specify minmon shared version -##################################### - - - -##################################### -# specify minmon_shared location -##################################### - - - - - - -##################################### -# utilities -##################################### -export COMPRESS=${COMPRESS:-gzip} -export UNCOMPRESS=${UNCOMPRESS:-gunzip} - diff --git a/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_hera.sh b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_hera.sh new file mode 100755 index 0000000000..995647490e --- /dev/null +++ b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_hera.sh @@ -0,0 +1,54 @@ +#!/bin/ksh + +#SBATCH -o gdas_verfrad.o%j +#SBATCH -J gdas_verfrad +#SBATCH --ntasks=1 --mem=5g +#SBATCH --time=20 +#SBATCH --account=fv3-cpu +#SBATCH -D . + +set -x + +export PDATE=${PDATE:-2021122818} + +####################################################################### +# hera specific hacks for no prod_utils module (ndate) +####################################################################### +export MY_MACHINE=hera +export NDATE=/home/Edward.Safford/bin/ndate + +export PERL5LIB="/usr/lib64/perl5:/usr/share/perl5" +export VERBOSE=YES +export KEEPDATA=YES + + +####################################################################### +# set necessary vars for data extraction J-job +####################################################################### +export PDY=`echo $PDATE | cut -c1-8` +export cyc=`echo $PDATE | cut -c9-10` +export job=gdas_vminmon.${cyc} +export pid=${pid:-$$} +export jobid=${job}.${pid} +export envir=para +export DATAROOT=${DATAROOT:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_data} +export COMROOT=${COMROOT:-/scratch2/NCEPDEV/stmp3/$LOGNAME/com} +export STMP_USER=${STMP_USER:-/scratch2/NCEPDEV/stmp3/$LOGNAME} + +export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon} + +export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/GSI/util/Minimization_Monitor/nwprod} +export HOMEgdas=${HOMEgdas:-${NWTEST}/gdas} +export HOMEgfs=${HOMEgfs:-${HOMEgdas}} +export JOBGLOBAL=${HOMEgdas}/jobs +export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared} +export COM_IN=${COM_IN:-${DATAROOT}} +export M_FIXgdas=${M_FIXgdas:-${HOMEgdas}/fix} + +############################################################# +# Execute job +############################################################# +$JOBGLOBAL/JGDAS_ATMOS_VMINMON + +exit + diff --git a/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss2.sh b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss2.sh new file mode 100755 index 0000000000..19dc94c540 --- /dev/null +++ b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss2.sh @@ -0,0 +1,62 @@ +#!/bin/ksh -l + +#PBS -o gdas_vminmon.out +#PBS -e gdas_vminmon.err +#PBS -N gdas_vminmon +#PBS -q dev +#PBS -l select=1:mem=400M +#PBS -l walltime=05:00 +#PBS -A GFS-DEV + + +set -ax + +export PDATE=${PDATE:-2021082306} + +############################################################# +# Specify whether the run is production or development +############################################################# +export PDY=`echo $PDATE | cut -c1-8` +export cyc=`echo $PDATE | cut -c9-10` +export job=gdas_vminmon.${cyc} +export pid=${pid:-$$} +export jobid=${job}.${pid} +export envir=para + +export DATAROOT=${DATAROOT:-/lfs/h1/ops/canned/com/gfs/v16.2} +export DATA=${DATA:-/lfs/h2/emc/stmp/Edward.Safford} +export COMROOT=${COMROOT:-/lfs/h2/emc/ptmp/Edward.Safford/com} + + +############################################################# +# Load modules +############################################################# +module load prod_util/2.0.10 +module load util_shared/1.4.0 +module load perl/5.32.0 + +module list + + +############################################################# +# Set user specific variables +############################################################# +export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gdas} +export NWTEST=${NWTEST:-/lfs/h2/emc/da/noscrub/Edward.Safford/git/gsi/GSI/util/Minimization_Monitor/nwprod} +export HOMEgdas=${NWTEST}/gdas +export HOMEgfs=${HOMEgfs:-${HOMEgdas}} + +export JOBGLOBAL=${HOMEgdas}/jobs +export HOMEminmon=${NWTEST}/minmon_shared + +export COM_IN=${COM_IN:-${DATAROOT}} +export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} +export M_FIXgdas=${HOMEgdas}/fix + +############################################################# +# Execute job +############################################################# +$JOBGLOBAL/JGDAS_ATMOS_VMINMON + +exit + diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_cray.sh b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss_c.sh similarity index 57% rename from util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_cray.sh rename to util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss_c.sh index f9c1b46b35..d958184fa6 100755 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_cray.sh +++ b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss_c.sh @@ -11,7 +11,7 @@ set -x -export PDATE=${PDATE:-2017111312} +export PDATE=${PDATE:-2022010406} ############################################################# # Specify whether the run is production or development @@ -24,15 +24,6 @@ export jobid=${job}.${pid} export envir=para -############################################################# -# Specify versions -############################################################# -#export gdas_ver=v14.1.0 -#export global_shared_ver=v14.1.0 -export gdas_ver=v1.0.0 -export minmon_shared_ver=v1.0.1 - - ############################################################# # Load modules ############################################################# @@ -44,30 +35,26 @@ module load pm5 module list -############################################################# -# WCOSS environment settings -############################################################# -export POE=YES - - ############################################################# # Set user specific variables ############################################################# -export DATAROOT=${DATAROOT:-/gpfs/hps3/emc/da/noscrub/$LOGNAME/test_data} -export COMROOT=${COMROOT:-/gpfs/hps2/ptmp/$LOGNAME/com} +export DATAROOT=/gpfs/hps3/emc/da/noscrub/$LOGNAME/test_data +export COMROOT=/gpfs/hps2/ptmp/$LOGNAME/com export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gdas} -export NWTEST=${NWTEST:-/gpfs/hps3/emc/da/noscrub/${LOGNAME}/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgdas=${NWTEST}/gdas.${gdas_ver} +export NWTEST=/gpfs/hps3/emc/da/noscrub/Edward.Safford/GSI/util/Minimization_Monitor/nwprod +export HOMEgdas=${NWTEST}/gdas +export M_FIXgdas=${M_FIXgdas:-${HOMEgdas}/fix} export JOBGLOBAL=${HOMEgdas}/jobs -export HOMEminmon=${NWTEST}/minmon_shared.${minmon_shared_ver} +export HOMEgfs=${HOMEgfs:-${HOMEgdas}} +export HOMEminmon=${NWTEST}/minmon_shared export COM_IN=${DATAROOT} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} +export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} export CYCLE_INTERVAL=${CYCLE_INTERVAL:-6} ############################################################# # Execute job ############################################################# -$JOBGLOBAL/JGDAS_VMINMON +$JOBGLOBAL/JGDAS_ATMOS_VMINMON exit diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_wcoss_d.sh b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss_d.sh similarity index 80% rename from util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_wcoss_d.sh rename to util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss_d.sh index 0d6943d976..f3aef842a4 100755 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/driver/test_jgdas_vminmon_wcoss_d.sh +++ b/util/Minimization_Monitor/nwprod/gdas/driver/test_jgdas_vminmon_wcoss_d.sh @@ -8,11 +8,11 @@ #BSUB -R affinity[core] #BSUB -M 80 #BSUB -W 00:05 -#BSUB -P GFS-T2O +#BSUB -P GFS-DEV set -ax -export PDATE=${PDATE:-2018011118} +export PDATE=${PDATE:-2018011112} ############################################################# # Specify whether the run is production or development @@ -28,15 +28,6 @@ export DATAROOT=${DATAROOT:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/test export COMROOT=${COMROOT:-/gpfs/dell2/ptmp/Edward.Safford/com} -############################################################# -# Specify versions -############################################################# -export gdas_ver=v14.1.0 -export global_shared_ver=v14.1.0 -export gdas_minmon_ver=v1.0.0 -export minmon_shared_ver=v1.0.1 - - ############################################################# # Load modules ############################################################# @@ -63,12 +54,12 @@ export minmon_shared_ver=v1.0.1 # Set user specific variables ############################################################# export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gdas} -export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgdas=${NWTEST}/gdas.${gdas_minmon_ver} +export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Minimization_Monitor/nwprod} +export HOMEgdas=${NWTEST}/gdas export HOMEgfs=${HOMEgfs:-${HOMEgdas}} export JOBGLOBAL=${HOMEgdas}/jobs -export HOMEminmon=${NWTEST}/minmon_shared.${minmon_shared_ver} +export HOMEminmon=${NWTEST}/minmon_shared export COM_IN=${COM_IN:-${DATAROOT}} export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} @@ -77,7 +68,7 @@ export M_FIXgdas=${HOMEgdas}/fix ############################################################# # Execute job ############################################################# -$JOBGLOBAL/JGDAS_VMINMON +$JOBGLOBAL/JGDAS_ATMOS_VMINMON exit diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/fix/gdas_minmon_cost.txt b/util/Minimization_Monitor/nwprod/gdas/fix/gdas_minmon_cost.txt similarity index 100% rename from util/Minimization_Monitor/nwprod/gdas.v1.0.0/fix/gdas_minmon_cost.txt rename to util/Minimization_Monitor/nwprod/gdas/fix/gdas_minmon_cost.txt diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/fix/gdas_minmon_gnorm.txt b/util/Minimization_Monitor/nwprod/gdas/fix/gdas_minmon_gnorm.txt similarity index 100% rename from util/Minimization_Monitor/nwprod/gdas.v1.0.0/fix/gdas_minmon_gnorm.txt rename to util/Minimization_Monitor/nwprod/gdas/fix/gdas_minmon_gnorm.txt diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/jobs/JGDAS_ATMOS_VMINMON b/util/Minimization_Monitor/nwprod/gdas/jobs/JGDAS_ATMOS_VMINMON similarity index 84% rename from util/Minimization_Monitor/nwprod/gdas.v1.0.0/jobs/JGDAS_ATMOS_VMINMON rename to util/Minimization_Monitor/nwprod/gdas/jobs/JGDAS_ATMOS_VMINMON index 2e0ffac0fd..407ddb5826 100755 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/jobs/JGDAS_ATMOS_VMINMON +++ b/util/Minimization_Monitor/nwprod/gdas/jobs/JGDAS_ATMOS_VMINMON @@ -44,15 +44,6 @@ export EXECminmon=${EXECminmon:-$HOMEminmon/exec} export USHminmon=${USHminmon:-$HOMEminmon/ush} -############################################# -# Run setpdy and initialize PDY variables -############################################# -if [[ $MY_MACHINE != "hera" ]]; then - export cycle=t${cyc}z - setpdy.sh - . ./PDY -fi - ############################################# # determine PDY and cyc for previous cycle ############################################# @@ -69,10 +60,8 @@ export p_cyc=`echo ${cdate} | cut -c9-10` ############################################# export COM_IN=${COM_IN:-${COMROOT}/${NET}/${envir}} -M_TANKverf=${M_TANKverf:-${COM_IN}} -M_TANKverfM0=${M_TANKverfM0:-${M_TANKverf}/${RUN}.${PDY}/${cyc}/$COMPONENT/minmon} -export M_TANKverfM1=${M_TANKverfM1:-${M_TANKverf}/${RUN}.${P_PDY}/${p_cyc}/$COMPONENT/minmon} -export M_TANKverf=$M_TANKverfM0 +export M_TANKverf=${M_TANKverf:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}/minmon} +export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/minmon} export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}/${cyc}/$COMPONENT} diff --git a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/scripts/exgdas_atmos_vminmon.sh b/util/Minimization_Monitor/nwprod/gdas/scripts/exgdas_atmos_vminmon.sh similarity index 91% rename from util/Minimization_Monitor/nwprod/gdas.v1.0.0/scripts/exgdas_atmos_vminmon.sh rename to util/Minimization_Monitor/nwprod/gdas/scripts/exgdas_atmos_vminmon.sh index 1fa612cbfe..f5087e41d5 100755 --- a/util/Minimization_Monitor/nwprod/gdas.v1.0.0/scripts/exgdas_atmos_vminmon.sh +++ b/util/Minimization_Monitor/nwprod/gdas/scripts/exgdas_atmos_vminmon.sh @@ -74,10 +74,15 @@ if [[ -s ${gsistat} ]]; then data_available=1 - #------------------------------------------------------------------ + #----------------------------------------------------------------------- # Copy the $MINMON_SUFFIX.gnorm_data.txt file to the working directory # It's ok if it doesn't exist; we'll create a new one if needed. - #------------------------------------------------------------------ + # + # Note: The logic below is to accomodate two different data storage + # methods. Some parallels (and formerly ops) dump all MinMon data for + # a given day in the same directory (if condition). Ops now separates + # data into ${cyc} subdirectories (elif condition). + #----------------------------------------------------------------------- if [[ -s ${M_TANKverf}/gnorm_data.txt ]]; then $NCP ${M_TANKverf}/gnorm_data.txt gnorm_data.txt elif [[ -s ${M_TANKverfM1}/gnorm_data.txt ]]; then diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon.sh b/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon.sh deleted file mode 100755 index 384e25cee3..0000000000 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon.sh +++ /dev/null @@ -1,77 +0,0 @@ -#!/bin/ksh - -#BSUB -o gfs_vminmon.o%J -#BSUB -e gfs_vminmon.o%J -#BSUB -J gfs_vminmon -#BSUB -q dev_shared -#BSUB -n 1 -#BSUB -R affinity[core] -#BSUB -M 80 -#BSUB -W 00:05 -#BSUB -a poe -#BSUB -P GFS-T2O - -set -x - -export PDATE=${PDATE:-2016030812} - -############################################################# -# Specify whether the run is production or development -############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -export job=gfs_vminmon.${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export Z=${Z:-gz} -me=`hostname | cut -c1` -export DATAROOT=${DATAROOT:-/gpfs/${me}d2/emc/da/noscrub/$LOGNAME/test_data} -export COMROOT=${COMROOT:-/ptmpp1/$LOGNAME/com} - - -############################################################# -# Specify versions -############################################################# -export gfs_ver=v14.1.0 -export global_shared_ver=v14.1.0 -export gfs_minmon_ver=v1.0.0 -export minmon_shared_ver=v1.0.1 - - -############################################################# -# Load modules -############################################################# -. /usrx/local/Modules/3.2.9/init/ksh -module use /nwprod2/modulefiles -module load prod_util -#module load util_shared - -module list - - -############################################################# -# WCOSS environment settings -############################################################# -export POE=YES - - -############################################################# -# Set user specific variables -############################################################# -export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gfs} -export NWTEST=${NWTEST:-/da/noscrub/${LOGNAME}/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgfs=${HOMEgfs:-${NWTEST}/gfs.${gfs_minmon_ver}} -export JOBGLOBAL=${JOBGLOBAL:-${HOMEgfs}/jobs} -export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared.${minmon_shared_ver}} -export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGFS_VMINMON - -exit - diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_theia.sh b/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_theia.sh deleted file mode 100755 index 4ff005ceaf..0000000000 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_theia.sh +++ /dev/null @@ -1,81 +0,0 @@ -#!/bin/ksh - -#PBS -o gfs_vminmon.log -#PBS -e gfs_vminmon.err -#PBS -N gfs_vminmon -#PBS -A glbss -#PBS -l procs=1,walltime=0:05:00 -#PBS -V - -set -x - -export PDATE=${PDATE:-2016030706} - - -############################################################# -# Specify whether the run is production or development -############################################################# -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -export job=gfs_vminmon.${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=para -export DATAROOT=${DATAROOT:-/scratch4/NCEPDEV/da/noscrub/Edward.Safford/test_data} -export COMROOT=${COMROOT:-/scratch4/NCEPDEV/stmp3/$LOGNAME/com} -export STMP_USER=${STMP_USER:-/scratch4/NCEPDEV/stmp3/$LOGNAME} - - -############################################################# -# Specify versions -############################################################# -export gfs_ver=v1.0.0 -export global_shared_ver=v1.0.1 - -############################################################# -# Add nwpara tools to path -############################################################# -NWPROD=${NWPROD:-/scratch4/NCEPDEV/global/save/glopara/nwpara/util} -NWPRODush=${NWPRODush:=${NWPROD}/ush} -NWPRODexec=${NWPRODexec:=${NWPROD}/exec} -export PATH=${PATH}:${NWPRODush}:${NWPRODexec} - - -############################################################# -# Set user specific variables -############################################################# -export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gfs} -#export NWTEST=${NWTEST:-/scratch4/NCEPDEV/da/noscrub/${LOGNAME}/gfs_q3fy17} -export NWTEST=${NWTEST:-/scratch4/NCEPDEV/da/noscrub/${LOGNAME}/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgfs=${HOMEgfs:-${NWTEST}/gfs.${gfs_ver}} -export JOBGLOBAL=${HOMEgfs}/jobs -export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared.${global_shared_ver}} -export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} - -####################################################################### -# theia specific hacks for no prod_utils module & no setpdy.sh script -####################################################################### -export MY_MACHINE=theia -NDATE=~/bin/ndate -prevday=`$NDATE -24 $PDATE` -export PDYm1=`echo $prevday | cut -c1-8` -ln -s ${NWPRODush}/startmsg.sh ${STMP_USER}/startmsg -ln -s ${NWPRODush}/postmsg.sh ${STMP_USER}/postmsg -ln -s ${NWPRODush}/prep_step.sh ${STMP_USER}/prep_step -ln -s ${NWPRODush}/err_chk.sh ${STMP_USER}/err_chk -export PATH=$PATH:${STMP_USER} -export utilscript=${utilscript:-${NWPRODush}} # err_chk calls postmsg.sh - # directly so need to override - # utilscript location - -export PERL5LIB="/usr/lib64/perl5:/usr/share/perl5" - - -############################################################# -# Execute job -############################################################# -$JOBGLOBAL/JGFS_VMINMON - -exit - diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/parm/gfs_minmon.parm b/util/Minimization_Monitor/nwprod/gfs.v1.0.0/parm/gfs_minmon.parm deleted file mode 100644 index f65e1cdb83..0000000000 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/parm/gfs_minmon.parm +++ /dev/null @@ -1,16 +0,0 @@ -##################################### -# specify minmon shared version -##################################### - - -##################################### -# specify minmon_shared location -##################################### - - -##################################### -# utilities -##################################### -export COMPRESS=${COMPRESS:-gzip} -export UNCOMPRESS=${UNCOMPRESS:-gunzip} - diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_hera.sh b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_hera.sh similarity index 60% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_hera.sh rename to util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_hera.sh index 0ffa2810a2..8a7f5f75c7 100755 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_hera.sh +++ b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_hera.sh @@ -9,57 +9,46 @@ set -x -export PDATE=${PDATE:-2016030706} +export PDATE=${PDATE:-2021122806} + +####################################################################### +# hera specific hacks for no prod_utils module (ndate) +####################################################################### +export MY_MACHINE=hera +export NDATE=/home/Edward.Safford/bin/ndate + +export PERL5LIB="/usr/lib64/perl5:/usr/share/perl5" +export VERBOSE=YES +export KEEPDATA=YES ############################################################# -# Specify whether the run is production or development +# Set necssary vars for j-job ############################################################# export PDY=`echo $PDATE | cut -c1-8` export cyc=`echo $PDATE | cut -c9-10` export job=gfs_vminmon.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} -export envir=para + export DATAROOT=${DATAROOT:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_data} export COMROOT=${COMROOT:-/scratch2/NCEPDEV/stmp3/$LOGNAME/com} export STMP_USER=${STMP_USER:-/scratch2/NCEPDEV/stmp3/$LOGNAME} - -############################################################# -# Specify versions -############################################################# -export gfs_ver=v1.0.0 -export global_shared_ver=v1.0.1 - - -############################################################# -# Set user specific variables -############################################################# export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon} -export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/${LOGNAME}/noscrub/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgfs=${HOMEgfs:-${NWTEST}/gfs.${gfs_ver}} +export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/GSI/util/Minimization_Monitor/nwprod} +export HOMEgfs=${HOMEgfs:-${NWTEST}/gfs} export JOBGLOBAL=${HOMEgfs}/jobs -export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared.${global_shared_ver}} +export HOMEminmon=${HOMEminmon:-${NWTEST}/minmon_shared} export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} +#export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} export M_FIXgfs=${M_FIXgfs:-${HOMEgfs}/fix} -####################################################################### -# theia specific hacks for no prod_utils module (ndate) -####################################################################### -export MY_MACHINE=hera -export NDATE=/home/Edward.Safford/bin/ndate - -export PERL5LIB="/usr/lib64/perl5:/usr/share/perl5" -export VERBOSE=YES -export KEEPDATA=YES - ############################################################# # Execute job ############################################################# -$JOBGLOBAL/JGFS_VMINMON +$JOBGLOBAL/JGFS_ATMOS_VMINMON exit diff --git a/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss2.sh b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss2.sh new file mode 100755 index 0000000000..9046d80dd3 --- /dev/null +++ b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss2.sh @@ -0,0 +1,71 @@ +#!/bin/ksh -l + +#PBS -o gfs_vminmon.out +#PBS -e gfs_vminmon.err +#PBS -N gfs_vminmon +#PBS -q dev +#PBS -l select=1:mem=400M +#PBS -l walltime=05:00 +#PBS -A GFS-DEV + + +set -ax + +export PDATE=${PDATE:-2021082306} + +############################################################# +# Specify whether the run is production or development +############################################################# +export PDY=`echo $PDATE | cut -c1-8` +export cyc=`echo $PDATE | cut -c9-10` +export job=gfs_vminmon.${cyc} +export pid=${pid:-$$} +export jobid=${job}.${pid} +export envir=para + +export DATAROOT=${DATAROOT:-/lfs/h1/ops/canned/com/gfs/v16.2} +export DATA=${DATA:-/lfs/h2/emc/stmp/Edward.Safford} +export COMROOT=${COMROOT:-/lfs/h2/emc/ptmp/Edward.Safford/com} + + +############################################################# +# Specify versions +############################################################# +#export gfs_ver=v16.2.0 +#export global_shared_ver=v16.2.0 +#export gfs_minmon_ver=v1.0.0 +#export minmon_shared_ver=v1.0.1 + + +############################################################# +# Load modules +############################################################# +module load prod_util/2.0.10 +module load util_shared/1.4.0 +module load perl/5.32.0 + +module list + + +############################################################# +# Set user specific variables +############################################################# +export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gfs} +export NWTEST=${NWTEST:-/lfs/h2/emc/da/noscrub/Edward.Safford/git/gsi/GSI/util/Minimization_Monitor/nwprod} +export HOMEgfs=${NWTEST}/gfs +#export HOMEgfs=${HOMEgfs:-${HOMEgdas}} + +export JOBGLOBAL=${HOMEgfs}/jobs +export HOMEminmon=${NWTEST}/minmon_shared + +export COM_IN=${COM_IN:-${DATAROOT}} +export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} +export M_FIXgfs=${HOMEgfs}/fix + +############################################################# +# Execute job +############################################################# +$JOBGLOBAL/JGFS_ATMOS_VMINMON + +exit + diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_cray.sh b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss_c.sh similarity index 57% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_cray.sh rename to util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss_c.sh index 35f48f3b1b..d8eb4723de 100755 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_cray.sh +++ b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss_c.sh @@ -11,7 +11,7 @@ set -x -export PDATE=${PDATE:-2016030712} +export PDATE=${PDATE:-2022010406} ############################################################# # Specify whether the run is production or development @@ -21,54 +21,37 @@ export cyc=`echo $PDATE | cut -c9-10` export job=gfs_vminmon.${cyc} export pid=${pid:-$$} export jobid=${job}.${pid} -export envir=para - - -############################################################# -# Specify versions -############################################################# -export gfs_ver=v14.1.0 -export global_shared_ver=v14.1.0 -export gfs_minmon_ver=v1.0.0 -export minmon_shared_ver=v1.0.1 ############################################################# # Load modules ############################################################# . $MODULESHOME/init/ksh - module load prod_util -#module load prod_envir module load pm5 module list -############################################################# -# WCOSS environment settings -############################################################# -export POE=YES - - ############################################################# # Set user specific variables ############################################################# export DATAROOT=${DATAROOT:-/gpfs/hps3/emc/da/noscrub/$LOGNAME/test_data} -export COMROOT=${COMROOT:-/gpfs/hps2/ptmp/$LOGNAME/com} +export COMROOT=/gpfs/hps2/ptmp/$LOGNAME/com export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gfs} -export NWTEST=${NWTEST:-/gpfs/hps3/emc/da/noscrub/${LOGNAME}/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgfs=${NWTEST}/gfs.${gfs_minmon_ver} +export NWTEST=${NWTEST:-/gpfs/hps3/emc/da/noscrub/Edward.Safford/GSI/util/Minimization_Monitor/nwprod} +export HOMEgfs=${NWTEST}/gfs +export M_FIXgfs=${HOMEgfs}/fix export JOBGLOBAL=${HOMEgfs}/jobs -export HOMEminmon=${NWTEST}/minmon_shared.${minmon_shared_ver} -export COM_IN=${COM_IN:-${DATAROOT}} -export M_TANKverf=${M_TANKverf:-${COMROOT}/${MINMON_SUFFIX}} +export HOMEminmon=${NWTEST}/minmon_shared +export COM_IN=${DATAROOT} +export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} ############################################################# # Execute job ############################################################# -$JOBGLOBAL/JGFS_VMINMON +$JOBGLOBAL/JGFS_ATMOS_VMINMON exit diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_wcoss_d.sh b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss_d.sh similarity index 79% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_wcoss_d.sh rename to util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss_d.sh index 52dbc0cf14..101cf62548 100755 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/driver/test_jgfs_vminmon_wcoss_d.sh +++ b/util/Minimization_Monitor/nwprod/gfs/driver/test_jgfs_vminmon_wcoss_d.sh @@ -8,11 +8,11 @@ #BSUB -R affinity[core] #BSUB -M 80 #BSUB -W 00:05 -#BSUB -P GFS-T2O +#BSUB -P GFS-DEV set -ax -export PDATE=${PDATE:-2018011118} +export PDATE=${PDATE:-2018011112} ############################################################# # Specify whether the run is production or development @@ -28,15 +28,6 @@ export DATAROOT=${DATAROOT:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/test export COMROOT=${COMROOT:-/gpfs/dell2/ptmp/Edward.Safford/com} -############################################################# -# Specify versions -############################################################# -export gdas_ver=v14.1.0 -export global_shared_ver=v14.1.0 -export gfs_minmon_ver=v1.0.0 -export minmon_shared_ver=v1.0.1 - - ############################################################# # Load modules ############################################################# @@ -63,11 +54,11 @@ export minmon_shared_ver=v1.0.1 # Set user specific variables ############################################################# export MINMON_SUFFIX=${MINMON_SUFFIX:-testminmon_gfs} -export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Minimization_Monitor/nwprod} -export HOMEgfs=${NWTEST}/gfs.${gfs_minmon_ver} +export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Minimization_Monitor/nwprod} +export HOMEgfs=${NWTEST}/gfs export JOBGLOBAL=${HOMEgfs}/jobs -export HOMEminmon=${NWTEST}/minmon_shared.${minmon_shared_ver} +export HOMEminmon=${NWTEST}/minmon_shared export COM_IN=${COM_IN:-${DATAROOT}} export M_TANKverf=${COMROOT}/${MINMON_SUFFIX} @@ -76,7 +67,7 @@ export M_FIXgfs=${HOMEgfs}/fix ############################################################# # Execute job ############################################################# -$JOBGLOBAL/JGFS_VMINMON +$JOBGLOBAL/JGFS_ATMOS_VMINMON exit diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/fix/gfs_minmon_cost.txt b/util/Minimization_Monitor/nwprod/gfs/fix/gfs_minmon_cost.txt similarity index 100% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/fix/gfs_minmon_cost.txt rename to util/Minimization_Monitor/nwprod/gfs/fix/gfs_minmon_cost.txt diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/fix/gfs_minmon_gnorm.txt b/util/Minimization_Monitor/nwprod/gfs/fix/gfs_minmon_gnorm.txt similarity index 100% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/fix/gfs_minmon_gnorm.txt rename to util/Minimization_Monitor/nwprod/gfs/fix/gfs_minmon_gnorm.txt diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/jobs/JGFS_ATMOS_VMINMON b/util/Minimization_Monitor/nwprod/gfs/jobs/JGFS_ATMOS_VMINMON similarity index 78% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/jobs/JGFS_ATMOS_VMINMON rename to util/Minimization_Monitor/nwprod/gfs/jobs/JGFS_ATMOS_VMINMON index a0d3503ef3..df0485b208 100755 --- a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/jobs/JGFS_ATMOS_VMINMON +++ b/util/Minimization_Monitor/nwprod/gfs/jobs/JGFS_ATMOS_VMINMON @@ -35,7 +35,6 @@ export m_job=${m_job:-${MINMON_SUFFIX}_mmDE} # Specify Package Areas ############################################## export HOMEgfs=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} -#export PARMmon=${PARMmon:-$HOMEgfs/parm/mon} export SCRgfs=${SCRgfs:-$HOMEgfs/scripts} export M_FIXgfs=${M_FIXgfs:-$HOMEgfs/fix/product} @@ -43,20 +42,6 @@ export HOMEminmon=${HOMEminmon:-${HOMEgfs}} export EXECminmon=${EXECminmon:-$HOMEminmon/exec} export USHminmon=${USHminmon:-$HOMEminmon/ush} -################################### -# source the parm file -################################### -#. ${PARMmon}/da_mon.parm - - -############################################# -# Run setpdy and initialize PDY variables -############################################# -if [[ $MY_MACHINE != "hera" ]]; then - export cycle=t${cyc}z - setpdy.sh - . ./PDY -fi ############################################# # determine PDY and cyc for previous cycle @@ -72,14 +57,10 @@ export p_cyc=`echo ${cdate} | cut -c9-10` ############################################# # TANKverf - WHERE OUTPUT DATA WILL RESIDE ############################################# -TANK_USE_RUN=${TANK_USE_RUN:-1} - export COM_IN=${COM_IN:-${COMROOT}/${NET}/${envir}} -M_TANKverf=${M_TANKverf:-${COM_IN}} -M_TANKverfM0=${M_TANKverfM0:-${M_TANKverf}/${RUN}.${PDY}/${cyc}/$COMPONENT/minmon} -export M_TANKverfM1=${M_TANKverfM1:-${M_TANKverf}/${RUN}.${P_PDY}/${p_cyc}/$COMPONENT/minmon} -export M_TANKverf=$M_TANKverfM0 +M_TANKverf=${M_TANKverf:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}/minmon} +export M_TANKverfM1=${M_TANKverfM1:-${COM_IN}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/minmon} export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}/${cyc}/$COMPONENT} diff --git a/util/Minimization_Monitor/nwprod/gfs.v1.0.0/scripts/exgfs_atmos_vminmon.sh b/util/Minimization_Monitor/nwprod/gfs/scripts/exgfs_atmos_vminmon.sh similarity index 100% rename from util/Minimization_Monitor/nwprod/gfs.v1.0.0/scripts/exgfs_atmos_vminmon.sh rename to util/Minimization_Monitor/nwprod/gfs/scripts/exgfs_atmos_vminmon.sh diff --git a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_costs.pl b/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_costs.pl deleted file mode 100755 index 10ebf67979..0000000000 --- a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_costs.pl +++ /dev/null @@ -1,233 +0,0 @@ -#! /usr/bin/perl - -#--------------------------------------------------------------------------- -# minmon_xtrct_costs.pl -# -# Extract cost data from gsistat file and load into cost -# and cost term files. -#--------------------------------------------------------------------------- - -use strict; -use warnings; - -#---------------------------------------------- -# subroutine to trim white space from strings -#---------------------------------------------- -sub trim { my $s = shift; $s =~ s/^\s+|\s+$//g; return $s }; - - -#--------------------------- -# -# Main routine begins here -# -#--------------------------- - -if ($#ARGV != 4 ) { - print "usage: minmon_xtrct_costs.pl SUFFIX PDY cyc infile jlogfile\n"; - exit; -} -my $suffix = $ARGV[0]; - -my $pdy = $ARGV[1]; -my $cyc = $ARGV[2]; -my $infile = $ARGV[3]; -my $jlogfile = $ARGV[4]; - -#-------------------------------------------------- -my $scr = "minmon_xtrct_costs.pl"; -my $msg = $scr . " HAS STARTED"; - -my @msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -my $rc = 0; -my $cdate = sprintf '%s%s', $pdy, $cyc; - -if( (-e $infile) ) { - - my $found_cost = 0; - my $found_costterms = 0; - my @cost_array; - my @jb_array; - my @jo_array; - my @jc_array; - my @jl_array; - my @term_array; - my @all_cost_terms; - - my $cost_target; - my $cost_number; - my $costterms_target; - my $jb_number = 5; - my $jo_number = 6; - my $jc_number = 7; - my $jl_number = 8; - -# my $FIXminmon = $ENV{"FIXminmon"}; - my $costfile = $ENV{"mm_costfile"}; -# my $costfile = sprintf '%s', "./minmon_cost.txt"; - - if( (-e $costfile) ) { - open( COSTFILE, "<${costfile}" ) or die "Can't open ${costfile}: $!\n"; - my $line; - - while( $line = ) { - if( $line =~ /cost_target/ ) { - my @termsline = split( /:/, $line ); - $cost_target = $termsline[1]; - } elsif( $line =~ /cost_number/ ) { - my @termsline = split( /:/, $line ); - $cost_number = $termsline[1]; - } elsif( $line =~ /costterms_target/ ){ - my @termsline = split( /:/, $line ); - $costterms_target = $termsline[1]; - } - } - close( COSTFILE ); - } else { - $rc = 2; - } - - #------------------------------------------------------------------------ - # Open the infile and search for the $costterms_target and $cost_target - # strings. If found, parse out the cost information and push into - # holding arrays. - #------------------------------------------------------------------------ - if( $rc == 0 ) { - open( INFILE, "<${infile}" ) or die "Can't open ${infile}: $!\n"; - - my $line; - my $term_ctr=0; - - while( $line = ) { - if( $line =~ /$costterms_target/ ) { - my @termsline = split( / +/, $line ); - push( @jb_array, $termsline[$jb_number] ); - push( @jo_array, $termsline[$jo_number] ); - push( @jc_array, $termsline[$jc_number] ); - push( @jl_array, $termsline[$jl_number] ); - } - - if( $line =~ /$cost_target/ ) { - my @costline = split( / +/, $line ); - push( @cost_array, $costline[$cost_number] ); - } - - if( $term_ctr > 0 ) { - my @termline = split( / +/, $line ); - - if ( $term_ctr < 10 ) { - push( @term_array, trim($termline[1]) ); - push( @term_array, trim($termline[2]) ); - push( @term_array, trim($termline[3]) ); - $term_ctr++; - } else { - push( @term_array, trim($termline[1]) ); - push( @term_array, trim($termline[2]) ); - $term_ctr = 0; - } - - }elsif ( $line =~ "J=" && $line !~ "EJ=" ) { - my @termline = split( / +/, $line ); - push( @term_array, trim($termline[2]) ); - push( @term_array, trim($termline[3]) ); - push( @term_array, trim($termline[4]) ); - $term_ctr = 1; - } - } - - close( INFILE ); - - - #---------------------------------------------- - # move cost_array into all_costs by iteration - #---------------------------------------------- - my @all_costs; - for my $i (0 .. $#cost_array) { - my $iterline = sprintf ' %d,%e,%e,%e,%e,%e%s', - $i, $cost_array[$i], $jb_array[$i], $jo_array[$i], - $jc_array[$i], $jl_array[$i], "\n"; - - push( @all_costs, $iterline ); - } - - #--------------------------------------------------- - # move term_array into all_cost_terms by iteration - #--------------------------------------------------- - if( @term_array > 0 ) { - my $nterms = 32; - my $max_iter = ($#term_array+1)/$nterms; - my $niter = $max_iter -1; - - for my $iter (0 .. $niter ) { - my $step = $iter * $nterms; - my $iterline = sprintf '%d, %e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e,%e%s', - $iter, $term_array[$step], $term_array[$step+1], $term_array[$step+2], - $term_array[$step+3], $term_array[$step+4], $term_array[$step+5], - $term_array[$step+6], $term_array[$step+7], $term_array[$step+8], - $term_array[$step+9], $term_array[$step+10], $term_array[$step+11], - $term_array[$step+12], $term_array[$step+13], $term_array[$step+14], - $term_array[$step+15], $term_array[$step+16], $term_array[$step+17], - $term_array[$step+18], $term_array[$step+19], $term_array[$step+20], - $term_array[$step+21], $term_array[$step+22], $term_array[$step+23], - $term_array[$step+24], $term_array[$step+25], $term_array[$step+26], - $term_array[$step+27], $term_array[$step+28], $term_array[$step+29], - $term_array[$step+30], $term_array[$step+31], "\n"; - push( @all_cost_terms, $iterline ); - } - } - - #------------------------------------------ - # write all_costs array to costs.txt file - #------------------------------------------ - my $filename2 = "${cdate}.costs.txt"; - if( @all_costs > 0 ) { - open( OUTFILE, ">$filename2" ) or die "Can't open ${filename2}: $!\n"; - print OUTFILE @all_costs; - close( OUTFILE ); - } - - #----------------------------------------------------- - # write all_cost_terms array to costs_terms.txt file - #----------------------------------------------------- - my $filename3 = "${cdate}.cost_terms.txt"; - if( @all_cost_terms > 0 ) { - open( OUTFILE, ">$filename3" ) or die "Can't open ${filename3}: $!\n"; - print OUTFILE @all_cost_terms; - close( OUTFILE ); - } - - #-------------------------- - # move files to $M_TANKverf - #-------------------------- - my $tankdir = $ENV{"M_TANKverf"}; - if(! -d $tankdir) { - system( "mkdir -p $tankdir" ); - } - - if( -e $filename2 ) { - my $newfile2 = "${tankdir}/${filename2}"; - system("cp -f $filename2 $newfile2"); - } - if( -e $filename3 ) { - my $newfile3 = "${tankdir}/${filename3}"; - system("cp -f $filename3 $newfile3"); - } - - } # $rc still == 0 after reading gmon_cost.txt -} -else { # $infile does not exist - $rc = 1; -} - -#-------------------------------------------------- -$msg = $scr . " HAS ENDED"; -@msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -print "$rc \n" - diff --git a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_gnorms.pl b/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_gnorms.pl deleted file mode 100755 index 0f4d5deb2d..0000000000 --- a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_gnorms.pl +++ /dev/null @@ -1,446 +0,0 @@ -#! /usr/bin/perl - -use strict; -use warnings; -use List::MoreUtils 'true'; -use List::MoreUtils 'first_index'; -use List::MoreUtils 'last_index'; - -#--------------------------------------------------------------------------- -# minmon_xtrct_gnorms.pl -# -# Update the gnorm_data.txt file with data from a new cycle. Add -# this new data to the last line of the gnorm_data.txt file. -# -# Note: If the gnorm_data.txt file does not exist, it will be created. -# -# The gnorm_data.txt file is used plotted directly by the javascript on -# the GSI stats page. -#--------------------------------------------------------------------------- -sub updateGnormData { - my $cycle = $_[0]; - my $igrad = $_[1]; - my $fgnorm = $_[2]; - my $avg_gnorm = $_[3]; - my $min_gnorm = $_[4]; - my $max_gnorm = $_[5]; - my $suffix = $_[6]; - - my $rc = 0; - my @filearray; - - my $gdfile = "gnorm_data.txt"; - - my $outfile = "new_gnorm_data.txt"; - my $yr = substr( $cycle, 0, 4); - my $mon = substr( $cycle, 4, 2); - my $day = substr( $cycle, 6, 2); - my $hr = substr( $cycle, 8, 2); - - my $newln = sprintf ' %04d,%02d,%02d,%02d,%e,%e,%e,%e,%e%s', - $yr, $mon, $day, $hr, $igrad, $fgnorm, - $avg_gnorm, $min_gnorm, $max_gnorm, "\n"; - - # - # attempt to locate the latest $gdfile and copy it locally - # - - #if( ! -e $gdfile ) { - # if( $hr -eq "00" ) - #} - - if( -e $gdfile ) { - open( INFILE, "<${gdfile}" ) or die "Can't open ${gdfile}: $!\n"; - - @filearray = ; - -# This is the mechanism that limits the data to 30 days worth. Should I -# keep it or let the transfer script(s) truncate? 6/12/16 -- I'm going to keep -# it. I can add this as a later change once I add a user mechanism to vary the -# amount of data plotted (on the fly). - - while( $#filearray > 119 ) { # 30 days worth of data = 120 cycles - shift( @filearray ); - } - close( INFILE ); - } - - # Here is the problem Russ encountered after re-running the MinMon: - # If the cycle time in $newln is the same as an existing record in - # *.gnorm_data.txt then we end up with 2+ rows for the same cycle time. - # In that case $newln should replace the first existing line - # in @filearray and all other lines that might match should be deleted. - # Else when the cycle time doesn't already exist (the expected condition) - # it should be pushed into @filearray. - - # algorithm: - # ========= - # Establish $count of matches on "$yr,$mon,$day,$hr" - # if $count > 0 - # while $count > 1 - # get last_index and remove with splice - # replace first_index with $newln - # else - # push $newln - # - my $srch_strng = "$yr,$mon,$day,$hr"; - my $count = true { /$srch_strng/ } @filearray; - - if( $count > 0 ) { - while( $count > 1 ) { - my $l_index = last_index { /$srch_strng/ } @filearray; - splice @filearray, $l_index, 1; - $count = true { /$srch_strng/ } @filearray; - } - my $f_index = first_index { /$srch_strng/ } @filearray; - splice @filearray, $f_index, 1, $newln; - } - else { - push( @filearray, $newln ); - } - - open( OUTFILE, ">$outfile" ) or die "Can't open ${$outfile}: $!\n"; - print OUTFILE @filearray; - close( OUTFILE ); - - system("cp -f $outfile $gdfile"); - -} - -#--------------------------------------------------------------------------- -# makeErrMsg -# -# Apply a gross check on the final value of the gnorm for a specific -# cycle. If the final_gnorm value is greater than the gross_check value -# then put that in the error message file. Also check for resets or a -# premature halt, and journal those events to the error message file too. -# -# Note to self: reset_iter array is passed by reference -#--------------------------------------------------------------------------- -sub makeErrMsg { - my $suffix = $_[0]; - my $cycle = $_[1]; - my $final_gnorm = $_[2]; - my $stop_flag = $_[3]; - my $stop_iter = $_[4]; - my $reset_flag = $_[5]; - my $reset_iter = $_[6]; #reset iteration array - my $infile = $_[7]; - my $gross_check = $_[8]; - - my $mail_msg =""; - my $out_file = "${suffix}.${cycle}.errmsg.txt"; - - - if( $stop_flag > 0 ) { - my $stop_msg = " Gnorm check detected premature iteration stop: suffix = $suffix, cycle = $cycle, iteration = $stop_iter"; - $mail_msg .= $stop_msg; - } - - if( $reset_flag > 0 ) { - my $ctr=0; - my $reset_msg = "\n Gnorm check detected $reset_flag reset(s): suffix = $suffix, cycle = $cycle"; - $mail_msg .= $reset_msg; - $mail_msg .= "\n"; - $mail_msg .= " Reset(s) detected in iteration(s): @{$reset_iter}[$ctr] \n"; - - my $arr_size = @{$reset_iter}; - for( $ctr=1; $ctr < $arr_size; $ctr++ ) { - $mail_msg .= " @{$reset_iter}[$ctr]\n"; - } - } - - if( $final_gnorm >= $gross_check ){ - my $gnorm_msg = " Final gnorm gross check failure: suffix = $suffix, cycle = $cycle, final gnorm = $final_gnorm "; - - $mail_msg .= $gnorm_msg; - } - - if( length $mail_msg > 0 ){ - my $file_msg = " File source for report is: $infile"; - $mail_msg .= $file_msg; - } - - if( length $mail_msg > 0 ){ - my $mail_link = "http://www.emc.ncep.noaa.gov/gmb/gdas/radiance/esafford/gsi_stat/index.html?src=$suffix&typ=gnorm&cyc=$cycle"; - open( OUTFILE, ">$out_file" ) or die "Can't open ${$out_file}: $!\n"; - print OUTFILE $mail_msg; - print OUTFILE "\n\n $mail_link"; - close( OUTFILE ); - } -} - - -#--------------------------------------------------------------------------- -# -# Main routine begins here -# -#--------------------------------------------------------------------------- - -if ($#ARGV != 4 ) { - print "usage: minmon_xtrct_gnorms.pl SUFFIX pdy cyc infile jlogfile\n"; - exit; -} - - -my $suffix = $ARGV[0]; -my $pdy = $ARGV[1]; -my $cyc = $ARGV[2]; -my $infile = $ARGV[3]; -my $jlogfile = $ARGV[4]; - -#-------------------------------------------------- -my $scr = "minmon_xtrct_gnorms.pl"; -my $msg = $scr . " HAS STARTED"; - -my @msgcmd = ("postmsg", $jlogfile, $msg); -#system( @msgcmd ) == 0 -# or die "system @msgcmd failed: $?"; - -#-------------------------------------------------- - - -my $igrad_target; -my $igrad_number; -my $gnorm_target; -my $gnorm_number; -my $expected_gnorms; -my $gross_check_val; - -my $rc = 0; -my $cdate = sprintf '%s%s', $pdy, $cyc; - -#my $FIXminmon = $ENV{"FIXminmon"}; -my $gnormfile = $ENV{"mm_gnormfile"}; -#my $gnormfile = sprintf '%s', "./minmon_gnorm.txt"; - - -if( (-e $gnormfile) ) { - open( GNORMFILE, "<${gnormfile}" ) or die "Can't open ${gnormfile}: $!\n"; - my $line; - - while( $line = ) { - if( $line =~ /igrad_target/ ) { - my @termsline = split( /:/, $line ); - $igrad_target = $termsline[1]; - } elsif( $line =~ /igrad_number/ ) { - my @termsline = split( /:/, $line ); - $igrad_number = $termsline[1]; - } elsif( $line =~ /gnorm_target/ ){ - my @termsline = split( /:/, $line ); - $gnorm_target = $termsline[1]; - } elsif( $line =~ /gnorm_number/ ){ - my @termsline = split( /:/, $line ); - $gnorm_number = $termsline[1]; - } elsif( $line =~ /expected_gnorms/ ){ - my @termsline = split( /:/, $line ); - $expected_gnorms = $termsline[1]; - } elsif( $line =~ /gross_check_val/ ){ - my @termsline = split( /:/, $line ); - $gross_check_val = $termsline[1]; - } - } - close( GNORMFILE ); -} else { - $rc = 4; -} - -if( $rc == 0 ) { - if( (-e $infile) ) { - open( INFILE, "<${infile}" ) or die "Can't open ${infile}: $!\n"; - - my $found_grad = 0; - my $final_gnorm = 0.0; - my $igrad = 0.0; - my $header = 4; - my $header2 = 0; - my @gnorm_array; - my @last_10_gnorm; - - my $reset_flag = 0; - my $stop_flag = 0; - my $warn_str = "WARNING"; - my $stop_str = "Stopping"; - my $stop_iter = ""; - my $reset_str = "Reset"; - my @reset_iter; # reset iteration array - - my $stop_iter_flag = 0; - my $reset_iter_flag = 0; - my $line; - while( $line = ) { - - ############################################## - # if the reset_iter_flag is 1 then record the - # current outer & inner iteration number - ############################################## - if( $reset_iter_flag == 1 ) { - if( $line =~ /${gnorm_target}/ ){ - my @iterline = split( / +/, $line ); - my $iter_str = $iterline[9] . "," . $iterline[10]; - push( @reset_iter, $iter_str); - $reset_iter_flag = 0; - } - } - - - if( $found_grad == 0 ) { - if( $line =~ /${igrad_target}/ ) { - my @gradline = split( / +/, $line ); - - $igrad = $gradline[$igrad_number]; - $found_grad = 1; - } - } - - if( $line =~ /$gnorm_target/ ) { - my @gnormline = split( / +/, $line ); - push( @gnorm_array, $gnormline[$gnorm_number] ); - } - - if( $line =~ /${warn_str}/ ) { - if( $line =~ /${stop_str}/ ) { - $stop_flag++; - $stop_iter_flag=1; - } - elsif( $line =~ /${reset_str}/ ){ - $reset_flag++; - $reset_iter_flag = 1; - } - } - - } - close( INFILE ); - - ######################################################################## - # If the stop_flag is >0 then record the last outer & inner - # iteration number. The trick is that it's the last iteration in the - # log file and we just passed it when we hit the stop warning message, - # so we have to reopen the file and get the last iteration number. - ######################################################################## - if( $stop_flag > 0 ) { - open( INFILE, "<${infile}" ) or die "Can't open ${infile}: $!\n"; - - my @lines = reverse ; - foreach $line (@lines) { - if( $line =~ /${gnorm_target}/ ){ - my @iterline = split( / +/, $line ); - $stop_iter = $iterline[9] . "," . $iterline[10]; - last; - } - } - close( INFILE ); - } - - - my @all_gnorm = @gnorm_array; - - ############################################################################## - ## - ## If the iterations were halted due to error then the @all_gnorm array won't - ## be the expected size. In that case we need to pad the array out with - ## RMISS values so GrADS won't choke when it tries to read the data file. - ## - ## Note that we're padding @all_gnorm. The @gnorm_array is examined below - ## and we don't want to pad that and mess up the min/max calculation. - ## - ############################################################################### - my $arr_size = @all_gnorm; - - if( $arr_size < $expected_gnorms ) { - for( my $ctr = $arr_size; $ctr < $expected_gnorms; $ctr++ ) { - push( @all_gnorm, -999.0 ); - } - } - - my $sum_10_gnorm = 0.0; - my $min_gnorm = 9999999.0; - my $max_gnorm = -9999999.0; - my $avg_gnorm = 0.0; - - for( my $ctr = 9; $ctr >= 0; $ctr-- ) { - my $new_gnorm = pop( @gnorm_array ); - $sum_10_gnorm = $sum_10_gnorm + $new_gnorm; - if( $new_gnorm > $max_gnorm ) { - $max_gnorm = $new_gnorm; - } - if( $new_gnorm < $min_gnorm ) { - $min_gnorm = $new_gnorm; - } - if( $ctr == 9 ) { - $final_gnorm = $new_gnorm; - } - } - - $avg_gnorm = $sum_10_gnorm / 10; - - - ##################################################################### - # Update the gnorm_data.txt file with information on the - # initial gradient, final gnorm, and avg/min/max for the last 10 - # iterations. - ##################################################################### - updateGnormData( $cdate,$igrad,$final_gnorm,$avg_gnorm,$min_gnorm,$max_gnorm,$suffix ); - - - ##################################################################### - # Call makeErrMsg to build the error message file to record any - # abnormalities in the minimization. This file can be mailed by - # a calling script. - ##################################################################### - makeErrMsg( $suffix, $cdate, $final_gnorm, $stop_flag, $stop_iter, $reset_flag, \@reset_iter, $infile, $gross_check_val ); - - - ######################################################### - # write to GrADS ready output data file - # - # Note: this uses pack to achieve the same results as - # an unformatted binary Fortran file. - ######################################################### - my $filename2 = "${cdate}.gnorms.ieee_d"; - - open( OUTFILE, ">$filename2" ) or die "Can't open ${filename2}: $!\n"; - binmode OUTFILE; - - print OUTFILE pack( 'f*', @all_gnorm); - - close( OUTFILE ); - - #-------------------------- - # move files to $M_TANKverf - #-------------------------- - my $tankdir = $ENV{"M_TANKverf"}; - print "M_TANKverf = $tankdir \n"; - if(! -d $tankdir) { - system( "mkdir -p $tankdir" ); - } - - if( -e $filename2 ) { - system("cp -f $filename2 ${tankdir}/."); - } - - my $gdfile = "gnorm_data.txt"; - if( -e $gdfile ) { - system("cp -f $gdfile ${tankdir}/."); - } - - my $errmsg = "${cdate}.errmsg.txt"; - if( -e $errmsg ) { - system("cp -f $errmsg ${tankdir}/."); - } - - } # $rc still == 0 after reading gmon_gnorm.txt - -}else { # $infile does not exist - $rc = 3; -} - -#-------------------------------------------------- -$msg = $scr . " HAS ENDED"; -@msgcmd = ("postmsg", $jlogfile, $msg); -#system( @msgcmd ) == 0 -# or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -print "$rc \n" - diff --git a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_reduct.pl b/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_reduct.pl deleted file mode 100755 index 4dd6b118a1..0000000000 --- a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.0/ush/minmon_xtrct_reduct.pl +++ /dev/null @@ -1,92 +0,0 @@ -#! /usr/bin/perl -use strict; - -#--------------------------------------------------------------------------- -# minmon_xtrct_reduct.pl -# -# Extract the reduction stats for a GSI minimization run and store in -# reduction.ieee_d files ready for GrADS use. -#--------------------------------------------------------------------------- - -if ($#ARGV != 4 ) { - print "usage: minmon_xtrct_reduct.pl SUFFIX pdy cyc infile jlogfile\n"; - print " suffix is data source identifier\n"; - print " pdy is YYYYMMDD of the cycle to be processed\n"; - print " cyc is HH of the cycle to be processed\n"; - print " infile is the data file containing the reduction stats\n"; - print " jlogfile is the job log file\n"; - exit; -} -my $suffix = $ARGV[0]; -my $pdy = $ARGV[1]; -my $cyc = $ARGV[2]; -my $infile = $ARGV[3]; -my $jlogfile = $ARGV[4]; - -#-------------------------------------------------- -my $scr = "minmon_xtrct_reduct.pl"; -my $msg = $scr . " HAS STARTED"; - -my @msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -my $rc = 0; -my $cdate = sprintf '%s%s', $pdy, $cyc; - -if( (-e $infile) ) { - - my $reduct_target = "penalty and grad reduction"; - my $reduct_num = 12; - - open( INFILE, "<${infile}" ) or die "Can't open ${infile}: $!\n"; - - my @reduct_array; - - while( my $line = ) { - if( $line =~ /$reduct_target/ ) { - my @reduct_ln = split( / +/, $line ); - push( @reduct_array, $reduct_ln[$reduct_num] ); - } - } - - close( INFILE ); - - - ################################# - # write reduct_array to outfile - ################################# - my $outfile = "${cdate}.reduction.ieee_d"; - open( OUTFILE, ">$outfile" ) or die "Can't open ${outfile}: $!\n"; - binmode OUTFILE; - - print OUTFILE pack( 'f*', @reduct_array); - close( OUTFILE ); - - #---------------------------- - # copy outfile to $M_TANKverf - #---------------------------- - my $tankdir = $ENV{"M_TANKverf"}; - if(! -d $tankdir) { - system( "mkdir -p $tankdir" ); - } - - if( -e $outfile ) { - my $newfile = "${tankdir}/${outfile}"; - system("cp -f $outfile $newfile"); - } - -} else { # $infile does not exist - $rc = 5; -} - -#-------------------------------------------------- -$msg = $scr . " HAS ENDED"; -@msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -print "$rc \n" - diff --git a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_costs.pl b/util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_costs.pl similarity index 92% rename from util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_costs.pl rename to util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_costs.pl index ca866fbd02..502032da80 100755 --- a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_costs.pl +++ b/util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_costs.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl #--------------------------------------------------------------------------- # minmon_xtrct_costs.pl @@ -36,14 +36,9 @@ my $use_costterms = 0; my $no_data = 0.00; -#-------------------------------------------------- my $scr = "minmon_xtrct_costs.pl"; -my $msg = $scr . " HAS STARTED"; +print "$scr has started\n"; -my @msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- my $rc = 0; my $cdate = sprintf '%s%s', $pdy, $cyc; @@ -68,9 +63,7 @@ my $jc_number = 7; my $jl_number = 8; -# my $FIXminmon = $ENV{"FIXminmon"}; my $costfile = $ENV{"mm_costfile"}; -# my $costfile = sprintf '%s', "./minmon_cost.txt"; if( (-e $costfile) ) { open( COSTFILE, "<${costfile}" ) or die "Can't open ${costfile}: $!\n"; @@ -235,12 +228,4 @@ $rc = 1; } -#-------------------------------------------------- -$msg = $scr . " HAS ENDED"; -@msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -print "$rc \n" - +print "$scr has ended, return code = $rc \n" diff --git a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_gnorms.pl b/util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_gnorms.pl similarity index 95% rename from util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_gnorms.pl rename to util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_gnorms.pl index b921fb7fa1..61da749a1d 100755 --- a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_gnorms.pl +++ b/util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_gnorms.pl @@ -1,4 +1,4 @@ -#! /usr/bin/perl +#!/usr/bin/env perl use strict; use warnings; @@ -41,14 +41,9 @@ sub updateGnormData { $yr, $mon, $day, $hr, $igrad, $fgnorm, $avg_gnorm, $min_gnorm, $max_gnorm, "\n"; - # + #------------------------------------------------------------- # attempt to locate the latest $gdfile and copy it locally # - - #if( ! -e $gdfile ) { - # if( $hr -eq "00" ) - #} - if( -e $gdfile ) { open( INFILE, "<${gdfile}" ) or die "Can't open ${gdfile}: $!\n"; @@ -202,15 +197,9 @@ sub updateGnormData { my $infile = $ARGV[3]; my $jlogfile = $ARGV[4]; -#-------------------------------------------------- -my $scr = "minmon_xtrct_gnorms.pl"; -my $msg = $scr . " HAS STARTED"; - -my @msgcmd = ("postmsg", $jlogfile, $msg); -#system( @msgcmd ) == 0 -# or die "system @msgcmd failed: $?"; -#-------------------------------------------------- +my $scr = "minmon_xtrct_gnorms.pl"; +print "$scr Has Started\n"; # # This needs to be redesigned to get the gnorm value from the gsistat file @@ -310,8 +299,6 @@ sub updateGnormData { my $grad_sqr = $grad**2; my $gnorm = $grad_sqr/$igrad_sqr; -# print "grad_sqr, igrad_sqr, gnorm = $grad_sqr, $igrad_sqr, $gnorm\n"; - push( @gnorm_array, $gnorm ); } @@ -454,12 +441,4 @@ sub updateGnormData { $rc = 3; } -#-------------------------------------------------- -$msg = $scr . " HAS ENDED"; -@msgcmd = ("postmsg", $jlogfile, $msg); -#system( @msgcmd ) == 0 -# or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -print "$rc \n" - +print "$scr has ended, return code = $rc \n" diff --git a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_reduct.pl b/util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_reduct.pl similarity index 78% rename from util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_reduct.pl rename to util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_reduct.pl index 38152ed299..1b8186b6ad 100755 --- a/util/Minimization_Monitor/nwprod/minmon_shared.v1.0.1/ush/minmon_xtrct_reduct.pl +++ b/util/Minimization_Monitor/nwprod/minmon_shared/ush/minmon_xtrct_reduct.pl @@ -1,4 +1,5 @@ -#! /usr/bin/perl +#!/usr/bin/env perl + use strict; #--------------------------------------------------------------------------- @@ -23,14 +24,8 @@ my $infile = $ARGV[3]; my $jlogfile = $ARGV[4]; -#-------------------------------------------------- my $scr = "minmon_xtrct_reduct.pl"; -my $msg = $scr . " HAS STARTED"; - -my @msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- +print "$scr has started\n"; my $rc = 0; my $cdate = sprintf '%s%s', $pdy, $cyc; @@ -39,9 +34,7 @@ if( (-e $infile) ) { -# my $reduct_target = "penalty and grad reduction"; my $reduct_target = "cost,grad,step,b,step?"; -# my $reduct_num = 12; my $gradient_num = 5; my $reduct; @@ -59,7 +52,6 @@ $reduct = $iter_gradient / $initial_gradient; -# push( @reduct_array, $reduct_ln[$reduct_num] ); push( @reduct_array, $reduct ); } } @@ -94,12 +86,4 @@ $rc = 5; } -#-------------------------------------------------- -$msg = $scr . " HAS ENDED"; -@msgcmd = ("postmsg", $jlogfile, $msg); -system( @msgcmd ) == 0 - or die "system @msgcmd failed: $?"; -#-------------------------------------------------- - -print "$rc \n" - +print "$scr has ended, return code = $rc \n" diff --git a/util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/driver/test_nam_minmon.sh b/util/Minimization_Monitor/nwprod/nam_minmon/driver/test_nam_minmon.sh similarity index 100% rename from util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/driver/test_nam_minmon.sh rename to util/Minimization_Monitor/nwprod/nam_minmon/driver/test_nam_minmon.sh diff --git a/util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/fix/nam_minmon_cost.txt b/util/Minimization_Monitor/nwprod/nam_minmon/fix/nam_minmon_cost.txt similarity index 100% rename from util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/fix/nam_minmon_cost.txt rename to util/Minimization_Monitor/nwprod/nam_minmon/fix/nam_minmon_cost.txt diff --git a/util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/fix/nam_minmon_gnorm.txt b/util/Minimization_Monitor/nwprod/nam_minmon/fix/nam_minmon_gnorm.txt similarity index 100% rename from util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/fix/nam_minmon_gnorm.txt rename to util/Minimization_Monitor/nwprod/nam_minmon/fix/nam_minmon_gnorm.txt diff --git a/util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/jobs/JNAM_MINMON b/util/Minimization_Monitor/nwprod/nam_minmon/jobs/JNAM_MINMON similarity index 100% rename from util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/jobs/JNAM_MINMON rename to util/Minimization_Monitor/nwprod/nam_minmon/jobs/JNAM_MINMON diff --git a/util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/parm/nam_minmon.parm b/util/Minimization_Monitor/nwprod/nam_minmon/parm/nam_minmon.parm similarity index 100% rename from util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/parm/nam_minmon.parm rename to util/Minimization_Monitor/nwprod/nam_minmon/parm/nam_minmon.parm diff --git a/util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/scripts/exnam_vrfminmon.sh.ecf b/util/Minimization_Monitor/nwprod/nam_minmon/scripts/exnam_vrfminmon.sh.ecf similarity index 100% rename from util/Minimization_Monitor/nwprod/nam_minmon.v1.0.0/scripts/exnam_vrfminmon.sh.ecf rename to util/Minimization_Monitor/nwprod/nam_minmon/scripts/exnam_vrfminmon.sh.ecf diff --git a/util/Minimization_Monitor/parm/MinMon.ver b/util/Minimization_Monitor/parm/MinMon.ver deleted file mode 100644 index 9de5a047c4..0000000000 --- a/util/Minimization_Monitor/parm/MinMon.ver +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/sh - -if [[ $MINMON_VER -ne 1 ]]; then - - export MINMON_VER=1 - - export gdas_minmon_ver=v1.0.0 - export gfs_minmon_ver=v1.0.0 - export nam_minmon_ver=v1.0.0 - export minmon_shared_ver=v1.0.1 - -else - echo "MinMon.ver is already loaded" -fi - diff --git a/util/Minimization_Monitor/parm/MinMon_config b/util/Minimization_Monitor/parm/MinMon_config index c24af7aa8a..adc9293f0f 100644 --- a/util/Minimization_Monitor/parm/MinMon_config +++ b/util/Minimization_Monitor/parm/MinMon_config @@ -1,26 +1,22 @@ #!/bin/sh -################################################################### -# Note: MinMon/parm/MinMon.ver file must be sourced before this file -################################################################### - if [[ $MINMON_CONFIG -ne 1 ]]; then export MINMON_CONFIG=1 - export MY_MACHINE=hera + export MY_MACHINE=wcoss2 - export MY_MINMON=${MY_MINMON:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/ProdGSI/util/Minimization_Monitor} + export MY_MINMON=${MY_MINMON:-/lfs/h2/emc/da/noscrub/Edward.Safford/git/gsi/GSI/util/Minimization_Monitor} - export HOMEgdas=${MY_MINMON}/nwprod/gdas.${gdas_minmon_ver} - export HOMEgfs=${MY_MINMON}/nwprod/gfs.${gfs_minmon_ver} + export HOMEgdas=${MY_MINMON}/nwprod/gdas + export HOMEgfs=${MY_MINMON}/nwprod/gfs export M_FIXgdas=${M_FIXgdas:-${HOMEgdas}/fix} export M_FIXgfs=${M_FIXgfs:-${HOMEgfs}/fix} - export HOMEnam=${MY_MINMON}/nwprod/nam_minmon.${nam_minmon_ver} - export HOMEminmon=${MY_MINMON}/nwprod/minmon_shared.${minmon_shared_ver} + export HOMEnam=${MY_MINMON}/nwprod/nam_minmon + export HOMEminmon=${MY_MINMON}/nwprod/minmon_shared export MINMON_DE=${MINMON_DE:-${MY_MINMON}/data_xtrct} export M_DE_SCRIPTS=${M_DE_SCRIPTS:-${MINMON_DE}/ush} @@ -30,18 +26,18 @@ if [[ $MINMON_CONFIG -ne 1 ]]; then export M_IG_GRDS=${M_IG_GRDS:-${MINMON_IG}/grds} export M_IG_PARM=${M_IG_PARM:-${MINMON_IG}/parm} - export MY_STMP=${MY_STMP:-/scratch2/NCEPDEV/stmp3/Edward.Safford} - export MY_PTMP=${MY_PTMP:-/scratch2/NCEPDEV/stmp3/Edward.Safford} + export MY_STMP=${MY_STMP:-/lfs/h2/emc/stmp/Edward.Safford} + export MY_PTMP=${MY_PTMP:-/lfs/h2/emc/ptmp/Edward.Safford} export envir=${RUN_ENVIR:-prod} # # working directory # - export DATA_IN=${DATA_IN:-${MY_STMP}/${MINMON_SUFFIX}/${RUN}/minmon} + export DATA_IN=${DATA_IN:-${MY_STMP}/${MINMON_SUFFIX}/${RUN}/minmon} #rename to WORK_DIR export LOGdir=${LOGdir:-${MY_PTMP}/logs/${MINMON_SUFFIX}/${RUN}/minmon} - export MY_TANKDIR=${MY_TANKDIR:-/scratch1/NCEPDEV/da/Edward.Safford/nbns} + export MY_TANKDIR=${MY_TANKDIR:-/lfs/h2/emc/da/noscrub/Edward.Safford/nbns} export M_TANKverf=${M_TANKverf:-${MY_TANKDIR}} export MIN_IMGN_TANKDIR=${MY_TANKDIR}/imgn/${MINMON_SUFFIX} @@ -49,38 +45,23 @@ if [[ $MINMON_CONFIG -ne 1 ]]; then export WEBSERVER=${WEBSERVER:-emcrzdm} export WEBDIR=${WEBDIR:-/home/people/emc/www/htdocs/gmb/gdas/radiance/esafford/gsi_stat/pngs} - # # Utilities used by the MinMon package # export NCP=${NCP:-"/bin/cp -f"} export Z=${Z:-"gz"} - if [[ $MY_MACHINE = "wcoss" ]]; then - shell=sh - . /usrx/local/Modules/default/init/${shell} - module load lsf - module load GrADS/2.0.2 - - export SUB="bsub" - export NWPROD=/nwprod - export COMPRESS=/usrx/local/bin/pigz - export UNCOMPRESS="/usrx/local/bin/unpigz -f" - export RSYNC=/usr/bin/rsync - export PERL5LIB="/usrx/local/pm5/lib64/perl5:/usrx/local/pm5/share/perl5" - - - elif [[ $MY_MACHINE = "wcoss_d" ]]; then + if [[ $MY_MACHINE = "wcoss_d" ]]; then shell=sh source /usrx/local/prod/lmod/lmod/init/${shell} - MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core:/usrx/local/prod/modulefiles/core_third:/usrx/local/prod/modulefiles/defs:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod:/usrx/local/dev/modulefiles - + export MODULEPATH=/usrx/local/prod/lmod/lmod/modulefile/sCore:/usrx/local/prod/modulefiles/core_third:/usrx/local/prod/modulefiles/defs:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod:/usrx/local/dev/modulefiles module purge + 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 prod_util/1.1.6 module load pm5/1.0 module load GrADS/2.2.0 @@ -89,9 +70,24 @@ if [[ $MINMON_CONFIG -ne 1 ]]; then export UNCOMPRESS="gunzip -f" export RSYNC=/usr/bin/rsync + elif [[ $MY_MACHINE = "wcoss2" ]]; then + module load prod_util/2.0.10 + module load util_shared/1.4.0 + module load perl/5.32.0 - elif [[ $MY_MACHINE = "cray" ]]; then + # + # Note this GrADS mod is a temporary solution. NCO is to + # provide a more permanent fix on wcoss2 at some point. + # + module use /apps/test/modules + module load GrADS/2.2.1-cce-11.0.4 + + export SUB=`which qsub` + export COMPRESS=gzip + export UNCOMPRESS="gunzip -f" + export RSYNC=`which rsync` + elif [[ $MY_MACHINE = "cray" ]]; then sys=`hostname` sys1=`echo $sys | cut -c1` echo $sys1 @@ -136,6 +132,7 @@ if [[ $MINMON_CONFIG -ne 1 ]]; then export NDATE=${NWPROD}/ndate export COMPRESS=gzip export UNCOMPRESS="gunzip -f" + elif [[ $MY_MACHINE = "s4" ]]; then shell=sh . $MODULESHOME/init/$shell diff --git a/util/Minimization_Monitor/parm/MinMon_user_settings b/util/Minimization_Monitor/parm/MinMon_user_settings index 40357a3fa0..939d299c7e 100644 --- a/util/Minimization_Monitor/parm/MinMon_user_settings +++ b/util/Minimization_Monitor/parm/MinMon_user_settings @@ -14,19 +14,19 @@ if [[ $MINMON_USER_SETTINGS -ne 1 ]]; then # ACCOUNT is used on zeus only for use with the qsub -a flag. It is # empty on other platforms. # - export ACCOUNT=${ACCOUNT:-fv3-cpu} + export ACCOUNT=${ACCOUNT:-} # # PROJECT is used on wcoss only with the bjob -P flag. It is # empty on other platforms. # - export PROJECT=${PROJECT:-} + export PROJECT=${PROJECT:-GDAS-DEV} # - # JOB_QUEUE is used on wcoss only with the bjob -q flag. It is + # JOB_QUEUE is used on wcoss and wcoss2 bjob/qsub -q flag. It is # empty on other platforms. # - export JOB_QUEUE=${JOB_QUEUE:-dev_shared} + export JOB_QUEUE=${JOB_QUEUE:-dev} # # RUN_ONLY_ON_DEV 1 = dev machine only, 0 = run anywhere @@ -64,7 +64,7 @@ if [[ $MINMON_USER_SETTINGS -ne 1 ]]; then # # MAIL_TO is the mail recpient list for error reporting # - export MAIL_TO=${MAIL_TO:-""} + export MAIL_TO=${MAIL_TO:-"edward.safford@noaa.gov"} # # MAIL_CC is the mail recpient cc list for error reporting