From 294ceeb061481f1eb734f70045ff9e13aeb8c687 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Mon, 3 Mar 2025 14:34:39 +0000 Subject: [PATCH] Ref #106 Save work in progress. --- .../data_extract/ush/ConMon_DE.sh | 6 ++--- .../nwprod/conmon_shared/ush/mk_low_cnt.pl | 24 +++++++------------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh index b15fff15..e8e960c4 100755 --- a/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh +++ b/src/Conventional_Monitor/data_extract/ush/ConMon_DE.sh @@ -199,8 +199,6 @@ if [[ -e ${C_TANKDIR}/info/gdas_conmon_base.txt ]]; then export conmon_base=${C_TANKDIR}/info/gdas_conmon_base.txt fi -echo "check test" - exit_value=0 if [ -s $cnvstat -a -s $pgrbf00 -a -s $pgrbf06 ]; then #------------------------------------------------------------------ @@ -232,10 +230,10 @@ if [ -s $cnvstat -a -s $pgrbf00 -a -s $pgrbf06 ]; then elif [[ $MY_MACHINE = "wcoss2" ]]; then $SUB -v "NET=${NET}, C_TANKDIR=${C_TANKDIR}, C_LOGDIR=${C_LOGDIR}, cnvstat=${cnvstat}, pgrbf00=${pgrbf00}, \ - pgrbf06=${pgrbf06}, CNVSTAT_LOCATION=${cnvstat_location}, COMPONENT=${COMPONENT}, \ + pgrbf06=${pgrbf06}, CNVSTAT_LOCATION=${cnvstat_location}, COMPONENT=${COMPONENT}, DO_DATA_RPT=${DO_DATA_RPT}, \ C_DATDIR=${C_DATDIR}, C_GDATDIR=${C_GDATDIR}, C_COMIN=${C_COMIN}, C_COMINm6h=${C_COMINm6h}, \ CONMON_WORK_DIR=${CONMON_WORK_DIR}, PDATE=${PDATE}, PDY=${PDY}, CYC=${CYC}, HOMEgdas_conmon=${HOMEgdas_conmon}, \ - WGRIB2=${WGRIB2}, USHconmon=${USHconmon}, CLEAN_TANKDIR=${CLEAN_TANKDIR}, convinfo=${convinfo}, gfs_ver=${gfs_ver}, + WGRIB2=${WGRIB2}, USHconmon=${USHconmon}, CLEAN_TANKDIR=${CLEAN_TANKDIR}, convinfo=${convinfo}, gfs_ver=${gfs_ver}, \ HOMEgfs_conmon=${HOMEgfs_conmon}, EXECconmon=${EXECconmon}" \ -q $JOB_QUEUE -A $ACCOUNT -o ${logfile} -e ${logfile} -l walltime=30:00 -N ${jobname} \ -l select=1:mem=12G ${HOMEgdas_conmon}/jobs/JGDAS_ATMOS_CONMON diff --git a/src/Conventional_Monitor/nwprod/conmon_shared/ush/mk_low_cnt.pl b/src/Conventional_Monitor/nwprod/conmon_shared/ush/mk_low_cnt.pl index def44a7c..8f4f22ba 100755 --- a/src/Conventional_Monitor/nwprod/conmon_shared/ush/mk_low_cnt.pl +++ b/src/Conventional_Monitor/nwprod/conmon_shared/ush/mk_low_cnt.pl @@ -92,7 +92,6 @@ my %nobs_hash; foreach ( @nobs_data ) { my @words = split /,/, $_; - print " words = @words\n"; my $key = trim( $words[0] ) . "_" . trim( $words[1] ); my $value = trim( $words[2] ); $nobs_hash{ $key } = $value; @@ -108,20 +107,13 @@ my %base_hash; foreach ( @base_data ) { my @words = split /,/, $_; - print " words = @words\n"; my $base_hr = trim( $words[0] ); my $key = trim( $words[1] ); my $value = trim( $words[2] ); - print "base_hr, hr = $base_hr, $hr \n" ; - if( $base_hr == $hr ) { - print " adding $value to hash with key $key\n"; $base_hash{ $key } = $value; } - else { - print " not this hour\n"; - } } @@ -143,14 +135,16 @@ my $bound = $base_hash{ $key }; my $avg = $bound; - #-------------------------------------------- - # start with a gross check of 65% of average - # - $bound = $bound * 0.65; + if (defined $bound) { + #-------------------------------------------- + # start with a gross check of 65% of average + # + $bound = $bound * 0.65; - if( $nobs < $bound ) { - print FILE "$key, $nobs, $bound, $avg\n"; - } + if( $nobs < $bound ) { + print FILE "$key, $nobs, $bound, $avg\n"; + } + } } close( FILE );