From 1e6fd616ea633e25cf5f83e5b618111659b94d3d Mon Sep 17 00:00:00 2001 From: "Edward.Safford" Date: Fri, 9 Apr 2021 14:40:01 +0000 Subject: [PATCH] GitHub Issue NOAA-EMC/GSI#123. OznMon update and bugzilla fixes. --- CMakeLists.txt | 4 +- util/Ozone_Monitor/CMakeLists.txt | 4 +- util/Ozone_Monitor/OznMon_install.pl | 14 +- util/Ozone_Monitor/build_OznMon_cmake.sh | 13 +- .../Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh | 205 ++++++++++++++++++ .../Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh | 72 +++--- .../data_xtrct/ush/find_cycle.pl | 13 +- .../data_xtrct/ush/oznmon_copy.sh | 171 +++++++++++++++ .../data_xtrct/ush/run_GEOIRctl3.sh | 71 ------ .../data_xtrct/ush/run_GEOIRimg4.sh | 72 ------ .../data_xtrct/ush/run_gfs_gdas.sh | 10 +- util/Ozone_Monitor/get_hostname.pl | 14 +- .../Ozone_Monitor/image_gen/ush/OznMon_Plt.sh | 159 ++++++++------ .../image_gen/ush/OznMon_Transfer.sh | 40 +--- .../Ozone_Monitor/image_gen/ush/mk_err_rpt.sh | 13 +- util/Ozone_Monitor/image_gen/ush/mk_horiz.sh | 10 +- .../Ozone_Monitor/image_gen/ush/mk_summary.sh | 9 +- util/Ozone_Monitor/image_gen/ush/mk_time.sh | 9 +- .../Ozone_Monitor/image_gen/ush/plot_horiz.sh | 7 +- .../image_gen/ush/plot_summary.sh | 6 +- util/Ozone_Monitor/image_gen/ush/plot_time.sh | 6 +- .../image_gen/ush/rm_img_files.pl | 101 +++++++++ .../image_gen/ush/run_plot_GEOIRimg4.sh | 66 ------ .../image_gen/ush/run_plot_gdas.sh | 68 ------ .../image_gen/ush/run_transfer_gfs.sh | 17 -- util/Ozone_Monitor/image_gen/ush/transfer.sh | 72 ++---- util/Ozone_Monitor/makeall.sh | 82 ------- .../driver/test_jgdas_verfozn.sh | 93 -------- .../driver/test_jgdas_verfozn_hera.sh | 42 +--- .../driver/test_jgdas_verfozn_wcoss_c.sh | 29 +-- .../driver/test_jgdas_verfozn_wcoss_d.sh | 29 +-- .../fix/gdas_oznmon_base.tar | Bin .../fix/gdas_oznmon_satype.txt | 0 .../jobs/JGDAS_ATMOS_VERFOZN | 42 +--- .../parm/gdas_oznmon.parm | 0 .../scripts/exgdas_atmos_verfozn.sh | 58 +---- .../sorc/oznmon_horiz.fd/makefile | 69 ------ .../sorc/oznmon_horiz.fd/update_ctl_horiz.f90 | 93 -------- .../sorc/oznmon_time.fd/makefile | 76 ------- .../sorc/oznmon_time.fd/update_ctl_time.f90 | 93 -------- .../exec/.gitignore | 0 .../modulefiles/cray/OznMonBuild | 0 .../modulefiles/dell/OznMonBuild | 0 .../modulefiles/theia/OznMonBuild | 0 .../modulefiles/wcoss/OznMonBuild | 0 .../sorc/oznmon_horiz.fd/CMakeLists.txt | 0 .../sorc/oznmon_horiz.fd/create_ctl_horiz.f90 | 0 .../sorc/oznmon_horiz.fd/horiz.f90 | 36 --- .../sorc/oznmon_horiz.fd/kinds.f90 | 0 .../sorc/oznmon_horiz.fd/oznmon_read_diag.f90 | 0 .../sorc/oznmon_time.fd/CMakeLists.txt | 0 .../sorc/oznmon_time.fd/avgsdv.f90 | 0 .../sorc/oznmon_time.fd/create_ctl_time.f90 | 0 .../sorc/oznmon_time.fd/kinds.f90 | 0 .../sorc/oznmon_time.fd/oznmon_read_diag.f90 | 0 .../sorc/oznmon_time.fd/time.f90 | 0 .../sorc/oznmon_time.fd/valid.f90 | 0 .../nwprod/oznmon_shared/ush/clean_tankdir.sh | 123 +++++++++++ .../ush/ozn_xtrct.sh | 126 +++++------ util/Ozone_Monitor/parm/OznMon.ver | 2 - util/Ozone_Monitor/parm/OznMon_config | 45 ++-- util/Ozone_Monitor/parm/OznMon_user_settings | 27 ++- 62 files changed, 955 insertions(+), 1356 deletions(-) create mode 100755 util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh create mode 100755 util/Ozone_Monitor/data_xtrct/ush/oznmon_copy.sh delete mode 100755 util/Ozone_Monitor/data_xtrct/ush/run_GEOIRctl3.sh delete mode 100755 util/Ozone_Monitor/data_xtrct/ush/run_GEOIRimg4.sh create mode 100755 util/Ozone_Monitor/image_gen/ush/rm_img_files.pl delete mode 100755 util/Ozone_Monitor/image_gen/ush/run_plot_GEOIRimg4.sh delete mode 100755 util/Ozone_Monitor/image_gen/ush/run_plot_gdas.sh delete mode 100755 util/Ozone_Monitor/image_gen/ush/run_transfer_gfs.sh delete mode 100755 util/Ozone_Monitor/makeall.sh delete mode 100755 util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn.sh rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/driver/test_jgdas_verfozn_hera.sh (53%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/driver/test_jgdas_verfozn_wcoss_c.sh (74%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/driver/test_jgdas_verfozn_wcoss_d.sh (79%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/fix/gdas_oznmon_base.tar (100%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/fix/gdas_oznmon_satype.txt (100%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/jobs/JGDAS_ATMOS_VERFOZN (74%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/parm/gdas_oznmon.parm (100%) rename util/Ozone_Monitor/nwprod/{gdas_oznmon.v2.0.0 => gdas_oznmon}/scripts/exgdas_atmos_verfozn.sh (52%) delete mode 100755 util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/makefile delete mode 100755 util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/update_ctl_horiz.f90 delete mode 100755 util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/makefile delete mode 100755 util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/update_ctl_time.f90 rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/exec/.gitignore (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/modulefiles/cray/OznMonBuild (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/modulefiles/dell/OznMonBuild (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/modulefiles/theia/OznMonBuild (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/modulefiles/wcoss/OznMonBuild (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_horiz.fd/CMakeLists.txt (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_horiz.fd/create_ctl_horiz.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_horiz.fd/horiz.f90 (93%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_horiz.fd/kinds.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_horiz.fd/oznmon_read_diag.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/CMakeLists.txt (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/avgsdv.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/create_ctl_time.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/kinds.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/oznmon_read_diag.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/time.f90 (100%) rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/sorc/oznmon_time.fd/valid.f90 (100%) create mode 100755 util/Ozone_Monitor/nwprod/oznmon_shared/ush/clean_tankdir.sh rename util/Ozone_Monitor/nwprod/{oznmon_shared.v2.0.0 => oznmon_shared}/ush/ozn_xtrct.sh (66%) delete mode 100644 util/Ozone_Monitor/parm/OznMon.ver diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b824a545d..26d91095a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,8 +260,8 @@ project(GSI) endif(BUILD_ENKF) if(BUILD_UTIL) add_subdirectory(util/EnKF/gfs/src) - add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd) - add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd) + add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd) + add_subdirectory(util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd) add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radang.fd) add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radbcoef.fd) add_subdirectory(util/Radiance_Monitor/nwprod/radmon_shared/sorc/verf_radbcor.fd) diff --git a/util/Ozone_Monitor/CMakeLists.txt b/util/Ozone_Monitor/CMakeLists.txt index 61885bdd15..d130e2bca9 100644 --- a/util/Ozone_Monitor/CMakeLists.txt +++ b/util/Ozone_Monitor/CMakeLists.txt @@ -90,6 +90,6 @@ if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) endif() -add_subdirectory(nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd) -add_subdirectory(nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd) +add_subdirectory(nwprod/oznmon_shared/sorc/oznmon_horiz.fd) +add_subdirectory(nwprod/oznmon_shared/sorc/oznmon_time.fd) add_subdirectory(data_xtrct/sorc/make_base.fd) diff --git a/util/Ozone_Monitor/OznMon_install.pl b/util/Ozone_Monitor/OznMon_install.pl index 87b2ae65e3..0c7906d684 100755 --- a/util/Ozone_Monitor/OznMon_install.pl +++ b/util/Ozone_Monitor/OznMon_install.pl @@ -5,7 +5,7 @@ # # This script makes sets all necessary configuration definitions # and calls the makeall.sh script to build all the necessary -# executables. This script works for hera, wcoss, cray, and +# executables. This script works for hera, wcoss_c, and # wcoss_d machines. # #------------------------------------------------------------------- @@ -16,7 +16,7 @@ my $machine = `/usr/bin/perl get_hostname.pl`; my $my_machine="export MY_MACHINE=$machine"; - if( $machine ne "cray" && $machine ne "hera" && $machine ne "wcoss" && $machine ne "wcoss_d" ) { + if( $machine ne "wcoss_c" && $machine ne "hera" && $machine ne "wcoss_d" ) { die( "ERROR --- Unrecognized machine hostname, $machine. Exiting now...\n" ); } else { @@ -24,7 +24,7 @@ } # - # hera, wcoss, cray, wcoss_d are all little endian machines, and all run linux + # hera, wcoss_c, wcoss_d are all little endian machines, and all run linux # my $little_endian = "export LITTLE_ENDIAN=\${LITTLE_ENDIAN:-0}"; my $my_os = "linux"; @@ -59,7 +59,7 @@ elsif( $machine eq "wcoss_d" ){ $tankdir = "/gpfs/dell2/emc/modeling/noscrub/$user_name/nbns"; } - elsif( $machine eq "cray" ){ + elsif( $machine eq "wcoss_c" ){ $tankdir = "/gpfs/hps/emc/da/noscrub/$user_name/nbns"; } else { @@ -205,7 +205,7 @@ $my_ptmp="export OZN_PTMP=\${OZN_PTMP:-/gpfs/dell2/ptmp}"; $my_stmp="export OZN_STMP=\${OZN_STMP:-/gpfs/dell2/stmp}"; } - elsif( $machine eq "cray" ) { + elsif( $machine eq "wcoss_c" ) { $my_ptmp="export OZN_PTMP=\${OZN_PTMP:-/gpfs/hps2/ptmp}"; $my_stmp="export OZN_STMP=\${OZN_STMP:-/gpfs/hps2/stmp}"; } @@ -331,12 +331,12 @@ } my $project = "export PROJECT=\${PROJECT:-GFS-DEV}"; - if( $machine ne "wcoss" && $machine ne "cray" && $machine ne "wcoss_d" ) { + if( $machine ne "wcoss_c" && $machine ne "wcoss_d" ) { $project="export PROJECT="; } my $job_queue="export JOB_QUEUE="; - if( $machine eq "cray" ) { + if( $machine eq "wcoss_c" ) { $job_queue="export JOB_QUEUE=\${JOB_QUEUE:-dev}"; } elsif( $machine eq "wcoss" || $machine eq "wcoss_d" ){ $job_queue = "export JOB_QUEUE=\${JOB_QUEUE:-dev_shared}"; diff --git a/util/Ozone_Monitor/build_OznMon_cmake.sh b/util/Ozone_Monitor/build_OznMon_cmake.sh index 6630e94dc9..c21d2d70b6 100755 --- a/util/Ozone_Monitor/build_OznMon_cmake.sh +++ b/util/Ozone_Monitor/build_OznMon_cmake.sh @@ -63,9 +63,8 @@ fi # Verify this is a supported machine #--------------------------------------------------- -if [[ ${target} = "hera" || ${target} = "wcoss" \ - || ${target} = "wcoss_c" || ${target} = "wcoss_d" \ - || ${target} = "orion" ]]; then +if [[ ${target} = "hera" || ${target} = "wcoss_c" \ + || ${target} = "wcoss_d" || ${target} = "orion" ]]; then echo Building nwprod executables on ${target} echo @@ -77,13 +76,13 @@ if [[ ${target} = "hera" || ${target} = "wcoss" \ module purge module use -a $dir_modules module load modulefile.ProdGSI.$target - elif [ $target = wcoss -o $target = gaea ]; then + elif [ $target = gaea ]; then module purge module load $dir_modules/modulefile.ProdGSI.$target elif [ $target = hera -o $target = orion ]; then - module purge - module use $dir_modules - module load modulefile.ProdGSI.$target + module purge + module use $dir_modules + module load modulefile.ProdGSI.$target elif [ $target = cheyenne ]; then module purge source $dir_modules/modulefile.ProdGSI.$target diff --git a/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh b/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh new file mode 100755 index 0000000000..a40867709b --- /dev/null +++ b/util/Ozone_Monitor/data_xtrct/ush/OznMon_CP.sh @@ -0,0 +1,205 @@ +#!/bin/bash + +#-------------------------------------------------------------------- +# OznMon_CP.sh +# +# This script searches for new oznmon output from the global GDAS +# and copies those filess to the user's $TANKDIR directory under +# the specified suffix argument. +# +# The bad_penalty, low count, and missing diag reports are +# reevaluated using local copies of the base file and satype +# files in the $TANKdir/$suffix/info directory. +# +# Note that processing occurs within TANKdir, not in stmp space. +# +# The unified error report is journaled to warning.${PDY}${CYC}. +# +#-------------------------------------------------------------------- + +function usage { + echo "Usage: OznMon_CP_glb.sh suffix [-r|--run gdas|gfs -p|--pdate yyyymmddhh" + echo "" + echo " Suffix (NET) is the indentifier for this data source." + echo "" + echo " -r|--run is the run value, typically gdas or gfs. Default value is gdas." + echo "" + echo " -p|--pdate is 10 digit yyyymmddhh string of cycle to be copied." + echo " If not specified the pdate will be calculated by finding the latest" + echo " cycle time in $OZN_STATS_TANKDIR and incrementing it by 6 hours." + echo "" + echo " --oznf parent directory to file location. This will be extended by " + echo " $RUN.$PDY/$CYC/atmos/oznmon and the files there copied to OZN_STATS_TANKDIR." + echo "" + echo " --ostat directory of oznstat file." +} + + +echo start OznMon_CP.sh +exit_value=0 + +nargs=$# +if [[ $nargs -le 0 || $nargs -gt 7 ]]; then + usage + exit 1 +fi + +set -ax + +#----------------------------------------------------------- +# Set default values and process command line arguments. +# +run=gdas + +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 + ;; + --oznf) + oznmon_file_loc="$2" + shift # past argument + ;; + --ostat) + oznmon_stat_loc="$2" + shift # past argument + ;; + *) + #any unspecified key is OZNMON_SUFFIX + export OZNMON_SUFFIX=$key + ;; + esac + + shift +done + +echo "OZNMON_SUFFIX = $OZNMON_SUFFIX" +echo "run = $run" +echo "pdate = $pdate" +echo "oznmon_file_loc = ${oznmon_file_loc}" +echo "oznmon_stat_loc = ${oznmon_stat_loc}" + +export RUN=${RUN:-${run}} + + +#-------------------------------------------------------------------- +# Set environment variables +#-------------------------------------------------------------------- +this_dir=`dirname $0` + +top_parm=${this_dir}/../../parm + +oznmon_user_settings=${oznmon_user_settings:-${top_parm}/OznMon_user_settings} +if [[ -s ${oznmon_user_settings} ]]; then + . ${oznmon_user_settings} + echo "able to source ${oznmon_user_settings}" +else + echo "Unable to source ${oznmon_user_settings} file" + exit 4 +fi + + +oznmon_config=${oznmon_config:-${top_parm}/OznMon_config} +if [[ -s ${oznmon_config} ]]; then + . ${oznmon_config} + echo "able to source ${oznmon_config}" +else + echo "Unable to source ${oznmon_config} file" + exit 3 +fi + +if [[ ${oznmon_stat_loc} = "" ]]; then + oznmon_stat_loc=${OZNSTAT_LOCATION} +fi + + +#--------------------------------------------------------------- +# Create any missing directories. +#--------------------------------------------------------------- +if [[ ! -d ${OZN_STATS_TANKDIR} ]]; then + mkdir -p ${OZN_STATS_TANKDIR} +fi +if [[ ! -d ${OZN_LOGdir} ]]; then + mkdir -p ${OZN_LOGdir} +fi + +#--------------------------------------------------------------- +# If the pdate (processing date) was not specified at the +# command line then set it by finding the latest cycle in +# $TANKverf and increment 6 hours. +#--------------------------------------------------------------- +if [[ $pdate = "" ]]; then + ldate=`${OZN_DE_SCRIPTS}/find_cycle.pl --run $RUN --cyc 1 --dir ${OZN_STATS_TANKDIR}` + pdate=`${NDATE} +06 ${ldate}` +fi +export PDATE=${pdate} + +export PDY=`echo $PDATE|cut -c1-8` +export CYC=`echo $PDATE|cut -c9-10` + +#--------------------------------------------------------------- +# Verify the data files are available +#--------------------------------------------------------------- +export OZNSTAT_LOCATION=${oznmon_stat_loc}/${RUN}.${PDY}/${CYC}/atmos + + +#--------------------------------------------------------------- +# Location of the oznmon files is an adventure. The if case +# is the default gfs output location. Para runs are handled +# in the else condition +# +if [[ ${oznmon_file_loc} = "" ]]; then + data_location=${OZNSTAT_LOCATION}/oznmon +else + data_location=${oznmon_file_loc} + if [[ -d ${data_location}/${RUN}.${PDY} ]]; then + data_location=${data_location}/${RUN}.${PDY} + fi +fi + +export DATA_LOCATION=${data_location} +echo "DATA_LOCATION = ${DATA_LOCATION}" +nfile_src=`ls -l ${DATA_LOCATION}/time/*${PDATE}*ieee_d* | egrep -c '^-'` + +export OZNSTAT=${OZNSTAT_LOCATION}/${RUN}.t${CYC}z.oznstat + + +if [[ ${nfile_src} -gt 0 ]]; then + job=${OZN_DE_SCRIPTS}/oznmon_copy.sh + jobname=OznMon_CP_${OZNMON_SUFFIX} + logfile=${OZN_LOGdir}/CP.${PDY}.${CYC}.log + if [[ -e ${logfile} ]]; then + rm -f ${logfile} + fi + + + if [[ $MY_MACHINE = "wcoss_d" ]]; then + $SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} \ + -M 80 -R affinity[core] -W 0:10 -J ${jobname} -cwd ${PWD} ${job} + + elif [[ $MY_MACHINE = "wcoss_c" ]]; then + $SUB -q $JOB_QUEUE -P $PROJECT -o ${logfile} \ + -M 100 -W 0:20 -J ${jobname} -cwd ${PWD} ${job} + + elif [[ $MY_MACHINE = "hera" ]]; then + $SUB --account=${ACCOUNT} --time=10 -J ${jobname} -D . \ + -o ${logfile} --ntasks=1 --mem=5g ${job} + fi +else + echo "Unable to locate DATA_LOCATION: ${DATA_LOCATION}" + exit_value=4 +fi + + +echo end OznMon_CP.sh +exit ${exit_value} + diff --git a/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh b/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh index 268e347d52..abe0d3680c 100755 --- a/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh +++ b/util/Ozone_Monitor/data_xtrct/ush/OznMon_DE.sh @@ -1,4 +1,4 @@ -#!/bin/ksh +#!/bin/bash #-------------------------------------------------------------------- # usage @@ -6,10 +6,11 @@ function usage { echo "Usage: OznMon_DE.sh suffix [pdate]" echo " Suffix is the indentifier for this data source." - echo " -p | -pdate yyyymmddcc to specify the cycle to be processed" + 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 " -r | --run the gdas|gfs run to be processed" echo " use only if data in TANKdir stores both runs" + echo " -s | --ostat location of directory to oznstat files" echo " " } @@ -19,7 +20,7 @@ function usage { set -ax nargs=$# -if [[ $nargs -lt 1 || $nargs -gt 5 ]]; then +if [[ $nargs -lt 1 || $nargs -gt 7 ]]; then usage exit 1 fi @@ -34,13 +35,17 @@ do case $key in -p|--pdate) - export PDATE="$2" + pdate="$2" shift # past argument ;; -r|--run) export RUN="$2" shift # past argument ;; + -o|--ostat) + oznstat_dir="$2" + shift # past argument + ;; *) #any unspecified key is OZNMON_SUFFIX export OZNMON_SUFFIX=$key @@ -55,19 +60,10 @@ this_dir=`dirname $0` echo "OZNMON_SUFFIX = $OZNMON_SUFFIX" echo "RUN = $RUN" -echo "PDATE = $PDATE" +echo "pdate = $pdate" top_parm=${this_dir}/../../parm -oznmon_version_file=${oznmon_version:-${top_parm}/OznMon.ver} -if [[ -s ${oznmon_version_file} ]]; then - . ${oznmon_version_file} - echo "able to source ${oznmon_version_file}" -else - echo "Unable to source ${oznmon_version_file} file" - exit 2 -fi - oznmon_user_settings=${oznmon_user_settings:-${top_parm}/OznMon_user_settings} if [[ -s ${oznmon_user_settings} ]]; then . ${oznmon_user_settings} @@ -100,12 +96,12 @@ fi #-------------------------------------------------------------- # Determine next cycle -# If PDATE wasn't an argument then call find_cycle.pl -# to determine the last processed cycle, and set PDATE to +# 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} -le 0 ]]; then - echo "PDATE not specified: setting PDATE using last cycle" +if [[ ${#pdate} -le 0 ]]; then + echo "pdate not specified: setting pdate using last cycle" if [[ -d ${OZN_DE_SCRIPTS} ]]; then echo "good: $OZN_DE_SCRIPTS" else @@ -117,17 +113,22 @@ if [[ ${#PDATE} -le 0 ]]; then date=`${OZN_DE_SCRIPTS}/find_cycle.pl -run gdas -cyc 1 -dir ${OZN_STATS_TANKDIR}` echo "date = $date" - export PDATE=`$NDATE +6 $date` + pdate=`$NDATE +6 $date` else - echo "PDATE was specified: $PDATE" + echo "pdate was specified: $pdate" fi +export PDATE=${pdate} export PDY=`echo $PDATE|cut -c1-8` export cyc=`echo $PDATE|cut -c9-10` mdate=`$NDATE -24 $PDATE` -PDYm1=`echo $mdate|cut -c1-8` -echo "PDY, cyc, PDYm1 = $PDY, $cyc $PDYm1" +PDYm1=`echo ${mdate}|cut -c1-8` +cycm1=`echo ${mdate}|cut -c9-10` +echo "PDY, cyc, PDYm1 = ${PDY}, ${cyc} ${PDYm1}" + +export TANKverf_ozn=${OZN_TANKDIR}/${RUN}.${PDY}/${cyc}/oznmon +export TANKverf_oznM1=${OZN_TANKDIR}/${RUN}.${PDYm1}/${cycm1}/oznmon pid=${pid:-$$} @@ -150,11 +151,15 @@ export jobid=${jobid:-${job}.${cyc}.${pid}} export COMROOT=${PTMP_USER} #------------------------------------------------------------- -# This is default for wcoss/cray machines. Need to reset -# COM_IN in parm files for hera. +# Set COM_IN to default or input value. # -export COM_IN=${COM_IN:-/gpfs/hps/nco/ops/com/gfs/prod} +if [ ${#oznstat_dir} -gt 0 ]; then + com_in=${oznstat_dir} +else + com_in=${COM_IN:-/gpfs/dell1/nco/ops/com/gfs/prod} +fi +export COM_IN=${com_in} export COMROOT=${COMROOT:-/${PTMP_USER}} @@ -176,7 +181,7 @@ echo "gdas_oznmon_ver = $gdas_oznmon_ver" echo "shared_oznmon_ver = $shared_oznmon_ver" echo "ACCOUNT = $ACCOUNT" -jobfile=${jobfile:-${HOMEgdas_ozn}/jobs/JGDAS_VERFOZN} +jobfile=${jobfile:-${HOMEgdas_ozn}/jobs/JGDAS_ATMOS_VERFOZN} echo "jobfile = $jobfile" #------------------------------------------------------------- @@ -185,8 +190,8 @@ echo "jobfile = $jobfile" #if [[ $GLB_AREA -eq 0 ]]; then # jobfile=${jobfile:-${HOMEnam}/jobs/JNAM_VERFOZN} #else - jobfile=${jobfile:-${HOMEgdas_ozn}/jobs/JGDAS_VERFOZN} - echo "jobfile = $jobfile" +# jobfile=${jobfile:-${HOMEgdas_ozn}/jobs/JGDAS_ATMOS_VERFOZN} +# echo "jobfile = $jobfile" #fi @@ -210,13 +215,6 @@ if [[ $MY_MACHINE = "hera" ]]; then --ntasks=1 --mem=5g \ ${jobfile} -elif [[ $MY_MACHINE = "wcoss" ]]; then - - $SUB -q $JOB_QUEUE -P $PROJECT -M 50 -R affinity[core] \ - -o ${OZN_LOGdir}/DE.${PDY}.${cyc}.log \ - -e ${OZN_LOGdir}/DE.${PDY}.${cyc}.err \ - -W 0:05 -J ${job} -cwd ${PWD} $jobfile - elif [[ $MY_MACHINE = "wcoss_d" ]]; then $SUB -q $JOB_QUEUE -P $PROJECT -M 400 -R affinity[core] \ @@ -224,7 +222,7 @@ elif [[ $MY_MACHINE = "wcoss_d" ]]; then -e ${OZN_LOGdir}/DE.${PDY}.${cyc}.err \ -W 0:05 -J ${job} -cwd ${PWD} $jobfile -elif [[ $MY_MACHINE = "cray" ]]; then +elif [[ $MY_MACHINE = "wcoss_c" ]]; then $SUB -q $JOB_QUEUE -P $PROJECT -o ${OZN_LOGdir}/DE.${PDY}.${cyc}.log \ -e ${OZN_LOGdir}/DE.${PDY}.${cyc}.err \ diff --git a/util/Ozone_Monitor/data_xtrct/ush/find_cycle.pl b/util/Ozone_Monitor/data_xtrct/ush/find_cycle.pl index 165e4cca64..069dae672c 100755 --- a/util/Ozone_Monitor/data_xtrct/ush/find_cycle.pl +++ b/util/Ozone_Monitor/data_xtrct/ush/find_cycle.pl @@ -4,12 +4,12 @@ # find_cycle.pl # # Arguments: -# --dir : Required string value containing $TANKdir/$SUFFIX. -# --cyc : Optional integer value: +# -dir : Required string value containing $TANKdir/$SUFFIX. +# -cyc : Optional integer value: # 1 = last cycle (default) # 2 = 2nd to last cycle # 0 = first cycle -# --run : Run name, generally 'gdas' or 'gfs'. +# -run : Run name, generally 'gdas' or 'gfs'. # If not specified 'gdas' will be used. # # Return that first/last cycle as a text string in YYYYMMDDHH format, @@ -135,7 +135,10 @@ $hr_ctr = $hr_ctr - 1; - $newdir = "${dirpath}/${sortmm[$ctr]}/${hrs[$hr_ctr]}/oznmon/time"; + $newdir = "${dirpath}/${sortmm[$ctr]}/${hrs[$hr_ctr]}/atmos/oznmon/time"; + if( ! -d $newdir ) { + $newdir = "${dirpath}/${sortmm[$ctr]}/${hrs[$hr_ctr]}/oznmon/time"; + } if( -d $newdir ) { opendir DIR, $newdir or die "Cannot open the current directory: $!"; @@ -179,7 +182,7 @@ } } - } + } } while $hr_ctr > 0 && $found_cycle == 0; diff --git a/util/Ozone_Monitor/data_xtrct/ush/oznmon_copy.sh b/util/Ozone_Monitor/data_xtrct/ush/oznmon_copy.sh new file mode 100755 index 0000000000..0919aa3907 --- /dev/null +++ b/util/Ozone_Monitor/data_xtrct/ush/oznmon_copy.sh @@ -0,0 +1,171 @@ +#!/bin/bash + +#-------------------------------------------------------------------- +# oznmon_copy.sh +# +# This script is run as a submitted job by OznMon_CP.sh and +# should not be run directly. +# +# This script searches for new radmon output and copies those +# filess to the user's $TANKDIR directory under the specified +# suffix argument. +# +# The bad_penalty, low count, and missing diag reports are +# reevaluated using local copies of the base file and satype +# files in the $TANKdir/$suffix/info directory. +# +# Note that processing occurs within TANKdir, not in stmp space. +# +# The unified error report is journaled to warning.${PDY}${CYC}. +# +#-------------------------------------------------------------------- + + +echo "" +echo "--> oznmon_copy.sh" +echo "" +echo "OZNMON_SUFFIX = $OZNMON_SUFFIX" +echo "PDATE = $PDATE" +echo "RUN = $RUN" +echo "DATA_LOCATION = ${DATA_LOCATION}" + +exit_value=0 +monitor=oznmon + +set -ax + +prev=`$NDATE -06 $PDATE` +prev_day=`echo $prev|cut -c1-8` +prev_cyc=`echo $prev|cut -c9-10` + +echo prev_day, prev_cyc = $prev_day, $prev_cyc + +dest_dir=${OZN_STATS_TANKDIR}/${RUN}.${PDY}/${CYC}/oznmon +echo "dest_dir = ${dest_dir}" +satype_file=${OZN_STATS_TANKDIR}/info/${RUN}_oznmon_satype.txt + +if [[ ! -s ${satype_file} ]]; then + satype_file=${FIXgdas_ozn}/gdas_oznmon_satype.txt +fi + +if [[ ! -s ${satype_file} ]]; then + echo "WARNING: unable to locate ${satype_file}" +else + satype_list=`cat ${satype_file}` +fi + + +#--------------------------------------------------- +# Check the number of files available to copy +# and the number of files < 30 min old. Abort the +# copy if any files are < 30 min old. This avoids +# incomplete results which can result in false +# 'drop out' plots. +# + +subdir_list="horiz time" +for sub in ${subdir_list}; do + nfile_src=`ls -l ${DATA_LOCATION}/${sub}/*${PDATE}*ieee_d* | egrep -c '^-'` + echo "nfile_src = ${nfile_src}" + + nfile_thirty=`find ${DATA_LOCATION}/${sub}/*${PDATE}*ieee_d* -maxdepth 0 -mmin -30` + echo "nfile_thirty = ${nfile_thirty}" + + if [[ ${nfile_src} -le 0 ]]; then + exit_value=5 + exit + elif [[ ${nfile_thirty} != "" ]]; then + exit_value=4 + exit + fi +done + +if [[ ${exit_value} -eq 0 ]]; then + if [[ ! -d ${dest_dir} ]]; then + mkdir -p ${dest_dir} + fi + cd ${dest_dir} + + + for sub in ${subdir_list}; do + + mkdir -p ${dest_dir}/${sub} + + $NCP ${DATA_LOCATION}/${sub}/*${PDATE}.ieee_d* ${dest_dir}/${sub}/. + $NCP ${DATA_LOCATION}/${sub}/*.ctl* ${dest_dir}/${sub}/. + if [[ ${sub} = "time" ]]; then + $NCP ${DATA_LOCATION}/${sub}/bad*${PDATE}* ${dest_dir}/${sub}/. + fi + done + + + if [[ $DO_DATA_RPT -eq 1 && ${#satype_list} -gt 0 ]]; then + + #------------------------------------------------------------------- + # re-run the bad_diag report + # 1. Rm any existing bad_diag file. + # 2. Get the contents of the SATYPE list in this order: + # $OZN_TANKdir/$SUFFIX/info/gdas_oznmon_satype.txt + # $GDAS_OZNMON/fix/gdas/oznmon_satype.txt + # 3. Get contents of oznstat file & strip to sat/instr. + # 4. Compare satype list to oznstat contents; report missing. + # + bad_diag=${dest_dir}/time/bad_diag.${PDATE} + if [[ -e ${bad_diag} ]]; then + rm ${bad_diag} + fi + + oznstat_files=`tar -tf ${OZNSTAT}` + #------------------------------------------------------------------------- + # Diag files are in this format: + # diag_gome_metop-a_ges.2021040506.nc4.gz + # diag_gome_metop-a_anl.2021040506.nc4.gz + # + # Select only the 'ges' files and reduce them to: + # gome_metop-a + # + for file in ${oznstat_files}; do + if [[ "${file}" == *"ges"* ]]; then + sat=`echo ${file} | cut -d. -f1` + sat="$( cut -d '_' -f2- <<< "${sat}" )"; + sat=`echo ${sat} | rev | cut -d"_" -f2- | rev` + + oznstat_list="${oznstat_list} ${sat}" + fi + done + + + if [[ ${#oznstat_list} -gt 0 ]]; then + + diag_rpt="diag_rpt.txt" + echo '' > ${diag_rpt} + + for sat in ${satype_list}; do + test=`echo ${oznstat_list} | grep ${sat}` + echo "test length = ${#test}" + + if [[ "${#test}" -eq 0 ]]; then + echo " missing diag file -- diag_${sat}.${PDATE} not found" >> ${diag_rpt} + fi + done + + diag_test=`cat ${diag_rpt}` + if [[ ${#diag_test} -gt 0 ]]; then + mv ${diag_rpt} ${bad_diag} + fi + + if [[ -e ${diag_rpt} ]]; then + rm ${diag_rpt} + fi + fi + + fi # DO_DATA_REPORT + + +fi # exit value != 0 + +echo "" +echo "<-- oznmon_copy.sh" +echo "" +exit ${exit_value} + diff --git a/util/Ozone_Monitor/data_xtrct/ush/run_GEOIRctl3.sh b/util/Ozone_Monitor/data_xtrct/ush/run_GEOIRctl3.sh deleted file mode 100755 index 7f117456eb..0000000000 --- a/util/Ozone_Monitor/data_xtrct/ush/run_GEOIRctl3.sh +++ /dev/null @@ -1,71 +0,0 @@ -#!/bin/sh - -set -xa - -OZN_SUFFIX=GEOIRctl3 -run=gdas - -NET=gfs -envir=prod - -MY_MACHINE=wcoss_d -package="ProdGSI/util/Ozone_Monitor" -#package="OznMon" - -if [[ $MY_MACHINE = "cray" ]]; then - . /opt/modules/3.2.6.7/init/sh - module use -a /gpfs/hps/nco/ops/nwprod/modulefiles - module load prod_util -elif [[ $MY_MACHINE = "wcoss" ]]; then - shell=sh - . /usrx/local/Modules/default/init/${shell} - module load prod_util -elif [[ $MY_MACHINE = "wcoss_d" ]]; then - shell=sh - . /usrx/local/prod/modules/default/init/${shell} - module load prod_util/1.1.0 - MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core - MODULEPATH=${MODULEPATH}:/usrx/local/prod/modulefiles/core_third - MODULEPATH=${MODULEPATH}:/usrx/local/prod/modulefiles/defs - MODULEPATH=${MODULEPATH}:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod - export MODULEPATH=${MODULEPATH}:/usrx/local/dev/modulefiles -fi - - -if [[ $MY_MACHINE = "theia" ]]; then - scripts=/scratch4/NCEPDEV/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -elif [[ $MY_MACHINE = "wcoss" ]]; then - scripts=/gpfs/gd2/emc/da/noscrub/Edward.Safford/${package}/data_xtrct/ush -elif [[ $MY_MACHINE = "wcoss_d" ]]; then - scripts=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -elif [[ $MY_MACHINE = "cray" ]]; then - scripts=/gpfs/hps3/emc/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -fi - -idate=`${scripts}/find_cycle.pl -dir ~/nbns/stats/${OZN_SUFFIX} -cyc 1 -run ${run}` -echo "idate = $idate" - -export NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.1/exec/ips/ndate -export START_DATE=2019052006 -#START_DATE=`${NDATE} +06 $idate` - -PDY=`echo $START_DATE | cut -c1-8` -cyc=`echo $START_DATE | cut -c9-10` - - -#export COM_IN=/gpfs/dell1/nco/ops/com/${NET}/${envir}/${run}.${PDY}/${cyc} -export COM_IN=/gpfs/dell3/ptmp/Haixia.Liu/ROTDIRS/prfv3_GEOIRctl3/${run}.${PDY}/${cyc} - -export oznstat=${COM_IN}/${run}.t${cyc}z.oznstat - -export OZN_TANKDIR=/u/${LOGNAME}/nbns - -log=/gpfs/dell2/ptmp/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.log -#log=/ptmpd1/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.log -#log=./log - -#err=/ptmpd1/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.err -err=/gpfs/dell2/ptmp/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.err -#err=./err - -${scripts}/OznMon_DE.sh $OZN_SUFFIX -p $START_DATE -r gdas 1>$log 2>$err diff --git a/util/Ozone_Monitor/data_xtrct/ush/run_GEOIRimg4.sh b/util/Ozone_Monitor/data_xtrct/ush/run_GEOIRimg4.sh deleted file mode 100755 index 5b9160ee74..0000000000 --- a/util/Ozone_Monitor/data_xtrct/ush/run_GEOIRimg4.sh +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/sh - -set -xa - -OZN_SUFFIX=GEOIRimg4 -run=gdas - -NET=gfs -envir=prod - -MY_MACHINE=wcoss_d -package="ProdGSI/util/Ozone_Monitor" -#package="OznMon" - -if [[ $MY_MACHINE = "cray" ]]; then - . /opt/modules/3.2.6.7/init/sh - module use -a /gpfs/hps/nco/ops/nwprod/modulefiles - module load prod_util -elif [[ $MY_MACHINE = "wcoss" ]]; then - shell=sh - . /usrx/local/Modules/default/init/${shell} - module load prod_util -elif [[ $MY_MACHINE = "wcoss_d" ]]; then - shell=sh - . /usrx/local/prod/modules/default/init/${shell} - module load prod_util/1.1.0 - MODULEPATH=/usrx/local/prod/lmod/lmod/modulefiles/Core - MODULEPATH=${MODULEPATH}:/usrx/local/prod/modulefiles/core_third - MODULEPATH=${MODULEPATH}:/usrx/local/prod/modulefiles/defs - MODULEPATH=${MODULEPATH}:/gpfs/dell1/nco/ops/nwprod/modulefiles/core_prod - export MODULEPATH=${MODULEPATH}:/usrx/local/dev/modulefiles -fi - - -if [[ $MY_MACHINE = "theia" ]]; then - scripts=/scratch4/NCEPDEV/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -elif [[ $MY_MACHINE = "wcoss" ]]; then - scripts=/gpfs/gd2/emc/da/noscrub/Edward.Safford/${package}/data_xtrct/ush -elif [[ $MY_MACHINE = "wcoss_d" ]]; then - scripts=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -elif [[ $MY_MACHINE = "cray" ]]; then - scripts=/gpfs/hps3/emc/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -fi - -idate=`${scripts}/find_cycle.pl -dir ~/nbns/stats/${OZN_SUFFIX} -cyc 1 -run ${run}` -echo "idate = $idate" - -export NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.1/exec/ips/ndate -#export START_DATE=2019062812 -START_DATE=`${NDATE} +06 $idate` - -PDY=`echo $START_DATE | cut -c1-8` -cyc=`echo $START_DATE | cut -c9-10` - - -#export COM_IN=/gpfs/dell1/nco/ops/com/${NET}/${envir}/${run}.${PDY}/${cyc} -export COM_IN=/gpfs/dell3/ptmp/Haixia.Liu/ROTDIRS/prfv3_${OZN_SUFFIX}/${run}.${PDY}/${cyc} - -export oznstat=${COM_IN}/${run}.t${cyc}z.oznstat - -export OZN_TANKDIR=/u/${LOGNAME}/nbns -export OZNMON_NEW_HDR=1 - -log=/gpfs/dell2/ptmp/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.log -#log=/ptmpd1/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.log -#log=./log - -#err=/ptmpd1/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.err -err=/gpfs/dell2/ptmp/Edward.Safford/logs/${OZN_SUFFIX}/${run}/oznmon/OznMon_DE.err -#err=./err - -${scripts}/OznMon_DE.sh $OZN_SUFFIX -p $START_DATE -r gdas 1>$log 2>$err diff --git a/util/Ozone_Monitor/data_xtrct/ush/run_gfs_gdas.sh b/util/Ozone_Monitor/data_xtrct/ush/run_gfs_gdas.sh index 92bbaec9ea..37c2475cca 100755 --- a/util/Ozone_Monitor/data_xtrct/ush/run_gfs_gdas.sh +++ b/util/Ozone_Monitor/data_xtrct/ush/run_gfs_gdas.sh @@ -12,14 +12,10 @@ MY_MACHINE=wcoss_d package="ProdGSI/util/Ozone_Monitor" #package="OznMon" -if [[ $MY_MACHINE = "cray" ]]; then +if [[ $MY_MACHINE = "wcoss_c" ]]; then . /opt/modules/3.2.6.7/init/sh module use -a /gpfs/hps/nco/ops/nwprod/modulefiles module load prod_util -elif [[ $MY_MACHINE = "wcoss" ]]; then - shell=sh - . /usrx/local/Modules/default/init/${shell} - module load prod_util elif [[ $MY_MACHINE = "wcoss_d" ]]; then shell=sh . /usrx/local/prod/modules/default/init/${shell} @@ -34,11 +30,9 @@ fi if [[ $MY_MACHINE = "hera" ]]; then scripts=/scratch4/NCEPDEV/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -elif [[ $MY_MACHINE = "wcoss" ]]; then - scripts=/gpfs/gd2/emc/da/noscrub/Edward.Safford/${package}/data_xtrct/ush elif [[ $MY_MACHINE = "wcoss_d" ]]; then scripts=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush -elif [[ $MY_MACHINE = "cray" ]]; then +elif [[ $MY_MACHINE = "wcoss_c" ]]; then scripts=/gpfs/hps3/emc/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/data_xtrct/ush fi diff --git a/util/Ozone_Monitor/get_hostname.pl b/util/Ozone_Monitor/get_hostname.pl index 8d2d6d5b95..145b3a91c5 100755 --- a/util/Ozone_Monitor/get_hostname.pl +++ b/util/Ozone_Monitor/get_hostname.pl @@ -4,22 +4,17 @@ # get_hostname.pl # # This script determines the hostname of the current machine. The -# possiblities are cray, theia, wcoss or "" if the host is not +# possiblities are wcoss_c, wcoss_d, hera, or "" if the host is not # one of those three. #------------------------------------------------------------------- -# my $arch; -# $arch = ` uname -s | tr '[:upper:]' '[:lower:]' `; -# $arch =~ s/^\s+|\s+$//g; -# my $my_os = "export MY_OS=$arch"; - my $machine = ""; # # hera login nodes are hfe1-hfeN, and hostname command only returns the node name, # while wcoss_c and wcoss_d return [hostname].ncep.noaa.gov. Keep only the - # actual hostname and see if it matches the node names for hera, wcoss_d, or cray. + # actual hostname and see if it matches the node names for hera, wcoss_d, or wcoss_c. # my $host = ""; $host = ` hostname `; @@ -34,10 +29,7 @@ $machine = "hera"; } elsif( $host =~ /login/ ) { - $machine = "cray"; - } - elsif( $host =~ /t/ || $host =~ /g/ ){ # wcoss nodes are tXXaY and gXXaY - $machine = "wcoss"; + $machine = "wcoss_c"; } elsif( $host =~ /v/ || $host =~ /m/ ){ # wcoss_d nodes are vXXaY and mXXaY $machine = "wcoss_d"; diff --git a/util/Ozone_Monitor/image_gen/ush/OznMon_Plt.sh b/util/Ozone_Monitor/image_gen/ush/OznMon_Plt.sh index 4b0bbec701..4c922f8a2e 100755 --- a/util/Ozone_Monitor/image_gen/ush/OznMon_Plt.sh +++ b/util/Ozone_Monitor/image_gen/ush/OznMon_Plt.sh @@ -11,13 +11,13 @@ # # OZNMON_SUFFIX = data source identifier which matches data # in the TANKverf/stats directory. -# -p --pdate = specified cycle to plot. If not specified the +# -p|--pdate = specified cycle to plot. If not specified the # last available date will be plotted. -# -r --run = $RUN value, gdas|gfs, default is gdas. -# -c1|--comp1 = define first source to plot as comparison (time -# series plots only) -# -c2|--comp2 = define second source to plot as comparison (time -# series plots only) +# -r|--run = $RUN value, gdas|gfs, default is gdas. +# -c1|--comp1 = define first instrument/sat source to plot as comparison +# (applies to time series plots only) +# -c2|--comp2 = define second instrument/sat source to plot as comparison +# (applies to time series plots only) # # NOTE: Both COMP1 and COMP2 have to be defined to # generate comparison plots as part of the COMP1 @@ -52,7 +52,7 @@ do case $key in -p|--pdate) - PDATE="$2" + pdate="$2" shift # past argument ;; -r|--run) @@ -96,7 +96,7 @@ if [[ ${#RUN} -le 0 ]]; then fi echo "OZNMON_SUFFIX = $OZNMON_SUFFIX" -echo "PDATE = $PDATE" +echo "pdate = $pdate" echo "RUN = $RUN" @@ -115,15 +115,6 @@ this_dir=`dirname $0` top_parm=${this_dir}/../../parm -oznmon_version_file=${oznmon_version:-${top_parm}/OznMon.ver} -if [[ -s ${oznmon_version_file} ]]; then - . ${oznmon_version_file} - echo "able to source ${oznmon_version_file}" -else - echo "Unable to source ${oznmon_version_file} file" - exit 2 -fi - oznmon_user_settings=${oznmon_user_settings:-${top_parm}/OznMon_user_settings} if [[ -s ${oznmon_user_settings} ]]; then . ${oznmon_user_settings} @@ -172,63 +163,101 @@ 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 ${OZN_IMGN_TANKbase}/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" - PDATE=`${OZN_IG_SCRIPTS}/find_cycle.pl -run ${RUN} -cyc 1 -dir ${TANKDIR}` -else - echo "PDATE was specified: $PDATE" -fi -export PDATE=$PDATE -export PDY=`echo $PDATE|cut -c1-8` -export cyc=`echo $PDATE|cut -c9-10` +echo "OZN_IMGN_TANKbase = ${OZN_IMGN_TANKbase}" +last_plot_time=${OZN_IMGN_TANKbase}/${RUN}/oznmon/last_plot_time +echo "last_plot_time file = ${last_plot_time}" -#-------------------------------------------------------------------- -# Create the WORKDIR and link the data files to it -#-------------------------------------------------------------------- -export WORKDIR=${STMP_USER}/${OZNMON_SUFFIX}/${RUN}/oznmon/IG.${PDY}.${cyc} -if [[ -d $WORKDIR ]]; then - rm -rf $WORKDIR +latest_data=`${OZN_IG_SCRIPTS}/find_cycle.pl -run gdas -cyc 1 -dir ${OZN_STATS_TANKDIR}` + +if [[ ${#pdate} -le 0 ]]; 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 -mkdir $WORKDIR -cd $WORKDIR -#-------------------------------------------------------------------- -# Plot scripts are plot_time.sh and plot_horiz.sh. The plot_time.sh -# script calls plot_summary.sh. The plot_time & plot_horiz are -# submitted jobs. -# -# All plot_* scripts call transfer.sh. We'll handle that like the -# other monitors. -#-------------------------------------------------------------------- +echo "pdate, latest_data = ${pdate} ${latest_data}" -#-------------------------------------------------------------------- -# export SATYPE -# -# For the moment we can just load the -# gdas.v2.0.0/fix/gdas_oznmon_satype.txt file. Eventually DE will -# need to compare actual files vs this list (or an updated one in -# TANKDIR/info like RadMon. -# -# Update the search order to use the local copy in $TANKDIR/info -# if available. -#-------------------------------------------------------------------- -if [[ -e ${TANKDIR}/info/gdas_oznmon_satype.txt ]]; then - export SATYPE=${SATYPE:-`cat ${TANKDIR}/info/${RUN}_oznmon_satype.txt`} -else - export SATYPE=${SATYPE:-`cat ${HOMEgdas_ozn}/fix/${RUN}_oznmon_satype.txt`} -fi +if [[ ${pdate} -le ${latest_data} ]]; then + echo " proceeding with plot" + + export PDATE=$pdate + export PDY=`echo $PDATE|cut -c1-8` + export cyc=`echo $PDATE|cut -c9-10` + + #-------------------------------------------------------------------- + # Create the WORKDIR and link the data files to it + #-------------------------------------------------------------------- + export WORKDIR=${STMP_USER}/${OZNMON_SUFFIX}/${RUN}/oznmon/IG.${PDY}.${cyc} + if [[ -d $WORKDIR ]]; then + rm -rf $WORKDIR + fi + mkdir $WORKDIR + cd $WORKDIR + + #-------------------------------------------------------------------- + # Plot scripts are plot_time.sh and plot_horiz.sh. The plot_time.sh + # script calls plot_summary.sh. The plot_time & plot_horiz are + # submitted jobs. + # + # All plot_* scripts call transfer.sh. We'll handle that like the + # other monitors. + #-------------------------------------------------------------------- + + if [[ -e ${TANKDIR}/info/gdas_oznmon_satype.txt ]]; then + export SATYPE=${SATYPE:-`cat ${TANKDIR}/info/${RUN}_oznmon_satype.txt`} + else + export SATYPE=${SATYPE:-`cat ${HOMEgdas_ozn}/fix/${RUN}_oznmon_satype.txt`} + fi + + + ${OZN_IG_SCRIPTS}/mk_horiz.sh + ${OZN_IG_SCRIPTS}/mk_time.sh + ${OZN_IG_SCRIPTS}/mk_summary.sh + + if [[ $DO_DATA_RPT -eq 1 ]]; then + ${OZN_IG_SCRIPTS}/mk_err_rpt.sh + fi + + #-------------------------------------------------------------------- + # Update the last_plot_time file if found + #-------------------------------------------------------------------- + if [[ -e ${last_plot_time} ]]; then + echo "update last_plot_time file" + echo ${PDATE} > ${last_plot_time} + fi -${OZN_IG_SCRIPTS}/mk_horiz.sh -${OZN_IG_SCRIPTS}/mk_time.sh -${OZN_IG_SCRIPTS}/mk_summary.sh + #-------------------------------------------------------------------- + # Remove all but the last 30 cycles worth of data image files. + # + # This is not currently necessary -- the OznMon doesn't make any + # time-stampped plots. But it's here (borrowed from the RadMon) + # to meet that contingency. + #-------------------------------------------------------------------- + #${OZN_IG_SCRIPTS}/rm_img_files.pl --dir ${OZN_IMGN_TANKDIR} --nfl 30 -if [[ $DO_DATA_RPT -eq 1 ]]; then - ${OZN_IG_SCRIPTS}/mk_err_rpt.sh +else + echo "unable to plot" fi echo "end OznMon_Plt.sh" diff --git a/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh b/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh index 22eecc2f4a..4a9bb5602c 100755 --- a/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh +++ b/util/Ozone_Monitor/image_gen/ush/OznMon_Transfer.sh @@ -48,18 +48,6 @@ fi echo "OZNMON_SUFFIX, RUN = $OZNMON_SUFFIX, $RUN" -#-------------------------------------------------------------------- -# Check for my monitoring use. Abort if running on prod machine. -#-------------------------------------------------------------------- - -if [[ $RUN_ONLY_ON_DEV -eq 1 ]]; then - is_prod=`${OZN_IG_SCRIPTS}/onprod.sh` - if [[ $is_prod = 1 ]]; then - exit 10 - fi -fi - - #-------------------------------------------------- # source verison, config, and user_settings files #-------------------------------------------------- @@ -68,15 +56,6 @@ this_dir=`dirname $0` top_parm=${this_dir}/../../parm -oznmon_version_file=${oznmon_version:-${top_parm}/OznMon.ver} -if [[ -s ${oznmon_version_file} ]]; then - . ${oznmon_version_file} - echo "able to source ${oznmon_version_file}" -else - echo "Unable to source ${oznmon_version_file} file" - exit 2 -fi - oznmon_user_settings=${oznmon_user_settings:-${top_parm}/OznMon_user_settings} if [[ -s ${oznmon_user_settings} ]]; then . ${oznmon_user_settings} @@ -112,12 +91,9 @@ fi transfer_script=${OZN_IG_SCRIPTS}/transfer.sh job=${OZNMON_SUFFIX}_ozn_transfer -if [[ $MY_MACHINE = "wcoss" || $MY_MACHINE = "wcoss_d" ]]; then +if [[ $MY_MACHINE = "wcoss_d" || $MY_MACHINE = "wcoss_c" ]]; then - job_queue="transfer" - if [[ $MY_MACHINE = "wcoss_d" ]]; then - job_queue="dev_transfer" - fi + job_queue="dev_transfer" echo "PROJECT = $PROJECT" echo "logf = $logf" @@ -128,18 +104,6 @@ if [[ $MY_MACHINE = "wcoss" || $MY_MACHINE = "wcoss_d" ]]; then -R affinity[core] -J ${job} -cwd ${OZN_IG_SCRIPTS} \ ${transfer_script} -elif [[ $MY_MACHINE = "cray" ]]; then - - echo "" -# ${OZN_IG_SCRIPTS}/transfer.sh ${OZNMON_SUFFIX} \ -# 1>${logf} 2> ${errf} - - ${OZN_IG_SCRIPTS}/transfer.sh 1>${logf} 2> ${errf} - -# $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \ -# -R "select[mem>100] rusage[mem=100]" \ -# -M 100 -W 0:05 -J ${job} -cwd ${OZN_IG_SCRIPTS} ${transfer_script} - fi exit diff --git a/util/Ozone_Monitor/image_gen/ush/mk_err_rpt.sh b/util/Ozone_Monitor/image_gen/ush/mk_err_rpt.sh index de8f8d8eb9..99039af677 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_err_rpt.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_err_rpt.sh @@ -78,21 +78,12 @@ hyperlink_base="http://www.emc.ncep.noaa.gov/gmb/gdas/es_ozn/index.html?" if [[ "$standalone" -eq 1 ]]; then #-------------------------------------------------- - # source verison, config, and user_settings files + # source config and user_settings files #-------------------------------------------------- this_dir=`dirname $0` top_parm=${this_dir}/../../parm - oznmon_version_file=${oznmon_version:-${top_parm}/OznMon.ver} - if [[ -s ${oznmon_version_file} ]]; then - . ${oznmon_version_file} - echo "able to source ${oznmon_version_file}" - else - echo "Unable to source ${oznmon_version_file} file" - exit 2 - fi - oznmon_user_settings=${oznmon_user_settings:-${top_parm}/OznMon_user_settings} if [[ -s ${oznmon_user_settings} ]]; then . ${oznmon_user_settings} @@ -233,7 +224,6 @@ if [[ -s $bad_cnt || -s $bad_diag || -s $bad_pen ]]; then link="${link}&stat=${stat}" link="${link}&src=${OZNMON_SUFFIX}/${RUN}" -# echo "link = $link" if [[ ${#test} -gt 0 ]]; then @@ -361,4 +351,3 @@ fi echo end mk_err_rpt.sh -#exit( $err ) diff --git a/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh b/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh index 9a23c4a388..9d91165ab4 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_horiz.sh @@ -79,18 +79,12 @@ for dsrc in ${data_source}; do fi - if [[ ${MY_MACHINE} = "wcoss" ]]; then - - $SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \ - -o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} \ - ${WORKDIR}/${cmdfile} - - elif [[ ${MY_MACHINE} = "hera" ]]; then + if [[ ${MY_MACHINE} = "hera" ]]; then $SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} \ --time=10 --wrap "srun -l --multi-prog ${cmdfile}" - elif [[ ${MY_MACHINE} = "cray" ]]; then + elif [[ ${MY_MACHINE} = "wcoss_c" ]]; then $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \ -R "select[mem>100] rusage[mem=100]" \ diff --git a/util/Ozone_Monitor/image_gen/ush/mk_summary.sh b/util/Ozone_Monitor/image_gen/ush/mk_summary.sh index 823205cf05..2f87d6d455 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_summary.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_summary.sh @@ -94,17 +94,12 @@ for ptype in ${process_type}; do rm -f $errf fi - if [[ ${MY_MACHINE} = "wcoss" ]]; then - - $SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \ - -o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile} - - elif [[ ${MY_MACHINE} = "hera" ]]; then + if [[ ${MY_MACHINE} = "hera" ]]; then $SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} --time=10 \ --wrap "srun -l --multi-prog ${cmdfile}" - elif [[ ${MY_MACHINE} = "cray" ]]; then + elif [[ ${MY_MACHINE} = "wcoss_c" ]]; then $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \ -R "select[mem>100] rusage[mem=100]" \ diff --git a/util/Ozone_Monitor/image_gen/ush/mk_time.sh b/util/Ozone_Monitor/image_gen/ush/mk_time.sh index 2b4bfdaf2f..e0386c7212 100755 --- a/util/Ozone_Monitor/image_gen/ush/mk_time.sh +++ b/util/Ozone_Monitor/image_gen/ush/mk_time.sh @@ -72,17 +72,12 @@ for dsrc in ${data_source}; do rm -f $errf fi - if [[ ${MY_MACHINE} = "wcoss" ]]; then - - $SUB -q ${JOB_QUEUE} -P ${PROJECT} -M 50 -R affinity[core] \ - -o ${logf} -e ${errf} -W 0:05 -J ${job} -cwd ${WORKDIR} ${WORKDIR}/${cmdfile} - - elif [[ ${MY_MACHINE} = "hera" ]]; then + if [[ ${MY_MACHINE} = "hera" ]]; then $SUB --account ${ACCOUNT} -n $ctr -o ${logf} -D . -J ${job} --time=10 \ --wrap "srun -l --multi-prog ${cmdfile}" - elif [[ ${MY_MACHINE} = "cray" ]]; then + elif [[ ${MY_MACHINE} = "wcoss_c" ]]; then $SUB -q ${JOB_QUEUE} -P ${PROJECT} -o ${logf} -e ${errf} \ -R "select[mem>100] rusage[mem=100]" \ diff --git a/util/Ozone_Monitor/image_gen/ush/plot_horiz.sh b/util/Ozone_Monitor/image_gen/ush/plot_horiz.sh index c812bdbc17..ae23681c4a 100755 --- a/util/Ozone_Monitor/image_gen/ush/plot_horiz.sh +++ b/util/Ozone_Monitor/image_gen/ush/plot_horiz.sh @@ -40,7 +40,12 @@ cdate=$PDATE while [[ $ctr -le 3 ]]; do c_pdy=`echo $cdate|cut -c1-8` c_cyc=`echo $cdate|cut -c9-10` - tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/horiz + + tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/atmos/oznmon/horiz + if [[ ! -d ${tankdir_cdate} ]]; then + tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/horiz + fi + $NCP ${tankdir_cdate}/${SATYPE}.${dsrc}.ctl ./ $NCP ${tankdir_cdate}/${SATYPE}.${dsrc}.${c_pdy}* ./ diff --git a/util/Ozone_Monitor/image_gen/ush/plot_summary.sh b/util/Ozone_Monitor/image_gen/ush/plot_summary.sh index 40c8168f06..2d57d0437f 100755 --- a/util/Ozone_Monitor/image_gen/ush/plot_summary.sh +++ b/util/Ozone_Monitor/image_gen/ush/plot_summary.sh @@ -35,7 +35,11 @@ cdate=$PDATE while [[ $ctr -le 120 ]]; do c_pdy=`echo $cdate|cut -c1-8` c_cyc=`echo $cdate|cut -c9-10` - tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/time + + tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/atmos/oznmon/time + if [[ ! -d ${tankdir_cdate} ]]; then + tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/time + fi if [[ ! -e ./${SATYPE}.${ptype}.ctl ]]; then $NCP ${tankdir_cdate}/${SATYPE}.${ptype}.ctl ./ diff --git a/util/Ozone_Monitor/image_gen/ush/plot_time.sh b/util/Ozone_Monitor/image_gen/ush/plot_time.sh index f0c7289c4c..71ccde2e16 100755 --- a/util/Ozone_Monitor/image_gen/ush/plot_time.sh +++ b/util/Ozone_Monitor/image_gen/ush/plot_time.sh @@ -47,7 +47,11 @@ cdate=$PDATE while [[ $ctr -le 119 ]]; do c_pdy=`echo $cdate|cut -c1-8` c_cyc=`echo $cdate|cut -c9-10` - tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/time + + tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/atmos/oznmon/time + if [[ ! -d ${tankdir_cdate} ]]; then + tankdir_cdate=${TANKDIR}/${RUN}.${c_pdy}/${c_cyc}/oznmon/time + fi if [[ ! -e ./${SATYPE}.${dsrc}.ctl ]]; then $NCP ${tankdir_cdate}/${SATYPE}.${dsrc}.ctl ./ diff --git a/util/Ozone_Monitor/image_gen/ush/rm_img_files.pl b/util/Ozone_Monitor/image_gen/ush/rm_img_files.pl new file mode 100755 index 0000000000..36e86eb849 --- /dev/null +++ b/util/Ozone_Monitor/image_gen/ush/rm_img_files.pl @@ -0,0 +1,101 @@ +#!/usr/bin/perl +use strict; +use warnings; +use Getopt::Long; +use Scalar::Util qw(looks_like_number); + + +#------------------------------------------------------------------- +# +# Subroutine uniq +# +# Given an input array, return all unique values in an array. +# +#------------------------------------------------------------------- + sub uniq { + my %seen; + return grep { !$seen{$_}++ } @_; + } + + +#-------------------- +# Main begins here +#-------------------- + +print "--> rm_img_files.pl\n"; + +#-------------------------------- +# load command line argument(s) +#-------------------------------- +my $dir = './'; # directory to be cleaned up (~/nbns/imgn/NET/RUN/monitor/pngs) +my $nfl = 20; # number of files to keep + +GetOptions( 'dir=s' => \$dir, + 'nfl=i' => \$nfl ); + +#----------------------------------- +# get directory $dir/hist contents +#----------------------------------- +opendir my $target_dir, "$dir/summary" or die "Cannot open directory: $!"; +my @files = readdir $target_dir; +closedir $target_dir; + +#----------------------------------------------------- +# Break up file names and get the unique cycle times +# +# Sort the unique list in reverse order so the latest +# cycle time is first. +#----------------------------------------------------- +my @times = (); +foreach my $file ( @files ) { + my @spl = split( '\.', $file ); + if( looks_like_number( $spl[1] ) && length($spl[1] ) == 10 ) { + push( @times, $spl[1] ); + } +} + +my @unique = (); +if ( $#times >= 0 ) { + @unique = sort{ $b <=> $a }( uniq( @times )); +} + + +#------------------------------------- +# Identify cycle times to be removed +#------------------------------------- +my @del_list = (); +my @sdir_list = qw( summary ); + +if( $#unique >= $nfl ) { + my $ii = $nfl; + my $end = $#unique; + + foreach my $time ( @unique ) { + print "$time\n"; + } + print " ii, end = $ii, $end\n"; + + do { + push( @del_list, $unique[$ii] ); + $ii++; + } while $ii <= $end; + + + #--------------------------------------------- + # step through the del_list and dir_list to + # remove old image files + #--------------------------------------------- + print "del_list = @del_list\n"; + + foreach my $sdir ( @sdir_list ) { + + foreach my $del ( @del_list ) { + my $rm_cmd = "rm -f $dir/$sdir/*$del*"; + print "RM: $rm_cmd\n"; + system( $rm_cmd ) == 0 + or die "system $rm_cmd failed: $?"; + } + } +} + +print "<-- rm_img_files.pl\n"; diff --git a/util/Ozone_Monitor/image_gen/ush/run_plot_GEOIRimg4.sh b/util/Ozone_Monitor/image_gen/ush/run_plot_GEOIRimg4.sh deleted file mode 100755 index 2052183ccc..0000000000 --- a/util/Ozone_Monitor/image_gen/ush/run_plot_GEOIRimg4.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/sh -set -ax - -package=ProdGSI/util/Ozone_Monitor -#package=OznMon - -DO_COMP=1 -COMP1=sbuv2_n19 -COMP2=ompsnp_npp - -ozn_suffix=GEOIRimg4 -run=gdas - -my_machine=wcoss_d - - -export NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.0/exec/ips/ndate - -echo "NDATE = $NDATE" - -scripts=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/${package}/image_gen/ush -data_map=${scripts}/data_map.xml - -export JOB_QUEUE=dev -export MAIL_TO="edward.safford@noaa.gov" - -export OZN_USE_RUN=1 - -export CYCLE_INTERVAL=6 - -tankdir=/u/Edward.Safford/nbns/stats/${ozn_suffix} -#imgdate=`${scripts}/query_data_map.pl ${data_map} ${ozn_suffix}_${run} imgdate` -#idate=`$NDATE +${CYCLE_INTERVAL} $imgdate` - -logdir=/gpfs/dell2/ptmp/Edward.Safford/logs - -#export SATYPE=`cat ${tankdir}/info/gdas_oznmon_satype.txt` - -prodate=`${scripts}/find_cycle.pl -run ${run} -cyc 1 -dir ${tankdir}` -echo "imgdate, idate, prodate = $imgdate, $idate, $prodate" -idate=2019063018 - -if [[ $idate -le $prodate ]]; then - - echo " firing OznMon_Plt.sh" - - if [[ $DO_COMP -eq 1 ]]; then - ${scripts}/OznMon_Plt.sh $ozn_suffix -p $idate -r $run \ - -c1 $COMP1 -c2 $COMP2 \ - 1>${logdir}/${ozn_suffix}/${run}/oznmon/OznMon_Plt.log \ - 2>${logdir}/${ozn_suffix}/${run}/oznmon/OznMon_Plt.err - else - - ${scripts}/OznMon_Plt.sh $ozn_suffix -p $idate -r $run \ - 1>${logdir}/${ozn_suffix}/${run}/oznmon/OznMon_Plt.log \ - 2>${logdir}/${ozn_suffix}/${run}/oznmon/OznMon_Plt.err - fi - - rc=`${scripts}/update_data_map.pl ${data_map} \ - ${ozn_suffix}_${run} imgdate ${idate}` - - echo "rc from update_data_map.pl = $rc" - -fi - -exit diff --git a/util/Ozone_Monitor/image_gen/ush/run_plot_gdas.sh b/util/Ozone_Monitor/image_gen/ush/run_plot_gdas.sh deleted file mode 100755 index 4558f4fd9e..0000000000 --- a/util/Ozone_Monitor/image_gen/ush/run_plot_gdas.sh +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -package=ProdGSI/util/Ozone_Monitor -#package=OznMon - -suffix=GFS -run=gdas - -DO_COMP=1 -COMP1=sbuv2_n19 -COMP2=ompsnp_npp - -idev=`cat /etc/dev | cut -c1` -iprod=`cat /etc/prod | cut -c1` - -#scripts=/gpfs/${idev}d2/emc/da/noscrub/Edward.Safford/${package}/image_gen/ush -#scripts=/scratch4/NCEPDEV/da/noscrub/Edward.Safford/${package}/image_gen/ush -scripts=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/${package}/image_gen/ush - -data_map=${scripts}/data_map.xml - -#export NDATE=/nwprod/util/exec/ndate -export NDATE=/gpfs/dell1/nco/ops/nwprod/prod_util.v1.1.0/exec/ips/ndate - -export MAIL_CC="russ.treadon@noaa.gov, andrew.collard@noaa.gov, haixia.liu@noaa.gov" -export MAIL_TO="edward.safford@noaa.gov" - -export OZN_USE_RUN=1 - -export CYCLE_INTERVAL=6 - -#tankdir=/gpfs/${idev}d2/emc/da/noscrub/Edward.Safford/nbns/stats/${suffix} -#tankdir=/scratch4/NCEPDEV/da/save/Edward.Safford/nbns/stats/${suffix} -tankdir=/u/Edward.Safford/nbns/stats/${suffix} - -imgdate=`${scripts}/query_data_map.pl ${data_map} ${suffix}_${run} imgdate` -idate=`$NDATE +${CYCLE_INTERVAL} $imgdate` -#idate=2019071306 - -prodate=`${scripts}/find_cycle.pl -run ${run} -cyc 1 -dir ${tankdir}` - -logdir=/gpfs/dell2/ptmp/Edward.Safford/logs - -echo "imgdate, idate, prodate = $imgdate, $idate, $prodate" -if [[ $idate -le $prodate ]]; then - - echo " firing OznMon_Plt.sh" - - if [[ $DO_COMP -eq 1 ]]; then - ${scripts}/OznMon_Plt.sh $suffix -p $idate -r $run \ - -c1 $COMP1 -c2 $COMP2 \ - 1>${logdir}/${suffix}/${run}/oznmon/OznMon_Plt.log \ - 2>${logdir}/${suffix}/${run}/oznmon/OznMon_Plt.err - - else - ${scripts}/OznMon_Plt.sh $suffix -p $idate -r $run \ - 1>${logdir}/${suffix}/${run}/oznmon/OznMon_Plt.log \ - 2>${logdir}/${suffix}/${run}/oznmon/OznMon_Plt.err - fi - - rc=`${scripts}/update_data_map.pl ${data_map} \ - ${suffix}_${run} imgdate ${idate}` - - echo "rc from update_data_map.pl = $rc" - -fi - -exit diff --git a/util/Ozone_Monitor/image_gen/ush/run_transfer_gfs.sh b/util/Ozone_Monitor/image_gen/ush/run_transfer_gfs.sh deleted file mode 100755 index b74e07713d..0000000000 --- a/util/Ozone_Monitor/image_gen/ush/run_transfer_gfs.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -package=ProdGSI/util/Ozone_Monitor -#package=OznMon - -ozn_suffix=GFS -run=gdas - -ch=`hostname | cut -c1` - -#export WEB_DIR=/home/people/emc/www/htdocs/gmb/gdas/es_ozn/pngs - -scripts=/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/${package}/image_gen/ush - -${scripts}/OznMon_Transfer.sh ${ozn_suffix} --run ${run} - -exit diff --git a/util/Ozone_Monitor/image_gen/ush/transfer.sh b/util/Ozone_Monitor/image_gen/ush/transfer.sh index 71a645d0fc..d34921879b 100755 --- a/util/Ozone_Monitor/image_gen/ush/transfer.sh +++ b/util/Ozone_Monitor/image_gen/ush/transfer.sh @@ -4,56 +4,28 @@ echo "start transfer.sh" set -ax -# 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 - - echo "OZN_IMGN_TANKDIR = ${OZN_IMGN_TANKDIR}" - echo "OZNMON_SUFFIX = ${OZNMON_SUFFIX} " - echo "WEB_SVR = $WEB_SVR" - echo "WEB_USER = $WEB_USER" - echo "WEB_DIR = $WEB_DIR" - echo "RSYNCH = $RSYNC" - - if [[ ${OZN_IMGN_TANKDIR} != "/" ]]; then # sanity check - - if [[ $MY_MACHINE = "wcoss" || $MY_MACHINE = "wcoss_d" || \ - $MY_MACHINE = "cray" ]]; then - - #---------------------------------------------------------------- - # expand WEB_DIR to include the suffix and conditionally the RUN - # - if [[ $OZN_USE_RUN -eq 1 ]]; then - export WEB_DIR=${WEB_DIR}/${OZNMON_SUFFIX}/${RUN} - else - export WEB_DIR=${WEB_DIR}/${OZNMON_SUFFIX} - fi - - ssh ${WEB_USER}@${WEB_SVR}.ncep.noaa.gov "mkdir -p ${WEB_DIR}" - - #---------------------------------------------------------------- - # use rsync to perform the file transfer - # - $RSYNC -ave ssh ${OZN_IMGN_TANKDIR}/ \ - ${WEB_USER}@${WEB_SVR}.ncep.noaa.gov:${WEB_DIR}/ - fi +echo "OZN_IMGN_TANKDIR = ${OZN_IMGN_TANKDIR}" +echo "OZNMON_SUFFIX = ${OZNMON_SUFFIX} " +echo "WEB_SVR = $WEB_SVR" +echo "WEB_USER = $WEB_USER" +echo "WEB_DIR = $WEB_DIR" +echo "RSYNCH = $RSYNC" +if [[ ${OZN_IMGN_TANKDIR} != "/" ]]; then # sanity check + + if [[ $MY_MACHINE = "wcoss_c" || $MY_MACHINE = "wcoss_d" ]]; then + + WEB_DIR=${WEB_DIR}/${OZNMON_SUFFIX}/${RUN} + ssh ${WEB_USER}@${WEB_SVR}.ncep.noaa.gov "mkdir -p ${WEB_DIR}" + + #---------------------------------------------------------------- + # use rsync to perform the file transfer + # + $RSYNC -ave ssh --delete-during ${OZN_IMGN_TANKDIR}/ \ + ${WEB_USER}@${WEB_SVR}.ncep.noaa.gov:${WEB_DIR}/ fi - echo "end transfer.sh" - exit +fi + +echo "end transfer.sh" +exit diff --git a/util/Ozone_Monitor/makeall.sh b/util/Ozone_Monitor/makeall.sh deleted file mode 100755 index d1e8c4a16d..0000000000 --- a/util/Ozone_Monitor/makeall.sh +++ /dev/null @@ -1,82 +0,0 @@ -#! /bin/bash - -#------------------------------------------------------------------ -# makeall -# -# This scripts makes all of the executables in the -# nwprod/oznmon_shared/sorc subdirectories and places the -# executables into the proper exec directories. -# -# An optional arguments to this script include "clean", "debug", -# and "check_prereqs". Do not use "install" as an optional -# argument -- this script will do that automatically. -# If no argument is included "all" and "install" are assumed. -#------------------------------------------------------------------ -set -ax - -mode=${1:-} -top_level=${PWD} -echo "top_level = ${top_level}" - -machine=`./get_hostname.pl` -echo "machine = $machine" - -#------------------------------ -# source OznMon_config -#------------------------------ -. ${top_level}/parm/OznMon_config -. ${top_level}/parm/OznMon.ver - -HOMEoznmon=${MY_OZNMON}/nwprod/oznmon_shared.${shared_oznmon_ver} -echo HOMEoznmon = $HOMEoznmon - -if [[ ${machine} = "theia" || ${machine} = "wcoss" || ${machine} = "cray" || ${machine} = "dell" ]]; then - echo Building executables on ${machine} - echo - - #------------------------------------------------------------------ - # make data extract executables in ${HOMEoznmon}/sorc directories - #------------------------------------------------------------------ - - module use -a ${HOMEoznmon}/modulefiles/${machine} - module load OznMonBuild - - executables="oznmon_horiz oznmon_time" - echo "Making executables in nwprod/oznmon_shared.${shared_oznmon_ver}/sorc:" - export dir_root=${HOMEoznmon} - for var in ${executables}; do - cd ${HOMEoznmon}/sorc/${var}.fd - - make ${mode} - if [[ $mode = "" ]]; then - make install - fi - - echo - - done - - executables="make_base" - echo "Making executables in data_xtrc/sorc:" - export dir_root=${MY_OZNMON}/data_xtrct/ - for var in ${executables}; do - cd ${OZN_DE_SORC}/${var}.fd - - make ${mode} - if [[ $mode = "" ]]; then - make install - fi - - echo - - done - -# module unload OznMonBuild - set +x - -else - echo ${machine} is not supported -fi - -exit - diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn.sh b/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn.sh deleted file mode 100755 index 3edbccf3c8..0000000000 --- a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/ksh - -#BSUB -o gdas_verfozn.o%J -#BSUB -e gdas_verfozn.o%J -#BSUB -J gdas_verfozn -#BSUB -q dev_shared -#BSUB -n 1 -#BSUB -R affinity[core] -#BSUB -M 100 -#BSUB -W 00:05 -#BSUB -a poe -#BSUB -P GFS-DEV - -##------------------------------------------------------------ -## This is the test driver script for the wcoss/ibm systems -## to run the JGDAS_VERFOZN job. -##------------------------------------------------------------ - -set -x - -export OZNMON_NEW_HDR=${OZN_NEW_HDR:-0} -export PDATE=${PDATE:-2017072206} -export NET=${NET:-gfs} -export RUN=${RUN:-gdas} - - -export PDY=`echo $PDATE | cut -c1-8` -export cyc=`echo $PDATE | cut -c9-10` -export job=gdas_verfozn.${cyc} -export pid=${pid:-$$} -export jobid=${job}.${pid} -export envir=${envir:-test} -export DATAROOT=${DATAROOT:-/gpfs/gd2/emc/da/noscrub/${LOGNAME}/test_data} -export COMROOT=${COMROOT:-/ptmpp1/${LOGNAME}/com} -export OZN_WORK_DIR=${OZN_WORK_DIR:-/stmpp1/${LOGNAME}/oznmon.${pid}} - -#------------------------------------------------------------ -# Specify versions -# -export gdas_oznmon_ver=v2.0.0 -export oznmon_shared_ver=v2.0.0 - - -#------------------------------------------------------------ -# 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 OZNMON_SUFFIX=${OZNMON_SUFFIX:-testozn} -export NWTEST=${NWTEST:-/gpfs/gd2/emc/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/nwprod} -export HOMEgdas_ozn=${NWTEST}/gdas_oznmon.${gdas_oznmon_ver} -export PARMgdas_ozn=${HOMEgdas_ozn}/parm -export FIXgdas_ozn=${FIXgdas_ozn:-${HOMEgdas_ozn}/fix} - - -export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgdas_ozn}} -export PARMgfs_ozn=${PARMgfs_ozn:-${PARMgdas_ozn}} -export FIXgfs_ozn=${FIXgfs_ozn:-${FIXgdas_ozn}} - -export JOBGLOBAL=${JOBGLOBAL:-${HOMEgdas_ozn}/jobs} -export HOMEoznmon=${HOMEoznmon:-${NWTEST}/oznmon_shared.${shared_oznmon_ver}} - -#export SCRgdas_ozn=${HOMEgdas_ozn}/scripts -#JOBgdas_ozn=${HOMEgdas_ozn}/jobs - -export HOMEoznmon=${NWTEST}/oznmon_shared.${oznmon_shared_ver} -export COM_IN=${COM_IN:-$DATAROOT} -export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOT}/${OZNMON_SUFFIX}} - - -#------------------------------------------------------------ -# Execute job -# -${JOBGLOBAL}/JGDAS_VERFOZN - -exit - diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_hera.sh b/util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_hera.sh similarity index 53% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_hera.sh rename to util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_hera.sh index 5426669de4..705d270ad9 100755 --- a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_hera.sh +++ b/util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_hera.sh @@ -11,8 +11,8 @@ set -x export OZNMON_NEW_HDR=${OZN_NEW_HDR:-0} -#export PDATE=${PDATE:-2020040306} # netcdf -export PDATE=${PDATE:-2020013000} # bin +export PDATE=${PDATE:-2020032106} # netcdf +#export PDATE=${PDATE:-2020013000} # bin export NET=${NET:-gfs} export RUN=${RUN:-gdas} @@ -26,37 +26,23 @@ export DATAROOT=${DATAROOT:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/test_dat export COMROOT=${COMROOT:-/scratch2/NCEPDEV/stmp3/${LOGNAME}/com} export OZN_WORK_DIR=${OZN_WORK_DIR:-/scratch2/NCEPDEV/stmp3/${LOGNAME}/oznmon.${pid}} -#------------------------------------------------------------ -# Specify versions -# -export gdas_oznmon_ver=v2.0.0 -export shared_oznmon_ver=v2.0.0 - - -#------------------------------------------------------------ -# 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 +# Set package definitions. # - export OZNMON_SUFFIX=${OZNMON_SUFFIX:-testozn} -export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/${LOGNAME}/noscrub/ProdGSI/util/Ozone_Monitor/nwprod} -export HOMEgdas_ozn=${HOMEgdas_ozn:-${NWTEST}/gdas_oznmon.${gdas_oznmon_ver}} +export NWTEST=${NWTEST:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/update/util/Ozone_Monitor/nwprod} +export HOMEgdas_ozn=${HOMEgdas_ozn:-${NWTEST}/gdas_oznmon} export PARMgdas_ozn=${PARMgdas_ozn:-${HOMEgdas_ozn}/parm} export FIXgdas_ozn=${FIXgdas_ozn:-${HOMEgdas_ozn}/fix} -export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgdas_ozn}} +export HOMEgfs=${HOMEgfs:-${HOMEgdas_ozn}} +export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgfs}} export PARMgfs_ozn=${PARMgfs_ozn:-${PARMgdas_ozn}} export FIXgfs_ozn=${FIXgfs_ozn:-${FIXgdas_ozn}} export JOBGLOBAL=${JOBGLOBAL:-${HOMEgdas_ozn}/jobs} -export HOMEoznmon=${HOMEoznmon:-${NWTEST}/oznmon_shared.${shared_oznmon_ver}} +export HOMEoznmon=${HOMEoznmon:-${NWTEST}/oznmon_shared} export COM_IN=${COM_IN:-${DATAROOT}} export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOT}/${OZNMON_SUFFIX}} @@ -66,23 +52,17 @@ export NDATE=${NDATE:-/home/Edward.Safford/bin/ndate} #------------------------------------------------------------ -# theia specific hacks for no prod_utils module & no setpdy.sh script +# hera specific hack for no prod_utils module # export MY_MACHINE=hera prevday=`$NDATE -24 $PDATE` export PDYm1=`echo $prevday | cut -c1-8` -#ln -s ${NWPRODush}/startmsg.sh ${COMROOT}/startmsg -#ln -s ${NWPRODush}/postmsg.sh ${COMROOT}/postmsg -#ln -s ${NWPRODush}/prep_step.sh ${COMROOT}/prep_step -#ln -s ${NWPRODush}/err_chk.sh ${COMROOT}/err_chk export PATH=$PATH:${COMROOT} -#export utilscript=${utilscript:-${NWPRODush}} # err_chk calls postmsg.sh - # directly so need to override - # utilscript location for theia + #------------------------------------------------------------ # Execute job # -$JOBGLOBAL/JGDAS_VERFOZN +$JOBGLOBAL/JGDAS_ATMOS_VERFOZN exit diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_wcoss_c.sh b/util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_wcoss_c.sh similarity index 74% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_wcoss_c.sh rename to util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_wcoss_c.sh index e165008999..806d0a74a2 100755 --- a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_wcoss_c.sh +++ b/util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_wcoss_c.sh @@ -19,7 +19,7 @@ set -x export OZNMON_NEW_HDR=${OZN_NEW_HDR:-0} -export PDATE=${PDATE:-2019083100} +export PDATE=${PDATE:-2021031100} export NET=${NET:-gfs} export RUN=${RUN:-gdas} @@ -34,12 +34,6 @@ export DATAROOT=${DATAROOT:-/gpfs/hps3/emc/da/noscrub/${LOGNAME}/test_data} export COMROOT=/gpfs/hps2/ptmp/${LOGNAME}/com export OZN_WORK_DIR=${OZN_WORK_DIR:-/gpfs/hps2/stmp/${LOGNAME}/oznmon.${pid}} -#------------------------------------------------------------ -# Specify versions -# -export gdas_oznmon_ver=v2.0.0 -export oznmon_shared_ver=v2.0.0 - ############################################################# # Load modules @@ -52,35 +46,30 @@ module load util_shared module list -#------------------------------------------------------------ -# WCOSS environment settings -# -export POE=YES - #------------------------------------------------------------ # Set user specific variables # -export OZNMON_SUFFIX=${OZNMON_SUFFIX:-testozn} -export NWTEST=${NWTEST:-/gpfs/hps3/emc/da/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/nwprod} -export HOMEgdas_ozn=${NWTEST}/gdas_oznmon.${gdas_oznmon_ver} +export OZNMON_SUFFIX=${OZNMON_SUFFIX:-testozn} +export NWTEST=${NWTEST:-/gpfs/hps3/emc/da/noscrub/Edward.Safford/update/util/Ozone_Monitor/nwprod} +export HOMEgdas_ozn=${NWTEST}/gdas_oznmon export PARMgdas_ozn=${HOMEgdas_ozn}/parm -export SCRgdas_ozn=${HOMEgdas_ozn}/scripts export FIXgdas_ozn=${HOMEgdas_ozn}/fix -JOBgdas_ozn=${HOMEgdas_ozn}/jobs -export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgdas_ozn}} +export HOMEgfs=${HOMEgfs:-${HOMEgdas_ozn}} +export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgfs}} export PARMgfs_ozn=${PARMgfs_ozn:-${PARMgdas_ozn}} export FIXgfs_ozn=${FIXgfs_ozn:-${FIXgdas_ozn}} -export HOMEoznmon=${NWTEST}/oznmon_shared.${oznmon_shared_ver} +export HOMEoznmon=${NWTEST}/oznmon_shared export COM_IN=${COM_IN:-$DATAROOT} export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOT}/${OZNMON_SUFFIX}} +export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOT}/${OZNMON_SUFFIX}} #------------------------------------------------------------ # Execute job # -${JOBgdas_ozn}/JGDAS_VERFOZN +${HOMEgdas_ozn}/jobs/JGDAS_ATMOS_VERFOZN exit diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_wcoss_d.sh b/util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_wcoss_d.sh similarity index 79% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_wcoss_d.sh rename to util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_wcoss_d.sh index 2c54897e09..2517bb497b 100755 --- a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/driver/test_jgdas_verfozn_wcoss_d.sh +++ b/util/Ozone_Monitor/nwprod/gdas_oznmon/driver/test_jgdas_verfozn_wcoss_d.sh @@ -6,7 +6,7 @@ #BSUB -q dev_shared #BSUB -n 1 #BSUB -R affinity[core] -#BSUB -M 500 +#BSUB -M 100 #BSUB -W 00:05 #BSUB -P GFS-DEV @@ -25,8 +25,8 @@ export OZNMON_NEW_HDR=${OZN_NEW_HDR:-0} # References to netcdf and binary indicate available files in # the test_data space. # -#export PDATE=${PDATE:-2019083100} # netcdf -export PDATE=${PDATE:-2018091706} # binary +export PDATE=${PDATE:-2021031106} # netcdf +#export PDATE=${PDATE:-2018091706} # binary export NET=${NET:-gfs} export RUN=${RUN:-gdas} @@ -41,12 +41,6 @@ export DATAROOT=${DATAROOT:-/gpfs/dell2/emc/modeling/noscrub/${LOGNAME}/test_dat export COMROOT=/gpfs/dell2/ptmp/${LOGNAME}/com export OZN_WORK_DIR=${OZN_WORK_DIR:-/gpfs/dell2/stmp/${LOGNAME}/oznmon.${pid}} -#------------------------------------------------------------ -# Specify versions -# -export gdas_oznmon_ver=v2.0.0 -export oznmon_shared_ver=v2.0.0 - #------------------------------------------------------------ # Load modules @@ -86,23 +80,20 @@ export POE=YES # Set user specific variables # export OZNMON_SUFFIX=${OZNMON_SUFFIX:-testozn} -export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/ProdGSI/util/Ozone_Monitor/nwprod} -export HOMEgdas_ozn=${NWTEST}/gdas_oznmon.${gdas_oznmon_ver} +export NWTEST=${NWTEST:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/update/util/Ozone_Monitor/nwprod} +export HOMEgdas_ozn=${NWTEST}/gdas_oznmon export PARMgdas_ozn=${HOMEgdas_ozn}/parm export FIXgdas_ozn=${FIXgdas_ozn:-${HOMEgdas_ozn}/fix} - -export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgdas_ozn}} +export HOMEgfs=${HOMEgfs:-${HOMEgdas_ozn}} +export HOMEgfs_ozn=${HOMEgfs_ozn:-${HOMEgfs}} export PARMgfs_ozn=${PARMgfs_ozn:-${PARMgdas_ozn}} export FIXgfs_ozn=${FIXgfs_ozn:-${FIXgdas_ozn}} export JOBGLOBAL=${JOBGLOBAL:-${HOMEgdas_ozn}/jobs} -export HOMEoznmon=${HOMEoznmon:-${NWTEST}/oznmon_shared.${shared_oznmon_ver}} - -#export SCRgdas_ozn=${HOMEgdas_ozn}/scripts -#JOBgdas_ozn=${HOMEgdas_ozn}/jobs +export HOMEoznmon=${HOMEoznmon:-${NWTEST}/oznmon_shared} -export HOMEoznmon=${NWTEST}/oznmon_shared.${oznmon_shared_ver} +export HOMEoznmon=${NWTEST}/oznmon_shared export COM_IN=${COM_IN:-$DATAROOT} export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOT}/${OZNMON_SUFFIX}} @@ -110,7 +101,7 @@ export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOT}/${OZNMON_SUFFIX}} #------------------------------------------------------------ # Execute job # -${JOBGLOBAL}/JGDAS_VERFOZN +${JOBGLOBAL}/JGDAS_ATMOS_VERFOZN exit diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/fix/gdas_oznmon_base.tar b/util/Ozone_Monitor/nwprod/gdas_oznmon/fix/gdas_oznmon_base.tar similarity index 100% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/fix/gdas_oznmon_base.tar rename to util/Ozone_Monitor/nwprod/gdas_oznmon/fix/gdas_oznmon_base.tar diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/fix/gdas_oznmon_satype.txt b/util/Ozone_Monitor/nwprod/gdas_oznmon/fix/gdas_oznmon_satype.txt similarity index 100% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/fix/gdas_oznmon_satype.txt rename to util/Ozone_Monitor/nwprod/gdas_oznmon/fix/gdas_oznmon_satype.txt diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/jobs/JGDAS_ATMOS_VERFOZN b/util/Ozone_Monitor/nwprod/gdas_oznmon/jobs/JGDAS_ATMOS_VERFOZN similarity index 74% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/jobs/JGDAS_ATMOS_VERFOZN rename to util/Ozone_Monitor/nwprod/gdas_oznmon/jobs/JGDAS_ATMOS_VERFOZN index 8fb52314f6..13b8b3045a 100755 --- a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/jobs/JGDAS_ATMOS_VERFOZN +++ b/util/Ozone_Monitor/nwprod/gdas_oznmon/jobs/JGDAS_ATMOS_VERFOZN @@ -4,7 +4,7 @@ ############################################################# set -xa echo `date` $0 `date -u` begin -export PS4='$SECONDS + ' + ############################### # Specify NET, RUN, and COMPONENT name @@ -22,8 +22,8 @@ export DATA=${DATA:-${DATAROOT}/${jobid:?}} export OZNMON_SUFFIX=${OZNMON_SUFFIX:-${NET}} -mkdir -p $DATA -cd $DATA +mkdir -p ${DATA} +cd ${DATA} #################################### @@ -34,26 +34,11 @@ export pgmerr=errfile export cycle=t${cyc}z -############################################## -# Run setpdy and initialize PDY variables -############################################## -if [[ $MY_MACHINE != "HERA" && $MY_MACHINE != "hera" ]]; then - setpdy.sh - . ./PDY -fi - -#---------------------------------- -# Set up the UTILITIES -# -export utilscript=${utilscript:-${UTILROOT}/ush} -export utilexec=${utilexec:-${UTILROOT}/exec} - - #--------------------------------------------- # Specify Execution Areas # -export HOMEgfs_ozn=${HOMEgfs:-${NWROOT}/gfs.$gfs_ver} -export HOMEgdas_ozn=${HOMEgfs_ozn:-${NWROOT}/gfs.$gfs_ver} +export HOMEgfs_ozn=${HOMEgfs:-${NWROOT}/gfs.${gfs_ver}} +export HOMEgdas_ozn=${HOMEgfs_ozn:-${NWROOT}/gfs.${gfs_ver}} export PARMgdas_ozn=${PARMgfs_ozn:-$HOMEgfs_ozn/parm/mon} export SCRgdas_ozn=${SCRgfs_ozn:-$HOMEgfs_ozn/scripts} export FIXgdas_ozn=${FIXgfs_ozn:-$HOMEgfs_ozn/fix/gdas} @@ -81,24 +66,22 @@ export P_PDY=`echo ${cdate} | cut -c1-8` export p_cyc=`echo ${cdate} | cut -c9-10` #--------------------------------------------- -# COMOUT - WHERE GSI OUTPUT RESIDES # OZN_TANKDIR - WHERE OUTPUT DATA WILL RESIDE # -echo "pre-assignment, OZN_TANKDIR = $OZN_TANKDIR" -export OZN_TANKDIR=${COMROOT}/$NET/$envir -export TANKverf_ozn=${TANKverf_ozn:-${OZN_TANKDIR}/${RUN}.${PDY}/${cyc}/$COMPONENT/oznmon} -export TANKverf_oznM1=${TANKverf_oznM1:-${OZN_TANKDIR}/${RUN}.${P_PDY}/${p_cyc}/$COMPONENT/oznmon} -export COM_IN=${COM_IN:-${COMROOT}/${NET}/${envir}} -export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/$COMPONENT} +export OZN_TANKDIR=${OZN_TANKDIR:-${COMROOTp3}/$NET/$envir} +export TANKverf_ozn=${TANKverf_ozn:-${OZN_TANKDIR}/${RUN}.${PDY}/${cyc}/${COMPONENT}/oznmon} +export TANKverf_oznM1=${TANKverf_oznM1:-${OZN_TANKDIR}/${RUN}.${P_PDY}/${p_cyc}/${COMPONENT}/oznmon} +export COM_IN=${COM_IN:-${COMROOTp3}/${NET}/${envir}} +export COMIN=${COMIN:-${COM_IN}/${RUN}.${PDY}/${cyc}/${COMPONENT}} if [[ ! -d ${TANKverf_ozn} ]]; then - mkdir -p -m 775 $TANKverf_ozn + mkdir -p -m 775 ${TANKverf_ozn} fi #--------------------------------------- # set up validation file # -if [[ $VALIDATE_DATA -eq 1 ]]; then +if [[ ${VALIDATE_DATA} -eq 1 ]]; then export ozn_val_file=${ozn_val_file:-${FIXgdas_ozn}/gdas_oznmon_base.tar} fi @@ -106,7 +89,6 @@ fi # Set necessary environment variables # export OZN_AREA=${OZN_AREA:-glb} - export oznstat=${oznstat:-$COMIN/gdas.t${cyc}z.oznstat} diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/parm/gdas_oznmon.parm b/util/Ozone_Monitor/nwprod/gdas_oznmon/parm/gdas_oznmon.parm similarity index 100% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/parm/gdas_oznmon.parm rename to util/Ozone_Monitor/nwprod/gdas_oznmon/parm/gdas_oznmon.parm diff --git a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/scripts/exgdas_atmos_verfozn.sh b/util/Ozone_Monitor/nwprod/gdas_oznmon/scripts/exgdas_atmos_verfozn.sh similarity index 52% rename from util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/scripts/exgdas_atmos_verfozn.sh rename to util/Ozone_Monitor/nwprod/gdas_oznmon/scripts/exgdas_atmos_verfozn.sh index f28d91db45..939b03a3d4 100755 --- a/util/Ozone_Monitor/nwprod/gdas_oznmon.v2.0.0/scripts/exgdas_atmos_verfozn.sh +++ b/util/Ozone_Monitor/nwprod/gdas_oznmon/scripts/exgdas_atmos_verfozn.sh @@ -3,33 +3,10 @@ set -ax ################################################################################ -#### UNIX Script Documentation Block -# . . -# Script name: exgdas_vrfyozn.sh -# Script description: Runs data extract/validation for global ozone diag data +# exgdas_vrfyozn.sh # -# Author: Ed Safford Org: NP23 Date: 2012-01-18 -# -# Abstract: This script runs the data extract/validation portion of the -# OznMon package. -# -# Script history log: -# -# Input script positional parameters: -# 1 Current analysis date in yyyymmddhh format -# defaults to PDY; required -# 2 cycle time in cc format -# defaults to cyc; required -# -# input data : $oznstat -# -# output data: -# -# Remarks: -# -# Condition codes -# 0 - no problem encountered -# >0 - some problem encountered +# This script runs the data extract/validation portion of the Ozone Monitor +# (OznMon) DA package. # ################################################################################ export scr=exgdas_vrfyozn.sh @@ -49,34 +26,19 @@ export COMPONENT=${COMPONENT:-atmos} export PDY=${1:-${PDY:?}} export cyc=${2:-${cyc:?}} -# Directories -export OZN_WORK_DIR=${OZN_WORK_DIR:-$(pwd)} -export COM_IN=${COM_IN:-${COMROOT}/${NET}/${envir}} -export COMIN=${COMIN:-$COM_IN/${RUN}.${PDY}/${cyc}/$COMPONENT} - -export HOMEgdas_ozn=${HOMEgdas_ozn:-${NWROOT}/gdas.${gdas_oznmon_ver}} -export FIXgdas_ozn=${FIXgdas_ozn:-$HOMEgdas/fix} - -export HOMEoznmon=${HOMEoznmon:-/${NWROOT}/oznmon_shared.v${shared_oznmon_ver}} -export EXECoznmon=${EXECoznmon:-$HOMEoznmon/exec} -export FIXoznmon=${FIXoznmon:-${HOMEoznmon}/fix} -export USHoznmon=${USHoznmon:-$HOMEoznmon/ush} - - -# Filenames -export oznstat=${oznstat:-$COMIN/gdas.t${cyc}z.oznstat} -export satype_file=${satype_file:-$FIXgdas_ozn/gdas_oznmon_satype.txt} # Other variables -#export USE_ANL=${USE_ANL:-1} +export SATYPE_FILE=${SATYPE_FILE:-$FIXgdas_ozn/gdas_oznmon_satype.txt} export PDATE=${PDY}${cyc} export DO_DATA_RPT=${DO_DATA_RPT:-1} export NCP=${NCP:-/bin/cp} -export NDATE=${NDATE:-/nwprod/util/exec/ndate} -################################################################## +#----------------------------------------------------------------- # ensure work and TANK dirs exist, verify oznstat is available +# +export OZN_WORK_DIR=${OZN_WORK_DIR:-$(pwd)} + if [[ ! -d ${OZN_WORK_DIR} ]]; then mkdir $OZN_WORK_DIR fi @@ -90,7 +52,7 @@ if [[ -s ${oznstat} ]]; then echo ${oznstat} is available fi -##################################################################### + data_available=0 @@ -123,7 +85,7 @@ if [[ -s ${oznstat} ]]; then err=$? else - # oznstat file is not available + # oznstat file not found err=1 fi diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/makefile b/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/makefile deleted file mode 100755 index e7be37ccfe..0000000000 --- a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/makefile +++ /dev/null @@ -1,69 +0,0 @@ -# ***************************************************************** -# makefile.horiz -# -# Make the OzMon horiz executable -# -# To build enter these commands: -# > module use -a ../nwprod/ozmon_shared.v2.0.0/modulefiles/cray|theia|wcoss -# > module load OzMonBuild -# > make -f makefile -# > make -f makefile install -# > module unload OzMonBuild -# -# Notes: -# 1) Makefile.conf.* have been replaced with the build modules -# 2) make options supported include: -# a) make all (default if all is not specified) -# b) clean -# c) debug -# d) install -# ***************************************************************** -SHELL=/bin/sh - -BINDIR = ${dir_root}/exec - -LIBS = $(W3NCO_LIB4) - -SRCS = kinds.f90 read_diag.f90 horiz.f90 create_ctl_horiz.f90 \ - update_ctl_horiz.f90 - -OBJS = kinds.o read_diag.o horiz.o create_ctl_horiz.o \ - update_ctl_horiz.o - -# -# ***************************************************************** -# - -CMD = oznmon_horiz.x - -all: $(CMD) - -clean: - rm -f *.x - rm -f *.o - rm -f *.mod - -install: - cp -f $(CMD) $(BINDIR)/ - -debug: FFLAGS = $(D_FFLAGS) -debug: $(CMD) - -$(CMD): $(OBJS) - $(CF) $(FFLAGS) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) - -kinds.o : kinds.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -read_diag.o : read_diag.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -horiz.o : horiz.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -create_ctl_horiz.o : create_ctl_horiz.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -update_ctl_horiz.o : update_ctl_horiz.f90 - $(CF) $(FFLAGS) -c $(*).f90 - diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/update_ctl_horiz.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/update_ctl_horiz.f90 deleted file mode 100755 index 2da714ffa3..0000000000 --- a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/update_ctl_horiz.f90 +++ /dev/null @@ -1,93 +0,0 @@ -subroutine update_ctl_horiz(n_chan,iyy,imm,idd,ihh,idhh,incr,& - ctl_file,lunctl) - - implicit none - - logical eof - - character(3),dimension(12):: mon - character(40) ctl_file - character(120) line - character(120),dimension(n_chan+50):: ctl_line - - integer lunctl,iyy,imm,idd,ihh,n_chan,idhh,incr - integer iyy2,imm2,idd2,ihh2,ntime,iline,nline,maxlin - integer,dimension(8):: ida,jda - - real,dimension(5):: fha - - data mon / 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', & - 'aug', 'sep', 'oct', 'nov', 'dec' / - -!*********************************************************************** -! - maxlin=n_chan+50 - -! Create date for tdef based on given date and hour offset - fha=0.0; ida=0; jda=0; ntime=0 - iyy2=iyy; imm2=imm; idd2=idd; ihh2=ihh - if (idhh/=0) then - ntime = abs(idhh)/incr - fha(2)=idhh - ida(1)=iyy - ida(2)=imm - ida(3)=idd - ida(4)=0 - ida(5)=ihh - call w3movdat(fha,ida,jda) - iyy2=jda(1) - imm2=jda(2) - idd2=jda(3) - ihh2=jda(5) - endif - ntime=ntime+1 - -! Open unit to GrADS control file - open(lunctl,file=ctl_file,form='formatted') - - -! Read control file, line by line. Upate time -! definition line. - iline=0 - eof=.false. - do while (.not.eof) - read(lunctl,100,end=200) line -100 format(a120) - if (index(line,'tdef') /= 0) then - write(line,110) ntime,ihh2,idd2,mon(imm2),iyy2 -110 format('tdef ',i4,' linear ',i2.2,'Z',i2.2,a3,i4.4,' 06hr') - write(6,*) line - endif - - iline=iline+1 - if (iline>maxlin) then - write(6,*)'***ERROR*** number of lines in ',ctl_file,& - ' exceeds maxlin=',maxlin - write(6,*)' last line read is ',line - call errexit(94) - endif - ctl_line(iline)=line - - goto 300 - -200 continue - eof=.true. -300 continue - end do - nline=iline - write(6,*)'update_ctl_horiz: read nline=',nline,' lines from ctl file' - - -! Rewind control file. Write stored information to file. - rewind(lunctl) - do iline=1,nline - line=ctl_line(iline) - write(lunctl,400) line -400 format(t1,a120) - end do - close(lunctl) - - -! Return - return -end subroutine update_ctl_horiz diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/makefile b/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/makefile deleted file mode 100755 index 2323c7c2c5..0000000000 --- a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/makefile +++ /dev/null @@ -1,76 +0,0 @@ -# ***************************************************************** -# makefile.time -# -# Make the OzMon time executable -# -# To build enter these commands: -# > module use -a ../nwprod/ozmon_shared.v2.0.0/modulefiles/cray|theia|wcoss -# > module load OzMonBuild -# > make -# > make install -# > module unload OzMonBuild -# -# Notes: -# 1) Makefile.conf.* have been replaced with the build modules -# 2) make options supported include: -# a) make all (default if "all" is not specified) -# b) clean -# c) debug -# d) install -# ***************************************************************** - -SHELL=/bin/sh - -BINDIR = $(dir_root)/exec - -LIBS = $(W3NCO_LIB4) - -SRCS = kinds.f90 read_diag.f90 \ - valid.f90 time.f90 create_ctl_time.f90 avgsdv.f90 \ - update_ctl_time.f90 - -OBJS = kinds.o read_diag.o valid.o time.o \ - create_ctl_time.o avgsdv.o update_ctl_time.o - -# -# ***************************************************************** -# - -CMD = oznmon_time.x - -all: $(CMD) - -clean: - rm -f *.x - rm -f *.o - rm -f *.mod - -install: - cp -f $(CMD) $(BINDIR)/ - -debug: FFLAGS = $(D_FFLAGS) -debug: $(CMD) - -$(CMD): $(OBJS) - $(CF) $(FFLAGS) $(LDFLAGS) -o $(@) $(OBJS) $(LIBS) - -kinds.o : kinds.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -read_diag.o : read_diag.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -valid.o : valid.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -time.o : time.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -create_ctl_time.o : create_ctl_time.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -avgsdv.o : avgsdv.f90 - $(CF) $(FFLAGS) -c $(*).f90 - -update_ctl_time.o : update_ctl_time.f90 - $(CF) $(FFLAGS) -c $(*).f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/update_ctl_time.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/update_ctl_time.f90 deleted file mode 100755 index e008ef687b..0000000000 --- a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/update_ctl_time.f90 +++ /dev/null @@ -1,93 +0,0 @@ -subroutine update_ctl_oz(n_chan,iyy,imm,idd,ihh,idhh,incr,& - ctl_file,lunctl) - - implicit none - - logical eof - - character(3),dimension(12):: mon - character(40) ctl_file - character(120) line - character(120),dimension(n_chan+50):: ctl_line - - integer lunctl,iyy,imm,idd,ihh,n_chan,idhh,incr - integer iyy2,imm2,idd2,ihh2,ntime,iline,nline,maxlin - integer,dimension(8):: ida,jda - - real,dimension(5):: fha - - data mon / 'jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', & - 'aug', 'sep', 'oct', 'nov', 'dec' / - -!*********************************************************************** -! - maxlin=n_chan+50 - -! Create date for tdef based on given date and hour offset - fha=0.0; ida=0; jda=0; ntime=0 - iyy2=iyy; imm2=imm; idd2=idd; ihh2=ihh - if (idhh/=0) then - ntime = abs(idhh)/incr - fha(2)=idhh - ida(1)=iyy - ida(2)=imm - ida(3)=idd - ida(4)=0 - ida(5)=ihh - call w3movdat(fha,ida,jda) - iyy2=jda(1) - imm2=jda(2) - idd2=jda(3) - ihh2=jda(5) - endif - ntime=ntime+1 - -! Open unit to GrADS control file - open(lunctl,file=ctl_file,form='formatted') - - -! Read control file, line by line. Upate time -! definition line. - iline=0 - eof=.false. - do while (.not.eof) - read(lunctl,100,end=200) line -100 format(a120) - if (index(line,'tdef') /= 0) then - write(line,110) ntime,ihh2,idd2,mon(imm2),iyy2 -110 format('tdef ',i4,' linear ',i2.2,'Z',i2.2,a3,i4.4,' 06hr') - write(6,*) line - endif - - iline=iline+1 - if (iline>maxlin) then - write(6,*)'***ERROR*** number of lines in ',ctl_file,& - ' exceeds maxlin=',maxlin - write(6,*)' last line read is ',line - call errexit(94) - endif - ctl_line(iline)=line - - goto 300 - -200 continue - eof=.true. -300 continue - end do - nline=iline - write(6,*)'update_ctl_oz: read nline=',nline,' lines from ctl file' - - -! Rewind control file. Write stored information to file. - rewind(lunctl) - do iline=1,nline - line=ctl_line(iline) - write(lunctl,400) line -400 format(t1,a120) - end do - close(lunctl) - - -! Return - return -end subroutine update_ctl_oz diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/exec/.gitignore b/util/Ozone_Monitor/nwprod/oznmon_shared/exec/.gitignore similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/exec/.gitignore rename to util/Ozone_Monitor/nwprod/oznmon_shared/exec/.gitignore diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/cray/OznMonBuild b/util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/cray/OznMonBuild similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/cray/OznMonBuild rename to util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/cray/OznMonBuild diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/dell/OznMonBuild b/util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/dell/OznMonBuild similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/dell/OznMonBuild rename to util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/dell/OznMonBuild diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/theia/OznMonBuild b/util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/theia/OznMonBuild similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/theia/OznMonBuild rename to util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/theia/OznMonBuild diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/wcoss/OznMonBuild b/util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/wcoss/OznMonBuild similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/modulefiles/wcoss/OznMonBuild rename to util/Ozone_Monitor/nwprod/oznmon_shared/modulefiles/wcoss/OznMonBuild diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/CMakeLists.txt b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/CMakeLists.txt similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/CMakeLists.txt rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/CMakeLists.txt diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/create_ctl_horiz.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/create_ctl_horiz.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/create_ctl_horiz.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/create_ctl_horiz.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/horiz.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/horiz.f90 similarity index 93% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/horiz.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/horiz.f90 index 497fc1802f..2a176befda 100644 --- a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/horiz.f90 +++ b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/horiz.f90 @@ -361,47 +361,11 @@ program horiz write(6,*)'write output to lungrd=',lungrd,', file=',trim(grad_file) -! Deallocate arrays deallocate(var,iuse,error) - goto 950 - - -!------------------------------------------------------------------- -! Jump to here if eof or error reading diagnostic file. -900 continue - write(6,*)'***PROBLEM reading diagnostic file. diag_oz=',diag_oz - - if (m_levs<=0) then - write(6,*)'***ERROR*** invalid nlevs=',n_levs,' STOP program' - call errexit(93) - endif - - call update_ctl_horiz(n_levs,iyy,imm,idd,ihh,idhh,incr,& - ctl_file,lunctl) - - allocate(var(n_levs,ntype)) - do j=1,ntype - do i=1,n_levs - var(i,j)=rmiss - end do - end do - - open(lungrd,file=grad_file,form='unformatted') - - stid='missing' - rlat=0.0 - rlon=0.0 - - write(lungrd) stid,rlat,rlon,rtim,nlev,nflag - write(lungrd) ((var(i,j),i=1,n_levs),j=1,ntype) - irite=1 - - deallocate(var) !----------------------------------- ! Close unit to diagnostic file -950 continue close(lndiag) !---------------------------------------------------------------------- diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/kinds.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/kinds.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/kinds.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/kinds.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/oznmon_read_diag.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/oznmon_read_diag.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_horiz.fd/oznmon_read_diag.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_horiz.fd/oznmon_read_diag.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/CMakeLists.txt b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/CMakeLists.txt similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/CMakeLists.txt rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/CMakeLists.txt diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/avgsdv.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/avgsdv.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/avgsdv.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/avgsdv.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/create_ctl_time.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/create_ctl_time.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/create_ctl_time.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/create_ctl_time.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/kinds.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/kinds.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/kinds.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/kinds.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/oznmon_read_diag.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/oznmon_read_diag.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/oznmon_read_diag.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/oznmon_read_diag.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/time.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/time.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/time.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/time.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/valid.f90 b/util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/valid.f90 similarity index 100% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/sorc/oznmon_time.fd/valid.f90 rename to util/Ozone_Monitor/nwprod/oznmon_shared/sorc/oznmon_time.fd/valid.f90 diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared/ush/clean_tankdir.sh b/util/Ozone_Monitor/nwprod/oznmon_shared/ush/clean_tankdir.sh new file mode 100755 index 0000000000..87319a961c --- /dev/null +++ b/util/Ozone_Monitor/nwprod/oznmon_shared/ush/clean_tankdir.sh @@ -0,0 +1,123 @@ +#!/bin/bash + +#------------------------------------------------------------------ +# +# clean_tankdir.sh +# +#------------------------------------------------------------------ + + echo "--> clean_tankdir.sh" + rc=0 + + area=$1 + days_to_keep=$2 + echo " area, days_to_keep = ${area}, ${days_to_keep}" + + #--------------------------------------------------------------- + # Algorithm + # + # 1. Build list of $run.${PDY} || radmon.${PDY} sudirectories. + # 2. All subdirectories older than $days_to_keep get deleted. + #--------------------------------------------------------------- + if [[ ${area} = 'rgn' ]]; then + subdir="radmon" + else + subdir=${RUN} + fi + + echo "OZN_STATS_TANKDIR = ${OZN_STATS_TANKDIR}" + + dirs=`ls ${OZN_STATS_TANKDIR}` + echo "dirs = ${dirs}" + + + if [[ ${area} = 'rgn' ]]; then + echo " in rgn" + #----------------------------------------------- + # Determine number of days from $PDATE for all + # directories that start with "radmon". Note + # that this expects the directories to be in + # the format of ${RUN}.yyyymmdd. + # + for dir in $dirs; do + file_name="${dir##*/}" + file="${file_name%.*}" + file_extension="${file_name##*.}" + echo "file, file_extension = ${file}, ${file_extension}" + + if [ ${file} = ${subdir} ]; then + + #---------------------------------------------- + # Use date utility to determine number of days + # from PDATE. Note that time difference is + # calculated in seconds, hence the division + # by the number of seconds/day. + # + days=$(( ($(date --date=${PDY} +%s) - $(date --date=${file_extension} +%s) )/(60*60*24) )) + echo "days = ${days}" + + #---------------------------------------- + # rm anything older than $days_to_keep + # + if [ $days -gt ${days_to_keep} ]; then + + cycle_dir="${OZN_STATS_TANKDIR}/${dir}" + echo "cycle_dir = ${cycle_dir}" + + if [[ -d ${cycle_dir} ]]; then + echo "RM ${cycle_dir}" + rm -rf ${cycle_dir} + fi + fi + + fi + done + + else + + #----------------------------------------------- + # Determine number of days from $PDATE for all + # directories that start with "gdas". Note + # that this expects the directories to be in + # the format of ${RUN}.yyyymmdd. + # + for dir in $dirs; do + file_name="${dir##*/}" + file="${file_name%.*}" + file_extension="${file_name##*.}" + + if [ ${file} = ${subdir} ]; then + + #---------------------------------------------- + # Use date utility to determine number of days + # from PDATE. Note that time difference is + # calculated in seconds, hence the division + # by the number of seconds/day. + # + days=$(( ($(date --date=${PDY} +%s) - $(date --date=${file_extension} +%s) )/(60*60*24) )) + + #---------------------------------------- + # rm anything older than $days_to_keep + # + if [ $days -gt ${days_to_keep} ]; then + cycles="00 06 12 18" + + for cyc in $cycles; do + cycle_dir="${OZN_STATS_TANKDIR}/${dir}/${cyc}/oznmon" + if [[ -d ${cycle_dir} ]]; then + echo "RM ${cycle_dir}" + rm -rf ${cycle_dir} + fi + done + + fi + + fi + + done + fi + + echo "<-- clean_tankdir.sh" + +exit ${rc} + diff --git a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/ush/ozn_xtrct.sh b/util/Ozone_Monitor/nwprod/oznmon_shared/ush/ozn_xtrct.sh similarity index 66% rename from util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/ush/ozn_xtrct.sh rename to util/Ozone_Monitor/nwprod/oznmon_shared/ush/ozn_xtrct.sh index f05b0081b3..f301a95fb3 100755 --- a/util/Ozone_Monitor/nwprod/oznmon_shared.v2.0.0/ush/ozn_xtrct.sh +++ b/util/Ozone_Monitor/nwprod/oznmon_shared/ush/ozn_xtrct.sh @@ -1,8 +1,8 @@ -#!/bin/ksh +#!/bin/bash #------------------------------------------------------------------ # ozn_xtrct.sh # -# This script performs the data extraction from the cnvstat's +# This script performs the data extraction from the oznstat # diagnostic files. The resulting data (*.ieee_d) files, GrADS # control files and stdout files will be moved to the # $TANKverf_ozn. @@ -14,7 +14,7 @@ # # Return values are # 0 = normal -# 2 = unable to generate SATYPE list; may indicate no diag +# 2 = unable to generate satype list; may indicate no diag # files found in oznstat file #------------------------------------------------------------------ @@ -24,33 +24,35 @@ set -ax #-------------------------------------------------- # check_diag_files # -# Compare SATYPE (which contains the contents of +# Compare $satype (which contains the contents of # gdas_oznmon_satype.txt to $avail_satype which is # determined by the contents of the oznstat file. # Report any missing diag files in a file named # bad_diag.$PDATE # check_diag_files() { - PDATE=$1 - SATYPE=$2 + pdate=$1 + found_satype=$2 avail_satype=$3 - out_file="bad_diag.${PDATE}" - echo "--> check_diag_files" + out_file="bad_diag.${pdate}" - for type in ${SATYPE}; do - check=`echo $avail_satype | grep $type` - len_check=`echo -n "$check" | wc -c` + echo ""; echo ""; echo "--> check_diag_files" - if [[ $len_check -le 1 ]]; then - echo "missing diag file -- diag_$type.${PDATE}.gz not found " >> ./$out_file + for type in ${found_satype}; do + check=`echo ${avail_satype} | grep ${type}` + len_check=`echo -n "${check}" | wc -c` + + if [[ ${len_check} -le 1 ]]; then + echo "missing diag file -- diag_${type}_ges.${pdate}.gz not found " >> ./${out_file} fi done - echo "<-- check_diag_files" + echo "<-- check_diag_files"; echo ""; echo "" } + echo "start ozn_xtrct.sh" iret=0 @@ -91,48 +93,42 @@ echo "VALIDATE_DATA, validate = $VALIDATE_DATA, $validate " #------------------------------------------------------------------ -# ptype here is the processing type which is intended to be "ges" +# ozn_ptype here is the processing type which is intended to be "ges" # or "anl". Default is "ges". # ozn_ptype=${ozn_ptype:-"ges anl"} #--------------------------------------------------------------------------- -# Build SATYPE list from files found in oznstat file. +# Build satype list from the available diag files. # -# NOTE: at some point we'll want to make this a fixed list so we can -# detect missing instruments, allowing new sources to be added like the -# radmon does. -# -# An empty SATYPE list means there are no diag files to process. That's +# An empty satype list means there are no diag files to process. That's # a problem, reported by an iret value of 2 # avail_satype=`ls -l d*ges* | sed -e 's/_/ /g;s/\./ /' | gawk '{ print $11 "_" $12 }'` -if [[ $DO_DATA_RPT -eq 1 ]]; then - if [[ -e ${satype_file} ]]; then - SATYPE=`cat ${satype_file}` - check_diag_files ${PDATE} "${SATYPE}" "${avail_satype}" +if [[ ${DO_DATA_RPT} -eq 1 ]]; then + if [[ -e ${SATYPE_FILE} ]]; then + satype=`cat ${SATYPE_FILE}` + check_diag_files ${PDATE} "${satype}" "${avail_satype}" else - echo "WARNING: missing ${satype_file}" + echo "WARNING: missing ${SATYPE_FILE}" fi fi -echo $SATYPE - -len_satype=`echo -n "$SATYPE" | wc -c` +len_satype=`echo -n "${satype}" | wc -c` -if [[ $len_satype -le 1 ]]; then - SATYPE=$aval_satype +if [[ ${len_satype} -le 1 ]]; then + satype=${avail_satype} fi -echo $SATYPE +echo ${satype} -len_satype=`echo -n "$SATYPE" | wc -c` +len_satype=`echo -n "${satype}" | wc -c` -if [[ $DO_DATA_RPT -eq 1 && $len_satype -lt 1 ]]; then +if [[ ${DO_DATA_RPT} -eq 1 && ${len_satype} -lt 1 ]]; then iret=2 else @@ -140,27 +136,27 @@ else #-------------------------------------------------------------------- # Copy extraction programs to working directory # - $NCP ${HOMEoznmon}/exec/oznmon_time.x ./oznmon_time.x + ${NCP} ${HOMEoznmon}/exec/oznmon_time.x ./oznmon_time.x if [[ ! -e oznmon_time.x ]]; then iret=2 - exit $iret + exit ${iret} fi - $NCP ${HOMEoznmon}/exec/oznmon_horiz.x ./oznmon_horiz.x + ${NCP} ${HOMEoznmon}/exec/oznmon_horiz.x ./oznmon_horiz.x if [[ ! -e oznmon_horiz.x ]]; then iret=3 - exit $iret + exit ${iret} fi #--------------------------------------------------------------------------- # Outer loop over $ozn_ptype (default values 'ges', 'anl') # - echo "ozn_ptype = $ozn_ptype" + echo "ozn_ptype = ${ozn_ptype}" for ptype in ${ozn_ptype}; do - echo "ptype = $ptype" + echo "ptype = ${ptype}" - for type in ${SATYPE}; do + for type in ${satype}; do mv diag_${type}_${ptype}.${PDATE}.gz ${type}.${ptype}.gz gunzip ./${type}.${ptype}.gz done @@ -169,13 +165,13 @@ else #-------------------------------------------------------------------- # Run programs for given time - iyy=`echo $PDATE | cut -c1-4` - imm=`echo $PDATE | cut -c5-6` - idd=`echo $PDATE | cut -c7-8` - ihh=`echo $PDATE | cut -c9-10` + iyy=`echo ${PDATE} | cut -c1-4` + imm=`echo ${PDATE} | cut -c5-6` + idd=`echo ${PDATE} | cut -c7-8` + ihh=`echo ${PDATE} | cut -c9-10` - for type in ${SATYPE}; do - echo "processing ptype, type: $ptype, $type" + for type in ${satype}; do + echo "processing ptype, type: ${ptype}, ${type}" rm -f input cat << EOF > input @@ -194,7 +190,7 @@ cat << EOF > input region(4)='20S-20N', rlonmin(4)=-180.0,rlonmax(4)=180.0,rlatmin(4)=-20.0,rlatmax(4)= 20.0, region(5)='20S-70S', rlonmin(5)=-180.0,rlonmax(5)=180.0,rlatmin(5)=-70.0,rlatmax(5)=-20.0, region(6)='70S-90S', rlonmin(6)=-180.0,rlonmax(6)=180.0,rlatmin(6)=-90.0,rlatmax(6)=-70.0, - validate=$validate, + validate=${validate}, new_hdr=${new_hdr}, ptype=${ptype}, netcdf=${netcdf_boolean} @@ -202,11 +198,11 @@ cat << EOF > input EOF - echo "oznmon_time.x HAS STARTED $type" + echo "oznmon_time.x HAS STARTED ${type}" ./oznmon_time.x < input > stdout.time.${type}.${ptype} - echo "oznmon_time.x HAS ENDED $type" + echo "oznmon_time.x HAS ENDED ${type}" if [[ ! -d ${TANKverf_ozn}/time ]]; then mkdir -p ${TANKverf_ozn}/time @@ -214,8 +210,6 @@ EOF $NCP ${type}.${ptype}.ctl ${TANKverf_ozn}/time/ $NCP ${type}.${ptype}.${PDATE}.ieee_d ${TANKverf_ozn}/time/ -# $COMPRESS stdout.time.${type}.${ptype} -# $NCP stdout.time.${type}.${ptype}.${Z} ${TANKverf_ozn}/time/ $NCP bad* ${TANKverf_ozn}/time/ rm -f input @@ -235,11 +229,11 @@ cat << EOF > input / EOF - echo "oznmon_horiz.x HAS STARTED $type" + echo "oznmon_horiz.x HAS STARTED ${type}" ./oznmon_horiz.x < input > stdout.horiz.${type}.${ptype} - echo "oznmon_horiz.x HAS ENDED $type" + echo "oznmon_horiz.x HAS ENDED ${type}" if [[ ! -d ${TANKverf_ozn}/horiz ]]; then mkdir -p ${TANKverf_ozn}/horiz @@ -249,23 +243,29 @@ EOF $COMPRESS ${type}.${ptype}.${PDATE}.ieee_d $NCP ${type}.${ptype}.${PDATE}.ieee_d.${Z} ${TANKverf_ozn}/horiz/ -# $COMPRESS stdout.horiz.${type}.${ptype} -# $NCP stdout.horiz.${type}.${ptype}.${Z} ${TANKverf_ozn}/horiz/ echo "finished processing ptype, type: $ptype, $type" - done # type in SATYPE + done # type in satype done # ptype in $ozn_ptype tar -cvf stdout.horiz.tar stdout.horiz* - $COMPRESS stdout.horiz.tar - $NCP stdout.horiz.tar.${Z} ${TANKverf_ozn}/horiz/ + ${COMPRESS} stdout.horiz.tar + ${NCP} stdout.horiz.tar.${Z} ${TANKverf_ozn}/horiz/ tar -cvf stdout.time.tar stdout.time* - $COMPRESS stdout.time.tar - $NCP stdout.time.tar.${Z} ${TANKverf_ozn}/time/ + ${COMPRESS} stdout.time.tar + ${NCP} stdout.time.tar.${Z} ${TANKverf_ozn}/time/ fi -echo "ozn_xtrct.sh HAS ENDED, iret = $iret" +#------------------------------------------------------- +# Conditionally remove data files older than 40 days +# +if [[ ${CLEAN_TANKDIR} -eq 1 ]]; then + ${HOMEoznmon}/ush/clean_tankdir.sh glb 40 +fi + + +echo "ozn_xtrct.sh HAS ENDED, iret = ${iret}" -exit $iret +exit ${iret} diff --git a/util/Ozone_Monitor/parm/OznMon.ver b/util/Ozone_Monitor/parm/OznMon.ver deleted file mode 100644 index f1350a658a..0000000000 --- a/util/Ozone_Monitor/parm/OznMon.ver +++ /dev/null @@ -1,2 +0,0 @@ -export gdas_oznmon_ver=v2.0.0 -export shared_oznmon_ver=v2.0.0 diff --git a/util/Ozone_Monitor/parm/OznMon_config b/util/Ozone_Monitor/parm/OznMon_config index 758849716d..13dabad249 100644 --- a/util/Ozone_Monitor/parm/OznMon_config +++ b/util/Ozone_Monitor/parm/OznMon_config @@ -18,7 +18,7 @@ if [[ $OZNMON_CONFIG -ne 1 ]]; then export OZNMON_CONFIG=1 -export MY_MACHINE=hera + export MY_MACHINE=wcoss_d #------------------------------------------------------------------- # Note: The file header in the oznstat file has slightly changed. @@ -38,7 +38,7 @@ export MY_MACHINE=hera # you checked out only the Ozone_Monitor portion of the branch then # MY_RADMON should point to that. # -export MY_OZNMON=${MY_OZNMON:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/ProdGSI/util/Ozone_Monitor} + export MY_OZNMON=${MY_OZNMON:-/gpfs/dell2/emc/modeling/noscrub/Edward.Safford/GSI/util/Ozone_Monitor} export OZN_SCRIPTS=${OZN_SCRIPTS:-${MY_OZNMON}/scripts} export OZN_DE_SCRIPTS=${OZN_DE_SCRIPTS:-${MY_OZNMON}/data_xtrct/ush} @@ -48,8 +48,9 @@ export MY_OZNMON=${MY_OZNMON:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/ProdGS export OZN_IG_GSCRPTS=${OZN_IG_GSCRPTS:-${MY_OZNMON}/image_gen/gscripts} export OZN_EXEDIR=${OZN_EXEDIR:-${MY_OZNMON}/exec} - export HOMEgdas_ozn=${HOMEgdas_ozn:-${MY_OZNMON}/nwprod/gdas_oznmon.${gdas_oznmon_ver}} - export HOMEoznmon=${HOMEoznmon:-${MY_OZNMON}/nwprod/oznmon_shared.${shared_oznmon_ver}} + export HOMEgdas_ozn=${HOMEgdas_ozn:-${MY_OZNMON}/nwprod/gdas_oznmon} + export FIXgdas_ozn=${FIXgdas_ozn:-${HOMEgdas_ozn}/fix} + export HOMEoznmon=${HOMEoznmon:-${MY_OZNMON}/nwprod/oznmon_shared} # # Add these gfs definitions to accomodate the changes @@ -65,13 +66,14 @@ export MY_OZNMON=${MY_OZNMON:-/scratch1/NCEPDEV/da/Edward.Safford/noscrub/ProdGS # and the succedding scripts will construct and use subdirectories under # this location. # -export OZN_TANKDIR=${OZN_TANKDIR:-/scratch1/NCEPDEV/da/Edward.Safford/nbns} + export OZN_TANKDIR=${OZN_TANKDIR:-/u/Edward.Safford/nbns} if [[ $GLB_AREA -eq 1 ]]; then OZN_IMGN_TANKDIR=${OZN_TANKDIR}/imgn/${OZNMON_SUFFIX} else OZN_IMGN_TANKDIR=${OZN_TANKDIR}/imgn/regional/${OZNMON_SUFFIX} fi + export OZN_IMGN_TANKbase=${OZN_IMGN_TANKDIR} if [[ $OZN_USE_RUN -eq 1 ]]; then OZN_IMGN_TANKDIR=${OZN_IMGN_TANKDIR}/${RUN} @@ -91,9 +93,9 @@ export OZN_TANKDIR=${OZN_TANKDIR:-/scratch1/NCEPDEV/da/Edward.Safford/nbns} # # Log and work space definitions # -export OZN_PTMP=${OZN_PTMP:-/scratch2/NCEPDEV/stmp3} + export OZN_PTMP=${OZN_PTMP:-/gpfs/dell2/ptmp} export PTMP_USER=${PTMP_USER:-${OZN_PTMP}/${LOGNAME}} -export OZN_STMP=${OZN_STMP:-/scratch2/NCEPDEV/stmp1} + export OZN_STMP=${OZN_STMP:-/gpfs/dell2/stmp} export STMP_USER=${STMP_USER:-${OZN_STMP}/${LOGNAME}} @@ -111,9 +113,9 @@ export OZN_STMP=${OZN_STMP:-/scratch2/NCEPDEV/stmp1} # # Webserver settings # -export WEB_SVR=${WEB_SVR:-emcrzdm} -export WEB_USER=${WEB_USER:-esafford} -export WEB_DIR=${WEB_DIR:-/home/people/emc/www/htdocs/gmb/gdas/es_ozn/pngs} + export WEB_SVR=${WEB_SVR:-emcrzdm} + export WEB_USER=${WEB_USER:-esafford} + export WEB_DIR=${WEB_DIR:-/home/people/emc/www/htdocs/gmb/gdas/es_ozn/pngs} # @@ -122,26 +124,7 @@ export WEB_DIR=${WEB_DIR:-/home/people/emc/www/htdocs/gmb/gdas/es_ozn/pngs} 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 prod_util - module load util_shared - module load GrADS - - export GRADS=`which grads` - export STNMAP=`which stnmap` - export SUB=`which bsub` - - export NWPROD=/nwprod - export NDATE=${NWPROD}/util/exec/ndate - export COMPRESS=${COMPRESS:-/bin/gzip} - export UNCOMPRESS=${UNCOMPRESS:-"/bin/gunzip -f"} - export RSYNC=`which rsync` - - - elif [[ $MY_MACHINE = "wcoss_d" ]]; then + if [[ $MY_MACHINE = "wcoss_d" ]]; then shell=sh source /usrx/local/prod/lmod/lmod/init/${shell} @@ -166,7 +149,7 @@ export WEB_DIR=${WEB_DIR:-/home/people/emc/www/htdocs/gmb/gdas/es_ozn/pngs} export GRADS=`which grads` export STNMAP=`which stnmap` - elif [[ $MY_MACHINE = "cray" ]]; then + elif [[ $MY_MACHINE = "wcoss_c" ]]; then . /opt/modules/3.2.6.7/init/sh module use -a /gpfs/hps/nco/ops/nwprod/modulefiles module use -a /usrx/local/dev/modulefiles diff --git a/util/Ozone_Monitor/parm/OznMon_user_settings b/util/Ozone_Monitor/parm/OznMon_user_settings index 70fbc1b9c4..864ed81c30 100644 --- a/util/Ozone_Monitor/parm/OznMon_user_settings +++ b/util/Ozone_Monitor/parm/OznMon_user_settings @@ -10,19 +10,19 @@ # 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= +export PROJECT=${PROJECT:-GFS-DEV} # # JOB_QUEUE is used on wcoss only with the bjob -q flag. It is # empty on other platforms. # -export JOB_QUEUE= +export JOB_QUEUE=${JOB_QUEUE:-dev_shared} # # GLB_AREA is either 1 (global) or 0 (regional) @@ -37,7 +37,7 @@ export GLB_AREA=${GLB_AREA:-1} # horizontal data when it's needed rather than storing huge files all the # time). # -export OZNSTAT_LOCATION=${OZNSTAT_LOCATION:-/com2/gfs/prod} +export OZNSTAT_LOCATION=${OZNSTAT_LOCATION:-/gpfs/dell1/nco/ops/com/gfs/prod} # # USE_ANL switches on/off data extraction for analysis files (ges is always on) @@ -73,18 +73,23 @@ export OZN_USE_RUN=${OZN_USE_RUN:-1} # desirable. It is not normally necesary to apply this to parallels. # 0 = off, 1 = on # -export DO_DATA_RPT=${DO_DATA_RPT:-0} +export DO_DATA_RPT=${DO_DATA_RPT:-1} # MAIL_TO is the the primary recipient of generated email warning messages # (if DO_DATA_RPT = 1). # -export MAIL_TO=${MAIL_TO:-' '} +export MAIL_TO=${MAIL_TO:-'edward.safford@noaa.gov'} # MAIL_CC is the the cc list of recipients of generated email warning messages # (if DO_DATA_RPT = 1). # -export MAIL_CC=${MAIL_CC:-' '} +if [[ -e /u/${LOGNAME}/bin/get_cc_list.pl ]]; then + cc_list=`/u/${LOGNAME}/bin/get_cc_list.pl --nr ${OZNMON_SUFFIX}_${RUN} --mon OznMon` +else + cc_list="" +fi +export MAIL_CC=${MAIL_CC:=${cc_list}} # # RUN_ONLY_ON_DEV switches on/off the constraint to run only on the @@ -117,3 +122,11 @@ export REGIONAL_RR=${REGIONAL_RR:-0} # refresh sources. # export CYCLE_INTERVAL=${CYCLE_INTERVAL:-6} + + +# +# CLEAN_TANKDIR controls automatic removal of old data files in +# TANKDIR. +# +# 0 = no automatic removal, 1 = automatic removal +export CLEAN_TANKDIR=${CLEAN_TANKDIR:=1}