From e14077ccef4dbe7bcde0501b58e944f21fd0c8f8 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Mon, 12 Dec 2022 15:36:41 +0000 Subject: [PATCH 1/2] Ref #56 Add misc fixes. --- .../data_xtrct/ush/MinMon_CP.sh | 4 +++- .../data_extract/ush/RadMon_CP_glb.sh | 5 ++++- .../data_extract/ush/radmon_copy.sh | 13 +++++++++++-- src/Radiance_Monitor/image_gen/ush/Transfer.sh | 2 +- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/src/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh b/src/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh index 712ae2e5..b7b86e5e 100755 --- a/src/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh +++ b/src/Minimization_Monitor/data_xtrct/ush/MinMon_CP.sh @@ -39,6 +39,8 @@ fi # Process command line arguments # pdate="" +run="" + while [[ $# -ge 1 ]] do key="$1" @@ -123,7 +125,7 @@ cyc=`echo $pdate|cut -c9-10` # Verify the data files are available for this cycle # data_dir="" -data_dir=`$MON_USH/get_stats_path.sh --run $RUN --pdate ${pdate} --net ${MINMON_SUFFIX} --tank ${data} --mon minmon` +data_dir=`$MON_USH/get_stats_path.sh --run $run --pdate ${pdate} --net ${MINMON_SUFFIX} --tank ${data} --mon minmon` echo data_dir = $data_dir if [[ ! -d ${data_dir} ]]; then diff --git a/src/Radiance_Monitor/data_extract/ush/RadMon_CP_glb.sh b/src/Radiance_Monitor/data_extract/ush/RadMon_CP_glb.sh index 52d294f4..0853d1f1 100755 --- a/src/Radiance_Monitor/data_extract/ush/RadMon_CP_glb.sh +++ b/src/Radiance_Monitor/data_extract/ush/RadMon_CP_glb.sh @@ -53,6 +53,8 @@ export RAD_AREA=glb # Set default values and process command line arguments. # run=gdas +pdate="" +data_file_loc="" while [[ $# -ge 1 ]] do @@ -145,7 +147,8 @@ fi # $TANKverf and increment 6 hours. #--------------------------------------------------------------- if [[ $pdate = "" ]]; then - ldate=`${DE_SCRIPTS}/nu_find_cycle.pl --run $RUN --cyc 1 --dir ${TANKverf}` + ldate=`${MON_USH}/find_last_cycle.sh --net ${RADMON_SUFFIX} \ + --run ${RUN} --mon radmon --tank ${TANKDIR}` pdate=`${NDATE} +06 ${ldate}` fi echo "pdate = $pdate" diff --git a/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh b/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh index 912f3d1d..53efe3c8 100755 --- a/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh +++ b/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh @@ -60,10 +60,19 @@ fi # incomplete results which can result in false # 'drop out' plots. # +echo "DATA_LOCATION = $DATA_LOCATION" nfile_src=`ls -l ${DATA_LOCATION}/*${PDATE}*ieee_d* | egrep -c '^-'` +echo "first try, nfile_src = $nfile_src" +if [[ ${nfile_src} -le 0 ]]; then + echo "trying tar files" + nfile_src=`ls -l ${DATA_LOCATION}/radmon_*tar* | egrep -c '^-'` +fi echo "nfile_src = ${nfile_src}" nfile_thirty=`find ${DATA_LOCATION}/*${PDATE}*ieee_d* -maxdepth 0 -mmin -30` +if [[ ${nfile_thirty} -le 0 ]]; then + nfile_thirty=`find ${DATA_LOCATION}/*radmon_*tar* -maxdepth 0 -mmin -30` +fi echo "nfile_thirty = ${nfile_thirty}" if [[ ${nfile_src} -le 0 ]]; then @@ -82,7 +91,7 @@ if [[ ${exit_value} -eq 0 ]]; then for type in ${type_list}; do - file_list=`ls ${DATA_LOCATION}/${type}.*${PDATE}*ieee_d* ${DATA_LOCATION}/${type}*tar* ` + file_list=`ls ${DATA_LOCATION}/${type}.*${PDATE}*ieee_d* ${DATA_LOCATION}/radmon_${type}*tar* ` for file in ${file_list}; do bfile=`basename ${file}` @@ -188,7 +197,7 @@ if [[ $exit_value == 0 ]]; then ${DE_SCRIPTS}/radmon_diag_ck.sh --rad ${radstat} --sat ${satype_file} --out ${diag_out} if [[ -e ${diag_out} ]]; then - $NCP ./${diag_out} ${TANKverf}/${RUN}.${day}/${cyc}/radmon/. + $NCP ./${diag_out} ${TANKverf}/${RUN}.${PDY}/${CYC}/radmon/. fi fi diff --git a/src/Radiance_Monitor/image_gen/ush/Transfer.sh b/src/Radiance_Monitor/image_gen/ush/Transfer.sh index 93f2232e..192c8c49 100755 --- a/src/Radiance_Monitor/image_gen/ush/Transfer.sh +++ b/src/Radiance_Monitor/image_gen/ush/Transfer.sh @@ -104,7 +104,7 @@ if [[ ${IMGNDIR} != "/" ]]; then if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" || $MY_MACHINE = "wcoss2" ]]; then /usr/bin/rsync -ave ssh --exclude *.ctl.${Z} \ --exclude 'horiz' --exclude *.png --delete-during ${IMGNDIR}/ \ - ${WEB_USER}@${WEB_SVR}.ncep.noaa.gov:${WEBDIR}/ + ${WEBUSER}@${WEBSVR}.ncep.noaa.gov:${WEBDIR}/ fi fi From d14e0f632c61479ed0a1e144621dbde0f66c9603 Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Mon, 12 Dec 2022 16:09:10 +0000 Subject: [PATCH 2/2] Ref #56 rm unnecessary debug statements --- src/Radiance_Monitor/data_extract/ush/radmon_copy.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh b/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh index 53efe3c8..4195ac33 100755 --- a/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh +++ b/src/Radiance_Monitor/data_extract/ush/radmon_copy.sh @@ -60,11 +60,8 @@ fi # incomplete results which can result in false # 'drop out' plots. # -echo "DATA_LOCATION = $DATA_LOCATION" nfile_src=`ls -l ${DATA_LOCATION}/*${PDATE}*ieee_d* | egrep -c '^-'` -echo "first try, nfile_src = $nfile_src" if [[ ${nfile_src} -le 0 ]]; then - echo "trying tar files" nfile_src=`ls -l ${DATA_LOCATION}/radmon_*tar* | egrep -c '^-'` fi echo "nfile_src = ${nfile_src}"