Skip to content

Commit

Permalink
GitHub Issue #160. Correct data file location problem.
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardSafford-NOAA committed May 18, 2021
1 parent b511ba0 commit 00eb5da
Show file tree
Hide file tree
Showing 13 changed files with 58 additions and 25 deletions.
38 changes: 25 additions & 13 deletions util/Radiance_Monitor/data_extract/ush/RadMon_CP_glb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@ function usage {
echo " If not specified the pdate will be calculated by finding the latest"
echo " cycle time in $TANKverf and incrementing it by 6 hours."
echo ""
echo " -f|--radf parent directory to file location. This will be extended by "
echo " -f|--radf parent directory to radstat file location. This will be extended by "
echo " $RUN.$PDY/$CYC/atmos/radmon and the files there copied to TANKverf."
echo ""
echo " -d|--dataf parent directory to extracted radstat data file location. This will be extended by "
echo " $RUN.$PDY/$CYC and the files there copied to TANKverf."

}


echo start RadMon_CP_glb.sh
exit_value=0

nargs=$#
if [[ $nargs -le 0 || $nargs -gt 7 ]]; then
if [[ $nargs -le 0 || $nargs -gt 9 ]]; then
usage
exit 1
fi
Expand Down Expand Up @@ -65,7 +69,11 @@ do
shift # past argument
;;
-f|--radf)
radmon_file_loc="$2"
radstat_loc="$2"
shift # past argument
;;
-d|--dataf)
data_file_loc="$2"
shift # past argument
;;
*)
Expand All @@ -80,7 +88,8 @@ done
echo "RADMON_SUFFIX = $RADMON_SUFFIX"
echo "run = $run"
echo "pdate = $pdate"
echo "radmon_file_loc = ${radmon_file_loc}"
echo "radstat_loc = ${radstat_loc}"
echo "data_file_loc = ${data_file_loc}"

export RUN=${RUN:-${run}}

Expand Down Expand Up @@ -111,10 +120,6 @@ fi

export USHradmon=${USHradmon:-$HOMEradmon/ush}

if [[ ${radmon_file_loc} = "" ]]; then
radmon_file_loc=${RADSTAT_LOCATION}
fi


#---------------------------------------------------------------
# Create any missing directories.
Expand Down Expand Up @@ -142,13 +147,20 @@ export PDY=`echo $PDATE|cut -c1-8`
export CYC=`echo $PDATE|cut -c9-10`

#---------------------------------------------------------------
# Verify the data files are available
# Set data and radstat locations
#---------------------------------------------------------------
if [[ -n ${radstat_loc} ]]; then
export RADSTAT_LOCATION=${radstat_loc}
fi
export RADSTAT_LOCATION=${RADSTAT_LOCATION}/${RUN}.${PDY}/${CYC}/atmos


if [[ -n ${data_file_loc} ]]; then
export DATA_LOCATION=${data_file_loc}/${RUN}.${PDY}
else
export DATA_LOCATION=${RADSTAT_LOCATION}/radmon
fi

export RADSTAT_LOCATION=${radmon_file_loc}/${RUN}.${PDY}/${CYC}/atmos
echo "RADSTAT_LOCATION = ${RADSTAT_LOCATION}"
export DATA_LOCATION=${RADSTAT_LOCATION}/radmon
echo "DATA_LOCATION = ${DATA_LOCATION}"

if [[ -d ${DATA_LOCATION} ]]; then
job=${DE_SCRIPTS}/radmon_copy.sh
Expand Down
4 changes: 2 additions & 2 deletions util/Radiance_Monitor/data_extract/ush/radmon_copy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,8 +175,8 @@ if [[ $exit_value == 0 ]]; then
echo "satype_file is good to go: ${satype_file}"
fi

if [[ ! -e ${radstat_file} ]]; then
echo "MISSING radstat_file: ${radstat_file}"
if [[ ! -e ${radstat} ]]; then
echo "MISSING radstat_file: ${radstat}"
else
echo "radstat is good to go: ${radstat}"
fi
Expand Down
Binary file added util/Radiance_Monitor/image_gen/html/arrowleft.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added util/Radiance_Monitor/image_gen/html/arrowright.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 6 additions & 4 deletions util/Radiance_Monitor/image_gen/html/install_glb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -99,12 +99,14 @@ data_found=0
while [[ data_found -eq 0 && $PDATE -ge $limit ]]; do
PDY=`echo $PDATE|cut -c1-8`

if [[ ${TANK_USE_RUN} -eq 1 ]]; then
test_dir=${TANKverf}/${RUN}.${PDY}/${MONITOR}
else
test_dir=${TANKverf}/${RUN}.${PDY}/${MONITOR}
if [[ ! -d ${test_dir} ]]; then
test_dir=${TANKverf}/${RUN}.${PDY}
fi
if [[ ! -d ${test_dir} ]]; then
test_dir=${TANKverf}/${MONITOR}.${PDY}
fi

echo "test_dir = ${test_dir}"

if [[ -d ${test_dir} ]]; then
Expand Down
11 changes: 10 additions & 1 deletion util/Radiance_Monitor/image_gen/ush/RadMon_IG_glb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,10 @@ echo "last_plot_time file = ${last_plot_time}"

latest_data=`${IG_SCRIPTS}/nu_find_cycle.pl --cyc 1 \
--dir ${TANKDIR} --run ${RUN}`
if [[ ${latest_data} = "" ]]; then
latest_data=`${IG_SCRIPTS}/find_cycle.pl --cyc 1 \
--dir ${TANKDIR} --run ${RUN}`
fi

if [[ ${pdate} = "" ]]; then
if [[ -e ${last_plot_time} ]]; then
Expand Down Expand Up @@ -151,7 +155,7 @@ echo "PDATE = ${PDATE}"
# Make sure $LOGdir exists
#--------------------------------------------------------------------
echo "LOGdir = ${LOGdir}"
if [[ -e ${LOGdir} ]]; then
if [[ ! -e ${LOGdir} ]]; then
mkdir -p $LOGdir
fi

Expand All @@ -175,8 +179,13 @@ export PDY=`echo $PDATE|cut -c1-8`
#

ieee_src=${TANKverf}/${RUN}.${PDY}/${CYC}/${MONITOR}

if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${PDY}/${MONITOR}

if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${PDY}
fi
fi

if [[ ! -d ${ieee_src} ]]; then
Expand Down
3 changes: 3 additions & 0 deletions util/Radiance_Monitor/image_gen/ush/mk_angle_plots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ for type in ${SATYPE}; do
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${pdy}/${MONITOR}
fi
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${pdy}
fi
fi

echo "ieee_src = with pdy = $pdy"
Expand Down
3 changes: 3 additions & 0 deletions util/Radiance_Monitor/image_gen/ush/mk_bcoef_plots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ for type in ${SATYPE}; do
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${PDY}/${MONITOR}
fi
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${PDY}
fi
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${MONITOR}.${PDY}
fi
Expand Down
3 changes: 3 additions & 0 deletions util/Radiance_Monitor/image_gen/ush/mk_time_plots.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ for type in ${SATYPE}; do
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${pdy}/${MONITOR}
fi
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${RUN}.${pdy}
fi
if [[ ! -d ${ieee_src} ]]; then
ieee_src=${TANKverf}/${MONITOR}.${pdy}
fi
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
abi_g16 abi_g17 ahi_himawari8 amsua_metop-a amsua_metop-b amsua_metop-c amsua_n15 amsua_n18 amsua_n19 atms_npp atms_n20 avhrr_metop-a avhrr_metop-b avhrr_n18 avhrr_n19 cris-fsr_npp cris-fsr_n20 hirs4_metop-a hirs4_metop-b hirs4_n19 iasi_metop-a iasi_metop-b mhs_metop-a mhs_metop-b mhs_metop-c mhs_n19 saphir_meghat seviri_m08 seviri_m11 ssmis_f17 ssmis_f18
abi_g16 abi_g17 ahi_himawari8 amsua_metop-a amsua_metop-b amsua_metop-c amsua_n15 amsua_n18 amsua_n19 atms_npp atms_n20 avhrr_metop-a avhrr_metop-b avhrr_n18 avhrr_n19 cris-fsr_npp cris-fsr_n20 hirs4_metop-a hirs4_n19 iasi_metop-a iasi_metop-b mhs_metop-a mhs_metop-b mhs_metop-c mhs_n19 saphir_meghat seviri_m08 seviri_m11 ssmis_f17 ssmis_f18

5 changes: 3 additions & 2 deletions util/Radiance_Monitor/parm/RadMon_config
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,9 @@ elif [[ $MY_MACHINE = "wcoss_c" ]]; then

elif [[ $MY_MACHINE = "hera" ]]; then

export GRADS=/apps/grads/2.0.2/bin/grads
export STNMAP=/apps/grads/2.0.2/bin/stnmap
module load grads/2.2.1
export GRADS=`which grads`
export STNMAP=`which stnmap`

export SUB=/apps/slurm/default/bin/sbatch
export NDATE=/home/Edward.Safford/bin/ndate
Expand Down
4 changes: 2 additions & 2 deletions util/Radiance_Monitor/parm/RadMon_user_settings
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,15 @@ export USE_STATIC_SATYPE=${USE_STATIC_SATYPE:-1}
# primarily intended for use with the operational data sets (GDAS,NDAS) where
# detection and reporting of a missing sat/instrument source in a given cycle run
# is desirable. It is not normally necessary in parallels. 0 = off, 1 = on
export DO_DIAG_RPT=${DO_DIAG_RPT:-1}
export DO_DIAG_RPT=${DO_DIAG_RPT:-0}


# DO_DATA_RPT switches on/off error checking and reporting of the penalty values
# by channel for each sat/instrument source. This is a check primarily intended
# for use iwth the operational data sets (GDAS,NDAS) where detection and
# reporting of drifting channel(s) on specific sat/instrument sources is
# desirable. It is not normally necesary to apply this to parallels. 0 = off, 1 = on
export DO_DATA_RPT=${DO_DATA_RPT:-1}
export DO_DATA_RPT=${DO_DATA_RPT:-0}


export MAIL_TO=${MAIL_TO:-'edward.safford@noaa.gov'}
Expand Down

0 comments on commit 00eb5da

Please sign in to comment.