From 1308f93b5f3668142d913f8c0a27107e17bb5a9f Mon Sep 17 00:00:00 2001 From: JianpingHuang-NOAA <54634403+JianpingHuang-NOAA@users.noreply.github.com> Date: Fri, 16 Feb 2024 09:56:05 -0500 Subject: [PATCH] [production/AQM.v7] Enhancing EE2 compliance for the AQMv7 package (#1034) * update the scripts for ufs/bash_util * add prep_step in post scripts * update version number of module and libs * change the trigger time for 4 cycles * update J-jobs with correction of comin and comout env definition * delete auto_A2_cp_fix.sh from ~/ush * replace PCOM with COMOUTwmo for post and bias correction jobs --- ecf/defs/aqm_cycled.def | 80 +++--- jobs/JAQM_BIAS_CORRECTION_O3 | 19 +- jobs/JAQM_BIAS_CORRECTION_PM25 | 20 +- jobs/JAQM_FIRE_EMISSION | 9 +- jobs/JAQM_FORECAST | 10 +- jobs/JAQM_FORECAST_MANAGER | 17 +- jobs/JAQM_ICS | 12 +- jobs/JAQM_LBCS | 14 +- jobs/JAQM_MAKE_ICS | 13 +- jobs/JAQM_MAKE_LBCS | 12 +- jobs/JAQM_NEXUS_EMISSION | 11 +- jobs/JAQM_NEXUS_POST_SPLIT | 10 +- jobs/JAQM_POINT_SOURCE | 10 +- jobs/JAQM_POST | 11 +- jobs/JAQM_POST_STAT_O3 | 15 +- jobs/JAQM_POST_STAT_PM25 | 15 +- jobs/JAQM_PRE_POST_STAT | 8 +- scripts/exaqm_bias_correction_o3.sh | 26 +- scripts/exaqm_bias_correction_pm25.sh | 22 +- scripts/exaqm_fire_emission.sh | 16 +- scripts/exaqm_lbcs.sh | 6 +- scripts/exaqm_nexus_emission.sh | 6 +- scripts/exaqm_output.sh | 200 --------------- scripts/exaqm_post.sh | 4 - scripts/exaqm_post_stat_o3.sh | 20 +- scripts/exaqm_post_stat_pm25.sh | 24 +- sorc/Externals.cfg | 8 +- {ush => sorc}/auto_A2_cp_fix.sh | 2 + sorc/auto_build_exec.sh | 4 +- ush/bash_utils/boolify.sh | 2 + ush/bash_utils/change_case.sh | 2 + ush/bash_utils/check_for_preexist_dir_file.sh | 2 + ush/bash_utils/check_var_valid_value.sh | 2 + ush/bash_utils/count_files.sh | 2 + ush/bash_utils/create_symlink_to_file.sh | 2 + ush/bash_utils/define_macos_utilities.sh | 2 + ush/bash_utils/filesys_cmds_vrfy.sh | 2 + ush/bash_utils/get_bash_file_contents.sh | 2 + ush/bash_utils/get_charvar_from_netcdf.sh | 2 + ush/bash_utils/get_elem_inds.sh | 2 + .../get_manage_externals_config_property.sh | 2 + ush/bash_utils/interpol_to_arbit_CRES.sh | 2 + ush/bash_utils/is_array.sh | 2 + ush/bash_utils/is_element_of.sh | 2 + ush/bash_utils/print_input_args.sh | 2 + ush/bash_utils/print_msg.sh | 2 + ush/bash_utils/process_args.sh | 2 + ush/bash_utils/save_restore_shell_opts.sh | 2 + ush/bash_utils/set_bash_param.sh | 2 + ush/bash_utils/set_file_param.sh | 2 + ush/bash_utils/source_config.sh | 2 + ush/load_modules_run_task.sh | 231 ------------------ ush/source_util_funcs.sh | 2 + versions/build.ver | 8 +- versions/run.ver | 10 +- 55 files changed, 239 insertions(+), 680 deletions(-) delete mode 100755 scripts/exaqm_output.sh rename {ush => sorc}/auto_A2_cp_fix.sh (93%) delete mode 100755 ush/load_modules_run_task.sh diff --git a/ecf/defs/aqm_cycled.def b/ecf/defs/aqm_cycled.def index a7aa8bcd4e..c76f534105 100644 --- a/ecf/defs/aqm_cycled.def +++ b/ecf/defs/aqm_cycled.def @@ -22,30 +22,30 @@ suite nco_aqm family nexus task jaqm_nexus_emission_00 edit NSPT '00' - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_nexus_emission_01 edit NSPT '01' - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_nexus_emission_02 edit NSPT '02' - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_nexus_emission_03 edit NSPT '03' - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_nexus_emission_04 edit NSPT '04' - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_nexus_emission_05 edit NSPT '05' - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_nexus_post_split trigger ./jaqm_nexus_emission_00==complete and ./jaqm_nexus_emission_01==complete and ./jaqm_nexus_emission_02==complete and ./jaqm_nexus_emission_03==complete and ./jaqm_nexus_emission_04==complete and ./jaqm_nexus_emission_05==complete endfamily family prep task jaqm_make_ics - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_make_lbcs - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_ics trigger ./jaqm_make_ics==complete task jaqm_lbcs @@ -53,9 +53,9 @@ suite nco_aqm endfamily family pts_fire_emis task jaqm_point_source - trigger :TIME == 0151 + trigger :TIME == 0142 task jaqm_fire_emission - trigger :TIME == 0151 + trigger :TIME == 0142 endfamily family forecast task jaqm_forecast @@ -121,30 +121,30 @@ suite nco_aqm family nexus task jaqm_nexus_emission_00 edit NSPT '00' - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_nexus_emission_01 edit NSPT '01' - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_nexus_emission_02 edit NSPT '02' - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_nexus_emission_03 edit NSPT '03' - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_nexus_emission_04 edit NSPT '04' - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_nexus_emission_05 edit NSPT '05' - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_nexus_post_split trigger ./jaqm_nexus_emission_00==complete and ./jaqm_nexus_emission_01==complete and ./jaqm_nexus_emission_02==complete and ./jaqm_nexus_emission_03==complete and ./jaqm_nexus_emission_04==complete and ./jaqm_nexus_emission_05==complete endfamily family prep task jaqm_make_ics - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_make_lbcs - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_ics trigger ./jaqm_make_ics==complete task jaqm_lbcs @@ -152,9 +152,9 @@ suite nco_aqm endfamily family pts_fire_emis task jaqm_point_source - trigger :TIME == 0751 + trigger :TIME == 0742 task jaqm_fire_emission - trigger :TIME == 0751 + trigger :TIME == 0742 endfamily family forecast task jaqm_forecast @@ -494,30 +494,30 @@ suite nco_aqm family nexus task jaqm_nexus_emission_00 edit NSPT '00' - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_nexus_emission_01 edit NSPT '01' - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_nexus_emission_02 edit NSPT '02' - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_nexus_emission_03 edit NSPT '03' - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_nexus_emission_04 edit NSPT '04' - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_nexus_emission_05 edit NSPT '05' - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_nexus_post_split trigger ./jaqm_nexus_emission_00==complete and ./jaqm_nexus_emission_01==complete and ./jaqm_nexus_emission_02==complete and ./jaqm_nexus_emission_03==complete and ./jaqm_nexus_emission_04==complete and ./jaqm_nexus_emission_05==complete endfamily family prep task jaqm_make_ics - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_make_lbcs - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_ics trigger ./jaqm_make_ics==complete task jaqm_lbcs @@ -525,9 +525,9 @@ suite nco_aqm endfamily family pts_fire_emis task jaqm_point_source - trigger :TIME == 1351 + trigger :TIME == 1342 task jaqm_fire_emission - trigger :TIME == 1351 + trigger :TIME == 1342 endfamily family forecast task jaqm_forecast @@ -867,30 +867,30 @@ suite nco_aqm family nexus task jaqm_nexus_emission_00 edit NSPT '00' - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_nexus_emission_01 edit NSPT '01' - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_nexus_emission_02 edit NSPT '02' - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_nexus_emission_03 edit NSPT '03' - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_nexus_emission_04 edit NSPT '04' - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_nexus_emission_05 edit NSPT '05' - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_nexus_post_split trigger ./jaqm_nexus_emission_00==complete and ./jaqm_nexus_emission_01==complete and ./jaqm_nexus_emission_02==complete and ./jaqm_nexus_emission_03==complete and ./jaqm_nexus_emission_04==complete and ./jaqm_nexus_emission_05==complete endfamily family prep task jaqm_make_ics - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_make_lbcs - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_ics trigger ./jaqm_make_ics==complete task jaqm_lbcs @@ -898,9 +898,9 @@ suite nco_aqm endfamily family pts_fire_emis task jaqm_point_source - trigger :TIME == 2051 + trigger :TIME == 2042 task jaqm_fire_emission - trigger :TIME == 2051 + trigger :TIME == 2042 endfamily family forecast task jaqm_forecast diff --git a/jobs/JAQM_BIAS_CORRECTION_O3 b/jobs/JAQM_BIAS_CORRECTION_O3 index fa048b2f23..dafe4bc66a 100755 --- a/jobs/JAQM_BIAS_CORRECTION_O3 +++ b/jobs/JAQM_BIAS_CORRECTION_O3 @@ -35,18 +35,15 @@ export SENDDBN_NTC=${SENDDBN_NTC:-NO} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMINm1="${COMINm1:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDYm1})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" export DCOMINairnow="${DCOMINairnow:-${DCOMROOT}}" -export COMINbicor=${COMINbicor:-${COMaqm}} -export COMOUTbicor=${COMOUTbicor:-${COMaqm}} +export COMINbicor="${COMINbicor:-$(compath.py ${NET}/${aqm_ver})}" +export COMOUTbicor="${COMOUTbicor:-$(compath.py -o ${NET}/${aqm_ver})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located @@ -78,9 +75,9 @@ This is the J-job script for the task that runs BIAS-CORRECTION-O3. DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}/tmp_BIAS_CORRECTION_O3}" if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then - export PCOM=${PCOM:-${COMOUT}/wmo} - if [ ! -d "${PCOM}" ]; then - mkdir -p "${PCOM}" + export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} + if [ ! -d "${COMOUTwmo}" ]; then + mkdir -p "${COMOUTwmo}" fi fi diff --git a/jobs/JAQM_BIAS_CORRECTION_PM25 b/jobs/JAQM_BIAS_CORRECTION_PM25 index 6add9eb169..3c007690df 100755 --- a/jobs/JAQM_BIAS_CORRECTION_PM25 +++ b/jobs/JAQM_BIAS_CORRECTION_PM25 @@ -35,19 +35,15 @@ export SENDDBN_NTC=${SENDDBN_NTC:-NO} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMINm1="${COMINm1:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDYm1})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" export DCOMINairnow="${DCOMINairnow:-${DCOMROOT}}" -export COMINbicor=${COMINbicor:-${COMaqm}} -export COMOUTbicor=${COMOUTbicor:-${COMaqm}} +export COMINbicor="${COMINbicor:-$(compath.py ${NET}/${aqm_ver})}" +export COMOUTbicor="${COMOUTbicor:-$(compath.py -o ${NET}/${aqm_ver})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located @@ -78,9 +74,9 @@ This is the J-job script for the task that runs BIAS-CORRECTION-PM25. DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}/tmp_BIAS_CORRECTION_PM25}" if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then - export PCOM=${PCOM:-${COMOUT}/wmo} - if [ ! -d "${PCOM}" ]; then - mkdir -p "${PCOM}" + export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} + if [ ! -d "${COMOUTwmo}" ]; then + mkdir -p "${COMOUTwmo}" fi fi diff --git a/jobs/JAQM_FIRE_EMISSION b/jobs/JAQM_FIRE_EMISSION index 2e1d61c3db..a5d94fed44 100755 --- a/jobs/JAQM_FIRE_EMISSION +++ b/jobs/JAQM_FIRE_EMISSION @@ -31,17 +31,14 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} export FIXaqmfire="${FIXaqmfire:-${HOMEaqm}/fix/fire}" export DCOMROOT=${DCOMROOT:-/lfs/h1/ops/prod/dcom} export DCOMINfire="${DCOMINfire:-${DCOMROOT}/${PDY}/rave}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_FORECAST b/jobs/JAQM_FORECAST index 2a7118b5c8..989683fbff 100755 --- a/jobs/JAQM_FORECAST +++ b/jobs/JAQM_FORECAST @@ -11,7 +11,7 @@ export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export subcyc=0 export pid=${pid:-$$} export outid=${outid:-"LL$job"} -export RUN="${RUN:-${RUN_dfv}}" +export RUN="${RUN:-aqm}" export umbrella_forecast_data=${DATAROOT}/${RUN}_forecast_${cyc}_${aqm_ver} # exception handling for retro case if [ -d ${umbrella_forecast_data}/RESTART_ORG ]; then @@ -44,13 +44,9 @@ export SENDDBN_NTC=${SENDDBN_NTC:-NO} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_FORECAST_MANAGER b/jobs/JAQM_FORECAST_MANAGER index 27f61ab472..72e76761be 100755 --- a/jobs/JAQM_FORECAST_MANAGER +++ b/jobs/JAQM_FORECAST_MANAGER @@ -31,13 +31,9 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMIN="${COMIN:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY})}" -export COMINm1="${COMINm1:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDYm1})}" -export COMINm2="${COMINm1:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDYm2})}" -export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${model_ver}/${RUN}.${PDY}/${cyc})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Save current shell options (in a global array). Then set new options @@ -76,6 +72,15 @@ This is the J-job script for the task that runs POST-UPP-STAT. startmsg ${HOMEaqm}/scripts/exaqm_forecast_manager.sh export err=$?; err_chk + +#====================================================================== +msg="JOB ${job} HAS COMPLETED NORMALLY." +postmsg "${msg}" + +if [ "${KEEPDATA}" != "YES" ]; then + rm -rf ${DATA} +fi + # Print exit message print_info_msg " ======================================================================== diff --git a/jobs/JAQM_ICS b/jobs/JAQM_ICS index 8dd086f500..a1f92f235e 100755 --- a/jobs/JAQM_ICS +++ b/jobs/JAQM_ICS @@ -34,14 +34,10 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} - -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" + +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_LBCS b/jobs/JAQM_LBCS index bd56e9ecc3..3f36a7d563 100755 --- a/jobs/JAQM_LBCS +++ b/jobs/JAQM_LBCS @@ -34,18 +34,14 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" - -export COMINgefs="${COMINgefs:-$(compath.py ${envir}/gefs/${gefs_ver})}" export FIXaqmchem_lbcs="${FIXaqmchem_lbcs:-${HOMEaqm}/fix/chem_lbcs}" +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMINgefs="${COMINgefs:-$(compath.py gefs/${gefs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" + #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located # (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in diff --git a/jobs/JAQM_MAKE_ICS b/jobs/JAQM_MAKE_ICS index cbfbe06b20..bb1b7bf20f 100755 --- a/jobs/JAQM_MAKE_ICS +++ b/jobs/JAQM_MAKE_ICS @@ -34,14 +34,11 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} - -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" + +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMINm1="${COMINm1:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDYm1})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_MAKE_LBCS b/jobs/JAQM_MAKE_LBCS index 985bc52ec5..2b5b0bb3e4 100755 --- a/jobs/JAQM_MAKE_LBCS +++ b/jobs/JAQM_MAKE_LBCS @@ -35,14 +35,10 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} - -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" + +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_NEXUS_EMISSION b/jobs/JAQM_NEXUS_EMISSION index ceb9f3f705..87d82359e9 100755 --- a/jobs/JAQM_NEXUS_EMISSION +++ b/jobs/JAQM_NEXUS_EMISSION @@ -39,16 +39,11 @@ export FIXaqmnexus_gfs_sfc="${FIXaqmnexus:-${HOMEaqm}/fix/gfs}" export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} export FIXemis="${FIXemis:-${FIXaqm}/emission}" -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" - -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_NEXUS_POST_SPLIT b/jobs/JAQM_NEXUS_POST_SPLIT index 71cec18573..f3f5c61475 100755 --- a/jobs/JAQM_NEXUS_POST_SPLIT +++ b/jobs/JAQM_NEXUS_POST_SPLIT @@ -39,16 +39,12 @@ export FIXaqmnexus_gfs_sfc="${FIXaqmnexus:-${HOMEaqm}/fix/gfs}" export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" export FIXemis="${FIXemis:-${FIXaqm}/emission}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_POINT_SOURCE b/jobs/JAQM_POINT_SOURCE index 51b10ceb2d..696b151d51 100755 --- a/jobs/JAQM_POINT_SOURCE +++ b/jobs/JAQM_POINT_SOURCE @@ -31,16 +31,12 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" export FIXemispt="${FIXemispt:-${FIXaqm}/emission/nei2016v1-pt}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMINgfs="${COMINgfs:-$(compath.py gfs/${gfs_ver})}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_POST b/jobs/JAQM_POST index a4b942e284..c4bf4078b8 100755 --- a/jobs/JAQM_POST +++ b/jobs/JAQM_POST @@ -36,14 +36,9 @@ export SENDDBN_NTC=${SENDDBN_NTC:-NO} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} - -export COMINgfs="${COMINgfs:-$(compath.py ${envir}/gfs/${gfs_ver})}" -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" + +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/jobs/JAQM_POST_STAT_O3 b/jobs/JAQM_POST_STAT_O3 index e13b404efa..3fa45d42db 100755 --- a/jobs/JAQM_POST_STAT_O3 +++ b/jobs/JAQM_POST_STAT_O3 @@ -35,13 +35,10 @@ export SENDDBN_NTC=${SENDDBN_NTC:-NO} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMINm1="${COMINm1:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDYm1})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located @@ -73,9 +70,9 @@ This is the J-job script for the task that runs POST-STAT-O3. DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}/tmp_POST_STAT_O3}" if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then - export PCOM=${PCOM:-${COMOUT}/wmo} - if [ ! -d "${PCOM}" ]; then - mkdir -p "${PCOM}" + export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} + if [ ! -d "${COMOUTwmo}" ]; then + mkdir -p "${COMOUTwmo}" fi fi diff --git a/jobs/JAQM_POST_STAT_PM25 b/jobs/JAQM_POST_STAT_PM25 index 4f091fc2b8..937fffc46e 100755 --- a/jobs/JAQM_POST_STAT_PM25 +++ b/jobs/JAQM_POST_STAT_PM25 @@ -35,13 +35,10 @@ export SENDDBN_NTC=${SENDDBN_NTC:-NO} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMINm1="${COMINm1:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDYm1})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located @@ -73,9 +70,9 @@ This is the J-job script for the task that runs POST-UPP-STAT. DATA="${DATA:-${COMIN}${SLASH_ENSMEM_SUBDIR}/tmp_POST_STAT_PM25}" if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then - export PCOM=${PCOM:-${COMOUT}/wmo} - if [ ! -d "${PCOM}" ]; then - mkdir -p "${PCOM}" + export COMOUTwmo=${COMOUTwmo:-${COMOUT}/wmo} + if [ ! -d "${COMOUTwmo}" ]; then + mkdir -p "${COMOUTwmo}" fi fi diff --git a/jobs/JAQM_PRE_POST_STAT b/jobs/JAQM_PRE_POST_STAT index f5833219b9..502868d3cf 100755 --- a/jobs/JAQM_PRE_POST_STAT +++ b/jobs/JAQM_PRE_POST_STAT @@ -31,13 +31,9 @@ export CDATE=${PDY}${cyc} export EXECaqm=${EXECaqm:-${HOMEaqm}/exec} export PARMaqm=${PARMaqm:-${HOMEaqm}/parm} export FIXaqm=${FIXaqm:-${HOMEaqm}/fix} -export UTILaqm=${UTILaqm:-${HOMEaqm}/util} -export COMaqm=${COMaqm:-$(compath.py ${envir}/aqm/${aqm_ver})} -export COMIN="${COMIN:-${COMaqm}/${RUN}.${PDY}}" -export COMINm1="${COMaqm}/${RUN}.${PDYm1}" -export COMINm2="${COMaqm}/${RUN}.${PDYm2}" -export COMOUT="${COMOUT:-${COMaqm}/${RUN}.${PDY}/${cyc}}" +export COMIN="${COMIN:-$(compath.py ${NET}/${aqm_ver}/${RUN}.${PDY})}" +export COMOUT="${COMOUT:-$(compath.py -o ${NET}/${aqm_ver}/${RUN}.${PDY}/${cyc})}" #----------------------------------------------------------------------- # Get the full path to the file in which this script/function is located diff --git a/scripts/exaqm_bias_correction_o3.sh b/scripts/exaqm_bias_correction_o3.sh index db343d62c0..6dcee2ec05 100755 --- a/scripts/exaqm_bias_correction_o3.sh +++ b/scripts/exaqm_bias_correction_o3.sh @@ -288,6 +288,8 @@ cp ${DATA}/${NET}.${cycle}.awpozcon*bc*.grib2 ${COMOUT} # STEP 6: calculating 24-hr ave PM2.5 #----------------------------------------------------------------------------- +. prep_step + if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp ${COMOUT}/ozone.corrected.${PDY}.${cyc}z.nc a.nc @@ -372,7 +374,6 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_${hr}hr_o3_bc.227.grib2 export FORT12="filesize" - export FORT31= export FORT51=${NET}-${hr}hro3-maxi.227.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm-${hr}hro3-maxi.${cycle}.227 @@ -380,18 +381,17 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}-${hr}hro3-maxi.227.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm-${hr}hro3-maxi.${cycle}.227 done - # Post Files to PCOM - cp awpaqm.${cycle}.*o3-max-bc.227.grib2 ${PCOM} + # Post Files to COMOUTwmo + cp awpaqm.${cycle}.*o3-max-bc.227.grib2 ${COMOUTwmo} # Distribute Data if [ "${SENDDBN_NTC}" = "YES" ] ; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.1ho3-max-bc.227.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.8ho3-max-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1ho3-max-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.8ho3-max-bc.227.grib2 fi fi fi @@ -457,7 +457,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_${hr}hr_o3_bc.227.grib2 export FORT12="filesize" - export FORT31= export FORT51=grib2.${cycle}.awpcsozcon_aqm_${hr}-bc.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_${hr}hr_o3_bc-awpozcon.${cycle}.227 @@ -465,7 +464,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=grib2.${cycle}.awpcsozcon_aqm_${hr}-bc.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.${hr}ho3-bc.227.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_${hr}hr_o3_bc-awpozcon.${cycle}.227 @@ -474,7 +472,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_${hr}hr_o3_bc.227.grib2 export FORT12="filesize" - export FORT31= export FORT51=${NET}.${cycle}.max_${hr}hr_o3-bc.227.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm-${hr}hro3_bc-maxi.${cycle}.227 @@ -482,18 +479,17 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_${hr}hr_o3-bc.227.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm-${hr}hro3_bc-maxi.${cycle}.227 - # Post Files to PCOM - cp awpaqm.${cycle}.${hr}ho3-bc.227.grib2 ${PCOM} - cp awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 ${PCOM} + # Post Files to COMOUTwmo + cp awpaqm.${cycle}.${hr}ho3-bc.227.grib2 ${COMOUTwmo} + cp awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 ${COMOUTwmo} # Distribute Data if [ "${SENDDBN}" = "YES" ]; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.${hr}ho3-bc.227.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.${hr}ho3-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.${hr}ho3-max-bc.227.grib2 fi done fi diff --git a/scripts/exaqm_bias_correction_pm25.sh b/scripts/exaqm_bias_correction_pm25.sh index f46a64869d..9c2ed7e497 100755 --- a/scripts/exaqm_bias_correction_pm25.sh +++ b/scripts/exaqm_bias_correction_pm25.sh @@ -266,6 +266,8 @@ cp ${DATA}/${NET}.${cycle}.pm25*bc*.grib2 ${COMOUT} # STEP 6: calculating 24-hr ave PM2.5 #------------------------------------------------------------------------ +. prep_step + if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then cp ${COMOUT}/pm2.5.corrected.${PDY}.${cyc}z.nc a.nc @@ -384,7 +386,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.grib2_pm25_bc.227 export FORT12="filesize" - export FORT31= export FORT51=${NET}.${cycle}.grib2_pm25_bc.227.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_pm25_bc.${cycle}.227 @@ -392,7 +393,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.grib2_pm25_bc.227.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.1hpm25-bc.227.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_pm25_bc.${cycle}.227 @@ -402,7 +402,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_1hr_pm25_bc.227.grib2 export FORT12="filesize" - export FORT31= export FORT51=${NET}.${cycle}.max_1hr_pm25_bc.227.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_max_1hr_pm25_bc.${cycle}.227 @@ -410,7 +409,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_1hr_pm25_bc.227.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_max_1hr_pm25_bc.${cycle}.227 @@ -420,7 +418,6 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2 export FORT12="filesize" - export FORT31= export FORT51=${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_24hrpm25_bc_awp.${cycle}.227 @@ -428,20 +425,19 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_24hr_pm25_bc.227.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_24hrpm25_bc_awp.${cycle}.227 - # Post Files to PCOM - cp awpaqm.${cycle}.1hpm25-bc.227.grib2 ${PCOM} - cp awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 ${PCOM} - cp awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 ${PCOM} + # Post Files to COMOUTwmo + cp awpaqm.${cycle}.1hpm25-bc.227.grib2 ${COMOUTwmo} + cp awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 ${COMOUTwmo} + cp awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 ${COMOUTwmo} # Distribute Data if [ "${SENDDBN_NTC}" = "YES" ] ; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.1hpm25-bc.227.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1hpm25-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.daily-1hr-pm25-max-bc.227.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.24hr-pm25-ave-bc.227.grib2 fi fi diff --git a/scripts/exaqm_fire_emission.sh b/scripts/exaqm_fire_emission.sh index 45de7f9b21..6a7913515b 100755 --- a/scripts/exaqm_fire_emission.sh +++ b/scripts/exaqm_fire_emission.sh @@ -7,6 +7,8 @@ postmsg "$msg" export pgm=aqm_fire_emission +EMAIL_SDM=${EMAIL_SDM:-NO} + #----------------------------------------------------------------------- # # Source the variable definitions file and the bash utility functions. @@ -105,9 +107,17 @@ else cp -p ${FIXaqmfire}/Hourly_Emissions_13km_dummy.nc ${FILE_curr} message_warning="WARNING: ${message_txt}. Replacing with the dummy file :: AQM RUN SOFT FAILED." print_info_msg "${message_warning}" - if [ ! -z "${maillist_group2}" ]; then - echo "${message_warning}" | mail.py $maillist_group2 - fi +# if [ ! -z "${maillist_group2}" ]; then +# echo "${message_warning}" | mail.py $maillist_group2 +# fi + if [ "${EMAIL_SDM^^}" = "YES" ] ; then + MAILFROM=${MAILFROM:-"nco.spa@noaa.gov"} + #MAILTO=${MAILTO:-"sdm@noaa.gov"} + MAILTO=${MAILTO:-"${maillist}"} + subject="${cyc}Z ${RUN^^} Output for ${basinname:-} WILDFIRE EMIS " + mail.py -s "${subject}" -v "${MAILTO}" + fi + fi done diff --git a/scripts/exaqm_lbcs.sh b/scripts/exaqm_lbcs.sh index f8fcb2a136..cbd39c4bc1 100755 --- a/scripts/exaqm_lbcs.sh +++ b/scripts/exaqm_lbcs.sh @@ -230,9 +230,9 @@ check_file_with_recheck() { # File not found even after rechecks echo "File was not found even after rechecks: $AQM_MOFILE_FHR_FP" - if [ ! -z "${maillist_group1}" ]; then - echo "${message_warning}" | mail.py $maillist_group1 - fi +# if [ ! -z "${maillist_group1}" ]; then +# echo "${message_warning}" | mail.py $maillist_group1 +# fi fi fi done diff --git a/scripts/exaqm_nexus_emission.sh b/scripts/exaqm_nexus_emission.sh index 2934f0567d..28f4e93759 100755 --- a/scripts/exaqm_nexus_emission.sh +++ b/scripts/exaqm_nexus_emission.sh @@ -130,9 +130,9 @@ if [ "${RUN_TASK_NEXUS_GFS_SFC}" = "FALSE" ]; then GFS_SFC_LOCAL_DIR = \"${GFS_SFC_LOCAL_DIR}\" gfs_sfc_fn = \"${gfs_sfc_fn}\"" print_info_msg "${message_txt}" - if [ ! -z "${maillist_group1}" ]; then - echo "${message_txt}" | mail.py $maillist_group1 - fi +# if [ ! -z "${maillist_group1}" ]; then +# echo "${message_txt}" | mail.py $maillist_group1 +# fi fi done diff --git a/scripts/exaqm_output.sh b/scripts/exaqm_output.sh deleted file mode 100755 index a9c7ecec73..0000000000 --- a/scripts/exaqm_output.sh +++ /dev/null @@ -1,200 +0,0 @@ -#!/bin/bash - -set -xe - -msg="JOB COPYING MODEL OUTPUTS HAS BEGUN" -postmsg "$msg" - -export pgm=aqm_output - -#----------------------------------------------------------------------- -# Source the variable definitions file and the bash utility functions. -#----------------------------------------------------------------------- -# -. $USHaqm/source_util_funcs.sh -source_config_for_task "task_output" ${GLOBAL_VAR_DEFNS_FP} -# -#----------------------------------------------------------------------- -# Save current shell options (in a global array). Then set new options -# for this script/function. -#----------------------------------------------------------------------- -{ save_shell_opts; . $USHaqm/preamble.sh; } > /dev/null 2>&1 -#----------------------------------------------------------------------- -# -# Get the full path to the file in which this script/function is located -# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in -# which the file is located (scrfunc_dir). -# -#----------------------------------------------------------------------- -# -scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) -scrfunc_fn=$( basename "${scrfunc_fp}" ) -scrfunc_dir=$( dirname "${scrfunc_fp}" ) -# -#----------------------------------------------------------------------- -# Print message indicating entry into script. -#----------------------------------------------------------------------- -# -print_info_msg " -======================================================================== -Entering script: \"${scrfunc_fn}\" -In directory: \"${scrfunc_dir}\" -This is the ex-script for the task that runs COPY_MODEL_OUTPUT. -========================================================================" -# -if [ ${#FCST_LEN_CYCL[@]} -gt 1 ]; then - cyc_mod=$(( ${cyc} - ${DATE_FIRST_CYCL:8:2} )) - CYCLE_IDX=$(( ${cyc_mod} / ${INCR_CYCL_FREQ} )) - FCST_LEN_HRS=${FCST_LEN_CYCL[$CYCLE_IDX]} -fi - -file_ids=( "fv_tracer.res.tile1.nc" "fv_core.res.nc" "fv_core.res.tile1.nc" "fv_srf_wnd.res.tile1.nc" "sfc_data.nc" "phy_data.nc" "coupler.res" ) -read -a restart_hrs <<< "${RESTART_INTERVAL}" -num_restart_hrs=${#restart_hrs[*]} - -sleep 200 - -DATA_FORECAST=$(/bin/ls -1rtd ${DATAROOT}/aqm_forecast_${cyc}.* | tail -n 1) - -#----------------------------------------------------------------------- -# Get the total file number of aqm.t${cyc}z.dyn*nc at $COMOUT -# total_files=$(ls -1 "$COMOUT"/aqm.t${cyc}z.dyn*nc | wc -l) - - files_exist=false - - shopt -s nullglob - files=("$COMOUT"/aqm.t${cyc}z.dyn*nc) - if [ ${#files[@]} -gt 0 ]; then - files_exist=true - total_files=${#files[@]} - fi -#----------------------------------------------------------------------- -# Check the conditions and set ist accordingly - if [ "$files_exist" = true ]; then - for ((i=0; i= restart_hrs[i] && total_files < restart_hrs[i+1])); then - ist=$((restart_hrs[i] + 1)) - break - fi - done - -# If total_files is greater than or equal to the last value in RESTART_INTERVAL - if ((total_files >= restart_hrs[num_restart_hrs-1])); then - ist=$((restart_hrs[num_restart_hrs-1] + 1)) - elif ((total_files < restart_hrs[0])); then - ist=0 - fi - else - ist=0 - fi -# -#----------------------------------------------------------------------- -while [ "$ist" -le "${FCST_LEN_HRS}" ]; do - hst=$( printf "%03d" "${ist}" ) - ic=0 - while [ $ic -lt 600 ] - do - if [ -s ${DATA_FORECAST}/dynf${hst}.nc ] && [ $(stat -c %s `ls ${DATA_FORECAST}/dynf${hst}.nc`) -gt 1170900000 ]; then - sleep 60 - cpreq ${DATA_FORECAST}/dynf${hst}.nc ${COMOUT}/aqm.t${cyc}z.dyn.f${hst}.nc - cpreq ${DATA_FORECAST}/phyf${hst}.nc ${COMOUT}/aqm.t${cyc}z.phy.f${hst}.nc - cpreq ${DATA_FORECAST}/aqm.prod.nc ${COMOUT}/aqm.t${cyc}z.prod.nc - break - else - sleep 20 - (( ic=ic+1 )) - fi - done - -# -#----------------------------------------------------------------------- -# Copy restart files at the prescribed-resart forecast hours - for (( ih_rst=${num_restart_hrs}-1; ih_rst>=0; ih_rst-- )); do - hst_rst=$( printf "%03d" "${restart_hrs[ih_rst]}" ) - if [ $hst == $hst_rst ] ;then - cdate_restart_hr=`$NDATE +${restart_hrs[ih_rst]} ${PDY}${cyc}` - rst_yyyymmdd="${cdate_restart_hr:0:8}" - rst_hh="${cdate_restart_hr:8:2}" - if [ $cyc = 06 -o $cyc = 12 ]; then - ic1=0 - while [ $ic1 -lt 240 ]; do - if [ -s ${DATA_FORECAST}/RESTART/${rst_yyyymmdd}.${rst_hh}0000.fv_tracer.res.tile1.nc ] && [ $(stat -c %s `ls ${DATA_FORECAST}/RESTART/${rst_yyyymmdd}.${rst_hh}0000.fv_tracer.res.tile1.nc`) -gt 21836600000 ]; then - if [ ! -d "${COMOUT}/RESTART" ]; then - mkdir -p "${COMOUT}/RESTART" - fi - sleep 30 - for file_id in "${file_ids[@]}"; do - source_file="${DATA_FORECAST}/RESTART/${rst_yyyymmdd}.${rst_hh}0000.${file_id}" - destination_dir="${COMOUT}/RESTART/${rst_yyyymmdd}.${rst_hh}0000.${file_id}" - while [ ! -e "${source_file}" ]; do - echo "Waiting for ${source_file} to exist..." - sleep 10 - done - sleep 10 - cpreq $source_file $destination_dir - done - sleep 20 - break - else - sleep 20 - (( ic1=ic1+1 )) - fi - done - else - # 00Z and 18Z - cdate_restart_hr=`$NDATE +6 ${PDY}${cyc}` - rst_yyyymmdd="${cdate_restart_hr:0:8}" - rst_hh="${cdate_restart_hr:8:2}" - ic2=0 - while [ $ic2 -lt 240 ]; do - if [ -s ${DATA_FORECAST}/RESTART/fv_tracer.res.tile1.nc ] && [ $(stat -c %s `ls ${DATA_FORECAST}/RESTART/fv_tracer.res.tile1.nc`) -gt 21836600000 ]; then - sleep 30 - if [ ! -d "${COMOUT}/RESTART" ]; then - mkdir -p "${COMOUT}/RESTART" - fi - for file_id in "${file_ids[@]}"; do - source_file="${DATA_FORECAST}/RESTART/${file_id}" - destination_dir="${COMOUT}/RESTART/${rst_yyyymmdd}.${rst_hh}0000.${file_id}" - while [ ! -e "${source_file}" ]; do - echo "Waiting for ${source_file} to exist..." - sleep 10 - done - sleep 20 - cpreq $source_file $destination_dir - done - break - else - sleep 20 - (( ic2=ic2+1 )) - fi - done - fi - fi - done - (( ist=ist+1 )) -done -# -#----------------------------------------------------------------------- -# Deleting FORECAAT run dir -# Note: This needs to done by the output job rather than the forecast job -#----------------------------------------------------------------------- -if [ "${KEEPDATA}" = "FALSE" ]; then - rm -rf ${DATA_FORECAST} -fi -# -#----------------------------------------------------------------------- -# Print message indicating successful completion of script. -#----------------------------------------------------------------------- -# -print_info_msg " -======================================================================== -COPY-MODEL-OUTPUT completed successfully. - -Exiting script: \"${scrfunc_fn}\" -In directory: \"${scrfunc_dir}\" -========================================================================" -# -#----------------------------------------------------------------------- -# -{ restore_shell_opts; } > /dev/null 2>&1 -# diff --git a/scripts/exaqm_post.sh b/scripts/exaqm_post.sh index a62d4a7286..757657912e 100755 --- a/scripts/exaqm_post.sh +++ b/scripts/exaqm_post.sh @@ -272,10 +272,6 @@ for fid in "${fids[@]}"; do post_renamed_fn="${NET}.${cycle}${dot_ensmem}.${fid}.${post_renamed_fn_suffix}" mv ${DATA}/${post_orig_fn} ${post_renamed_fn} - # DBN alert - if [ $SENDDBN = "YES" ]; then - $DBNROOT/bin/dbn_alert MODEL rrfs_post ${job} ${COMOUT}/${post_renamed_fn} - fi done # diff --git a/scripts/exaqm_post_stat_o3.sh b/scripts/exaqm_post_stat_o3.sh index c08a8da2be..c7c7057326 100755 --- a/scripts/exaqm_post_stat_o3.sh +++ b/scripts/exaqm_post_stat_o3.sh @@ -89,6 +89,8 @@ fi # #----------------------------------------------------------------------- # +. prep_step + if [ "${PREDEF_GRID_NAME}" = "AQM_NA_13km" ]; then id_domain=793 fi @@ -158,7 +160,6 @@ for grid in 227 196 198;do export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_${hr}hr_o3.${grid}.grib2 export FORT12="filesize" - export FORT31= export FORT51=grib2.${cycle}.${hr}awpcsozcon.${grid}.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_${hr}hr_o3-awpozcon.${cycle}.${grid} @@ -166,15 +167,14 @@ for grid in 227 196 198;do export XLFRTEOPTS="unit_vars=yes" export FORT11=grib2.${cycle}.${hr}awpcsozcon.${grid}.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.${hr}ho3.${grid}.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_${hr}hr_o3-awpozcon.${cycle}.${grid} done cp ${DATA}/${NET}.${cycle}.ave_1hr_o3.${grid}.grib2 ${COMOUT} cp ${DATA}/${NET}.${cycle}.ave_8hr_o3.${grid}.grib2 ${COMOUT} - cp ${DATA}/awpaqm.${cycle}.1ho3.${grid}.grib2 ${PCOM} - cp ${DATA}/awpaqm.${cycle}.8ho3.${grid}.grib2 ${PCOM} + cp ${DATA}/awpaqm.${cycle}.1ho3.${grid}.grib2 ${COMOUTwmo} + cp ${DATA}/awpaqm.${cycle}.8ho3.${grid}.grib2 ${COMOUTwmo} if [ "$SENDDBN" = "YES" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_CONC ${job} ${COMOUT}/${NET}.${cycle}.ave_1hr_o3.${grid}.grib2 @@ -182,8 +182,8 @@ for grid in 227 196 198;do fi if [ "$SENDDBN_NTC" = "YES" ]; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.1ho3.${grid}.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.8ho3.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1ho3.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.8ho3.${grid}.grib2 fi for var in awpozcon;do @@ -290,22 +290,20 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_${hr}hr_o3.${grid}.grib2 export FORT12="filesize" - export FORT31= export FORT51=aqm-${hr}hro3-maxi.${grid}.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm-${hr}hro3-maxi.${cycle}.${grid} echo `ls -l aqm-${hr}hro3-maxi.${grid}.grib2.temp | awk '{print $5} '` > filesize export XLFRTEOPTS="unit_vars=yes" export FORT11=aqm-${hr}hro3-maxi.${grid}.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.${hr}ho3-max.${grid}.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm-${hr}hro3-maxi.${cycle}.${grid} done - cp awpaqm.${cycle}.*o3-max.${grid}.grib2 ${PCOM} + cp awpaqm.${cycle}.*o3-max.${grid}.grib2 ${COMOUTwmo} if [ "${SENDDBN_NTC}" = "YES" ]; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.1ho3-max.${grid}.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.8ho3-max.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1ho3-max.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.8ho3-max.${grid}.grib2 fi done fi diff --git a/scripts/exaqm_post_stat_pm25.sh b/scripts/exaqm_post_stat_pm25.sh index ec696d03ae..9515758ed6 100755 --- a/scripts/exaqm_post_stat_pm25.sh +++ b/scripts/exaqm_post_stat_pm25.sh @@ -89,6 +89,8 @@ fi #----------------------------------------------------------------------- # +. prep_step + if [ "${PREDEF_GRID_NAME}" = "AQM_NA_13km" ]; then id_domain=793 fi @@ -143,7 +145,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_1hr_pm25.${grid}.grib2 export FORT12="filesize" - export FORT31= + #export FORT31= export FORT51=${NET}.${cycle}.ave_1hr_pm25.${grid}.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_1hpm25.${cycle}.${grid} @@ -151,7 +153,7 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_1hr_pm25.${grid}.grib2.temp export FORT12="filesize" - export FORT31= + #export FORT31= export FORT51=awpaqm.${cycle}.1hpm25.${grid}.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_1hpm25.${cycle}.${grid} @@ -159,11 +161,11 @@ if [ "${cyc}" = "06" ] || [ "${cyc}" = "12" ]; then ${DBNROOT}/bin/dbn_alert MODEL AQM_PM ${job} ${COMOUT}/${NET}.${cycle}.ave_1hr_pm25.${grid}.grib2 fi - # Post Files to PCOM - cp awpaqm.${cycle}.1hpm25.${grid}.grib2 ${PCOM} + # Post Files to COMOUTwmo + cp awpaqm.${cycle}.1hpm25.${grid}.grib2 ${COMOUTwmo} if [ "$SENDDBN_NTC" = "YES" ]; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.1hpm25.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.1hpm25.${grid}.grib2 fi done @@ -265,7 +267,6 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_1hr_pm25.${grid}.grib2 export FORT12="filesize" - export FORT31= export FORT51=${NET}.${cycle}.max_1hr_pm25.${grid}.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_max_1hr_pm25.${cycle}.${grid} @@ -273,7 +274,6 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.max_1hr_pm25.${grid}.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.daily-1hr-pm25-max.${grid}.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_max_1hr_pm25.${cycle}.${grid} @@ -282,7 +282,6 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_24hr_pm25.${grid}.grib2 export FORT12="filesize" - export FORT31= export FORT51=${NET}.${cycle}.ave_24hr_pm25.${grid}.grib2.temp tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_24hrpm25_awp.${cycle}.${grid} @@ -290,20 +289,19 @@ EOF1 export XLFRTEOPTS="unit_vars=yes" export FORT11=${NET}.${cycle}.ave_24hr_pm25.${grid}.grib2.temp export FORT12="filesize" - export FORT31= export FORT51=awpaqm.${cycle}.24hr-pm25-ave.${grid}.grib2 tocgrib2super < ${PARMaqm}/aqm_utils/wmo/grib2_aqm_ave_24hrpm25_awp.${cycle}.${grid} - cp awpaqm.${cycle}.daily-1hr-pm25-max.${grid}.grib2 ${PCOM} - cp awpaqm.${cycle}.24hr-pm25-ave.${grid}.grib2 ${PCOM} + cp awpaqm.${cycle}.daily-1hr-pm25-max.${grid}.grib2 ${COMOUTwmo} + cp awpaqm.${cycle}.24hr-pm25-ave.${grid}.grib2 ${COMOUTwmo} ############################## # Distribute Data ############################## if [ "${SENDDBN_NTC}" = "YES" ] ; then - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.24hr-pm25-ave.${grid}.grib2 - ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${PCOM}/awpaqm.${cycle}.daily-1hr-pm25-max.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.24hr-pm25-ave.${grid}.grib2 + ${DBNROOT}/bin/dbn_alert ${DBNALERT_TYPE} ${NET} ${job} ${COMOUTwmo}/awpaqm.${cycle}.daily-1hr-pm25-max.${grid}.grib2 fi done fi diff --git a/sorc/Externals.cfg b/sorc/Externals.cfg index 598dcf3985..c6dff4c9ec 100644 --- a/sorc/Externals.cfg +++ b/sorc/Externals.cfg @@ -3,7 +3,7 @@ protocol = git repo_url = https://github.com/ufs-community/UFS_UTILS # Specify either a branch name or a hash but not both. #branch = develop -hash = 72701ab +hash = 2f69e28 local_path = UFS_UTILS required = True @@ -12,7 +12,7 @@ protocol = git repo_url = https://github.com/ufs-community/ufs-weather-model # Specify either a branch name or a hash but not both. #branch = production/AQM.v7 -hash = 5aa916b +hash = 8599228 local_path = ufs-weather-model required = True @@ -30,7 +30,7 @@ protocol = git repo_url = https://github.com/noaa-oar-arl/NEXUS #branch = develop # Specify either a branch name or a hash but not both. -hash = 12f932f +hash = ed3e715 local_path = arl_nexus required = True @@ -39,7 +39,7 @@ protocol = git repo_url = https://github.com/NOAA-EMC/AQM-utils # Specify either a branch name or a hash but not both. #branch = develop -hash = 299b4ba +hash = d953bd1 local_path = AQM-utils required = True diff --git a/ush/auto_A2_cp_fix.sh b/sorc/auto_A2_cp_fix.sh similarity index 93% rename from ush/auto_A2_cp_fix.sh rename to sorc/auto_A2_cp_fix.sh index 209b7690aa..8e72d32724 100755 --- a/ush/auto_A2_cp_fix.sh +++ b/sorc/auto_A2_cp_fix.sh @@ -1,5 +1,7 @@ #!/bin/bash # +set -ax +# export dev_fix=/lfs/h2/emc/physics/noscrub/UFS_SRW_App/aqm.v7/fix cd ../ diff --git a/sorc/auto_build_exec.sh b/sorc/auto_build_exec.sh index 7cc2b1df00..ce81cc4357 100755 --- a/sorc/auto_build_exec.sh +++ b/sorc/auto_build_exec.sh @@ -27,7 +27,7 @@ cd ../ush #------------------------------------------------------------------- cd ../sorc -for src in aqm_bias_correct aqm_bias_interpolate aqm_post_bias_cor_grib2 aqm_post_grib2 aqm_post_maxi_bias_cor_grib2 aqm_post_maxi_grib2 convert_airnow_csv gefs2clbcs_para +for src in aqm_bias_correct aqm_bias_interpolate aqm_post_bias_cor_grib2 aqm_post_grib2 aqm_post_maxi_bias_cor_grib2 aqm_post_maxi_grib2 convert_airnow_csv gefs2clbcs_para do ln -s AQM-utils/sorc/${src}.fd . done @@ -38,6 +38,8 @@ ln -s ufs-weather-model ufs-model.fd ln -s UPP/sorc/ncep_post.fd upp.fd +ln -s arl_nexus nexus.fd + #------------------------------------------------------------------- #===== Step 4: create executable codes =============== #------------------------------------------------------------------- diff --git a/ush/bash_utils/boolify.sh b/ush/bash_utils/boolify.sh index 577b7c16eb..53bd9d72c1 100644 --- a/ush/bash_utils/boolify.sh +++ b/ush/bash_utils/boolify.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/change_case.sh b/ush/bash_utils/change_case.sh index b8cc1c7db4..9f96f6e26a 100644 --- a/ush/bash_utils/change_case.sh +++ b/ush/bash_utils/change_case.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/check_for_preexist_dir_file.sh b/ush/bash_utils/check_for_preexist_dir_file.sh index 340775d4a6..f145a333ca 100644 --- a/ush/bash_utils/check_for_preexist_dir_file.sh +++ b/ush/bash_utils/check_for_preexist_dir_file.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/check_var_valid_value.sh b/ush/bash_utils/check_var_valid_value.sh index 21288184db..520085c556 100644 --- a/ush/bash_utils/check_var_valid_value.sh +++ b/ush/bash_utils/check_var_valid_value.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/count_files.sh b/ush/bash_utils/count_files.sh index 9ca22f8c09..6bfedc67f6 100644 --- a/ush/bash_utils/count_files.sh +++ b/ush/bash_utils/count_files.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/create_symlink_to_file.sh b/ush/bash_utils/create_symlink_to_file.sh index 39a07841d5..e03e07ced7 100644 --- a/ush/bash_utils/create_symlink_to_file.sh +++ b/ush/bash_utils/create_symlink_to_file.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/define_macos_utilities.sh b/ush/bash_utils/define_macos_utilities.sh index fe66d93eef..e99f9f1a81 100644 --- a/ush/bash_utils/define_macos_utilities.sh +++ b/ush/bash_utils/define_macos_utilities.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/filesys_cmds_vrfy.sh b/ush/bash_utils/filesys_cmds_vrfy.sh index b355d293ad..549b953423 100644 --- a/ush/bash_utils/filesys_cmds_vrfy.sh +++ b/ush/bash_utils/filesys_cmds_vrfy.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/get_bash_file_contents.sh b/ush/bash_utils/get_bash_file_contents.sh index ff958abd3a..2b60e0a7a4 100644 --- a/ush/bash_utils/get_bash_file_contents.sh +++ b/ush/bash_utils/get_bash_file_contents.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/get_charvar_from_netcdf.sh b/ush/bash_utils/get_charvar_from_netcdf.sh index e7a0904db7..48a9626900 100644 --- a/ush/bash_utils/get_charvar_from_netcdf.sh +++ b/ush/bash_utils/get_charvar_from_netcdf.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/get_elem_inds.sh b/ush/bash_utils/get_elem_inds.sh index 4545fa4678..0caee5d2dc 100644 --- a/ush/bash_utils/get_elem_inds.sh +++ b/ush/bash_utils/get_elem_inds.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/get_manage_externals_config_property.sh b/ush/bash_utils/get_manage_externals_config_property.sh index 318804927b..748949efc7 100644 --- a/ush/bash_utils/get_manage_externals_config_property.sh +++ b/ush/bash_utils/get_manage_externals_config_property.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/interpol_to_arbit_CRES.sh b/ush/bash_utils/interpol_to_arbit_CRES.sh index 2f4681d93a..611a1be174 100644 --- a/ush/bash_utils/interpol_to_arbit_CRES.sh +++ b/ush/bash_utils/interpol_to_arbit_CRES.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/is_array.sh b/ush/bash_utils/is_array.sh index 234c3a13ac..69b43dd71d 100644 --- a/ush/bash_utils/is_array.sh +++ b/ush/bash_utils/is_array.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/is_element_of.sh b/ush/bash_utils/is_element_of.sh index 639c076d93..6002f752b0 100644 --- a/ush/bash_utils/is_element_of.sh +++ b/ush/bash_utils/is_element_of.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/print_input_args.sh b/ush/bash_utils/print_input_args.sh index ab097de4fd..63c698302e 100644 --- a/ush/bash_utils/print_input_args.sh +++ b/ush/bash_utils/print_input_args.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/print_msg.sh b/ush/bash_utils/print_msg.sh index 28a70d1431..381cece21c 100644 --- a/ush/bash_utils/print_msg.sh +++ b/ush/bash_utils/print_msg.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/process_args.sh b/ush/bash_utils/process_args.sh index b6c3536e65..de93ba3299 100644 --- a/ush/bash_utils/process_args.sh +++ b/ush/bash_utils/process_args.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/save_restore_shell_opts.sh b/ush/bash_utils/save_restore_shell_opts.sh index b561b6cea3..aa24eb4ac9 100644 --- a/ush/bash_utils/save_restore_shell_opts.sh +++ b/ush/bash_utils/save_restore_shell_opts.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/set_bash_param.sh b/ush/bash_utils/set_bash_param.sh index de4ebbf0ef..6fe304611e 100644 --- a/ush/bash_utils/set_bash_param.sh +++ b/ush/bash_utils/set_bash_param.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/set_file_param.sh b/ush/bash_utils/set_file_param.sh index a67b65dc70..369bdba97c 100644 --- a/ush/bash_utils/set_file_param.sh +++ b/ush/bash_utils/set_file_param.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/source_config.sh b/ush/bash_utils/source_config.sh index df5a79a0df..f47135ed3e 100644 --- a/ush/bash_utils/source_config.sh +++ b/ush/bash_utils/source_config.sh @@ -1,3 +1,5 @@ +#!/bin/bash + # #----------------------------------------------------------------------- # This file defines function that sources a config file (yaml/json etc) diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh deleted file mode 100755 index 4b098affb8..0000000000 --- a/ush/load_modules_run_task.sh +++ /dev/null @@ -1,231 +0,0 @@ -#!/bin/bash - -# -#----------------------------------------------------------------------- -# -# Source necessary files. -# -#----------------------------------------------------------------------- -# -if [ -z "${GLOBAL_VAR_DEFNS_FP}" ]; then - . ${HOMEaqm}/parm/config/var_defns.sh - . ${HOMEaqm}/ush/source_util_funcs.sh -else - . ${GLOBAL_VAR_DEFNS_FP} - . $USHdir/source_util_funcs.sh -fi -# -#----------------------------------------------------------------------- -# -# Save current shell options (in a global array). Then set new options -# for this script/function. -# -#----------------------------------------------------------------------- -# -{ save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1 -# -#----------------------------------------------------------------------- -# -# Get the full path to the file in which this script/function is located -# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in -# which the file is located (scrfunc_dir). -# -#----------------------------------------------------------------------- -# -scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) -scrfunc_fn=$( basename "${scrfunc_fp}" ) -scrfunc_dir=$( dirname "${scrfunc_fp}" ) -# -#----------------------------------------------------------------------- -# -# Check arguments. -# -#----------------------------------------------------------------------- -# -if [ "$#" -ne 2 ]; then - - print_err_msg_exit " -Incorrect number of arguments specified: - - Number of arguments specified: $# - -Usage: - - ${scrfunc_fn} task_name jjob_fp - -where the arguments are defined as follows: - - task_name: - The name of the rocoto task for which this script will load modules - and launch the J-job. - - jjob_fp - The full path to the J-job script corresponding to task_name. This - script will launch this J-job using the \"exec\" command (which will - first terminate this script and then launch the j-job; see man page of - the \"exec\" command). -" - -fi -# -#----------------------------------------------------------------------- -# -# Get the task name and the name of the J-job script. -# -#----------------------------------------------------------------------- -# -task_name="$1" -if [ "${WORKFLOW_MANAGER}" = "ecflow" ]; then - jjob_fp="${JOBSdir}/$2" -else - jjob_fp="$2" -fi -# -#----------------------------------------------------------------------- -# -# For NCO mode we need to define job and jobid -# -#----------------------------------------------------------------------- -# -set +u -if [ ! -z ${SLURM_JOB_ID} ]; then - export job=${SLURM_JOB_NAME} - export pid=${pid:-${SLURM_JOB_ID}} -elif [ ! -z ${PBS_JOBID} ]; then - export job=${PBS_JOBNAME} - export pid=${pid:-${PBS_JOBID}} -else - export job=${task_name} - export pid=${pid:-$$} -fi -export jobid=${job}.${pid} -set -u -# -#----------------------------------------------------------------------- -# -# Loading ufs-srweather-app build module files -# -#----------------------------------------------------------------------- -# -machine=$(echo_lowercase $MACHINE) -if [ "${WORKFLOW_MANAGER}" != "ecflow" ]; then - module reset -fi -if [ "${machine}" != "wcoss2" ]; then - module use "${HOMEaqm}/modulefiles" - module load "${BUILD_MOD_FN}" || print_err_msg_exit "\ - Loading of platform- and compiler-specific module file (BUILD_MOD_FN) -for the workflow task specified by task_name failed: - task_name = \"${task_name}\" - BUILD_MOD_FN = \"${BUILD_MOD_FN}\"" -fi -# -#----------------------------------------------------------------------- -# -# Set the directory (modules_dir) in which the module files for the va- -# rious workflow tasks are located. Also, set the name of the module -# file for the specified task. -# -# A module file is a file whose first line is the "magic cookie" string -# '#%Module'. It is interpreted by the "module load ..." command. It -# sets environment variables (including prepending/appending to paths) -# and loads modules. -# -# The UFS SRW App repository contains module files for the -# workflow tasks in the template rocoto XML file for the FV3-LAM work- -# flow that need modules not loaded in the BUILD_MOD_FN above. -# -# The full path to a module file for a given task is -# -# $HOMEaqm/modulefiles/$machine/${task_name}.local -# -# where HOMEaqm is the base directory of the workflow, machine is the -# name of the machine that we're running on (in lowercase), and task_- -# name is the name of the current task (an input to this script). -# -#----------------------------------------------------------------------- -# -modules_dir="$HOMEaqm/modulefiles/tasks/$machine" -modulefile_name="${task_name}" -default_modules_dir="$HOMEaqm/modulefiles" -# -#----------------------------------------------------------------------- -# -# Load the module file for the specified task on the current machine. -# -#----------------------------------------------------------------------- -# -print_info_msg "$VERBOSE" " - Loading modules for task \"${task_name}\" ..." - -module use "${modules_dir}" || print_err_msg_exit "\ - Call to \"module use\" command failed." - -# source version file (run) only if it is specified in versions directory -if [ "${WORKFLOW_MANAGER}" != "ecflow" ]; then - VERSION_FILE="${HOMEaqm}/versions/${RUN_VER_FN}" - if [ -f ${VERSION_FILE} ]; then - . ${VERSION_FILE} - fi -fi -# -# Load the .local module file if available for the given task -# -modulefile_local="${task_name}.local" -if [ -f ${modules_dir}/${modulefile_local}.lua ]; then - module load "${modulefile_local}" || print_err_msg_exit "\ -Loading .local module file (in directory specified by modules_dir) for the -specified task (task_name) failed: - task_name = \"${task_name}\" - modulefile_local = \"${modulefile_local}\" - modules_dir = \"${modules_dir}\"" -fi - -module list - -# Modules that use conda and need an environment activated will set the -# SRW_ENV variable to the name of the environment to be activated. That -# must be done within the script, and not inside the module. Do that -# now. - -if [ -n "${SRW_ENV:-}" ] ; then - set +u - conda activate ${SRW_ENV} - set -u -fi - -if [ -n "${AQM_ENV:-}" ] ; then - set +u - source "${AQM_ENV_FP}/${AQM_ENV}/bin/activate" - set -u -fi - -# -#----------------------------------------------------------------------- -# -# Use the exec command to terminate the current script and launch the -# J-job for the specified task. -# -#----------------------------------------------------------------------- -# -print_info_msg "$VERBOSE" " -Launching J-job (jjob_fp) for task \"${task_name}\" ... - jjob_fp = \"${jjob_fp}\" -" - -if [ "${WORKFLOW_MANAGER}" = "ecflow" ]; then - /bin/bash "${jjob_fp}" -else - exec "${jjob_fp}" -fi - -# -#----------------------------------------------------------------------- -# -# Restore the shell options saved at the beginning of this script/func- -# tion. -# -#----------------------------------------------------------------------- -# -{ restore_shell_opts; } > /dev/null 2>&1 - diff --git a/ush/source_util_funcs.sh b/ush/source_util_funcs.sh index 4b0369b27d..7b905b5f94 100755 --- a/ush/source_util_funcs.sh +++ b/ush/source_util_funcs.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -x + function source_util_funcs() { # #----------------------------------------------------------------------- diff --git a/versions/build.ver b/versions/build.ver index c2ce8dc81e..dacfc13217 100644 --- a/versions/build.ver +++ b/versions/build.ver @@ -3,10 +3,10 @@ export module_ver=8.5.2 export envvar_ver=1.0 -export PrgEnv_intel_ver=8.1.0 +export PrgEnv_intel_ver=8.3.3 export intel_ver=19.1.3.304 -export craype_ver=2.7.13 -export cray_mpich_ver=8.1.12 +export craype_ver=2.7.17 +export cray_mpich_ver=8.1.19 export cmake_ver=3.20.2 export jasper_ver=2.0.25 export zlib_ver=1.2.11 @@ -28,7 +28,7 @@ export libjpeg_ver=9c export cray_pals_ver=1.2.2 export udunits_ver=2.2.28 export gsl_ver=2.7 -export nco_ver=4.9.7 +export nco_ver=5.0.6 export nemsio_ver=2.5.2 export sigio_ver=2.3.2 export sfcio_ver=1.4.1 diff --git a/versions/run.ver b/versions/run.ver index 38cb4825d6..865253f7dd 100644 --- a/versions/run.ver +++ b/versions/run.ver @@ -1,8 +1,8 @@ #!/bin/bash export intel_ver=19.1.3.304 -export craype_ver=2.7.13 -export cray_mpich_ver=8.1.12 +export craype_ver=2.7.17 +export cray_mpich_ver=8.1.19 export jasper_ver=2.0.25 export hdf5_ver=1.10.6 export netcdf_ver=4.7.4 @@ -32,12 +32,10 @@ export aqm_ver=v7.0.1 export udunits_ver=2.2.28 export gsl_ver=2.7 -export nco_ver=4.9.7 +export nco_ver=5.0.6 export wgrib2_ver=2.0.8_wmo export grib_util_ver=1.2.4 -export maillist="nco.spa@noaa.gov,jianping.huang@noaa.gov" -export maillist_group1="nco.spa@noaa.gov,jianping.huang@noaa.gov,youhua.tang@noaa.gov" -export maillist_group2="nco.spa@noaa.gov,jianping.huang@noaa.gov,kai.wang@noaa.gov" +export maillist="nco.spa@noaa.gov,jianping.huang@noaa.gov,kai.wang@noaa.gov"