From 55b500b18782a6a64c6c37363506b8e8fbca2310 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 11 Apr 2024 21:56:41 +0000 Subject: [PATCH 01/34] WIP Use UW-compliant YAML for var_defns.sh file. Update loading tasks script for not having all required variables in environment. --- jobs/JREGIONAL_CHECK_POST_OUTPUT | 19 ++- jobs/JREGIONAL_GET_EXTRN_MDL_FILES | 67 ++++++--- jobs/JREGIONAL_GET_VERIF_OBS | 21 ++- jobs/JREGIONAL_INTEGRATION_TEST | 44 ++++++ jobs/JREGIONAL_MAKE_GRID | 24 +++- jobs/JREGIONAL_MAKE_ICS | 30 +++- jobs/JREGIONAL_MAKE_LBCS | 31 ++++- jobs/JREGIONAL_MAKE_OROG | 29 +++- jobs/JREGIONAL_MAKE_SFC_CLIMO | 32 ++++- jobs/JREGIONAL_PLOT_ALLVARS | 48 ++++++- jobs/JREGIONAL_RUN_FCST | 28 +++- ...EGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT | 18 ++- ...JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 14 +- ...L_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 12 ++ ...L_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB | 19 ++- jobs/JREGIONAL_RUN_MET_PB2NC_OBS | 19 ++- jobs/JREGIONAL_RUN_MET_PCPCOMBINE | 20 ++- jobs/JREGIONAL_RUN_POST | 40 +++++- jobs/JREGIONAL_RUN_PRDGEN | 34 ++++- ush/config_defaults.yaml | 16 +-- ush/load_modules_run_task.sh | 130 ++++++++++-------- ush/setup.py | 2 +- 22 files changed, 589 insertions(+), 108 deletions(-) diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index 2b1fe69bbb..b4053b0028 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -3,7 +3,19 @@ # #----------------------------------------------------------------------- # +# The J-Job script for checking the post output. # +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# ENSMEM_INDX +# CDATE +# +# Experiment variables +# +# user.SCRIPTSdir +# user.USHdir +# workflow.EXPTDIR # #----------------------------------------------------------------------- # @@ -16,7 +28,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index 8efd332dd9..9e36b1f4c5 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -3,20 +3,49 @@ # #----------------------------------------------------------------------- # -# This script gets either from the system directory or from mass store -# (HPSS) the files generated by the external model (specified by the -# variable EXTRN_MDL_NAME) for either the initial conditions (ICs) or the -# lateral boundary conditions (LBCs). Which of these we are considering -# depends on the value of the variable ICS_OR_LBCS, which should be defined -# in the environment (when calling this script from a rocoto workflow, -# the workflow should define this variable, e.g. using rocoto's -# tag). -# -# Note that when we refer to ICs, we are referring to not only the atmospheric -# fields at the initial time but also various surface fields (which are -# for now time-independent) as well as the 0-th forecast hour LBCs. Also, -# when we refer to LBCs, we are referring to the LBCs excluding the one -# at the 0-th hour. +# The J-Job script for getting the model files that will be used for +# either initial conditions or lateral boundary conditions for the +# experiment. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# ICS_OR_LBCS +# PDY +# cyc +# CDATE +# DATA +# COMIN +# EXTRN_MDL_STAGING_DIR (optional; default is DATA) +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# workflow: +# EXPTDIR +# +# Depending on ICS_or_LBCS: +# +# task_get_extrn_ics: +# EXTRN_MDL_NAME_ICS +# EXTRN_MDL_ICS_OFFSET_HRS +# FV3GFS_FILE_FMT_ICS +# EXTRN_MDL_SYSBASEDIR_ICS +# USE_USER_STAGED_EXTRN_FILES +# EXTRN_MDL_SOURCE_BASEDIR_ICS +# EXTRN_MDL_FILES_ICS +# +# task_get_extrn_lbcs: +# EXTRN_MDL_NAME_LBCS +# LBC_SPEC_INTVL_HRS +# EXTRN_MDL_LBCS_OFFSET_HRS +# FV3GFS_FILE_FMT_LBCS +# EXTRN_MDL_SYSBASEDIR_LBCS +# USE_USER_STAGED_EXTRN_FILES +# EXTRN_MDL_SOURCE_BASEDIR_LBCS +# EXTRN_MDL_FILES_LBCS # #----------------------------------------------------------------------- # @@ -29,8 +58,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_get_extrn_ics|task_get_extrn_lbcs" ${GLOBAL_VAR_DEFNS_FP} -. $USHdir/job_preamble.sh "TRUE" +for sect in (user workflow task_get_extrn_ics task_get_extrn_lbcs) ; do + --output-block ${sect}) ; do + export $var + done +done +. $USHdir/job_preamble.sh + + # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index 3820a739db..77cb1d66e9 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -3,7 +3,19 @@ # #----------------------------------------------------------------------- # -# This script checks, pulls, and stages observation data for model verification. +# The J-Job script that checks, pulls, and stages observation data for +# model verification. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# CDATE +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # @@ -16,7 +28,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task " " ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index cbb93e86cf..005617f496 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -1,5 +1,49 @@ #!/bin/bash + +# +#----------------------------------------------------------------------- +# +# This J-Job script runs a set of tests at the end of WE2E tests. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# CDATE +# FCST_DIR +# SLASH_ENSMEM_SUBDIR +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# RUN_ENV +# workflow: +# FCST_LEN_HRS +# +# +#----------------------------------------------------------------------- +# + +# +#----------------------------------------------------------------------- +# +# Source the variable definitions file and the bash utility functions. +# +#----------------------------------------------------------------------- +# +. $USHdir/source_util_funcs.sh +for sect in (user workflow) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done +. $USHdir/job_preamble.sh + + + # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index 844d782bc7..318239c47a 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -94,6 +94,23 @@ # orography file generated by orog_fltr_scr down to a width of 4 # cells and store the result in a new filtered orography file in # WORKDIR_SHVE. + +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# DATA +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# +# workflow: +# PREEXISTING_DIR_METHOD +# +# task_make_grid: +# GRID_DIR # #----------------------------------------------------------------------- # @@ -106,7 +123,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_grid" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow task_make_grid) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 70306c0a87..252bdc2552 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -1,5 +1,28 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The J-job to run chgres_cube for preparing initial conditions for the +# FV3 forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# COMIN +# SLASH_ENSMEM_SUBDIR +# DATA +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# RUN_ENVIR +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +31,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_ics" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index 16ac382fee..f49a78b490 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -1,5 +1,29 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The J-job to run chgres_cube for preparing lateral boundary conditions +# for the FV3 forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# CDATE +# COMIN +# SLASH_ENSMEM_SUBDIR +# DATA +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# RUN_ENVIR +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +32,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_lbcs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index b6f674e5ee..04665ce4d9 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -1,5 +1,27 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The J-job to run chgres_cube for preparing lateral boundary conditions +# for the FV3 forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# +# task_make_orog: +# OROG_DIR +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +30,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_orog" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user task_make_orog) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_MAKE_SFC_CLIMO b/jobs/JREGIONAL_MAKE_SFC_CLIMO index eee25b193a..e0596d3300 100755 --- a/jobs/JREGIONAL_MAKE_SFC_CLIMO +++ b/jobs/JREGIONAL_MAKE_SFC_CLIMO @@ -1,5 +1,30 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The J-job to run chgres_cube for preparing lateral boundary conditions +# for the FV3 forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# +# workflow: +# PREEXISTING_DIR_METHOD +# +# task_make_sfc_climo: +# SFC_CLIMO_DIR +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +33,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_sfc_climo" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow task_make_sfc_climo) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index 5e59abd93d..782c796b4f 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -1,5 +1,46 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The J-job to plot the forecast output +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# COMOUT +# SLASH_ENSMEM_SUBDIR +# PDY +# CDATE +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# RUN_ENVIR +# +# workflow: +# PREEXISTING_DIR_METHOD +# PREDEF_GRID_NAME +# EXPT_SUBDIR +# +# platform: +# FIXshp +# +# task_plot_allvars: +# COMOUT_REF +# PLOT_FCST_START +# PLOT_FCST_END +# PLOT_FCST_INC +# PLOT_DOMAINS +# +# task_run_fcst: +# FCST_LEN_HRS +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +49,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_plot_allvars|task_run_fcst" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow platform task_plot_allvars task_run_fcst) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_FCST b/jobs/JREGIONAL_RUN_FCST index a7f7c96031..65dd5bac2d 100755 --- a/jobs/JREGIONAL_RUN_FCST +++ b/jobs/JREGIONAL_RUN_FCST @@ -3,9 +3,24 @@ # #----------------------------------------------------------------------- # -# This script copies files from various directories into the experiment -# directory, creates links to some of them, and modifies others (e.g. -# templates) to customize them for the current experiment setup. +# The J-Job that runs the forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# CDATE +# DATA +# COMIN +# SLASH_ENSMEM_SUBDIR +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# +# workflow: +# RUN_ENVIR # #----------------------------------------------------------------------- # @@ -18,7 +33,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_fcst" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh "TRUE" # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT index 707697b5ab..0df81d72f3 100755 --- a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT +++ b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT @@ -3,7 +3,18 @@ # #----------------------------------------------------------------------- # +# The J-Job that runs that runs either METplus's gen_ens_prod tool or its +# ensemble_stat tool for ensemble verification. # +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # @@ -16,7 +27,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_ensgrid|task_run_vx_enspoint" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index 0301e9946a..164ae88c23 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -3,8 +3,18 @@ # #----------------------------------------------------------------------- # -# This script runs the METplus GridStat or PointStat tool for deterministic -# verification. +# This script runs the METplus GridStat or PointStat tool for +# deterministic verification. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index ab08320f33..b3e949ff84 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -3,7 +3,19 @@ # #----------------------------------------------------------------------- # +# The J-Job that runs MET/METplus's GridStat or PointStat tool to +# perform verification on the ensemble mean of a specified field (or +# group of fields). # +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB index 7da98212ac..5d1e360545 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB @@ -3,7 +3,19 @@ # #----------------------------------------------------------------------- # +# The J-Job that runs METplus's GridStat or PointStat tool to perform +# verification on the ensemble frequencies/ probabilities of a specified +# field (or group of fields). # +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # @@ -16,7 +28,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_ensgrid_prob" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS index e36e72418f..362b36cc03 100755 --- a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS +++ b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS @@ -4,6 +4,18 @@ #----------------------------------------------------------------------- # # +# The J-Job that runs METplus for point-stat by initialization time for +# all forecast hours. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # @@ -16,7 +28,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_met_pb2nc_obs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE index 7364ed96c9..4dd1ec9cc1 100755 --- a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE +++ b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE @@ -3,7 +3,20 @@ # #----------------------------------------------------------------------- # +# The J-job that runs the MET/METplus PcpCombine tool on hourly +# accumulated precipitation (APCP) data to obtain APCP for multi-hour +# accumulation periods. The data can be from CCPA observations or a +# focrecast. # +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir # #----------------------------------------------------------------------- # @@ -16,7 +29,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_met_pcpcombine" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index 97b100967c..e13e2e0f89 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -3,8 +3,37 @@ # #----------------------------------------------------------------------- # -# This script runs the post-processor (UPP) on the NetCDF output files -# of the write component of the FV3-LAM model. +# The J-Job that runs the Unified Post-processor (UPP) on the NetCDF +# output from FV3. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# DATA +# COMIN +# SLASH_ENSMEM_SUBDIR +# COMOUT +# DATAROOT +# PDY +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# +# workflow: +# RUN_ENVIR +# DATE_FIRST_CYCL +# INCR_CYCL_FREQ +# FCST_LEN_CYCL +# FCST_LEN_HRS +# +# platform: +# WORKFLOW_MANAGER +# +# task_run_post: +# SUB_HOURLY_POST # #----------------------------------------------------------------------- # @@ -17,7 +46,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_post|task_run_fcst" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow platform task_run_post task_run_fcst) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 2d30ced9db..2e47901e97 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -3,10 +3,33 @@ # #----------------------------------------------------------------------- # -# This script runs wgrib2 to create various subdomain GRIB2 files from -# the raw UPP-generated GRIB2 output from the run_post task of the +# The J-Job that runs wgrib2 to create various subdomain GRIB2 files +# from the raw UPP-generated GRIB2 output from the run_post task of the # FV3-LAM model. # +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# DATA +# COMIN +# SLASH_ENSMEM_SUBDIR +# COMOUT +# +# Experiment variables +# +# user: +# SCRIPTSdir +# USHdir +# +# workflow: +# RUN_ENVIR +# +# platform: +# WORKFLOW_MANAGER +# +# task_run_post: +# SUB_HOURLY_POST +# #----------------------------------------------------------------------- # @@ -18,7 +41,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_prdgen|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow platform task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/ush/config_defaults.yaml b/ush/config_defaults.yaml index 6a403754cb..43a39d9651 100644 --- a/ush/config_defaults.yaml +++ b/ush/config_defaults.yaml @@ -461,7 +461,7 @@ workflow: # #----------------------------------------------------------------------- # - WORKFLOW_ID: !nowtimestamp '' + WORKFLOW_ID: "" # #----------------------------------------------------------------------- # @@ -711,13 +711,11 @@ workflow: # script creates and that defines the workflow for the experiment. # # GLOBAL_VAR_DEFNS_FN: - # Name of file (a shell script) containing the definitions of the primary - # experiment variables (parameters) defined in this default configuration - # script and in the user-specified configuration as well as secondary - # experiment variables generated by the experiment generation script. - # This file is sourced by many scripts (e.g. the J-job scripts corresponding - # to each workflow task) in order to make all the experiment variables - # available in those scripts. + # Name of the experiment configuration file. It contains the primary + # experiment variables defined in this default configuration script and in the + # user-specified configuration as well as secondary experiment variables + # generated by the experiment generation script. This file is the primary + # source of information used in the scripts at run time. # # ROCOTO_YAML_FN: # Name of the YAML file containing the YAML workflow definition from @@ -765,7 +763,7 @@ workflow: FCST_MODEL: "ufs-weather-model" WFLOW_XML_FN: "FV3LAM_wflow.xml" - GLOBAL_VAR_DEFNS_FN: "var_defns.sh" + GLOBAL_VAR_DEFNS_FN: "var_defns.yaml" ROCOTO_YAML_FN: "rocoto_defns.yaml" EXTRN_MDL_VAR_DEFNS_FN: "extrn_mdl_var_defns" WFLOW_LAUNCH_SCRIPT_FN: "launch_FV3LAM_wflow.sh" diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 89f3addf41..64ede6393e 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -3,33 +3,40 @@ # #----------------------------------------------------------------------- # -# Source necessary files. +# This script loads the appropriate modules for a given task in an +# experiment. # -#----------------------------------------------------------------------- +# It requires the following global environment variables: # -. ${GLOBAL_VAR_DEFNS_FP} -. $USHdir/source_util_funcs.sh +# GLOBAL_VAR_DEFNS_FP # -#----------------------------------------------------------------------- +# And uses these variables from the GLOBAL_VAR_DEFNS_FP file # -# Save current shell options (in a global array). Then set new options -# for this script/function. +# platform.BUILD_MOD_FN +# platform.RUN_VER_FN +# workflow.VERBOSE # #----------------------------------------------------------------------- # -{ save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1 + +# Get the location of this file -- it's the USHdir +scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" ) +scrfunc_fn=$( basename "${scrfunc_fp}" ) +USHdir=$( dirname "${scrfunc_fp}" ) +HOMEdir=$( dirname $USHdir ) + +source $USHdir/source_util_funcs.sh + # #----------------------------------------------------------------------- # -# 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). +# Save current shell options (in a global array). Then set new options +# for this script/function. # #----------------------------------------------------------------------- # -scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) -scrfunc_fn=$( basename "${scrfunc_fp}" ) -scrfunc_dir=$( dirname "${scrfunc_fp}" ) +{ save_shell_opts; . $USHdir/preamble.sh; } > /dev/null 2>&1 + # #----------------------------------------------------------------------- # @@ -37,7 +44,7 @@ scrfunc_dir=$( dirname "${scrfunc_fp}" ) # #----------------------------------------------------------------------- # -if [ "$#" -ne 2 ]; then +if [ "$#" -ne 3 ]; then print_err_msg_exit " Incorrect number of arguments specified: @@ -46,15 +53,17 @@ Incorrect number of arguments specified: Usage: - ${scrfunc_fn} task_name jjob_fp + ${scrfunc_fn} machine task_name jjob_fp where the arguments are defined as follows: + machine: The name of the supported platform + task_name: The name of the rocoto task for which this script will load modules and launch the J-job. - jjob_fp + 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 @@ -65,12 +74,13 @@ fi # #----------------------------------------------------------------------- # -# Get the task name and the name of the J-job script. +# Save arguments # #----------------------------------------------------------------------- # -task_name="$1" -jjob_fp="$2" +machine=$(echo_lowercase $1) +task_name="$2" +jjob_fp="$3" # #----------------------------------------------------------------------- # @@ -99,12 +109,42 @@ set -u #----------------------------------------------------------------------- # default_modules_dir="$HOMEdir/modulefiles" -machine=$(echo_lowercase $MACHINE) -if [ "${WORKFLOW_MANAGER}" != "ecflow" ]; then +test ! $(module is-loaded ecflow > /dev/null 2>&1) && ecflow_loaded=false + +if [ "$ecflow_loaded" = "false" ] ; then source "${HOMEdir}/etc/lmod-setup.sh" ${machine} fi module use "${default_modules_dir}" +# Load workflow environment + +if [ -f ${default_modules_dir}/python_srw.lua ] ; then + module load python_srw || print_err_msg_exit "\ + Loading SRW common python module failed. Expected python_srw.lua + in the modules directory here: + modules_dir = \"${default_modules_dir}\"" +fi + +# 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. +SRW_ENV="DEV-uwtools" +if [ -n "${SRW_ENV:-}" ] ; then + set +u + conda deactivate + conda activate ${SRW_ENV} + set -u +fi + +# Source the necessary blocks of the experiment config YAML +for sect in (platform workflow) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect} ) ; do + export $var + done +done + if [ "${machine}" != "wcoss2" ]; then module load "${BUILD_MOD_FN}" || print_err_msg_exit "\ Loading of platform- and compiler-specific module file (BUILD_MOD_FN) @@ -116,26 +156,15 @@ 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. +# Set the directory for the modulefiles included with SRW and the +# specific module for the requested task. # # The full path to a module file for a given task is # # $HOMEdir/modulefiles/$machine/${task_name}.local # -# where HOMEdir 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). +# where HOMEdir is the SRW clone, machine is the name of the platform +# being used, and task_name is the current task to run. # #----------------------------------------------------------------------- # @@ -154,10 +183,10 @@ 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 -VERSION_FILE="${HOMEdir}/versions/${RUN_VER_FN}" -if [ -f ${VERSION_FILE} ]; then - . ${VERSION_FILE} +# source version file only if it exists in the versions directory +version_file="${HOMEdir}/versions/${RUN_VER_FN}" +if [ -f ${version_file} ]; then + source ${version_file} fi # # Load the .local module file if available for the given task @@ -170,20 +199,11 @@ specified task (task_name) failed: task_name = \"${task_name}\" modulefile_local = \"${modulefile_local}\" modules_dir = \"${modules_dir}\"" -elif [ -f ${default_modules_dir}/python_srw.lua ] ; then - module load python_srw || print_err_msg_exit "\ - Loading SRW common python module failed. Expected python_srw.lua - in the modules directory here: - modules_dir = \"${default_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. - +# Reactivate the workflow environment to ensure the correct Python +# environment is available first in the environment. if [ -n "${SRW_ENV:-}" ] ; then set +u conda deactivate @@ -204,11 +224,7 @@ 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 +/bin/bash "${jjob_fp}" # #----------------------------------------------------------------------- diff --git a/ush/setup.py b/ush/setup.py index 0511653fa2..2b297b647f 100644 --- a/ush/setup.py +++ b/ush/setup.py @@ -1502,7 +1502,7 @@ def dict_find(user_dict, substring): var_defns_cfg = copy.deepcopy(expt_config) del var_defns_cfg["rocoto"] with open(global_var_defns_fp, "a") as f: - f.write(cfg_to_shell_str(var_defns_cfg)) + f.write(cfg_to_yaml_str(var_defns_cfg)) # From 46c4805f0c990cdf1e0efed2acaa702efd6ce441 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 11 Apr 2024 22:01:26 +0000 Subject: [PATCH 02/34] Add machine to command --- parm/wflow/aqm_post.yaml | 10 +++++----- parm/wflow/aqm_prep.yaml | 16 ++++++++-------- parm/wflow/coldstart.yaml | 10 +++++----- parm/wflow/default_workflow.yaml | 2 +- parm/wflow/plot.yaml | 2 +- parm/wflow/post.yaml | 2 +- parm/wflow/prdgen.yaml | 2 +- parm/wflow/prep.yaml | 6 +++--- parm/wflow/test.yaml | 2 +- parm/wflow/verify_det.yaml | 8 ++++---- parm/wflow/verify_ens.yaml | 16 ++++++++-------- parm/wflow/verify_pre.yaml | 18 +++++++++--------- 12 files changed, 47 insertions(+), 47 deletions(-) diff --git a/parm/wflow/aqm_post.yaml b/parm/wflow/aqm_post.yaml index 5f307184d3..48a0761fef 100644 --- a/parm/wflow/aqm_post.yaml +++ b/parm/wflow/aqm_post.yaml @@ -22,7 +22,7 @@ default_aqm_task: &default_aqm task_pre_post_stat: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "pre_post_stat" "&HOMEdir;/jobs/JSRW_PRE_POST_STAT"' + command: '&LOAD_MODULES_RUN_TASK; "pre_post_stat" "&HOMEdir;/jobs/JSRW_PRE_POST_STAT"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' dependency: or: @@ -36,7 +36,7 @@ task_pre_post_stat: task_post_stat_o3: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "post_stat_o3" "&HOMEdir;/jobs/JSRW_POST_STAT_O3"' + command: '&LOAD_MODULES_RUN_TASK; "post_stat_o3" "&HOMEdir;/jobs/JSRW_POST_STAT_O3"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' memory: 120G dependency: @@ -46,7 +46,7 @@ task_post_stat_o3: task_post_stat_pm25: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "post_stat_pm25" "&HOMEdir;/jobs/JSRW_POST_STAT_PM25"' + command: '&LOAD_MODULES_RUN_TASK; "post_stat_pm25" "&HOMEdir;/jobs/JSRW_POST_STAT_PM25"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' memory: 120G dependency: @@ -56,7 +56,7 @@ task_post_stat_pm25: task_bias_correction_o3: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "bias_correction_o3" "&HOMEdir;/jobs/JSRW_BIAS_CORRECTION_O3"' + command: '&LOAD_MODULES_RUN_TASK; "bias_correction_o3" "&HOMEdir;/jobs/JSRW_BIAS_CORRECTION_O3"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' memory: 120G dependency: @@ -66,7 +66,7 @@ task_bias_correction_o3: task_bias_correction_pm25: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "bias_correction_pm25" "&HOMEdir;/jobs/JSRW_BIAS_CORRECTION_PM25"' + command: '&LOAD_MODULES_RUN_TASK; "bias_correction_pm25" "&HOMEdir;/jobs/JSRW_BIAS_CORRECTION_PM25"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' memory: 120G dependency: diff --git a/parm/wflow/aqm_prep.yaml b/parm/wflow/aqm_prep.yaml index d8f01d2c82..50e73d0ebd 100644 --- a/parm/wflow/aqm_prep.yaml +++ b/parm/wflow/aqm_prep.yaml @@ -29,7 +29,7 @@ default_aqm_task: &default_aqm task_nexus_gfs_sfc: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "nexus_gfs_sfc" "&HOMEdir;/jobs/JSRW_NEXUS_GFS_SFC"' + command: '&LOAD_MODULES_RUN_TASK; "nexus_gfs_sfc" "&HOMEdir;/jobs/JSRW_NEXUS_GFS_SFC"' native: '{% if platform.get("SCHED_NATIVE_CMD_HPSS") %}{{ platform.SCHED_NATIVE_CMD_HPSS }}{% else %}{{ platform.SCHED_NATIVE_CMD}}{% endif %}' partition: '{% if platform.get("PARTITION_HPSS") %}&PARTITION_HPSS;{% else %}None{% endif %}' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' @@ -53,7 +53,7 @@ metatask_nexus_emission: nspt: '{% for h in range(0, cpl_aqm_parm.NUM_SPLIT_NEXUS) %}{{ " %02d" % h }}{% endfor %}' task_nexus_emission_#nspt#: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "nexus_emission" "&HOMEdir;/jobs/JSRW_NEXUS_EMISSION"' + command: '&LOAD_MODULES_RUN_TASK; "nexus_emission" "&HOMEdir;/jobs/JSRW_NEXUS_EMISSION"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' nnodes: '{{ task_nexus_emission.NNODES_NEXUS_EMISSION }}' ppn: '{{ task_nexus_emission.PPN_NEXUS_EMISSION // 1 }}' @@ -68,7 +68,7 @@ metatask_nexus_emission: task_nexus_post_split: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "nexus_post_split" "&HOMEdir;/jobs/JSRW_NEXUS_POST_SPLIT"' + command: '&LOAD_MODULES_RUN_TASK; "nexus_post_split" "&HOMEdir;/jobs/JSRW_NEXUS_POST_SPLIT"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' dependency: metataskdep: @@ -77,13 +77,13 @@ task_nexus_post_split: task_fire_emission: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "fire_emission" "&HOMEdir;/jobs/JSRW_FIRE_EMISSION"' + command: '&LOAD_MODULES_RUN_TASK; "fire_emission" "&HOMEdir;/jobs/JSRW_FIRE_EMISSION"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' memory: 2G task_point_source: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "point_source" "&HOMEdir;/jobs/JSRW_POINT_SOURCE"' + command: '&LOAD_MODULES_RUN_TASK; "point_source" "&HOMEdir;/jobs/JSRW_POINT_SOURCE"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' walltime: 01:00:00 dependency: @@ -101,7 +101,7 @@ task_aqm_ics_ext: attrs: cycledefs: at_start maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "aqm_ics" "&HOMEdir;/jobs/JSRW_AQM_ICS"' + command: '&LOAD_MODULES_RUN_TASK; "aqm_ics" "&HOMEdir;/jobs/JSRW_AQM_ICS"' envars: <<: *default_vars PREV_CYCLE_DIR: '&WARMSTART_CYCLE_DIR;' @@ -126,7 +126,7 @@ task_aqm_ics: attrs: cycledefs: cycled_from_second maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "aqm_ics" "&HOMEdir;/jobs/JSRW_AQM_ICS"' + command: '&LOAD_MODULES_RUN_TASK; "aqm_ics" "&HOMEdir;/jobs/JSRW_AQM_ICS"' envars: <<: *default_vars PREV_CYCLE_DIR: '&COMIN_DIR;' @@ -148,7 +148,7 @@ task_aqm_ics: task_aqm_lbcs: <<: *default_aqm - command: '&LOAD_MODULES_RUN_TASK_FP; "aqm_lbcs" "&HOMEdir;/jobs/JSRW_AQM_LBCS"' + command: '&LOAD_MODULES_RUN_TASK; "aqm_lbcs" "&HOMEdir;/jobs/JSRW_AQM_LBCS"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' ppn: 24 dependency: diff --git a/parm/wflow/coldstart.yaml b/parm/wflow/coldstart.yaml index ceefe865e6..6fad0b8d83 100644 --- a/parm/wflow/coldstart.yaml +++ b/parm/wflow/coldstart.yaml @@ -20,7 +20,7 @@ default_task: &default_task task_get_extrn_ics: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "get_extrn_ics" "&JOBSdir;/JREGIONAL_GET_EXTRN_MDL_FILES"' + command: '&LOAD_MODULES_RUN_TASK; "get_extrn_ics" "&JOBSdir;/JREGIONAL_GET_EXTRN_MDL_FILES"' attrs: cycledefs: forecast maxtries: '2' @@ -51,7 +51,7 @@ task_get_extrn_ics: task_get_extrn_lbcs: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "get_extrn_lbcs" "&JOBSdir;/JREGIONAL_GET_EXTRN_MDL_FILES"' + command: '&LOAD_MODULES_RUN_TASK; "get_extrn_lbcs" "&JOBSdir;/JREGIONAL_GET_EXTRN_MDL_FILES"' attrs: cycledefs: forecast maxtries: '2' @@ -85,7 +85,7 @@ metatask_run_ensemble: mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' task_make_ics_mem#mem#: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "make_ics" "&JOBSdir;/JREGIONAL_MAKE_ICS"' + command: '&LOAD_MODULES_RUN_TASK; "make_ics" "&JOBSdir;/JREGIONAL_MAKE_ICS"' envars: <<: *default_vars SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' @@ -124,7 +124,7 @@ metatask_run_ensemble: task_make_lbcs_mem#mem#: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "make_lbcs" "&JOBSdir;/JREGIONAL_MAKE_LBCS"' + command: '&LOAD_MODULES_RUN_TASK; "make_lbcs" "&JOBSdir;/JREGIONAL_MAKE_LBCS"' envars: <<: *default_vars SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' @@ -142,7 +142,7 @@ metatask_run_ensemble: task_run_fcst_mem#mem#: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "run_fcst" "&JOBSdir;/JREGIONAL_RUN_FCST"' + command: '&LOAD_MODULES_RUN_TASK; "run_fcst" "&JOBSdir;/JREGIONAL_RUN_FCST"' envars: <<: *default_vars SLASH_ENSMEM_SUBDIR: '&SLASH_ENSMEM_SUBDIR;' diff --git a/parm/wflow/default_workflow.yaml b/parm/wflow/default_workflow.yaml index c79415b3be..e37fdae1ea 100644 --- a/parm/wflow/default_workflow.yaml +++ b/parm/wflow/default_workflow.yaml @@ -11,7 +11,7 @@ rocoto: HOMEdir: '{{ user.HOMEdir }}' JOBSdir: '{{ user.JOBSdir }}' KEEPDATA: '{{ nco.KEEPDATA_default }}' - LOAD_MODULES_RUN_TASK_FP: '{{ workflow.LOAD_MODULES_RUN_TASK_FP }}' + LOAD_MODULES_RUN_TASK: '{{ workflow.LOAD_MODULES_RUN_TASK_FP }} {{ user.MACHINE }}' LOGEXT: ".log" NET: '{{ nco.NET_default }}' MRMS_OBS_DIR: '{{ platform.MRMS_OBS_DIR }}' diff --git a/parm/wflow/plot.yaml b/parm/wflow/plot.yaml index 6dad3e0dfa..445d238c15 100644 --- a/parm/wflow/plot.yaml +++ b/parm/wflow/plot.yaml @@ -26,7 +26,7 @@ default_task_plot: &default_task task_plot_allvars: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "plot_allvars" "&JOBSdir;/JREGIONAL_PLOT_ALLVARS"' + command: '&LOAD_MODULES_RUN_TASK; "plot_allvars" "&JOBSdir;/JREGIONAL_PLOT_ALLVARS"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' dependency: or_do_post: &post_files_exist diff --git a/parm/wflow/post.yaml b/parm/wflow/post.yaml index 5672e7343f..114e5de377 100644 --- a/parm/wflow/post.yaml +++ b/parm/wflow/post.yaml @@ -3,7 +3,7 @@ default_task_post: &default_task attrs: cycledefs: '#cycledef#' maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_post" "&JOBSdir;/JREGIONAL_RUN_POST"' + command: '&LOAD_MODULES_RUN_TASK; "run_post" "&JOBSdir;/JREGIONAL_RUN_POST"' envars: &default_vars GLOBAL_VAR_DEFNS_FP: '&GLOBAL_VAR_DEFNS_FP;' USHdir: '&USHdir;' diff --git a/parm/wflow/prdgen.yaml b/parm/wflow/prdgen.yaml index 6b9f7cd4f6..3f2026a45f 100644 --- a/parm/wflow/prdgen.yaml +++ b/parm/wflow/prdgen.yaml @@ -10,7 +10,7 @@ metatask_run_prdgen: attrs: cycledefs: '#cycledef#' maxtries: 1 - command: '&LOAD_MODULES_RUN_TASK_FP; "run_prdgen" "&JOBSdir;/JREGIONAL_RUN_PRDGEN"' + command: '&LOAD_MODULES_RUN_TASK; "run_prdgen" "&JOBSdir;/JREGIONAL_RUN_PRDGEN"' envars: GLOBAL_VAR_DEFNS_FP: '&GLOBAL_VAR_DEFNS_FP;' USHdir: '&USHdir;' diff --git a/parm/wflow/prep.yaml b/parm/wflow/prep.yaml index c9d5549909..a0c6e3119a 100644 --- a/parm/wflow/prep.yaml +++ b/parm/wflow/prep.yaml @@ -24,12 +24,12 @@ default_task_prep: &default_task task_make_grid: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "make_grid" "&JOBSdir;/JREGIONAL_MAKE_GRID"' + command: '&LOAD_MODULES_RUN_TASK; "make_grid" "&JOBSdir;/JREGIONAL_MAKE_GRID"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' task_make_orog: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "make_orog" "&JOBSdir;/JREGIONAL_MAKE_OROG"' + command: '&LOAD_MODULES_RUN_TASK; "make_orog" "&JOBSdir;/JREGIONAL_MAKE_OROG"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' dependency: or: &make_grid_satisfied @@ -47,7 +47,7 @@ task_make_orog: task_make_sfc_climo: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "make_sfc_climo" "&JOBSdir;/JREGIONAL_MAKE_SFC_CLIMO"' + command: '&LOAD_MODULES_RUN_TASK; "make_sfc_climo" "&JOBSdir;/JREGIONAL_MAKE_SFC_CLIMO"' envars: <<: *default_envars join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' diff --git a/parm/wflow/test.yaml b/parm/wflow/test.yaml index 716665b228..9c084d6875 100644 --- a/parm/wflow/test.yaml +++ b/parm/wflow/test.yaml @@ -29,7 +29,7 @@ metatask_integration_test: mem: '{% if global.DO_ENSEMBLE %}{%- for m in range(1, global.NUM_ENS_MEMBERS+1) -%}{{ "%03d "%m }}{%- endfor -%} {% else %}{{ "000"|string }}{% endif %}' task_integration_test_mem#mem#: <<: *default_task - command: '&LOAD_MODULES_RUN_TASK_FP; "integration_test" "&JOBSdir;/JREGIONAL_INTEGRATION_TEST"' + command: '&LOAD_MODULES_RUN_TASK; "integration_test" "&JOBSdir;/JREGIONAL_INTEGRATION_TEST"' join: !cycstr '&LOGDIR;/{{ jobname }}_@Y@m@d@H&LOGEXT;' dependency: and_run_fcst: diff --git a/parm/wflow/verify_det.yaml b/parm/wflow/verify_det.yaml index 4c6b43ca25..548ccd5963 100644 --- a/parm/wflow/verify_det.yaml +++ b/parm/wflow/verify_det.yaml @@ -31,7 +31,7 @@ metatask_GridStat_CCPA_all_accums_all_mems: <<: *default_task_verify_det attrs: maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' envars: <<: *default_vars OBS_DIR: '&CCPA_OBS_DIR;' @@ -61,7 +61,7 @@ metatask_GridStat_NOHRSC_all_accums_all_mems: <<: *default_task_verify_det attrs: maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' envars: <<: *default_vars OBS_DIR: '&NOHRSC_OBS_DIR;' @@ -89,7 +89,7 @@ metatask_GridStat_MRMS_all_mems: VAR: '{% for var in verification.VX_FIELDS %}{% if var in ["REFC", "RETOP"] %}{{ "%s " % var }}{% endif %}{% endfor %}' task_run_MET_GridStat_vx_#VAR#_mem#mem#: <<: *default_task_verify_det - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' envars: <<: *default_vars OBS_DIR: '&MRMS_OBS_DIR;' @@ -118,7 +118,7 @@ metatask_PointStat_NDAS_all_mems: VAR: '{% for var in verification.VX_FIELDS %}{% if var in ["ADPSFC", "ADPUPA"] %}{{ "%s " % var }}{% endif %}{% endfor %}' task_run_MET_PointStat_vx_#VAR#_mem#mem#: <<: *default_task_verify_det - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX"' envars: <<: *default_vars OBS_DIR: '&NDAS_OBS_DIR;' diff --git a/parm/wflow/verify_ens.yaml b/parm/wflow/verify_ens.yaml index cf0a8d1dac..4b93a0d39d 100644 --- a/parm/wflow/verify_ens.yaml +++ b/parm/wflow/verify_ens.yaml @@ -26,7 +26,7 @@ metatask_GenEnsProd_EnsembleStat_CCPA: ACCUM_HH: '{% for ah in verification.VX_APCP_ACCUMS_HRS %}{% if workflow.FCST_LEN_HRS >= ah %}{{ "%02d " % ah }}{% endif %}{% endfor %}' task_run_MET_GenEnsProd_vx_APCP#ACCUM_HH#h: &task_GenEnsProd_CCPA <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' envars: &envars_GenEnsProd_CCPA <<: *default_vars ACCUM_HH: '#ACCUM_HH#' @@ -60,7 +60,7 @@ metatask_GenEnsProd_EnsembleStat_NOHRSC: ACCUM_HH: '{% for ah in verification.VX_ASNOW_ACCUMS_HRS %}{% if workflow.FCST_LEN_HRS >= ah %}{{ "%02d " % ah }}{% endif %}{% endfor %}' task_run_MET_GenEnsProd_vx_ASNOW#ACCUM_HH#h: &task_GenEnsProd_NOHRSC <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' envars: &envars_GenEnsProd_NOHRSC <<: *default_vars ACCUM_HH: '#ACCUM_HH#' @@ -95,7 +95,7 @@ metatask_GenEnsProd_EnsembleStat_MRMS: VAR: '{% for var in verification.VX_FIELDS %}{% if var in ["REFC", "RETOP"] %}{{ "%s " % var }}{% endif %}{% endfor %}' task_run_MET_GenEnsProd_vx_#VAR#: &task_GenEnsProd_MRMS <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' envars: &envars_GenEnsProd_MRMS <<: *default_vars ACCUM_HH: '01' @@ -127,7 +127,7 @@ metatask_GenEnsProd_EnsembleStat_NDAS: VAR: '{% for var in verification.VX_FIELDS %}{% if var in ["ADPSFC", "ADPUPA"] %}{{ "%s " % var }}{% endif %}{% endfor %}' task_run_MET_GenEnsProd_vx_#VAR#: &task_GenEnsProd_NDAS <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT"' envars: &envars_GenEnsProd_NDAS <<: *default_vars OBS_DIR: '&NDAS_OBS_DIR;' @@ -166,7 +166,7 @@ metatask_GridStat_CCPA_ensmeanprob_all_accums: ACCUM_HH: '{% for ah in verification.VX_APCP_ACCUMS_HRS %}{% if workflow.FCST_LEN_HRS >= ah %}{{ "%02d " % ah }}{% endif %}{% endfor %}' task_run_MET_GridStat_vx_ens#statlc#_APCP#ACCUM_HH#h: <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENS#stat#"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENS#stat#"' envars: <<: *default_vars OBS_DIR: '&CCPA_OBS_DIR;' @@ -188,7 +188,7 @@ metatask_GridStat_NOHRSC_ensmeanprob_all_accums: ACCUM_HH: '{% for ah in verification.VX_ASNOW_ACCUMS_HRS %}{% if workflow.FCST_LEN_HRS >= ah %}{{ "%02d " % ah }}{% endif %}{% endfor %}' task_run_MET_GridStat_vx_ens#statlc#_ASNOW#ACCUM_HH#h: <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENS#stat#"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENS#stat#"' envars: <<: *default_vars OBS_DIR: '&NOHRSC_OBS_DIR;' @@ -206,7 +206,7 @@ metatask_GridStat_MRMS_ensprob: VAR: '{% for var in verification.VX_FIELDS %}{% if var in ["REFC", "RETOP"] %}{{ "%s " % var }}{% endif %}{% endfor %}' task_run_MET_GridStat_vx_ensprob_#VAR#: <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB"' envars: <<: *default_vars ACCUM_HH: '01' @@ -228,7 +228,7 @@ metatask_PointStat_NDAS_ensmeanprob: VAR: '{% for var in verification.VX_FIELDS %}{% if var in ["ADPSFC", "ADPUPA"] %}{{ "%s " % var }}{% endif %}{% endfor %}' task_run_MET_PointStat_vx_ens#statlc#_#VAR#: <<: *default_task_verify_ens - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENS#stat#"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENS#stat#"' envars: <<: *default_vars OBS_DIR: '&NDAS_OBS_DIR;' diff --git a/parm/wflow/verify_pre.yaml b/parm/wflow/verify_pre.yaml index eb1a7eb796..8bd6c6c336 100644 --- a/parm/wflow/verify_pre.yaml +++ b/parm/wflow/verify_pre.yaml @@ -23,7 +23,7 @@ default_task_verify_pre: &default_task_verify_pre task_get_obs_ccpa: <<: *default_task_verify_pre - command: '&LOAD_MODULES_RUN_TASK_FP; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' + command: '&LOAD_MODULES_RUN_TASK; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' envars: <<: *default_vars ACCUM_HH: '01' @@ -37,7 +37,7 @@ task_get_obs_ccpa: task_get_obs_nohrsc: <<: *default_task_verify_pre - command: '&LOAD_MODULES_RUN_TASK_FP; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' + command: '&LOAD_MODULES_RUN_TASK; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' envars: <<: *default_vars OBS_DIR: '&NOHRSC_OBS_DIR;' @@ -50,7 +50,7 @@ task_get_obs_nohrsc: task_get_obs_mrms: <<: *default_task_verify_pre - command: '&LOAD_MODULES_RUN_TASK_FP; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' + command: '&LOAD_MODULES_RUN_TASK; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' envars: <<: *default_vars OBS_DIR: '&MRMS_OBS_DIR;' @@ -69,7 +69,7 @@ task_get_obs_ndas: OBS_DIR: '&NDAS_OBS_DIR;' OBTYPE: 'NDAS' FHR: '{% for h in range(0, workflow.FCST_LEN_HRS+1) %}{{ " %02d" % h }}{% endfor %}' - command: '&LOAD_MODULES_RUN_TASK_FP; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' + command: '&LOAD_MODULES_RUN_TASK; "get_obs" "&JOBSdir;/JREGIONAL_GET_VERIF_OBS"' queue: "&QUEUE_HPSS;" native: '{% if platform.get("SCHED_NATIVE_CMD_HPSS") %}{{ platform.SCHED_NATIVE_CMD_HPSS }}{% else %}{{ platform.SCHED_NATIVE_CMD}}{% endif %}' partition: '{% if platform.get("PARTITION_HPSS") %}&PARTITION_HPSS;{% else %}None{% endif %}' @@ -80,7 +80,7 @@ task_run_MET_Pb2nc_obs: attrs: cycledefs: forecast maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PB2NC_OBS"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PB2NC_OBS"' envars: <<: *default_vars VAR: ADPSFC @@ -110,7 +110,7 @@ metatask_PcpCombine_obs: attrs: cycledefs: forecast maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PCPCOMBINE"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PCPCOMBINE"' envars: <<: *default_vars VAR: APCP @@ -140,7 +140,7 @@ metatask_check_post_output_all_mems: attrs: cycledefs: forecast maxtries: '1' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_CHECK_POST_OUTPUT"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_CHECK_POST_OUTPUT"' envars: <<: *default_vars VAR: APCP @@ -221,7 +221,7 @@ metatask_PcpCombine_fcst_APCP_all_accums_all_mems: attrs: cycledefs: forecast maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PCPCOMBINE"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PCPCOMBINE"' envars: <<: *default_vars VAR: APCP @@ -249,7 +249,7 @@ metatask_PcpCombine_fcst_ASNOW_all_accums_all_mems: attrs: cycledefs: forecast maxtries: '2' - command: '&LOAD_MODULES_RUN_TASK_FP; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PCPCOMBINE"' + command: '&LOAD_MODULES_RUN_TASK; "run_vx" "&JOBSdir;/JREGIONAL_RUN_MET_PCPCOMBINE"' envars: <<: *default_vars VAR: ASNOW From 87e549fbbea765c032f1910230207724ff35ae12 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 11 Apr 2024 23:03:43 +0000 Subject: [PATCH 03/34] Keep same environment behavior for AQM jobs. --- jobs/JSRW_AQM_ICS | 7 ++++++- jobs/JSRW_AQM_LBCS | 8 +++++++- jobs/JSRW_BIAS_CORRECTION_O3 | 8 +++++++- jobs/JSRW_BIAS_CORRECTION_PM25 | 8 +++++++- jobs/JSRW_FIRE_EMISSION | 7 ++++++- jobs/JSRW_NEXUS_EMISSION | 7 ++++++- jobs/JSRW_NEXUS_GFS_SFC | 7 ++++++- jobs/JSRW_NEXUS_POST_SPLIT | 7 ++++++- jobs/JSRW_POINT_SOURCE | 8 +++++++- jobs/JSRW_POST_STAT_O3 | 8 +++++++- jobs/JSRW_POST_STAT_PM25 | 8 +++++++- jobs/JSRW_PRE_POST_STAT | 7 ++++++- 12 files changed, 78 insertions(+), 12 deletions(-) diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index 0c4df8aa5b..62929f758e 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -31,7 +31,12 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_aqm_ics" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index 11a1420d5e..09ac806518 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -31,7 +31,13 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_get_extrn_lbcs|task_make_orog|task_make_lbcs|cpl_aqm_parm|task_aqm_lbcs" ${GLOBAL_VAR_DEFNS_FP} +for sect in ( user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ + task_make_orog task_make_lbcs task_aqm_lbcs ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index 3ab2f2d40f..e58c3266c0 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -30,7 +30,13 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_run_post|task_bias_correction_o3" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ + task_bias_correction_o3) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index 42210e7f29..ff84cdaa59 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -30,7 +30,13 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_run_post|task_bias_correction_pm25" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ + task_bias_correction_pm25) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index ae0343e60e..b99ea5bbf5 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -30,7 +30,12 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_fire_emission" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index 33f1aca757..4f6824e695 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -30,7 +30,12 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_run_fcst|cpl_aqm_parm|task_nexus_emission" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index 89d84c740d..b688cc9980 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -30,7 +30,12 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_nexus_gfs_sfc" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index 6e5a0a259a..4463217b42 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -30,7 +30,12 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_nexus_post_split" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index a112a2d275..97f32506db 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -30,7 +30,13 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_run_fcst|cpl_aqm_parm|task_point_source" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ + task_run_fcst) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index 8924cba9e5..f15988c0b8 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -30,7 +30,13 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_run_post|task_post_stat_o3" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ + task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index 83434fa8c7..1a9c2fa9e8 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -30,7 +30,13 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_run_post|task_post_stat_pm25" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ + task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 12561085c2..3e18405ed0 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -30,7 +30,12 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_pre_post_stat" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # From 59d07d42427aab5e3fca9ddea277abfe58560d20 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 18 Apr 2024 02:39:49 +0000 Subject: [PATCH 04/34] WIP --- jobs/JREGIONAL_MAKE_GRID | 95 +------- scripts/exregional_check_post_output.sh | 45 +++- scripts/exregional_get_extrn_mdl_files.sh | 73 +++++- scripts/exregional_get_verif_obs.sh | 30 ++- scripts/exregional_integration_test.py | 6 +- scripts/exregional_make_grid.sh | 101 +++++++- scripts/exregional_make_ics.sh | 86 ++++++- scripts/exregional_make_lbcs.sh | 85 +++++++ scripts/exregional_make_orog.sh | 283 ++++++++++++---------- scripts/exregional_make_sfc_climo.sh | 100 ++++++++ 10 files changed, 671 insertions(+), 233 deletions(-) diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index 318239c47a..3942d38681 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -3,98 +3,9 @@ # #----------------------------------------------------------------------- # -# This script generates grid and orography files in NetCDF format that -# are required as inputs for running the FV3-LAM model (i.e. the FV3 mo- -# del on a regional domain). It in turn calls three other scripts whose -# file names are specified in the variables grid_gen_scr, orog_gen_scr, -# and orog_fltr_scr and then calls the executable defined in the varia- -# ble shave_exec. These scripts/executable perform the following tasks: -# -# 1) grid_gen_scr: -# -# This script generates grid files that will be used by subsequent -# preprocessing steps. It places its output in the directory defined -# by GRID_DIR. Note that: -# -# a) This script creates grid files for each of the 7 tiles of the -# cubed sphere grid (where tiles 1 through 6 cover the globe, and -# tile 7 is the regional grid located somewhere within tile 6) -# even though the forecast will be performed only on tile 7. -# -# b) The tile 7 grid file that this script creates includes a halo, -# i.e. a layer of cells beyond the boundary of tile 7). The width -# of this halo (i.e. the number of cells in the halo in the direc- -# tion perpendicular to the boundary of the tile) must be made -# large enough such that the "shave" steps later below (which take -# this file as input and generate grid files with thinner halos) -# have a wide enough starting halo to work with. More specifical- -# ly, the FV3-LAM model needs as inputs two grid files: one with a -# halo that is 3 cells and another with a halo that is 4 cells -# wide. Thus, the halo in the grid file that the grid_gen_scr -# script generates must be greater than 4 since otherwise, the -# shave steps would shave off cells from within the interior of -# tile 7. We will let NHW denote the width of the halo in the -# grid file generated by grid_gen_scr. The "n" in this variable -# name denotes number of cells, the "h" is used to indicate that -# it refers to a halo region, the "w" is used to indicate that it -# refers to a wide halo (i.e. wider than the 3-cell and 4-cell ha- -# los that the FV3-LAM model requires as inputs, and the "T7" is -# used to indicate that the cell count is on tile 7. -# -# 2) orog_gen_scr: -# -# This script generates the orography file. It places its output in -# the directory defined by OROG_DIR. Note that: -# -# a) This script generates an orography file only on tile 7. -# -# b) This orography file contains a halo of the same width (NHW) -# as the grid file for tile 7 generated by the grid_gen_scr script -# in the previous step. -# -# 3) orog_fltr_scr: -# -# This script generates a filtered version of the orography file ge- -# nerated by the script orog_gen_scr. This script places its output -# in the temporary directory defined in WORKDIR_FLTR. Note that: -# -# a) The filtered orography file generated by this script contains a -# halo of the same width (NHW) as the (unfiltered) orography file -# generated by script orog_gen_scr (and the grid file generated by -# grid_gen_scr). -# -# b) In analogy with the input grid files, the FV3-LAM model needs as -# input two (filtered) orography files -- one with no halo cells -# and another with 3. These are obtained later below by "shaving" -# off layers of halo cells from the (filtered) orography file ge- -# nerated in this step. -# -# 4) shave_exec: -# -# This "shave" executable is called 4 times to generate 4 files from -# the tile 7 grid file generated by grid_gen_scr and the tile 7 fil- -# tered orography file generated by orog_fltr_scr (both of which have -# a halo of width NHW cells). The 4 output files are placed in the -# temporary directory defined in WORKDIR_SHVE. More specifically: -# -# a) shave_exec is called to shave the halo in the tile 7 grid file -# generated by grid_gen_scr down to a width of 3 cells and store -# the result in a new grid file in WORKDIR_SHVE. -# -# b) shave_exec is called to shave the halo in the tile 7 grid file -# generated by grid_gen_scr down to a width of 4 cells and store -# the result in a new grid file in WORKDIR_SHVE. -# -# c) shave_exec is called to shave the halo in the tile 7 filtered -# orography file generated by orog_fltr_scr down to a width of 0 -# cells (i.e. no halo) and store the result in a new filtered oro- -# graphy file in WORKDIR_SHVE. -# -# d) shave_exec is called to shave the halo in the tile 7 filtered -# orography file generated by orog_fltr_scr down to a width of 4 -# cells and store the result in a new filtered orography file in -# WORKDIR_SHVE. - +# The J-Job that generates input NetCDF grid files for running the +# regional configuration of FV3 +# # Run-time environment variables: # # GLOBAL_VAR_DEFNS_FP diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index 1352d38789..1b89f29edb 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -1,5 +1,43 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The ex-script for checking the post output. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# ENSMEM_INDX +# CDATE +# VAR +# ACCUM_HH +# +# Experiment variables +# +# user: +# USHdir +# +# workflow: +# FCST_LEN_HRS +# +# global: +# DO_ENSEMBLE +# ENS_TIME_LAG_HRS +# +# constants: +# SECS_PER_HOUR +# +# verification: +# VX_NDIGITS_ENSMEM_NAMES +# FCST_SUBDIR_TEMPLATE +# FCST_FN_TEMPLATE +# VX_FCST_INPUT_BASEDIR +# NUM_MISSING_FCST_FILES_MAX +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +46,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_met_pcpcombine|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow global constants verification) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 018a30c285..e5b1e90144 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -1,5 +1,68 @@ #!/usr/bin/env bash + +# +#----------------------------------------------------------------------- +# +# The ex-script for getting the model files that will be used for either +# initial conditions or lateral boundary conditions for the experiment. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# ICS_OR_LBCS +# PDY +# cyc +# CDATE +# DATA +# COMIN +# EXTRN_MDL_STAGING_DIR +# TIME_OFFSET_HRS +# EXTRN_MDL_NAME +# EXTRN_MDL_CDATE +# NET +# +# Experiment variables +# +# user: +# USHdir +# RUN_ENVIR +# PARMdir +# MACHINE +# +# workflow: +# DATE_FIRST_CYCL +# INCR_CYCL_FREQ +# FCST_LEN_CYCL +# SYMLINK_FIX_FILES +# EXTRN_MDL_VAR_DEFNS_FN +# +# global: +# DO_ENSEMBLE +# NUM_ENS_MEMBERS +# +# platform: +# EXTRN_MDL_DATA_STORES +# +# task_get_extrn_ics: +# EXTRN_MDL_FILES_ICS +# FV3GFS_FILE_FMT_ICS +# EXTRN_MDL_SOURCE_BASEDIR_ICS +# EXTRN_MDL_SYSBASEDIR_ICS +# +# task_get_extrn_lbcs: +# LBC_SPEC_INTVL_HRS +# EXTRN_MDL_FILES_LBCS +# FV3GFS_FILE_FMT_LBCS +# EXTRN_MDL_SOURCE_BASEDIR_LBCS +# EXTRN_MDL_SYSBASEDIR_LBCS +# +#----------------------------------------------------------------------- +# + + + + # #----------------------------------------------------------------------- # @@ -8,7 +71,13 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_get_extrn_ics|task_get_extrn_lbcs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow global platform task_get_extrn_ics \ + task_get_extrn_lbcs) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # @@ -222,7 +291,7 @@ if [ "${EXTRN_MDL_NAME}" = "GEFS" ]; then for num in $(seq -f "%02g" ${NUM_ENS_MEMBERS}); do sorted_fn=( ) for fcst_hr in "${all_fcst_hrs_array[@]}"; do - # Read in filenames from $EXTRN_MDL_FNS and sort them + # Read in filenames from EXTRN_MDL_FNS and sort them base_path="${EXTRN_MDL_STAGING_DIR}/mem`printf %03d $num`" filenames_array=`awk -F= '/EXTRN_MDL_FNS/{print $2}' $base_path/${EXTRN_DEFNS}` for filename in ${filenames_array[@]}; do diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index a74f11cd3a..244ab3d96b 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -1,5 +1,28 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The ex-script that checks, pulls, and stages observation data for +# model verification. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# OBS_DIR +# PDY +# FHR +# OBTYPE +# VAR +# +# Experiment variables +# +# user: +# USHdir +# PARMdir +# +#----------------------------------------------------------------------- + # #----------------------------------------------------------------------- # @@ -8,7 +31,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task " " ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_integration_test.py b/scripts/exregional_integration_test.py index f0ac3d9af6..996cf6320e 100755 --- a/scripts/exregional_integration_test.py +++ b/scripts/exregional_integration_test.py @@ -4,16 +4,16 @@ #### Python Script Documentation Block # # Script name: exregional_integration_test.py -# Script description: Ensures the correct number of netcdf files are generated +# Script description: Ensures the correct number of netcdf files are generated # for each experiment # # Author: Eddie Snyder Org: NOAA EPIC Date: 2024-02-05 -# +# # Instructions: 1. Pass the appropriate info for the required arguments: # --fcst_dir=/path/to/forecast/files # --fcst_len= # 2. Run script with arguments -# +# # Notes/future work: - Currently SRW App only accepts netcdf as the UFS WM # output file format. If that changes, then additional # logic is needed to address the other file formats. diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 1f95ea8f91..05a827e3b7 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -1,5 +1,99 @@ #!/usr/bin/env bash + +# +#----------------------------------------------------------------------- +# +# This script generates NetCDF-formatted grid files required as input +# the FV3 model configured for the regional domain. +# +# The output of this script is placed in a directory defined by GRID_DIR. +# +# More about the grid for regional configurations of FV3: +# +# a) This script creates grid files for tile 7 (reserved for the +# regional grid located soewhere within tile 6 of the 6 global +# tiles. +# +# b) Regional configurations of FV3 need two grid files, one with 3 +# halo cells and one with 4 halo cells. The width of the halo is +# the number of cells in the direction perpendicular to the +# boundary. +# +# c) The tile 7 grid file that this script creates includes a halo, +# with at least 4 cells to accommodate this requirement. The halo +# is made thinner in a subsequent step called "shave". +# +# d) We will let NHW denote the width of the wide halo that is wider +# than the required 3- or 4-cell halos. (NHW; N=number of cells, +# H=halo, W=wide halo) +# +# e) T7 indicates the cell count on tile 7. +# +# +# This script does the following: +# +# - Create the grid, either an ESGgrid with the regional_esg_grid +# executable or a GFDL-type grid with the hgrid executable +# - Calculate the regional grid's global uniform cubed-sphere grid +# equivalent resolution with the global_equiv_resol executable +# - Use the shave executable to reduce the halo to 3 and 4 cells +# - Call an ush script that runs the make_solo_mosaic executable +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# DATA +# REDIRECT_OUT_ERR +# +# Experiment variables +# +# user: +# USHdir +# EXECdir +# +# workflow: +# VERBOSE +# GRID_GEN_METHOD +# RGNL_GRID_NML_FN +# DOT_OR_USCORE +# RES_IN_FIXLAM_FILENAMES +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_SERIAL +# +# constants: +# NH3 +# NH4 +# TILE_RGNL +# +# grid_params: +# ISTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG +# IEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG +# JSTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG +# JEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG +# STRETCH_FAC +# LON_CTR +# LAT_CTR +# GFDLgrid_REFINE_RATIO +# DEL_ANGLE_X_SG +# DEL_ANGLE_Y_SG +# NEG_NX_OF_DOM_WITH_WIDE_HALO +# NEG_NY_OF_DOM_WITH_WIDE_HALO +# PAZI +# NHW +# NX +# NY +# +# task_make_grid: +# GFDLgrid_USE_NUM_CELLS_IN_FILENAMES +# GFDLgrid_NUM_CELLS +# GRID_DIR +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +102,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_grid" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow platform constants grid_params task_make_grid) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 84d73696eb..79b59fc56c 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -1,5 +1,84 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The ex-scrtipt that sets up and runs chgres_cube for preparing initial +# conditions for the FV3 forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# COMIN +# SLASH_ENSMEM_SUBDIR +# DATA +# DATAROOT +# NET +# COMIN +# COMROOT +# COMOUT +# DATA_SHARE +# INPUT_DATA +# PDY +# EXTRN_MDL_CDATE +# REDIRECT_OUT_ERR +# +# Experiment variables +# +# user: +# USHdir +# RUN_ENVIR +# MACHINE +# EXECdir +# PARMdir +# +# workflow: +# VERBOSE +# EXTRN_MDL_VAR_DEFNS_FN +# CCPP_PHYS_SUITE +# SDF_USES_RUC_LSM +# SDF_USES_THOMPSON_MP +# THOMPSON_MP_CLIMO_FP +# FIXlam +# CRES +# DOT_OR_USCORE +# COLDSTART +# DATE_FIRST_CYCL +# +# constants: +# NH0 +# NH4 +# TILE_RGNL +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_UTILS +# FIXgsm +# +# global: +# HALO_BLEND +# +# cpl_aqm_parm: +# CPL_AQM +# +# task_make_ics: +# KMP_AFFINITY_MAKE_ICS +# OMP_NUM_THREADS_MAKE_ICS +# OMP_STACKSIZE_MAKE_ICS +# VCOORD_FILE +# USE_FVCOM +# FVCOM_WCSTART +# FVCOM_DIR +# FVCOM_FILE +# +# task_get_extrn_ics: +# EXTRN_MDL_NAME_ICS +# FV3GFS_FILE_FMT_ICS +# +#----------------------------------------------------------------------- +# + + # #----------------------------------------------------------------------- # @@ -8,7 +87,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_ics|task_get_extrn_ics" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow constants platform global cpl_aqm_parm task_make_ics task_get_extrn_ics) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index ca3f6401cb..71ff826bf9 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -1,5 +1,84 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The ex-scrtipt that sets up and runs chgres_cube for preparing lateral +# boundary conditions for the FV3 forecast +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# COMIN +# SLASH_ENSMEM_SUBDIR +# DATA +# DATAROOT +# NET +# COMIN +# COMROOT +# COMOUT +# DATA_SHARE +# INPUT_DATA +# PDY +# EXTRN_MDL_CDATE +# REDIRECT_OUT_ERR +# +# Experiment variables +# +# user: +# USHdir +# RUN_ENVIR +# MACHINE +# EXECdir +# PARMdir +# +# workflow: +# VERBOSE +# EXTRN_MDL_VAR_DEFNS_FN +# CCPP_PHYS_SUITE +# SDF_USES_RUC_LSM +# SDF_USES_THOMPSON_MP +# THOMPSON_MP_CLIMO_FP +# FIXlam +# CRES +# DOT_OR_USCORE +# COLDSTART +# DATE_FIRST_CYCL +# +# constants: +# NH0 +# NH4 +# TILE_RGNL +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_UTILS +# FIXgsm +# +# global: +# HALO_BLEND +# +# cpl_aqm_parm: +# CPL_AQM +# +# task_make_lbcs: +# KMP_AFFINITY_MAKE_LBCS +# OMP_NUM_THREADS_MAKE_LBCS +# OMP_STACKSIZE_MAKE_LBCS +# VCOORD_FILE +# USE_FVCOM +# FVCOM_WCSTART +# FVCOM_DIR +# FVCOM_FILE +# +# task_get_extrn_lbcs: +# EXTRN_MDL_NAME_LBCS +# FV3GFS_FILE_FMT_LBCS +# +#----------------------------------------------------------------------- +# + + # #----------------------------------------------------------------------- # @@ -9,6 +88,12 @@ # . $USHdir/source_util_funcs.sh source_config_for_task "task_make_lbcs|task_get_extrn_lbcs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow constants platform global cpl_aqm_parm task_make_ics task_get_extrn_ics) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 47430a802d..52e66519b3 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -1,5 +1,86 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# This ex-script is responsible for creating orography files for the FV3 +# forecast. +# +# The output of this script is placed in a directory defined by OROG_DIR +# +# More about the orog for the regional configuration of the FV3: +# +# a) Only the tile 7 orography file is created. +# +# b) This orography file contains a halo of the same width (NHW) +# as the grid file for tile 7 generated by the make_grid script +# +# c) Filtered versions of the orogoraphy files are created with the +# same width (NHW) as the unfiltered orography file and the grid +# file. FV3 requires two filtered orography files, one with no +# halo cells and one with 4 halo cells. +# +# This script does the following: +# +# - Create the raw orography files by running the orog executable. +# - Run the orog_gsl executable if any of several GSL-developed +# physics suites is chosen by the user. +# - Run the filter_topo executable on the raw orography files +# - Run the shave executable for the 0- and 4-cell halo orography +# files +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# DATA +# REDIRECT_OUT_ERR +# +# Experiment variables +# +# user: +# USHdir +# EXECdir +# +# workflow: +# VERBOSE +# PREEXISTING_DIR_METHOD +# CRES +# DOT_OR_USCORE +# FIXlam +# FIXam +# CCPP_PHYS_SUITE +# GRID_GEN_METHOD +# +# grid_params: +# NHW +# STRETCH_FAC +# NX +# NY +# +# constants: +# TILE_RGNL +# NH0 +# NH4 +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_SERIAL +# FIXorg +# +# task_make_orog: +# KMP_AFFINITY_MAKE_OROG +# OMP_NUM_THREADS_MAKE_OROG +# OMP_STACKSIZE_MAKE_OROG +# OROG_DIR +# +# task_make_grid: +# GFDLgrid_NUM_CELLS +# GFDLgrid_STRETCH_FAC +# GFDLgrid_REFINE_RATIO +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +89,13 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_orog|task_make_grid" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow grid_params constants platform task_make_orog task_make_grid) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done + # #----------------------------------------------------------------------- # @@ -30,13 +117,7 @@ source_config_for_task "task_make_orog|task_make_grid" ${GLOBAL_VAR_DEFNS_FP} 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}\" @@ -54,17 +135,7 @@ This is the ex-script for the task that generates orography files. export KMP_AFFINITY=${KMP_AFFINITY_MAKE_OROG} export OMP_NUM_THREADS=${OMP_NUM_THREADS_MAKE_OROG} export OMP_STACKSIZE=${OMP_STACKSIZE_MAKE_OROG} -# -#----------------------------------------------------------------------- -# -# Load modules and set various computational parameters and directories. -# -# Note: -# These module loads should all be moved to modulefiles. This has been -# done for Hera but must still be done for other machines. -# -#----------------------------------------------------------------------- -# + eval ${PRE_TASK_CMDS} if [ -z "${RUN_CMD_SERIAL:-}" ] ; then @@ -103,9 +174,6 @@ mkdir_vrfy -p "${shave_dir}" # #----------------------------------------------------------------------- # -# Set the name and path to the executable that generates the raw orography -# file and make sure that it exists. -# exec_fn="orog" exec_fp="$EXECdir/${exec_fn}" if [ ! -f "${exec_fp}" ]; then @@ -114,32 +182,19 @@ The executable (exec_fp) for generating the orography file does not exist: exec_fp = \"${exec_fp}\" Please ensure that you've built this executable." fi -# -# Create a temporary (work) directory in which to generate the raw orography -# file and change location to it. -# + DATA="${DATA:-${raw_dir}/tmp}" mkdir_vrfy -p "${DATA}" cd_vrfy "${DATA}" -# -# Copy topography and related data files from the system directory (FIXorg) -# to the temporary directory. -# + cp_vrfy ${FIXorg}/thirty.second.antarctic.new.bin fort.15 cp_vrfy ${FIXorg}/landcover30.fixed . cp_vrfy ${FIXorg}/gmted2010.30sec.int fort.235 + # #----------------------------------------------------------------------- # -# The orography filtering code reads in from the grid mosaic file the -# the number of tiles, the name of the grid file for each tile, and the -# dimensions (nx and ny) of each tile. Next, set the name of the grid -# mosaic file and create a symlink to it in filter_dir. -# -# Note that in the namelist file for the orography filtering code (created -# later below), the mosaic file name is saved in a variable called -# "grid_file". It would have been better to call this "mosaic_file" -# instead so it doesn't get confused with the grid file for a given tile... +# Get the grid file info from the mosaic file # #----------------------------------------------------------------------- # @@ -152,21 +207,15 @@ grid_fp="${FIXlam}/${grid_fn}" # #----------------------------------------------------------------------- # -# Set input parameters for the orography generation executable and write -# them to a text file. +# Set input parameters for the orog executable in a formatted text file. +# The executable takes its parameters via the command line. # -# Note that it doesn't matter what lonb and latb are set to below because -# if we specify an input grid file to the executable read in (which is -# what we do below), then if lonb and latb are not set to the dimensions -# of the grid specified in that file (divided by 2 since the grid file -# specifies a "supergrid"), then lonb and latb effectively get reset to -# the dimensions specified in the grid file. +# Note: lonb and latb are placeholders in this case since the program +# uses the ones obtained from the grid file. # #----------------------------------------------------------------------- # mtnres=1 -#lonb=$res -#latb=$res lonb=0 latb=0 jcap=0 @@ -195,15 +244,13 @@ cat "${input_redirect_fn}" # Call the executable to generate the raw orography file corresponding # to tile 7 (the regional domain) only. # -# The following will create an orography file named +# The script moves the output file from its temporary directory to the +# OROG_DIR and names it: # -# oro.${CRES}.tile7.nc +# ${CRES}_raw_orog.tile7.halo${NHW}.nc # -# and will place it in OROG_DIR. Note that this file will include -# orography for a halo of width NHW cells around tile 7. The follow- -# ing will also create a work directory called tile7 under OROG_DIR. -# This work directory can be removed after the orography file has been -# created (it is currently not deleted). +# Note that this file will include orography for a halo of width NHW +# cells around tile 7. # #----------------------------------------------------------------------- # @@ -218,16 +265,11 @@ with nonzero exit code: exec_fp = \"${exec_fp}\"" POST_STEP -# -# Change location to the original directory. -# cd_vrfy - # #----------------------------------------------------------------------- # -# Move the raw orography file from the temporary directory to raw_dir. -# In the process, rename it such that its name includes CRES and the halo -# width. +# Move the raw orography file and rename it. # #----------------------------------------------------------------------- # @@ -240,9 +282,9 @@ mv_vrfy "${raw_orog_fp_orig}" "${raw_orog_fp}" # #----------------------------------------------------------------------- # -# Call the code to generate the two orography statistics files (large- -# and small-scale) needed for the drag suite in the FV3_HRRR physics -# suite. +# Call the orog_gsl executable to generate the two orography statistics +# files (large- and small-scale) needed for the drag suite in certain +# GSL physics suites. # #----------------------------------------------------------------------- # @@ -324,14 +366,14 @@ fi # resolution of res_regional. These interpolated/extrapolated values are # then used to perform the orography filtering. # -# The above approach works for a GFDLgrid type of grid. To handle ESGgrid -# type grids, we set res in the namelist to the orography filtering code -# the equivalent global uniform cubed-sphere resolution of the regional -# grid, we set stretch_fac to 1 (since the equivalent resolution assumes -# a uniform global grid), and we set refine_ratio to 1. This will cause -# res_regional above to be set to the equivalent global uniform cubed- -# sphere resolution, so the filtering parameter values will be interpolated/ -# extrapolated to that resolution value. +# To handle ESGgrid type grids, we set res in the namelist to the +# orography filtering code the equivalent global uniform cubed-sphere +# resolution of the regional grid, we set stretch_fac to 1 (since the +# equivalent resolution assumes a uniform global grid), and we set +# refine_ratio to 1. This will cause res_regional above to be set to +# the equivalent global uniform cubed-sphere resolution, so the +# filtering parameter values will be interpolated/extrapolated to that +# resolution value. # #----------------------------------------------------------------------- # @@ -349,13 +391,11 @@ if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then # Really depends on what EMC wants to do. res="${GFDLgrid_NUM_CELLS}" -# stretch_fac="${GFDLgrid_STRETCH_FAC}" refine_ratio="${GFDLgrid_REFINE_RATIO}" elif [ "${GRID_GEN_METHOD}" = "ESGgrid" ]; then res="${CRES:1}" -# stretch_fac="${STRETCH_FAC}" refine_ratio="1" fi @@ -371,17 +411,12 @@ The executable (exec_fp) for filtering the raw orography does not exist: Please ensure that you've built this executable." fi # -# The orography filtering executable replaces the contents of the given -# raw orography file with a file containing the filtered orography. The -# name of the input raw orography file is in effect specified by the -# namelist variable topo_file; the orography filtering code assumes that -# this name is constructed by taking the value of topo_file and appending -# to it the string ".tile${N}.nc", where N is the tile number (which for -# a regional grid, is always 7). (Note that topo_file may start with a -# a path to the orography file that the filtering code will read in and -# replace.) Thus, we now copy the raw orography file (whose full path is -# specified by raw_orog_fp) to filter_dir and in the process rename it -# such that its new name: +# The filter_topo program overwrites its input file with filtered +# output, which is specified by topo_file in the namelist, but with a +# suffix ".tile7.nc" for the regional configuration. To avoid +# overwriting the output of the orog program, copy its output file to +# the filter_topo working directory and rename it. Here, the name is +# chosen such that it: # # (1) indicates that it contains filtered orography data (because that # is what it will contain once the orography filtering executable @@ -395,15 +430,10 @@ filtered_orog_fp_prefix="${filter_dir}/${filtered_orog_fn_prefix}" filtered_orog_fp="${filtered_orog_fp_prefix}.${fn_suffix_without_halo}" cp_vrfy "${raw_orog_fp}" "${filtered_orog_fp}" # -# The orography filtering executable looks for the grid file specified -# in the grid mosaic file (more specifically, specified by the gridfiles -# variable in the mosaic file) in the directory in which the executable -# is running. Recall that above, we already extracted the name of the -# grid file from the mosaic file and saved it in the variable grid_fn, -# and we saved the full path to this grid file in the variable grid_fp. -# Thus, we now create a symlink in the filter_dir directory (where the -# filtering executable will run) with the same name as the grid file and -# point it to the actual grid file specified by grid_fp. +# The filter_topo program looks for the grid file specified +# in the mosaic file (more specifically, specified by the gridfiles +# variable in the mosaic file) in its own run directory. Make a symlink +# to it. # create_symlink_to_file target="${grid_fp}" symlink="${filter_dir}/${grid_fn}" \ relative="TRUE" @@ -411,6 +441,10 @@ create_symlink_to_file target="${grid_fp}" symlink="${filter_dir}/${grid_fn}" \ # Create the namelist file (in the filter_dir directory) that the orography # filtering executable will read in. # +# Note that in the namelist file for the orography filtering code (created +# later below), the mosaic file name is saved in a variable called +# "grid_file". It would have been better to call this "mosaic_file" +# instead so it doesn't get confused with the grid file for a given tile. cat > "${filter_dir}/input.nml" < "${filter_dir}/input.nml" < ${nml_fn} + > ${ascii_fn} PREP_STEP -eval ${RUN_CMD_SERIAL} ${exec_fp} < ${nml_fn} ${REDIRECT_OUT_ERR} || \ +eval ${RUN_CMD_SERIAL} ${exec_fp} < ${ascii_fn} ${REDIRECT_OUT_ERR} || \ print_err_msg_exit "\ Call to executable (exec_fp) to generate a (filtered) orography file with a ${NH0}-cell-wide halo from the orography file with a {NHW}-cell-wide halo returned with nonzero exit code: exec_fp = \"${exec_fp}\" -The namelist file (nml_fn) used in this call is in directory shave_dir: - nml_fn = \"${nml_fn}\" +The config file (ascii_fn) used in this call is in directory shave_dir: + ascii_fn = \"${ascii_fn}\" shave_dir = \"${shave_dir}\"" POST_STEP mv_vrfy ${shaved_fp} ${OROG_DIR} # -# Create an input namelist file for the shave executable to generate an +# Create an input config file for the shave executable to generate an # orography file with a 4-cell-wide halo from the one with a wide halo. # Then call the shave executable. Finally, move the resultant file to # the OROG_DIR directory. @@ -528,33 +554,32 @@ print_info_msg "$VERBOSE" " \"Shaving\" filtered orography file with a ${NHW}-cell-wide halo to obtain a filtered orography file with a ${NH4}-cell-wide halo..." -nml_fn="input.shave.orog.halo${NH4}" +ascii_fn="input.shave.orog.halo${NH4}" shaved_fp="${shave_dir}/${CRES}${DOT_OR_USCORE}oro_data.tile${TILE_RGNL}.halo${NH4}.nc" printf "%s %s %s %s %s\n" \ $NX $NY ${NH4} \"${unshaved_fp}\" \"${shaved_fp}\" \ - > ${nml_fn} + > ${ascii_fn} PREP_STEP -eval ${RUN_CMD_SERIAL} ${exec_fp} < ${nml_fn} ${REDIRECT_OUT_ERR} || \ +eval ${RUN_CMD_SERIAL} ${exec_fp} < ${ascii_fn} ${REDIRECT_OUT_ERR} || \ print_err_msg_exit "\ Call to executable (exec_fp) to generate a (filtered) orography file with a ${NH4}-cell-wide halo from the orography file with a {NHW}-cell-wide halo returned with nonzero exit code: exec_fp = \"${exec_fp}\" -The namelist file (nml_fn) used in this call is in directory shave_dir: - nml_fn = \"${nml_fn}\" +The namelist file (ascii_fn) used in this call is in directory shave_dir: + ascii_fn = \"${ascii_fn}\" shave_dir = \"${shave_dir}\"" POST_STEP mv_vrfy "${shaved_fp}" "${OROG_DIR}" -# -# Change location to the original directory. -# + + cd_vrfy - # #----------------------------------------------------------------------- # -# Add link in ORIG_DIR directory to the orography file with a 4-cell-wide -# halo such that the link name do not contain the halo width. These links +# Add link in OROG_DIR directory to the orography file with a 4-cell-wide +# halo such that the link name does not contain the halo width. These links # are needed by the make_sfc_climo task. # # NOTE: It would be nice to modify the sfc_climo_gen_code to read in @@ -567,13 +592,7 @@ python3 $USHdir/link_fix.py \ --file-group "orog" || \ print_err_msg_exit "\ Call to function to create links to orography files failed." -# -#----------------------------------------------------------------------- -# -# Print message indicating successful completion of script. -# -#----------------------------------------------------------------------- -# + print_info_msg " ======================================================================== Orography files with various halo widths generated successfully!!! diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index 868029a488..c287e370cf 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -1,5 +1,105 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# This script generates grid and orography files in NetCDF format that +# are required as inputs for running the FV3-LAM model (i.e. the FV3 mo- +# del on a regional domain). It in turn calls three other scripts whose +# file names are specified in the variables grid_gen_scr, orog_gen_scr, +# and orog_fltr_scr and then calls the executable defined in the varia- +# ble shave_exec. These scripts/executable perform the following tasks: +# +# 1) grid_gen_scr: +# +# This script generates grid files that will be used by subsequent +# preprocessing steps. It places its output in the directory defined. +# by GRID_DIR. Note that: +# +# a) This script creates grid files for each of the 7 tiles of the +# cubed sphere grid (where tiles 1 through 6 cover the globe, and +# tile 7 is the regional grid located somewhere within tile 6) +# even though the forecast will be performed only on tile 7. +# +# b) The tile 7 grid file that this script creates includes a halo, +# i.e. a layer of cells beyond the boundary of tile 7). The width +# of this halo (i.e. the number of cells in the halo in the direc- +# tion perpendicular to the boundary of the tile) must be made +# large enough such that the "shave" steps later below (which take +# this file as input and generate grid files with thinner halos) +# have a wide enough starting halo to work with. More specifical- +# ly, the FV3-LAM model needs as inputs two grid files: one with a +# halo that is 3 cells and another with a halo that is 4 cells. +# wide. Thus, the halo in the grid file that the grid_gen_scr. +# script generates must be greater than 4 since otherwise, the +# shave steps would shave off cells from within the interior of +# tile 7. We will let NHW denote the width of the halo in the +# grid file generated by grid_gen_scr. The "n" in this variable +# name denotes number of cells, the "h" is used to indicate that +# it refers to a halo region, the "w" is used to indicate that it +# refers to a wide halo (i.e. wider than the 3-cell and 4-cell ha- +# los that the FV3-LAM model requires as inputs, and the "T7" is +# used to indicate that the cell count is on tile 7. +# +# 2) orog_gen_scr: +# +# This script generates the orography file. It places its output in +# the directory defined by OROG_DIR. Note that: +# +# a) This script generates an orography file only on tile 7. +# +# b) This orography file contains a halo of the same width (NHW) +# as the grid file for tile 7 generated by the grid_gen_scr script +# in the previous step. +# +# 3) orog_fltr_scr: +# +# This script generates a filtered version of the orography file ge- +# nerated by the script orog_gen_scr. This script places its output +# in the temporary directory defined in WORKDIR_FLTR. Note that: +# +# a) The filtered orography file generated by this script contains a +# halo of the same width (NHW) as the (unfiltered) orography file +# generated by script orog_gen_scr (and the grid file generated by. +# grid_gen_scr). +# +# b) In analogy with the input grid files, the FV3-LAM model needs as +# input two (filtered) orography files -- one with no halo cells +# and another with 3. These are obtained later below by "shaving" +# off layers of halo cells from the (filtered) orography file ge- +# nerated in this step. +# +# 4) shave_exec: +# +# This "shave" executable is called 4 times to generate 4 files from +# the tile 7 grid file generated by grid_gen_scr and the tile 7 fil- +# tered orography file generated by orog_fltr_scr (both of which have +# a halo of width NHW cells). The 4 output files are placed in the +# temporary directory defined in WORKDIR_SHVE. More specifically: +# +# a) shave_exec is called to shave the halo in the tile 7 grid file +# generated by grid_gen_scr down to a width of 3 cells and store +# the result in a new grid file in WORKDIR_SHVE. +# +# b) shave_exec is called to shave the halo in the tile 7 grid file +# generated by grid_gen_scr down to a width of 4 cells and store +# the result in a new grid file in WORKDIR_SHVE. +# +# c) shave_exec is called to shave the halo in the tile 7 filtered +# orography file generated by orog_fltr_scr down to a width of 0 +# cells (i.e. no halo) and store the result in a new filtered oro- +# graphy file in WORKDIR_SHVE. +# +# d) shave_exec is called to shave the halo in the tile 7 filtered +# orography file generated by orog_fltr_scr down to a width of 4 +# cells and store the result in a new filtered orography file in +# WORKDIR_SHVE. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# DATA + # #----------------------------------------------------------------------- # From 446f6eb46b83bd4a9beac8c32f81bed580ffff39 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 18 Apr 2024 14:13:22 +0000 Subject: [PATCH 05/34] Finished up first round of ex-scripts --- scripts/exregional_make_sfc_climo.sh | 136 ++++++------------ scripts/exregional_run_fcst.sh | 117 ++++++++++++++- ...onal_run_met_genensprod_or_ensemblestat.sh | 8 +- ...gional_run_met_gridstat_or_pointstat_vx.sh | 9 +- ...un_met_gridstat_or_pointstat_vx_ensmean.sh | 8 +- ...un_met_gridstat_or_pointstat_vx_ensprob.sh | 9 +- scripts/exregional_run_met_pb2nc_obs.sh | 9 +- scripts/exregional_run_met_pcpcombine.sh | 9 +- scripts/exregional_run_post.sh | 65 +++++++++ scripts/exregional_run_prdgen.sh | 9 +- scripts/exsrw_aqm_ics.sh | 9 +- scripts/exsrw_aqm_lbcs.sh | 9 +- scripts/exsrw_bias_correction_o3.sh | 9 +- scripts/exsrw_bias_correction_pm25.sh | 9 +- scripts/exsrw_fire_emission.sh | 9 +- scripts/exsrw_nexus_emission.sh | 9 +- scripts/exsrw_nexus_gfs_sfc.sh | 9 +- scripts/exsrw_nexus_post_split.sh | 9 +- scripts/exsrw_point_source.sh | 9 +- scripts/exsrw_post_stat_o3.sh | 9 +- scripts/exsrw_post_stat_pm25.sh | 9 +- scripts/exsrw_pre_post_stat.sh | 9 +- 22 files changed, 375 insertions(+), 112 deletions(-) diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index c287e370cf..06f78c5039 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -3,102 +3,49 @@ # #----------------------------------------------------------------------- # -# This script generates grid and orography files in NetCDF format that -# are required as inputs for running the FV3-LAM model (i.e. the FV3 mo- -# del on a regional domain). It in turn calls three other scripts whose -# file names are specified in the variables grid_gen_scr, orog_gen_scr, -# and orog_fltr_scr and then calls the executable defined in the varia- -# ble shave_exec. These scripts/executable perform the following tasks: -# -# 1) grid_gen_scr: -# -# This script generates grid files that will be used by subsequent -# preprocessing steps. It places its output in the directory defined. -# by GRID_DIR. Note that: -# -# a) This script creates grid files for each of the 7 tiles of the -# cubed sphere grid (where tiles 1 through 6 cover the globe, and -# tile 7 is the regional grid located somewhere within tile 6) -# even though the forecast will be performed only on tile 7. -# -# b) The tile 7 grid file that this script creates includes a halo, -# i.e. a layer of cells beyond the boundary of tile 7). The width -# of this halo (i.e. the number of cells in the halo in the direc- -# tion perpendicular to the boundary of the tile) must be made -# large enough such that the "shave" steps later below (which take -# this file as input and generate grid files with thinner halos) -# have a wide enough starting halo to work with. More specifical- -# ly, the FV3-LAM model needs as inputs two grid files: one with a -# halo that is 3 cells and another with a halo that is 4 cells. -# wide. Thus, the halo in the grid file that the grid_gen_scr. -# script generates must be greater than 4 since otherwise, the -# shave steps would shave off cells from within the interior of -# tile 7. We will let NHW denote the width of the halo in the -# grid file generated by grid_gen_scr. The "n" in this variable -# name denotes number of cells, the "h" is used to indicate that -# it refers to a halo region, the "w" is used to indicate that it -# refers to a wide halo (i.e. wider than the 3-cell and 4-cell ha- -# los that the FV3-LAM model requires as inputs, and the "T7" is -# used to indicate that the cell count is on tile 7. -# -# 2) orog_gen_scr: -# -# This script generates the orography file. It places its output in -# the directory defined by OROG_DIR. Note that: -# -# a) This script generates an orography file only on tile 7. -# -# b) This orography file contains a halo of the same width (NHW) -# as the grid file for tile 7 generated by the grid_gen_scr script -# in the previous step. -# -# 3) orog_fltr_scr: -# -# This script generates a filtered version of the orography file ge- -# nerated by the script orog_gen_scr. This script places its output -# in the temporary directory defined in WORKDIR_FLTR. Note that: -# -# a) The filtered orography file generated by this script contains a -# halo of the same width (NHW) as the (unfiltered) orography file -# generated by script orog_gen_scr (and the grid file generated by. -# grid_gen_scr). -# -# b) In analogy with the input grid files, the FV3-LAM model needs as -# input two (filtered) orography files -- one with no halo cells -# and another with 3. These are obtained later below by "shaving" -# off layers of halo cells from the (filtered) orography file ge- -# nerated in this step. -# -# 4) shave_exec: -# -# This "shave" executable is called 4 times to generate 4 files from -# the tile 7 grid file generated by grid_gen_scr and the tile 7 fil- -# tered orography file generated by orog_fltr_scr (both of which have -# a halo of width NHW cells). The 4 output files are placed in the -# temporary directory defined in WORKDIR_SHVE. More specifically: -# -# a) shave_exec is called to shave the halo in the tile 7 grid file -# generated by grid_gen_scr down to a width of 3 cells and store -# the result in a new grid file in WORKDIR_SHVE. -# -# b) shave_exec is called to shave the halo in the tile 7 grid file -# generated by grid_gen_scr down to a width of 4 cells and store -# the result in a new grid file in WORKDIR_SHVE. -# -# c) shave_exec is called to shave the halo in the tile 7 filtered -# orography file generated by orog_fltr_scr down to a width of 0 -# cells (i.e. no halo) and store the result in a new filtered oro- -# graphy file in WORKDIR_SHVE. -# -# d) shave_exec is called to shave the halo in the tile 7 filtered -# orography file generated by orog_fltr_scr down to a width of 4 -# cells and store the result in a new filtered orography file in -# WORKDIR_SHVE. +# This ex-script generates surface climatology files needed to run FV3 +# forecasts. +# +# The script runs the sfc_climo_gen UFS Utils program, and links the +# output to the SFC_CLIMO_GEN directory # # Run-time environment variables: # # GLOBAL_VAR_DEFNS_FP # DATA +# REDIRECT_OUT_ERR +# +# Experiment variables +# +# user: +# USHdir +# EXECdir +# +# workflow: +# FIXlam +# CRES +# DOT_OR_USCORE +# VERBOSE +# +# constants: +# NH0 +# NH4 +# TILE_RGNL +# GTYPE +# +# platform: +# FIXsfc +# PRE_TASK_CMDS +# RUN_CMD_UTILS +# +# task_make_sfc_climo: +# KMP_AFFINITY_MAKE_SFC_CLIMO +# OMP_NUM_THREADS_MAKE_SFC_CLIMO +# OMP_STACKSIZE_MAKE_SFC_CLIMO +# SFC_CLIMO_DIR +# +#----------------------------------------------------------------------- +# # #----------------------------------------------------------------------- @@ -108,7 +55,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_sfc_climo" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow constants platform task_make_sfc_climo) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 9e6dc38584..ed3a3bc416 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -1,5 +1,113 @@ #!/usr/bin/env bash + +# +#----------------------------------------------------------------------- +# +# This ex-script is responsible for running the FV3 regional forecast. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# CDATE +# DATA +# COMROOT +# NET +# RUN +# PDY +# SLASH_ENSMEM_SUBDIR +# COMIN +# INPUT_DATA +# REDIRECT_OUT_ERR +# COMOUT +# SENDDBN +# DBNROOT +# +# Experiment variables +# +# user: +# USHdir +# PARMdir +# RUN_ENVIR +# MACHINE +# +# workflow: +# VERBOSE +# DATE_FIRST_CYCL +# COLDSTART +# INCR_CYCL_FREQ +# FCST_LEN_CYCL +# EXPTDIR +# FIXlam +# FIXam +# CRES +# DOT_OR_USCORE +# CCPP_PHYS_SUITE +# FCST_LEN_HRS +# SYMLINK_FIX_FILES +# FIXclim +# DATA_TABLE_FP +# DATA_TABLE_FN +# FIELD_TABLE_FN +# FIELD_TABLE_FP +# FIELD_DICT_FP +# FIELD_DICT_FN +# FV3_NML_FN +# FV3_NML_FP +# CCPP_PHYS_DIR +# FV3_NML_STOCH_FP +# PREDEF_GRID_NAME +# +# global: +# DO_SPP +# DO_SPPT +# DO_SHUM +# DO_SKEB +# DO_LSM_SPP +# DO_ENSEMBLE +# +# fixed_files: +# CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING +# +# constants: +# NH0 +# NH4 +# NH3 +# TILE_RGNL +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_FCST +# +# cpl_aqm_parm: +# CPL_AQM +# AQM_RC_PRODUCT_FN +# +# task_run_fcst: +# KMP_AFFINITY_RUN_FCST +# OMP_NUM_THREADS_RUN_FCST +# OMP_STACKSIZE_RUN_FCST +# PRINT_ESMF +# USE_MERRA_CLIMO +# WRITE_DOPOST +# DO_FCST_RESTART +# RESTART_INTERVAL +# DT_ATMOS +# FV3_EXEC_FP +# +# task_get_extrn_lbcs: +# LBC_SPEC_INTVL_HRS +# +# task_run_post: +# USE_CUSTOM_POST_CONFIG_FILE +# CUSTOM_POST_CONFIG_FP +# SUB_HOURLY_POST +# DT_SUBHOURLY_POST_MNTS +# POST_OUTPUT_DOMAIN_NAME +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -8,7 +116,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_fcst|task_run_post|task_get_extrn_ics|task_get_extrn_lbcs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user workflow global fixed_files constants platform \ + cpl_aqm_parm task_run_fcst task_run_post task_get_extrn_lbcs) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done + # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index fe0e119b19..bb559cfe19 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -8,7 +8,13 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_ensgrid|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params task_run_vx_ensgrid task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 7eb1ce4605..da92426df1 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_gridstat|task_run_vx_pointstat|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_vx_gridstat task_run_vx_pointstat task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index 458dcec33f..af329e5032 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -8,7 +8,13 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_ensgrid_mean|task_run_vx_enspoint_mean|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params task_run_vx_ensgrid_mean task_run_vx_enspoint_mean task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index fc735845c9..867fbe50e7 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_ensgrid_prob|task_run_vx_enspoint_prob|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index 92d39102fc..639b401d7a 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_met_pb2nc_obs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_met_pb2nc_obs) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index 7eabe02901..ba78a6d08b 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_met_pcpcombine|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_met_pcpcombine task_run_post ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 60f87c3eaf..620c0cc404 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -1,5 +1,63 @@ #!/usr/bin/env bash +# +#----------------------------------------------------------------------- +# +# The ex-script that runs UPP. +# +# Run-time environment variables: +# +# GLOBAL_VAR_DEFNS_FP +# CDATE +# DATA_FHR +# PDY +# ENSMEM_INDX +# REDIRECT_OUT_ERR +# COMOUT +# NET +# SENDDBN +# DBNROOT +# COMOUT +# +# Experiment variables +# +# user: +# USHdir +# PARMdir +# EXECdir +# RUN_ENVIR +# MACHINE +# +# workflow: +# VERBOSE +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_POST +# +# global: +# USE_CRTM +# CRTM_DIR +# +# cpl_aqm_parm: +# CPL_AQM +# +# task_run_post: +# KMP_AFFINITY_RUN_POST +# OMP_NUM_THREADS_RUN_POST +# OMP_STACKSIZE_RUN_POST +# USE_CUSTOM_POST_CONFIG_FILE +# CUSTOM_POST_CONFIG_FP +# SUB_HOURLY_POST +# NUMX +# POST_OUTPUT_DOMAIN_NAME +# +# task_run_fcst: +# DT_ATMOS +# +#----------------------------------------------------------------------- +# + # #----------------------------------------------------------------------- # @@ -9,6 +67,13 @@ # . $USHdir/source_util_funcs.sh source_config_for_task "task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow global cpl_aqm_parm \ + task_run_post task_run_fcst ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 8fc72dff1c..5725225988 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_prdgen|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_prdgen task_run_post ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index efd833b092..13214b3611 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_aqm_ics" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_aqm_ics ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 93dc119ec2..6fa1c85fc2 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_get_extrn_lbcs|task_make_orog|task_make_lbcs|cpl_aqm_parm|task_aqm_lbcs" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_get_extrn_lbcs task_make_orog task_make_lbcs task_aqm_lbcs ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index 1ef4012528..6f3ad59e40 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_bias_correction_o3" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_bias_correction_o3 ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index ae1a2d6f65..ab04bab207 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_bias_correction_pm25" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_bias_correction_pm25 ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index cb44c99d8d..8d43300a70 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_fire_emission" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_fire_emission ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index a5769a6483..1295563f81 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_nexus_emission" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_nexus_emission ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 103842d46f..1eceef27ad 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_nexus_gfs_sfc" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_nexus_gfs_sfc ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 517893b5e5..2629af4563 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_nexus_post_split" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_nexus_post_split ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index 7acbc946f7..1bdbc95d49 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_run_fcst|cpl_aqm_parm|task_point_source" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_fcst task_point_source ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index 6fa1db7f8f..cea3ca1bc7 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_run_post|task_post_stat_o3" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_post task_post_stat_o3 ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index ea7c1717c3..ebc501a7d1 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "cpl_aqm_parm|task_run_post|task_post_stat_pm25" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_run_post task_post_stat_pm25 ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index dfb4c2cf9e..58cac92d8b 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -8,7 +8,14 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -source_config_for_task "task_pre_post|task_run_post" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user platform workflow nco global verification cpl_aqm_parm \ + constants fixed_files grid_params \ + task_pre_post task_run_post ) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done # #----------------------------------------------------------------------- # From 38f9daa108a9d393496fb310b97698ad40c590c8 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 18 Apr 2024 18:19:44 +0000 Subject: [PATCH 06/34] Order docs. --- scripts/exregional_check_post_output.sh | 18 +-- scripts/exregional_get_extrn_mdl_files.sh | 52 ++++---- scripts/exregional_get_verif_obs.sh | 4 +- scripts/exregional_make_grid.sh | 42 +++---- scripts/exregional_make_ics.sh | 73 ++++++----- scripts/exregional_make_lbcs.sh | 75 ++++++----- scripts/exregional_make_orog.sh | 44 +++---- scripts/exregional_make_sfc_climo.sh | 28 ++--- scripts/exregional_run_fcst.sh | 116 +++++++++--------- ...un_met_gridstat_or_pointstat_vx_ensmean.sh | 3 +- scripts/exregional_run_post.sh | 41 +++---- 11 files changed, 247 insertions(+), 249 deletions(-) diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index 1b89f29edb..cf88ba2dbb 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -7,11 +7,11 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP -# ENSMEM_INDX +# ACCUM_HH # CDATE +# ENSMEM_INDX +# GLOBAL_VAR_DEFNS_FP # VAR -# ACCUM_HH # # Experiment variables # @@ -25,15 +25,15 @@ # DO_ENSEMBLE # ENS_TIME_LAG_HRS # -# constants: -# SECS_PER_HOUR -# # verification: -# VX_NDIGITS_ENSMEM_NAMES -# FCST_SUBDIR_TEMPLATE # FCST_FN_TEMPLATE -# VX_FCST_INPUT_BASEDIR +# FCST_SUBDIR_TEMPLATE # NUM_MISSING_FCST_FILES_MAX +# VX_FCST_INPUT_BASEDIR +# VX_NDIGITS_ENSMEM_NAMES +# +# constants: +# SECS_PER_HOUR # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index e5b1e90144..9a0006d33c 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -9,53 +9,53 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP -# ICS_OR_LBCS -# PDY -# cyc # CDATE -# DATA # COMIN -# EXTRN_MDL_STAGING_DIR -# TIME_OFFSET_HRS -# EXTRN_MDL_NAME +# cyc +# DATA # EXTRN_MDL_CDATE +# EXTRN_MDL_NAME +# EXTRN_MDL_STAGING_DIR +# GLOBAL_VAR_DEFNS_FP +# ICS_OR_LBCS # NET +# PDY +# TIME_OFFSET_HRS # # Experiment variables # # user: -# USHdir -# RUN_ENVIR -# PARMdir # MACHINE +# PARMdir +# RUN_ENVIR +# USHdir +# +# platform: +# EXTRN_MDL_DATA_STORES # # workflow: # DATE_FIRST_CYCL -# INCR_CYCL_FREQ +# EXTRN_MDL_VAR_DEFNS_FN # FCST_LEN_CYCL +# INCR_CYCL_FREQ # SYMLINK_FIX_FILES -# EXTRN_MDL_VAR_DEFNS_FN -# -# global: -# DO_ENSEMBLE -# NUM_ENS_MEMBERS # -# platform: -# EXTRN_MDL_DATA_STORES +# task_get_extrn_lbcs: +# EXTRN_MDL_FILES_LBCS +# EXTRN_MDL_SOURCE_BASEDIR_LBCS +# EXTRN_MDL_SYSBASEDIR_LBCS +# FV3GFS_FILE_FMT_LBCS +# LBC_SPEC_INTVL_HRS # # task_get_extrn_ics: # EXTRN_MDL_FILES_ICS -# FV3GFS_FILE_FMT_ICS # EXTRN_MDL_SOURCE_BASEDIR_ICS # EXTRN_MDL_SYSBASEDIR_ICS +# FV3GFS_FILE_FMT_ICS # -# task_get_extrn_lbcs: -# LBC_SPEC_INTVL_HRS -# EXTRN_MDL_FILES_LBCS -# FV3GFS_FILE_FMT_LBCS -# EXTRN_MDL_SOURCE_BASEDIR_LBCS -# EXTRN_MDL_SYSBASEDIR_LBCS +# global: +# DO_ENSEMBLE +# NUM_ENS_MEMBERS # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index 244ab3d96b..84c6ebc038 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -8,11 +8,11 @@ # # Run-time environment variables: # +# FHR # GLOBAL_VAR_DEFNS_FP # OBS_DIR -# PDY -# FHR # OBTYPE +# PDY # VAR # # Experiment variables diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 05a827e3b7..6092e21da6 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -42,26 +42,31 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # DATA +# GLOBAL_VAR_DEFNS_FP # REDIRECT_OUT_ERR # # Experiment variables # # user: -# USHdir # EXECdir +# USHdir # +# platform: +# PRE_TASK_CMDS +# RUN_CMD_SERIAL + # workflow: -# VERBOSE -# GRID_GEN_METHOD -# RGNL_GRID_NML_FN # DOT_OR_USCORE +# GRID_GEN_METHOD # RES_IN_FIXLAM_FILENAMES +# RGNL_GRID_NML_FN +# VERBOSE # -# platform: -# PRE_TASK_CMDS -# RUN_CMD_SERIAL +# task_make_grid: +# GFDLgrid_NUM_CELLS +# GFDLgrid_USE_NUM_CELLS_IN_FILENAMES +# GRID_DIR # # constants: # NH3 @@ -69,27 +74,22 @@ # TILE_RGNL # # grid_params: -# ISTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG +# DEL_ANGLE_X_SG +# DEL_ANGLE_Y_SG +# GFDLgrid_REFINE_RATIO # IEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG -# JSTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG +# ISTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG # JEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG -# STRETCH_FAC -# LON_CTR +# JSTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG # LAT_CTR -# GFDLgrid_REFINE_RATIO -# DEL_ANGLE_X_SG -# DEL_ANGLE_Y_SG +# LON_CTR # NEG_NX_OF_DOM_WITH_WIDE_HALO # NEG_NY_OF_DOM_WITH_WIDE_HALO -# PAZI # NHW # NX # NY -# -# task_make_grid: -# GFDLgrid_USE_NUM_CELLS_IN_FILENAMES -# GFDLgrid_NUM_CELLS -# GRID_DIR +# PAZI +# STRETCH_FAC # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 79b59fc56c..58f0d9af05 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -8,73 +8,72 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # COMIN -# SLASH_ENSMEM_SUBDIR +# COMOUT +# COMROOT # DATA # DATAROOT -# NET -# COMIN -# COMROOT -# COMOUT # DATA_SHARE +# EXTRN_MDL_CDATE +# GLOBAL_VAR_DEFNS_FP # INPUT_DATA +# NET # PDY -# EXTRN_MDL_CDATE # REDIRECT_OUT_ERR +# SLASH_ENSMEM_SUBDIR # # Experiment variables # # user: -# USHdir -# RUN_ENVIR -# MACHINE # EXECdir +# MACHINE # PARMdir +# RUN_ENVIR +# USHdir +# +# platform: +# FIXgsm +# PRE_TASK_CMDS +# RUN_CMD_UTILS # # workflow: -# VERBOSE -# EXTRN_MDL_VAR_DEFNS_FN # CCPP_PHYS_SUITE +# COLDSTART +# CRES +# DATE_FIRST_CYCL +# DOT_OR_USCORE +# EXTRN_MDL_VAR_DEFNS_FN +# FIXlam # SDF_USES_RUC_LSM # SDF_USES_THOMPSON_MP # THOMPSON_MP_CLIMO_FP -# FIXlam -# CRES -# DOT_OR_USCORE -# COLDSTART -# DATE_FIRST_CYCL -# -# constants: -# NH0 -# NH4 -# TILE_RGNL -# -# platform: -# PRE_TASK_CMDS -# RUN_CMD_UTILS -# FIXgsm -# -# global: -# HALO_BLEND -# -# cpl_aqm_parm: -# CPL_AQM +# VERBOSE # # task_make_ics: +# FVCOM_DIR +# FVCOM_FILE +# FVCOM_WCSTART # KMP_AFFINITY_MAKE_ICS # OMP_NUM_THREADS_MAKE_ICS # OMP_STACKSIZE_MAKE_ICS -# VCOORD_FILE # USE_FVCOM -# FVCOM_WCSTART -# FVCOM_DIR -# FVCOM_FILE +# VCOORD_FILE # # task_get_extrn_ics: # EXTRN_MDL_NAME_ICS # FV3GFS_FILE_FMT_ICS # +# global: +# HALO_BLEND +# +# cpl_aqm_parm: +# CPL_AQM +# +# constants: +# NH0 +# NH4 +# TILE_RGNL +# #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 71ff826bf9..3043c797f5 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -8,52 +8,60 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # COMIN -# SLASH_ENSMEM_SUBDIR +# COMOUT +# COMROOT # DATA # DATAROOT -# NET -# COMIN -# COMROOT -# COMOUT # DATA_SHARE +# EXTRN_MDL_CDATE # INPUT_DATA +# GLOBAL_VAR_DEFNS_FP +# NET # PDY -# EXTRN_MDL_CDATE # REDIRECT_OUT_ERR +# SLASH_ENSMEM_SUBDIR # # Experiment variables # # user: -# USHdir -# RUN_ENVIR -# MACHINE # EXECdir +# MACHINE # PARMdir +# RUN_ENVIR +# USHdir +# +# platform: +# FIXgsm +# PRE_TASK_CMDS +# RUN_CMD_UTILS # # workflow: -# VERBOSE -# EXTRN_MDL_VAR_DEFNS_FN # CCPP_PHYS_SUITE +# COLDSTART +# CRES +# DATE_FIRST_CYCL +# DOT_OR_USCORE +# EXTRN_MDL_VAR_DEFNS_FN +# FIXlam # SDF_USES_RUC_LSM # SDF_USES_THOMPSON_MP # THOMPSON_MP_CLIMO_FP -# FIXlam -# CRES -# DOT_OR_USCORE -# COLDSTART -# DATE_FIRST_CYCL +# VERBOSE # -# constants: -# NH0 -# NH4 -# TILE_RGNL +# task_get_extrn_lbcs: +# EXTRN_MDL_NAME_LBCS +# FV3GFS_FILE_FMT_LBCS # -# platform: -# PRE_TASK_CMDS -# RUN_CMD_UTILS -# FIXgsm +# task_make_lbcs: +# FVCOM_DIR +# FVCOM_FILE +# FVCOM_WCSTART +# KMP_AFFINITY_MAKE_LBCS +# OMP_NUM_THREADS_MAKE_LBCS +# OMP_STACKSIZE_MAKE_LBCS +# USE_FVCOM +# VCOORD_FILE # # global: # HALO_BLEND @@ -61,19 +69,10 @@ # cpl_aqm_parm: # CPL_AQM # -# task_make_lbcs: -# KMP_AFFINITY_MAKE_LBCS -# OMP_NUM_THREADS_MAKE_LBCS -# OMP_STACKSIZE_MAKE_LBCS -# VCOORD_FILE -# USE_FVCOM -# FVCOM_WCSTART -# FVCOM_DIR -# FVCOM_FILE -# -# task_get_extrn_lbcs: -# EXTRN_MDL_NAME_LBCS -# FV3GFS_FILE_FMT_LBCS +# constants: +# NH0 +# NH4 +# TILE_RGNL # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 52e66519b3..1f138d4477 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -31,41 +31,30 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # DATA +# GLOBAL_VAR_DEFNS_FP # REDIRECT_OUT_ERR # # Experiment variables # # user: -# USHdir # EXECdir +# USHdir +# +# platform: +# FIXorg +# PRE_TASK_CMDS +# RUN_CMD_SERIAL # # workflow: -# VERBOSE -# PREEXISTING_DIR_METHOD +# CCPP_PHYS_SUITE # CRES # DOT_OR_USCORE -# FIXlam # FIXam -# CCPP_PHYS_SUITE +# FIXlam # GRID_GEN_METHOD -# -# grid_params: -# NHW -# STRETCH_FAC -# NX -# NY -# -# constants: -# TILE_RGNL -# NH0 -# NH4 -# -# platform: -# PRE_TASK_CMDS -# RUN_CMD_SERIAL -# FIXorg +# PREEXISTING_DIR_METHOD +# VERBOSE # # task_make_orog: # KMP_AFFINITY_MAKE_OROG @@ -78,6 +67,17 @@ # GFDLgrid_STRETCH_FAC # GFDLgrid_REFINE_RATIO # +# constants: +# NH0 +# NH4 +# TILE_RGNL +# +# grid_params: +# NHW +# NX +# NY +# STRETCH_FAC +# #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index 06f78c5039..a054ff3d2e 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -11,39 +11,39 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # DATA +# GLOBAL_VAR_DEFNS_FP # REDIRECT_OUT_ERR # # Experiment variables # # user: -# USHdir # EXECdir -# -# workflow: -# FIXlam -# CRES -# DOT_OR_USCORE -# VERBOSE -# -# constants: -# NH0 -# NH4 -# TILE_RGNL -# GTYPE +# USHdir # # platform: # FIXsfc # PRE_TASK_CMDS # RUN_CMD_UTILS # +# workflow: +# CRES +# DOT_OR_USCORE +# FIXlam +# VERBOSE +# # task_make_sfc_climo: # KMP_AFFINITY_MAKE_SFC_CLIMO # OMP_NUM_THREADS_MAKE_SFC_CLIMO # OMP_STACKSIZE_MAKE_SFC_CLIMO # SFC_CLIMO_DIR # +# constants: +# GTYPE +# NH0 +# NH4 +# TILE_RGNL +# #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index ed3a3bc416..4c4b4c3cb9 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -8,102 +8,102 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # CDATE -# DATA +# COMIN +# COMOUT # COMROOT +# DATA +# DBNROOT +# GLOBAL_VAR_DEFNS_FP +# INPUT_DATA # NET -# RUN # PDY -# SLASH_ENSMEM_SUBDIR -# COMIN -# INPUT_DATA # REDIRECT_OUT_ERR -# COMOUT +# RUN # SENDDBN -# DBNROOT +# SLASH_ENSMEM_SUBDIR # # Experiment variables # # user: -# USHdir +# MACHINE # PARMdir # RUN_ENVIR -# MACHINE +# USHdir +# +# platform: +# PRE_TASK_CMDS +# RUN_CMD_FCST # # workflow: -# VERBOSE -# DATE_FIRST_CYCL +# CCPP_PHYS_DIR +# CCPP_PHYS_SUITE # COLDSTART -# INCR_CYCL_FREQ -# FCST_LEN_CYCL -# EXPTDIR -# FIXlam -# FIXam # CRES +# DATA_TABLE_FN +# DATA_TABLE_FP +# DATE_FIRST_CYCL # DOT_OR_USCORE -# CCPP_PHYS_SUITE +# EXPTDIR +# FCST_LEN_CYCL # FCST_LEN_HRS -# SYMLINK_FIX_FILES -# FIXclim -# DATA_TABLE_FP -# DATA_TABLE_FN -# FIELD_TABLE_FN -# FIELD_TABLE_FP # FIELD_DICT_FP # FIELD_DICT_FN +# FIELD_TABLE_FN +# FIELD_TABLE_FP +# FIXam +# FIXclim +# FIXlam # FV3_NML_FN # FV3_NML_FP -# CCPP_PHYS_DIR # FV3_NML_STOCH_FP +# INCR_CYCL_FREQ # PREDEF_GRID_NAME +# SYMLINK_FIX_FILES +# VERBOSE # -# global: -# DO_SPP -# DO_SPPT -# DO_SHUM -# DO_SKEB -# DO_LSM_SPP -# DO_ENSEMBLE -# -# fixed_files: -# CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING -# -# constants: -# NH0 -# NH4 -# NH3 -# TILE_RGNL -# -# platform: -# PRE_TASK_CMDS -# RUN_CMD_FCST -# -# cpl_aqm_parm: -# CPL_AQM -# AQM_RC_PRODUCT_FN +# task_get_extrn_lbcs: +# LBC_SPEC_INTVL_HRS # # task_run_fcst: +# DO_FCST_RESTART +# DT_ATMOS +# FV3_EXEC_FP # KMP_AFFINITY_RUN_FCST # OMP_NUM_THREADS_RUN_FCST # OMP_STACKSIZE_RUN_FCST # PRINT_ESMF +# RESTART_INTERVAL # USE_MERRA_CLIMO # WRITE_DOPOST -# DO_FCST_RESTART -# RESTART_INTERVAL -# DT_ATMOS -# FV3_EXEC_FP -# -# task_get_extrn_lbcs: -# LBC_SPEC_INTVL_HRS # # task_run_post: -# USE_CUSTOM_POST_CONFIG_FILE # CUSTOM_POST_CONFIG_FP -# SUB_HOURLY_POST # DT_SUBHOURLY_POST_MNTS # POST_OUTPUT_DOMAIN_NAME +# SUB_HOURLY_POST +# USE_CUSTOM_POST_CONFIG_FILE +# +# global: +# DO_ENSEMBLE +# DO_LSM_SPP +# DO_SHUM +# DO_SKEB +# DO_SPP +# DO_SPPT +# +# cpl_aqm_parm: +# AQM_RC_PRODUCT_FN +# CPL_AQM +# +# constants: +# NH0 +# NH3 +# NH4 +# TILE_RGNL +# +# fixed_files: +# CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index af329e5032..b2c3caa6f8 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -9,7 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params task_run_vx_ensgrid_mean task_run_vx_enspoint_mean task_run_post) ; do + constants fixed_files grid_params \ + task_run_vx_ensgrid_mean task_run_vx_enspoint_mean task_run_post) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 620c0cc404..f3acde64f9 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -7,54 +7,53 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # CDATE +# COMOUT # DATA_FHR -# PDY +# DBNROOT # ENSMEM_INDX -# REDIRECT_OUT_ERR -# COMOUT +# GLOBAL_VAR_DEFNS_FP # NET +# PDY +# REDIRECT_OUT_ERR # SENDDBN -# DBNROOT -# COMOUT # # Experiment variables # # user: -# USHdir -# PARMdir # EXECdir -# RUN_ENVIR # MACHINE -# -# workflow: -# VERBOSE +# PARMdir +# RUN_ENVIR +# USHdir # # platform: # PRE_TASK_CMDS # RUN_CMD_POST # -# global: -# USE_CRTM -# CRTM_DIR -# -# cpl_aqm_parm: -# CPL_AQM +# workflow: +# VERBOSE # # task_run_post: +# CUSTOM_POST_CONFIG_FP # KMP_AFFINITY_RUN_POST # OMP_NUM_THREADS_RUN_POST # OMP_STACKSIZE_RUN_POST -# USE_CUSTOM_POST_CONFIG_FILE -# CUSTOM_POST_CONFIG_FP -# SUB_HOURLY_POST # NUMX # POST_OUTPUT_DOMAIN_NAME +# SUB_HOURLY_POST +# USE_CUSTOM_POST_CONFIG_FILE # # task_run_fcst: # DT_ATMOS # +# global: +# CRTM_DIR +# USE_CRTM +# +# cpl_aqm_parm: +# CPL_AQM +# #----------------------------------------------------------------------- # From 8496c684a540208ef39a459abbb9cb70b4d927dd Mon Sep 17 00:00:00 2001 From: Christina Holt Date: Thu, 18 Apr 2024 12:29:56 -0600 Subject: [PATCH 07/34] Order jobs. --- jobs/JREGIONAL_CHECK_POST_OUTPUT | 13 ++++++---- jobs/JREGIONAL_GET_EXTRN_MDL_FILES | 41 +++++++++++++++--------------- jobs/JREGIONAL_GET_VERIF_OBS | 4 +-- jobs/JREGIONAL_INTEGRATION_TEST | 4 +-- jobs/JREGIONAL_MAKE_GRID | 2 +- jobs/JREGIONAL_MAKE_ICS | 6 ++--- jobs/JREGIONAL_MAKE_LBCS | 6 ++--- jobs/JREGIONAL_PLOT_ALLVARS | 19 +++++++------- jobs/JREGIONAL_RUN_FCST | 4 +-- jobs/JREGIONAL_RUN_POST | 17 +++++++------ jobs/JREGIONAL_RUN_PRDGEN | 6 ++--- 11 files changed, 62 insertions(+), 60 deletions(-) diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index b4053b0028..9af1fa8641 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -7,15 +7,18 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP -# ENSMEM_INDX # CDATE +# ENSMEM_INDX +# GLOBAL_VAR_DEFNS_FP # # Experiment variables # -# user.SCRIPTSdir -# user.USHdir -# workflow.EXPTDIR +# user: +# SCRIPTSdir +# USHdir +# +# workflow: +# EXPTDIR # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index 9e36b1f4c5..ead66f0203 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -9,43 +9,42 @@ # # Run-time environment variables: # +# CDATE +# COMIN +# cyc +# DATA +# EXTRN_MDL_STAGING_DIR # GLOBAL_VAR_DEFNS_FP # ICS_OR_LBCS # PDY -# cyc -# CDATE -# DATA -# COMIN -# EXTRN_MDL_STAGING_DIR (optional; default is DATA) # # Experiment variables # # user: # SCRIPTSdir # USHdir +# # workflow: # EXPTDIR # -# Depending on ICS_or_LBCS: +# task_get_extrn_lbcs: +# EXTRN_MDL_FILES_LBCS +# EXTRN_MDL_LBCS_OFFSET_HRS +# EXTRN_MDL_NAME_LBCS +# EXTRN_MDL_SOURCE_BASEDIR_LBCS +# EXTRN_MDL_SYSBASEDIR_LBCS +# FV3GFS_FILE_FMT_LBCS +# LBC_SPEC_INTVL_HRS +# USE_USER_STAGED_EXTRN_FILES # # task_get_extrn_ics: -# EXTRN_MDL_NAME_ICS +# EXTRN_MDL_FILES_ICS # EXTRN_MDL_ICS_OFFSET_HRS -# FV3GFS_FILE_FMT_ICS -# EXTRN_MDL_SYSBASEDIR_ICS -# USE_USER_STAGED_EXTRN_FILES +# EXTRN_MDL_NAME_ICS # EXTRN_MDL_SOURCE_BASEDIR_ICS -# EXTRN_MDL_FILES_ICS -# -# task_get_extrn_lbcs: -# EXTRN_MDL_NAME_LBCS -# LBC_SPEC_INTVL_HRS -# EXTRN_MDL_LBCS_OFFSET_HRS -# FV3GFS_FILE_FMT_LBCS -# EXTRN_MDL_SYSBASEDIR_LBCS +# EXTRN_MDL_SYSBASEDIR_ICS +# FV3GFS_FILE_FMT_ICS # USE_USER_STAGED_EXTRN_FILES -# EXTRN_MDL_SOURCE_BASEDIR_LBCS -# EXTRN_MDL_FILES_LBCS # #----------------------------------------------------------------------- # @@ -58,7 +57,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow task_get_extrn_ics task_get_extrn_lbcs) ; do +for sect in (user workflow task_get_extrn_lbcs task_get_extrn_ics) ; do --output-block ${sect}) ; do export $var done diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index 77cb1d66e9..cdb356405e 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -8,12 +8,12 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # CDATE +# GLOBAL_VAR_DEFNS_FP # # Experiment variables # -# user: +# user: # SCRIPTSdir # USHdir # diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index 005617f496..ec65a70bf3 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -16,13 +16,13 @@ # Experiment variables # # user: +# RUN_ENV # SCRIPTSdir # USHdir -# RUN_ENV +# # workflow: # FCST_LEN_HRS # -# #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index 3942d38681..e507ad0abf 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -14,8 +14,8 @@ # Experiment variables # # user: -# SCRIPTSdir # USHdir +# SCRIPTSdir # # workflow: # PREEXISTING_DIR_METHOD diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 252bdc2552..7d66b9b0d2 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -8,17 +8,17 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # COMIN -# SLASH_ENSMEM_SUBDIR # DATA +# GLOBAL_VAR_DEFNS_FP +# SLASH_ENSMEM_SUBDIR # # Experiment variables # # user: +# RUN_ENVIR # SCRIPTSdir # USHdir -# RUN_ENVIR # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index f49a78b490..e12d22489d 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -8,18 +8,18 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # CDATE # COMIN -# SLASH_ENSMEM_SUBDIR # DATA +# GLOBAL_VAR_DEFNS_FP +# SLASH_ENSMEM_SUBDIR # # Experiment variables # # user: +# RUN_ENVIR # SCRIPTSdir # USHdir -# RUN_ENVIR # #----------------------------------------------------------------------- # diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index 782c796b4f..e958aab385 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -7,33 +7,32 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP +# CDATE # COMOUT +# GLOBAL_VAR_DEFNS_FP # SLASH_ENSMEM_SUBDIR -# PDY -# CDATE # # Experiment variables # # user: +# RUN_ENVIR # SCRIPTSdir # USHdir -# RUN_ENVIR +# +# platform: +# FIXshp # # workflow: +# EXPT_SUBDIR # PREEXISTING_DIR_METHOD # PREDEF_GRID_NAME -# EXPT_SUBDIR -# -# platform: -# FIXshp # # task_plot_allvars: # COMOUT_REF -# PLOT_FCST_START +# PLOT_DOMAINS # PLOT_FCST_END # PLOT_FCST_INC -# PLOT_DOMAINS +# PLOT_FCST_START # # task_run_fcst: # FCST_LEN_HRS diff --git a/jobs/JREGIONAL_RUN_FCST b/jobs/JREGIONAL_RUN_FCST index 65dd5bac2d..88222662ab 100755 --- a/jobs/JREGIONAL_RUN_FCST +++ b/jobs/JREGIONAL_RUN_FCST @@ -7,10 +7,10 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP # CDATE -# DATA # COMIN +# DATA +# GLOBAL_VAR_DEFNS_FP # SLASH_ENSMEM_SUBDIR # # Experiment variables diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index e13e2e0f89..06636ec786 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -8,13 +8,14 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP -# DATA # COMIN -# SLASH_ENSMEM_SUBDIR # COMOUT +# cyc +# DATA # DATAROOT +# GLOBAL_VAR_DEFNS_FP # PDY +# SLASH_ENSMEM_SUBDIR # # Experiment variables # @@ -22,15 +23,15 @@ # SCRIPTSdir # USHdir # +# platform: +# WORKFLOW_MANAGER +# # workflow: -# RUN_ENVIR # DATE_FIRST_CYCL -# INCR_CYCL_FREQ # FCST_LEN_CYCL # FCST_LEN_HRS -# -# platform: -# WORKFLOW_MANAGER +# INCR_CYCL_FREQ +# RUN_ENVIR # # task_run_post: # SUB_HOURLY_POST diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 2e47901e97..6aac80b341 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -9,11 +9,11 @@ # # Run-time environment variables: # -# GLOBAL_VAR_DEFNS_FP -# DATA # COMIN -# SLASH_ENSMEM_SUBDIR # COMOUT +# DATA +# GLOBAL_VAR_DEFNS_FP +# SLASH_ENSMEM_SUBDIR # # Experiment variables # From e5b28da868099c7734e85aafc61451451006ea1f Mon Sep 17 00:00:00 2001 From: Christina Holt Date: Thu, 18 Apr 2024 14:35:59 -0600 Subject: [PATCH 08/34] Ordering for sourced files. --- jobs/JREGIONAL_PLOT_ALLVARS | 2 +- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 7 ++++++- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 7 ++++++- jobs/JREGIONAL_RUN_POST | 2 +- jobs/JREGIONAL_RUN_PRDGEN | 8 ++++---- scripts/exregional_check_post_output.sh | 2 +- scripts/exregional_get_extrn_mdl_files.sh | 4 ++-- scripts/exregional_make_grid.sh | 2 +- scripts/exregional_make_ics.sh | 2 +- scripts/exregional_make_lbcs.sh | 2 +- scripts/exregional_make_orog.sh | 2 +- scripts/exregional_make_sfc_climo.sh | 2 +- scripts/exregional_run_fcst.sh | 4 ++-- scripts/exregional_run_met_genensprod_or_ensemblestat.sh | 3 ++- scripts/exregional_run_met_gridstat_or_pointstat_vx.sh | 4 ++-- ...exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh | 4 ++-- ...exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh | 4 ++-- scripts/exregional_run_met_pb2nc_obs.sh | 4 ++-- scripts/exregional_run_met_pcpcombine.sh | 4 ++-- scripts/exregional_run_post.sh | 8 ++++---- scripts/exregional_run_prdgen.sh | 4 ++-- scripts/exsrw_aqm_ics.sh | 4 ++-- scripts/exsrw_aqm_lbcs.sh | 4 ++-- scripts/exsrw_bias_correction_o3.sh | 4 ++-- scripts/exsrw_bias_correction_pm25.sh | 4 ++-- scripts/exsrw_fire_emission.sh | 4 ++-- scripts/exsrw_nexus_emission.sh | 4 ++-- scripts/exsrw_nexus_gfs_sfc.sh | 4 ++-- scripts/exsrw_nexus_post_split.sh | 4 ++-- scripts/exsrw_point_source.sh | 4 ++-- scripts/exsrw_post_stat_o3.sh | 4 ++-- scripts/exsrw_post_stat_pm25.sh | 4 ++-- scripts/exsrw_pre_post_stat.sh | 4 ++-- 33 files changed, 70 insertions(+), 59 deletions(-) diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index e958aab385..7f27155efc 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -48,7 +48,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow platform task_plot_allvars task_run_fcst) ; do +for sect in (user platform workflow task_plot_allvars task_run_fcst) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index 164ae88c23..3d2cb4ae29 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -27,7 +27,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_gridstat" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index b3e949ff84..58c4e52e39 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -28,7 +28,12 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_vx_ensgrid_mean" ${GLOBAL_VAR_DEFNS_FP} +for sect in (user) ; do + for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) ; do + export $var + done +done . $USHdir/job_preamble.sh # #----------------------------------------------------------------------- diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index 06636ec786..eb7000ffce 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -47,7 +47,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow platform task_run_post task_run_fcst) ; do +for sect in (user platform workflow task_run_post) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 6aac80b341..dd8706e429 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -21,12 +21,12 @@ # SCRIPTSdir # USHdir # -# workflow: -# RUN_ENVIR -# # platform: # WORKFLOW_MANAGER # +# workflow: +# RUN_ENVIR +# # task_run_post: # SUB_HOURLY_POST # @@ -41,7 +41,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow platform task_run_post) ; do +for sect in (user platform workflow task_run_post) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index cf88ba2dbb..9b24a7a6c4 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -46,7 +46,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow global constants verification) ; do +for sect in (user workflow global verification constants) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 9a0006d33c..c6b65b1b17 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -71,8 +71,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow global platform task_get_extrn_ics \ - task_get_extrn_lbcs) ; do +for sect in (user platform workflow global task_get_extrn_lbcs \ + task_get_extrn_ics) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 6092e21da6..355c1902de 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -102,7 +102,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow platform constants grid_params task_make_grid) ; do +for sect in (user platform workflow constants grid_params task_make_grid) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 58f0d9af05..5f9493c7da 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -86,7 +86,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow constants platform global cpl_aqm_parm task_make_ics task_get_extrn_ics) ; do +for sect in (user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 3043c797f5..8011bbf1ee 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -87,7 +87,7 @@ # . $USHdir/source_util_funcs.sh source_config_for_task "task_make_lbcs|task_get_extrn_lbcs" ${GLOBAL_VAR_DEFNS_FP} -for sect in (user workflow constants platform global cpl_aqm_parm task_make_ics task_get_extrn_ics) ; do +for sect in (user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 1f138d4477..5f9a1bf941 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -89,7 +89,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow grid_params constants platform task_make_orog task_make_grid) ; do +for sect in (user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index a054ff3d2e..d07f7687eb 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -55,7 +55,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow constants platform task_make_sfc_climo) ; do +for sect in (user platform workflow constants task_make_sfc_climo) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 4c4b4c3cb9..cdd63781ff 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -116,8 +116,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow global fixed_files constants platform \ - cpl_aqm_parm task_run_fcst task_run_post task_get_extrn_lbcs) ; do +for sect in (user platform workflow global cpl_aqm_parm constants fixed_files \ + task_get_extrn_lbcs task_run_fcst task_run_post) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index bb559cfe19..9b19ef9f65 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -9,7 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params task_run_vx_ensgrid task_run_post) ; do + constants fixed_files grid_params \ + task_run_post task_run_vx_ensgrid) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index da92426df1..3af298af44 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -9,8 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_vx_gridstat task_run_vx_pointstat task_run_post) ; do + constants fixed_files grid_params \ + task_run_post task_run_vx_gridstat task_run_vx_pointstat) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index b2c3caa6f8..f7a6d71346 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -9,8 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_vx_ensgrid_mean task_run_vx_enspoint_mean task_run_post) ; do + constants fixed_files grid_params \ + task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index 867fbe50e7..a97599b9a0 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -9,8 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post) ; do + constants fixed_files grid_params \ + task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index 639b401d7a..19da97293e 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -9,8 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_met_pb2nc_obs) ; do + constants fixed_files grid_params \ + task_run_met_pb2nc_obs) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index ba78a6d08b..dcee8da5da 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -9,8 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_met_pcpcombine task_run_post ; do + constants fixed_files grid_params \ + task_run_met_pcpcombine task_run_post) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index f3acde64f9..bbd76325b6 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -34,6 +34,9 @@ # workflow: # VERBOSE # +# task_run_fcst: +# DT_ATMOS +# # task_run_post: # CUSTOM_POST_CONFIG_FP # KMP_AFFINITY_RUN_POST @@ -44,9 +47,6 @@ # SUB_HOURLY_POST # USE_CUSTOM_POST_CONFIG_FILE # -# task_run_fcst: -# DT_ATMOS -# # global: # CRTM_DIR # USE_CRTM @@ -67,7 +67,7 @@ . $USHdir/source_util_funcs.sh source_config_for_task "task_run_post" ${GLOBAL_VAR_DEFNS_FP} for sect in (user platform workflow global cpl_aqm_parm \ - task_run_post task_run_fcst ; do + task_run_fcst task_run_post ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 5725225988..300a628d98 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -9,8 +9,8 @@ # . $USHdir/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_prdgen task_run_post ; do + constants fixed_files grid_params \ + task_run_post task_run_prdgen) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index 13214b3611..ec32fafa49 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_aqm_ics ; do + constants fixed_files grid_params \ + task_aqm_ics) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 6fa1c85fc2..aaa172cfbe 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_get_extrn_lbcs task_make_orog task_make_lbcs task_aqm_lbcs ; do + constants fixed_files grid_params \ + task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index 6f3ad59e40..caaea83aea 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_bias_correction_o3 ) ; do + constants fixed_files grid_params \ + task_bias_correction_o3 ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index ab04bab207..691cabdcd6 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_bias_correction_pm25 ) ; do + constants fixed_files grid_params \ + task_bias_correction_pm25 ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index 8d43300a70..49ee6f0e31 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_fire_emission ) ; do + constants fixed_files grid_params \ + task_fire_emission ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index 1295563f81..15ea27c485 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_nexus_emission ) ; do + constants fixed_files grid_params \ + task_nexus_emission ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 1eceef27ad..47d3d78af2 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_nexus_gfs_sfc ) ; do + constants fixed_files grid_params \ + task_nexus_gfs_sfc ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 2629af4563..5337d43f46 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_nexus_post_split ) ; do + constants fixed_files grid_params \ + task_nexus_post_split ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index 1bdbc95d49..6d6b718949 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_fcst task_point_source ) ; do + constants fixed_files grid_params \ + task_point_source task_run_fcst) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index cea3ca1bc7..a812194fc0 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_post task_post_stat_o3 ) ; do + constants fixed_files grid_params \ + task_run_post task_post_stat_o3 ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index ebc501a7d1..d3322cc6fc 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_run_post task_post_stat_pm25 ) ; do + constants fixed_files grid_params \ + task_run_post task_post_stat_pm25 ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index 58cac92d8b..c2fef98b8e 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -9,8 +9,8 @@ # . ${USHsrw}/source_util_funcs.sh for sect in (user platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_pre_post task_run_post ) ; do + constants fixed_files grid_params \ + task_pre_post task_run_post ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var From 16da1ef4d1ac995b324e03ffaf074846e6a3648d Mon Sep 17 00:00:00 2001 From: Christina Holt Date: Thu, 18 Apr 2024 14:47:15 -0600 Subject: [PATCH 09/34] Cleaning up old functionality. --- jobs/JREGIONAL_INTEGRATION_TEST | 12 -------- scripts/exregional_make_lbcs.sh | 1 - scripts/exregional_run_post.sh | 1 - ush/bash_utils/source_config.sh | 53 --------------------------------- ush/load_modules_run_task.sh | 9 ++++-- ush/source_util_funcs.sh | 9 ------ 6 files changed, 6 insertions(+), 79 deletions(-) delete mode 100644 ush/bash_utils/source_config.sh diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index ec65a70bf3..d0dc11f2b8 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -42,18 +42,6 @@ for sect in (user workflow) ; do done . $USHdir/job_preamble.sh - - -# -#----------------------------------------------------------------------- -# -# Source the variable definitions file and the bash utility functions. -# -#----------------------------------------------------------------------- -# -. $USHdir/source_util_funcs.sh -source_config_for_task "task_integration_test|task_run_fcst" ${GLOBAL_VAR_DEFNS_FP} -. $USHdir/job_preamble.sh # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 8011bbf1ee..eae8e8cba8 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -86,7 +86,6 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_make_lbcs|task_get_extrn_lbcs" ${GLOBAL_VAR_DEFNS_FP} for sect in (user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index bbd76325b6..2a1b1cf4e0 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -65,7 +65,6 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -source_config_for_task "task_run_post" ${GLOBAL_VAR_DEFNS_FP} for sect in (user platform workflow global cpl_aqm_parm \ task_run_fcst task_run_post ) ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ diff --git a/ush/bash_utils/source_config.sh b/ush/bash_utils/source_config.sh deleted file mode 100644 index df5a79a0df..0000000000 --- a/ush/bash_utils/source_config.sh +++ /dev/null @@ -1,53 +0,0 @@ -# -#----------------------------------------------------------------------- -# This file defines function that sources a config file (yaml/json etc) -# into the calling shell script -#----------------------------------------------------------------------- -# - -function config_to_str() { - $USHdir/config_utils.py -o $1 -c $2 "${@:3}" -} - -# -#----------------------------------------------------------------------- -# Define functions for different file formats -#----------------------------------------------------------------------- -# -function config_to_shell_str() { - config_to_str shell "$@" -} -function config_to_ini_str() { - config_to_str ini "$@" -} -function config_to_yaml_str() { - config_to_str yaml "$@" -} -function config_to_json_str() { - config_to_str json "$@" -} -function config_to_xml_str() { - config_to_str xml "$@" -} - -# -#----------------------------------------------------------------------- -# Source contents of a config file to shell script -#----------------------------------------------------------------------- -# -function source_config() { - - source <( config_to_shell_str "$@" ) - -} -# -#----------------------------------------------------------------------- -# Source partial contents of a config file to shell script. -# Only those variables needed by the task are sourced -#----------------------------------------------------------------------- -# -function source_config_for_task() { - - source <( config_to_shell_str "${@:2}" -k "(^(?!task_)|$1).*" ) - -} diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 64ede6393e..2f7a47b5e9 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -12,9 +12,12 @@ # # And uses these variables from the GLOBAL_VAR_DEFNS_FP file # -# platform.BUILD_MOD_FN -# platform.RUN_VER_FN -# workflow.VERBOSE +# platform: +# BUILD_MOD_FN +# RUN_VER_FN +# +# workflow: +# VERBOSE # #----------------------------------------------------------------------- # diff --git a/ush/source_util_funcs.sh b/ush/source_util_funcs.sh index fa097de34d..f4aedc6d41 100644 --- a/ush/source_util_funcs.sh +++ b/ush/source_util_funcs.sh @@ -230,15 +230,6 @@ function source_util_funcs() { #----------------------------------------------------------------------- # . ${bashutils_dir}/eval_METplus_timestr_tmpl.sh -# -#----------------------------------------------------------------------- -# -# Source the file containing the function that sources config files. -# -#----------------------------------------------------------------------- -# - . ${bashutils_dir}/source_config.sh - } source_util_funcs From 444f1f0f76e282fabcd39a0fdba204b695bacee9 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Thu, 18 Apr 2024 23:45:42 +0000 Subject: [PATCH 10/34] WIP --- jobs/JREGIONAL_CHECK_POST_OUTPUT | 2 +- jobs/JREGIONAL_GET_EXTRN_MDL_FILES | 2 +- jobs/JREGIONAL_GET_VERIF_OBS | 2 +- jobs/JREGIONAL_INTEGRATION_TEST | 2 +- jobs/JREGIONAL_MAKE_GRID | 2 +- jobs/JREGIONAL_MAKE_ICS | 2 +- jobs/JREGIONAL_MAKE_LBCS | 2 +- jobs/JREGIONAL_MAKE_OROG | 2 +- jobs/JREGIONAL_MAKE_SFC_CLIMO | 2 +- jobs/JREGIONAL_PLOT_ALLVARS | 2 +- jobs/JREGIONAL_RUN_FCST | 2 +- jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT | 2 +- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 2 +- ...EGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 2 +- ...EGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB | 2 +- jobs/JREGIONAL_RUN_MET_PB2NC_OBS | 2 +- jobs/JREGIONAL_RUN_MET_PCPCOMBINE | 2 +- jobs/JREGIONAL_RUN_POST | 2 +- jobs/JREGIONAL_RUN_PRDGEN | 2 +- jobs/JSRW_AQM_ICS | 2 +- jobs/JSRW_AQM_LBCS | 4 ++-- jobs/JSRW_BIAS_CORRECTION_O3 | 4 ++-- jobs/JSRW_BIAS_CORRECTION_PM25 | 4 ++-- jobs/JSRW_FIRE_EMISSION | 2 +- jobs/JSRW_NEXUS_EMISSION | 2 +- jobs/JSRW_NEXUS_GFS_SFC | 2 +- jobs/JSRW_NEXUS_POST_SPLIT | 2 +- jobs/JSRW_POINT_SOURCE | 4 ++-- jobs/JSRW_POST_STAT_O3 | 4 ++-- jobs/JSRW_POST_STAT_PM25 | 4 ++-- jobs/JSRW_PRE_POST_STAT | 2 +- scripts/exregional_check_post_output.sh | 10 +++++----- scripts/exregional_get_extrn_mdl_files.sh | 4 ++-- scripts/exregional_get_verif_obs.sh | 2 +- scripts/exregional_make_grid.sh | 2 +- scripts/exregional_make_ics.sh | 2 +- scripts/exregional_make_lbcs.sh | 2 +- scripts/exregional_make_orog.sh | 2 +- scripts/exregional_make_sfc_climo.sh | 2 +- scripts/exregional_run_fcst.sh | 4 ++-- ...exregional_run_met_genensprod_or_ensemblestat.sh | 4 ++-- .../exregional_run_met_gridstat_or_pointstat_vx.sh | 4 ++-- ...onal_run_met_gridstat_or_pointstat_vx_ensmean.sh | 4 ++-- ...onal_run_met_gridstat_or_pointstat_vx_ensprob.sh | 4 ++-- scripts/exregional_run_met_pb2nc_obs.sh | 4 ++-- scripts/exregional_run_met_pcpcombine.sh | 4 ++-- scripts/exregional_run_post.sh | 4 ++-- scripts/exregional_run_prdgen.sh | 4 ++-- scripts/exsrw_aqm_ics.sh | 4 ++-- scripts/exsrw_aqm_lbcs.sh | 4 ++-- scripts/exsrw_bias_correction_o3.sh | 4 ++-- scripts/exsrw_bias_correction_pm25.sh | 4 ++-- scripts/exsrw_fire_emission.sh | 4 ++-- scripts/exsrw_nexus_emission.sh | 4 ++-- scripts/exsrw_nexus_gfs_sfc.sh | 4 ++-- scripts/exsrw_nexus_post_split.sh | 4 ++-- scripts/exsrw_point_source.sh | 4 ++-- scripts/exsrw_post_stat_o3.sh | 4 ++-- scripts/exsrw_post_stat_pm25.sh | 4 ++-- scripts/exsrw_pre_post_stat.sh | 4 ++-- ush/load_modules_run_task.sh | 13 +++++++------ ush/machine/hera.yaml | 4 ++-- ush/setup.py | 6 +++--- 63 files changed, 104 insertions(+), 103 deletions(-) diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index 9af1fa8641..83dff8e559 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -31,7 +31,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow) ; do +for sect in user workflow ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index ead66f0203..2032078cd0 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -57,7 +57,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow task_get_extrn_lbcs task_get_extrn_ics) ; do +for sect in user workflow task_get_extrn_lbcs task_get_extrn_ics ; do --output-block ${sect}) ; do export $var done diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index cdb356405e..7bf142f3fe 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index d0dc11f2b8..72ec09a748 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -34,7 +34,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow) ; do +for sect in user workflow ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index e507ad0abf..1476249a3f 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -34,7 +34,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow task_make_grid) ; do +for sect in user workflow task_make_grid ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 7d66b9b0d2..79c13bec96 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -31,7 +31,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index e12d22489d..b3e4c83135 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -32,7 +32,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index 04665ce4d9..0ba7972f02 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -30,7 +30,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user task_make_orog) ; do +for sect in user task_make_orog ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_MAKE_SFC_CLIMO b/jobs/JREGIONAL_MAKE_SFC_CLIMO index e0596d3300..74f29f118c 100755 --- a/jobs/JREGIONAL_MAKE_SFC_CLIMO +++ b/jobs/JREGIONAL_MAKE_SFC_CLIMO @@ -33,7 +33,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow task_make_sfc_climo) ; do +for sect in user workflow task_make_sfc_climo ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index 7f27155efc..f8f8d5ec29 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -48,7 +48,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow task_plot_allvars task_run_fcst) ; do +for sect in user platform workflow task_plot_allvars task_run_fcst ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_FCST b/jobs/JREGIONAL_RUN_FCST index 88222662ab..bad15aef28 100755 --- a/jobs/JREGIONAL_RUN_FCST +++ b/jobs/JREGIONAL_RUN_FCST @@ -33,7 +33,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow) ; do +for sect in user workflow ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT index 0df81d72f3..842513a09e 100755 --- a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT +++ b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT @@ -27,7 +27,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index 3d2cb4ae29..b32a851068 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -27,7 +27,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index 58c4e52e39..87efa43f23 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB index 5d1e360545..bab593d256 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS index 362b36cc03..ed10112581 100755 --- a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS +++ b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE index 4dd1ec9cc1..e71314a6f3 100755 --- a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE +++ b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE @@ -29,7 +29,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index eb7000ffce..89d16864d7 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -47,7 +47,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow task_run_post) ; do +for sect in user platform workflow task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index dd8706e429..ccc610d340 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -41,7 +41,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow task_run_post) ; do +for sect in user platform workflow task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index 62929f758e..a4dc8885aa 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -31,7 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index 09ac806518..194cda10dc 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -31,8 +31,8 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in ( user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ - task_make_orog task_make_lbcs task_aqm_lbcs ) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ + task_make_orog task_make_lbcs task_aqm_lbcs ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index e58c3266c0..55851ec8b4 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -30,8 +30,8 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ - task_bias_correction_o3) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ + task_bias_correction_o3 ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index ff84cdaa59..6694c04ff5 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -30,8 +30,8 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ - task_bias_correction_pm25) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ + task_bias_correction_pm25 ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index b99ea5bbf5..92abb92704 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index 4f6824e695..99fc59025c 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index b688cc9980..cbe6551ec9 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index 4463217b42..3df819870e 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index 97f32506db..e07bd951fa 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -30,8 +30,8 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ - task_run_fcst) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ + task_run_fcst ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index f15988c0b8..f049394636 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -30,8 +30,8 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ - task_run_post) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ + task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index 1a9c2fa9e8..7c71450e62 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -30,8 +30,8 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ - task_run_post) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ + task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 3e18405ed0..99b9c96a02 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat) ; do +for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index 9b24a7a6c4..9fc7c9ecb1 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -46,11 +46,11 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user workflow global verification constants) ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done +for sect in user workflow global verification constants ; do + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index c6b65b1b17..dd4949d9ee 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -71,8 +71,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow global task_get_extrn_lbcs \ - task_get_extrn_ics) ; do +for sect in user platform workflow global task_get_extrn_lbcs \ + task_get_extrn_ics ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index 84c6ebc038..b74bb8fdd7 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -31,7 +31,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user) ; do +for sect in user ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 355c1902de..14cfe0cecb 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -102,7 +102,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow constants grid_params task_make_grid) ; do +for sect in user platform workflow constants grid_params task_make_grid ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 5f9493c7da..8510ac7ad6 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -86,7 +86,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics) ; do +for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index eae8e8cba8..7b98a2c666 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -86,7 +86,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics) ; do +for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 5f9a1bf941..b6298023cf 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -89,7 +89,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid) ; do +for sect in user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index d07f7687eb..db87b5a2aa 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -55,7 +55,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow constants task_make_sfc_climo) ; do +for sect in user platform workflow constants task_make_sfc_climo ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index cdd63781ff..f373424597 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -116,8 +116,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow global cpl_aqm_parm constants fixed_files \ - task_get_extrn_lbcs task_run_fcst task_run_post) ; do +for sect in user platform workflow global cpl_aqm_parm constants fixed_files \ + task_get_extrn_lbcs task_run_fcst task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index 9b19ef9f65..806a126acb 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_run_vx_ensgrid) ; do + task_run_post task_run_vx_ensgrid ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 3af298af44..70ca70a1fb 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_run_vx_gridstat task_run_vx_pointstat) ; do + task_run_post task_run_vx_gridstat task_run_vx_pointstat ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index f7a6d71346..36ac59e9c9 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean) ; do + task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index a97599b9a0..90736756e7 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post) ; do + task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index 19da97293e..72249d8bf8 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_met_pb2nc_obs) ; do + task_run_met_pb2nc_obs ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index dcee8da5da..2ef11c7359 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_met_pcpcombine task_run_post) ; do + task_run_met_pcpcombine task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 2a1b1cf4e0..4911afb4aa 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -65,8 +65,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow global cpl_aqm_parm \ - task_run_fcst task_run_post ) ; do +for sect in user platform workflow global cpl_aqm_parm \ + task_run_fcst task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 300a628d98..53be3ce899 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_run_prdgen) ; do + task_run_post task_run_prdgen ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index ec32fafa49..553c9905a1 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_aqm_ics) ; do + task_aqm_ics ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index aaa172cfbe..9818157368 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog) ; do + task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index caaea83aea..70d1b3e528 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_bias_correction_o3 ) ; do + task_bias_correction_o3 ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index 691cabdcd6..0b59314445 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_bias_correction_pm25 ) ; do + task_bias_correction_pm25 ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index 49ee6f0e31..da04c9a78f 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_fire_emission ) ; do + task_fire_emission ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index 15ea27c485..d34d5b3995 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_nexus_emission ) ; do + task_nexus_emission ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 47d3d78af2..f719482538 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_nexus_gfs_sfc ) ; do + task_nexus_gfs_sfc ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 5337d43f46..24fc484dd7 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_nexus_post_split ) ; do + task_nexus_post_split ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index 6d6b718949..65bcdf96c4 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_point_source task_run_fcst) ; do + task_point_source task_run_fcst ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index a812194fc0..d56d39df39 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_post_stat_o3 ) ; do + task_run_post task_post_stat_o3 ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index d3322cc6fc..0921f35794 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_post_stat_pm25 ) ; do + task_run_post task_post_stat_pm25 ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index c2fef98b8e..6051cf9609 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -8,9 +8,9 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in (user platform workflow nco global verification cpl_aqm_parm \ +for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_pre_post task_run_post ) ; do + task_pre_post task_run_post ; do for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) ; do export $var diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 2f7a47b5e9..39f902e7f0 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -103,7 +103,7 @@ else export pid=${pid:-$$} fi export jobid=${job}.${pid} -set -u +#set -u # #----------------------------------------------------------------------- # @@ -140,12 +140,13 @@ if [ -n "${SRW_ENV:-}" ] ; then set -u fi +set -x +u # Source the necessary blocks of the experiment config YAML -for sect in (platform workflow) ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect} ) ; do - export $var - done +for sect in platform ; do + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done if [ "${machine}" != "wcoss2" ]; then diff --git a/ush/machine/hera.yaml b/ush/machine/hera.yaml index 4d836af317..80fbb8fc98 100644 --- a/ush/machine/hera.yaml +++ b/ush/machine/hera.yaml @@ -20,8 +20,8 @@ platform: RUN_CMD_UTILS: srun --export=ALL RUN_CMD_NEXUS: srun -n ${nprocs} --export=ALL RUN_CMD_AQMLBC: srun --export=ALL -n ${numts} - SCHED_NATIVE_CMD: --export=NONE - SCHED_NATIVE_CMD_HPSS: -n 1 --export=NONE + SCHED_NATIVE_CMD: "--export=NONE" + SCHED_NATIVE_CMD_HPSS: "-n 1 --export=NONE" PRE_TASK_CMDS: '{ ulimit -s unlimited; ulimit -a; }' TEST_EXTRN_MDL_SOURCE_BASEDIR: /scratch1/NCEPDEV/nems/role.epic/UFS_SRW_data/develop/input_model_data TEST_AQM_INPUT_BASEDIR: /scratch1/NCEPDEV/nems/role.epic/UFS_SRW_data/develop/aqm_data diff --git a/ush/setup.py b/ush/setup.py index 2b297b647f..cd85bdf6ed 100644 --- a/ush/setup.py +++ b/ush/setup.py @@ -10,6 +10,7 @@ from textwrap import dedent import yaml +from uwtools.api.config import get_yaml_config from python_utils import ( log_info, @@ -1499,10 +1500,9 @@ def dict_find(user_dict, substring): yaml.Dumper.ignore_aliases = lambda *args : True yaml.dump(expt_config.get("rocoto"), f, sort_keys=False) - var_defns_cfg = copy.deepcopy(expt_config) + var_defns_cfg = get_yaml_config(config=expt_config) del var_defns_cfg["rocoto"] - with open(global_var_defns_fp, "a") as f: - f.write(cfg_to_yaml_str(var_defns_cfg)) + var_defns_cfg.dump(global_var_defns_fp) # From a12f6fb92994b83875981314229b36b25b383183 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Fri, 19 Apr 2024 00:10:10 +0000 Subject: [PATCH 11/34] WIP --- scripts/exregional_get_extrn_mdl_files.sh | 6 +++--- scripts/exregional_get_verif_obs.sh | 6 +++--- scripts/exregional_make_grid.sh | 6 +++--- scripts/exregional_make_ics.sh | 6 +++--- scripts/exregional_make_lbcs.sh | 6 +++--- scripts/exregional_make_orog.sh | 6 +++--- scripts/exregional_make_sfc_climo.sh | 6 +++--- scripts/exregional_run_fcst.sh | 6 +++--- scripts/exregional_run_met_genensprod_or_ensemblestat.sh | 6 +++--- scripts/exregional_run_met_gridstat_or_pointstat_vx.sh | 6 +++--- .../exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh | 6 +++--- .../exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh | 6 +++--- scripts/exregional_run_met_pb2nc_obs.sh | 6 +++--- scripts/exregional_run_met_pcpcombine.sh | 6 +++--- scripts/exregional_run_post.sh | 6 +++--- scripts/exregional_run_prdgen.sh | 6 +++--- scripts/exsrw_aqm_ics.sh | 6 +++--- scripts/exsrw_aqm_lbcs.sh | 6 +++--- scripts/exsrw_bias_correction_o3.sh | 6 +++--- scripts/exsrw_bias_correction_pm25.sh | 6 +++--- scripts/exsrw_fire_emission.sh | 6 +++--- scripts/exsrw_nexus_emission.sh | 6 +++--- scripts/exsrw_nexus_gfs_sfc.sh | 6 +++--- scripts/exsrw_nexus_post_split.sh | 6 +++--- scripts/exsrw_point_source.sh | 6 +++--- scripts/exsrw_post_stat_o3.sh | 6 +++--- scripts/exsrw_post_stat_pm25.sh | 6 +++--- scripts/exsrw_pre_post_stat.sh | 6 +++--- 28 files changed, 84 insertions(+), 84 deletions(-) diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index dd4949d9ee..74e68a3d0f 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -73,9 +73,9 @@ . $USHdir/source_util_funcs.sh for sect in user platform workflow global task_get_extrn_lbcs \ task_get_extrn_ics ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index b74bb8fdd7..d58bae085d 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -32,9 +32,9 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 14cfe0cecb..b782405e67 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -103,9 +103,9 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow constants grid_params task_make_grid ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 8510ac7ad6..69c6aa5139 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -87,9 +87,9 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 7b98a2c666..478c005e7b 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -87,9 +87,9 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index b6298023cf..829095fc9e 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -90,9 +90,9 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index db87b5a2aa..ccb0c5ccf4 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -56,9 +56,9 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow constants task_make_sfc_climo ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index f373424597..4d2cd43e43 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -118,9 +118,9 @@ . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm constants fixed_files \ task_get_extrn_lbcs task_run_fcst task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index 806a126acb..8caa72cb24 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_ensgrid ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 70ca70a1fb..92d566b80f 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_gridstat task_run_vx_pointstat ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index 36ac59e9c9..52737eeabf 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index 90736756e7..28ec0d68dc 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index 72249d8bf8..a504f6c5c1 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_met_pb2nc_obs ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index 2ef11c7359..8f9ec9f980 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_met_pcpcombine task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 4911afb4aa..da67790c52 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -67,9 +67,9 @@ . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm \ task_run_fcst task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 53be3ce899..9b70d0189d 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_prdgen ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index 553c9905a1..f9162a7556 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_aqm_ics ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 9818157368..7eea11732f 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index 70d1b3e528..e70599e120 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_bias_correction_o3 ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index 0b59314445..c487a1cd16 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_bias_correction_pm25 ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index da04c9a78f..0f21b6342c 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_fire_emission ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index d34d5b3995..aa0ba45b9b 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_emission ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index f719482538..eee75f78f6 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_gfs_sfc ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 24fc484dd7..16b74a9c55 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_post_split ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index 65bcdf96c4..fbaf796236 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_point_source task_run_fcst ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index d56d39df39..ce8b26371e 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_post_stat_o3 ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index 0921f35794..8ba4cdc736 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_post_stat_pm25 ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index 6051cf9609..d42d9c74e9 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -11,9 +11,9 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_pre_post task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ done done # From 4bec6b72517fd13dc5fbc75fa8b87eeb9ec86a27 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Fri, 19 Apr 2024 00:12:14 +0000 Subject: [PATCH 12/34] WIP --- scripts/exregional_get_extrn_mdl_files.sh | 2 +- scripts/exregional_get_verif_obs.sh | 2 +- scripts/exregional_make_grid.sh | 2 +- scripts/exregional_make_ics.sh | 2 +- scripts/exregional_make_lbcs.sh | 2 +- scripts/exregional_make_orog.sh | 2 +- scripts/exregional_make_sfc_climo.sh | 2 +- scripts/exregional_run_fcst.sh | 2 +- scripts/exregional_run_met_genensprod_or_ensemblestat.sh | 2 +- scripts/exregional_run_met_gridstat_or_pointstat_vx.sh | 2 +- scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh | 2 +- scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh | 2 +- scripts/exregional_run_met_pb2nc_obs.sh | 2 +- scripts/exregional_run_met_pcpcombine.sh | 2 +- scripts/exregional_run_post.sh | 2 +- scripts/exregional_run_prdgen.sh | 2 +- scripts/exsrw_aqm_ics.sh | 2 +- scripts/exsrw_aqm_lbcs.sh | 2 +- scripts/exsrw_bias_correction_o3.sh | 2 +- scripts/exsrw_bias_correction_pm25.sh | 2 +- scripts/exsrw_fire_emission.sh | 2 +- scripts/exsrw_nexus_emission.sh | 2 +- scripts/exsrw_nexus_gfs_sfc.sh | 2 +- scripts/exsrw_nexus_post_split.sh | 2 +- scripts/exsrw_point_source.sh | 2 +- scripts/exsrw_post_stat_o3.sh | 2 +- scripts/exsrw_post_stat_pm25.sh | 2 +- scripts/exsrw_pre_post_stat.sh | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 74e68a3d0f..2cdf080f05 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -76,7 +76,7 @@ for sect in user platform workflow global task_get_extrn_lbcs \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index d58bae085d..d2a1f4a238 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -35,7 +35,7 @@ for sect in user ; do while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index b782405e67..e32c65e6a9 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -106,7 +106,7 @@ for sect in user platform workflow constants grid_params task_make_grid ; do while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 69c6aa5139..be3b24bf28 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -90,7 +90,7 @@ for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 478c005e7b..eb59b2c2fa 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -90,7 +90,7 @@ for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 829095fc9e..847a731503 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -93,7 +93,7 @@ for sect in user platform workflow constants grid_params task_make_grid task_mak while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index ccb0c5ccf4..a828ab0f3d 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -59,7 +59,7 @@ for sect in user platform workflow constants task_make_sfc_climo ; do while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 4d2cd43e43..90ee68a682 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -121,7 +121,7 @@ for sect in user platform workflow global cpl_aqm_parm constants fixed_files \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index 8caa72cb24..a7e93ace05 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 92d566b80f..74fb2f895b 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index 52737eeabf..1329ba7d9c 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index 28ec0d68dc..dd1b768b9f 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index a504f6c5c1..c9af2e8af9 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index 8f9ec9f980..22c2edd2c7 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index da67790c52..c667dad6cc 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -70,7 +70,7 @@ for sect in user platform workflow global cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 9b70d0189d..0d05cd9fbe 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index f9162a7556..68c1eced5c 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 7eea11732f..780709ab33 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index e70599e120..49e8928264 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index c487a1cd16..28d69ad6f9 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index 0f21b6342c..3947a59d84 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index aa0ba45b9b..ecb9c4e8d2 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index eee75f78f6..4547248207 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 16b74a9c55..35abb14fec 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index fbaf796236..e3370f0d86 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index ce8b26371e..2eed7911fa 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index 8ba4cdc736..dd078ee1cc 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index d42d9c74e9..b967600cc0 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -14,7 +14,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - done + --output-block ${sect}) done # #----------------------------------------------------------------------- From 0d86ab0de7320705ccd5fee76422dfff7373196a Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Fri, 19 Apr 2024 00:19:18 +0000 Subject: [PATCH 13/34] Fix all the subshell problems. --- jobs/JREGIONAL_CHECK_POST_OUTPUT | 8 ++++---- jobs/JREGIONAL_GET_EXTRN_MDL_FILES | 6 +++--- jobs/JREGIONAL_GET_VERIF_OBS | 8 ++++---- jobs/JREGIONAL_INTEGRATION_TEST | 8 ++++---- jobs/JREGIONAL_MAKE_GRID | 8 ++++---- jobs/JREGIONAL_MAKE_ICS | 8 ++++---- jobs/JREGIONAL_MAKE_LBCS | 8 ++++---- jobs/JREGIONAL_MAKE_OROG | 8 ++++---- jobs/JREGIONAL_MAKE_SFC_CLIMO | 8 ++++---- jobs/JREGIONAL_PLOT_ALLVARS | 8 ++++---- jobs/JREGIONAL_RUN_FCST | 8 ++++---- jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT | 8 ++++---- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 8 ++++---- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 8 ++++---- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB | 8 ++++---- jobs/JREGIONAL_RUN_MET_PB2NC_OBS | 8 ++++---- jobs/JREGIONAL_RUN_MET_PCPCOMBINE | 8 ++++---- jobs/JREGIONAL_RUN_POST | 8 ++++---- jobs/JREGIONAL_RUN_PRDGEN | 8 ++++---- jobs/JSRW_AQM_ICS | 8 ++++---- jobs/JSRW_AQM_LBCS | 8 ++++---- jobs/JSRW_BIAS_CORRECTION_O3 | 8 ++++---- jobs/JSRW_BIAS_CORRECTION_PM25 | 8 ++++---- jobs/JSRW_FIRE_EMISSION | 8 ++++---- jobs/JSRW_NEXUS_EMISSION | 8 ++++---- jobs/JSRW_NEXUS_GFS_SFC | 8 ++++---- jobs/JSRW_NEXUS_POST_SPLIT | 8 ++++---- jobs/JSRW_POINT_SOURCE | 8 ++++---- jobs/JSRW_POST_STAT_O3 | 8 ++++---- jobs/JSRW_POST_STAT_PM25 | 8 ++++---- jobs/JSRW_PRE_POST_STAT | 8 ++++---- scripts/exregional_get_extrn_mdl_files.sh | 2 +- scripts/exregional_get_verif_obs.sh | 2 +- scripts/exregional_make_grid.sh | 2 +- scripts/exregional_make_ics.sh | 2 +- scripts/exregional_make_lbcs.sh | 2 +- scripts/exregional_make_orog.sh | 2 +- scripts/exregional_make_sfc_climo.sh | 2 +- scripts/exregional_run_fcst.sh | 2 +- scripts/exregional_run_met_genensprod_or_ensemblestat.sh | 2 +- scripts/exregional_run_met_gridstat_or_pointstat_vx.sh | 2 +- ...exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh | 2 +- ...exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh | 2 +- scripts/exregional_run_met_pb2nc_obs.sh | 2 +- scripts/exregional_run_met_pcpcombine.sh | 2 +- scripts/exregional_run_post.sh | 2 +- scripts/exregional_run_prdgen.sh | 2 +- scripts/exsrw_aqm_ics.sh | 2 +- scripts/exsrw_aqm_lbcs.sh | 2 +- scripts/exsrw_bias_correction_o3.sh | 2 +- scripts/exsrw_bias_correction_pm25.sh | 2 +- scripts/exsrw_fire_emission.sh | 2 +- scripts/exsrw_nexus_emission.sh | 2 +- scripts/exsrw_nexus_gfs_sfc.sh | 2 +- scripts/exsrw_nexus_post_split.sh | 2 +- scripts/exsrw_point_source.sh | 2 +- scripts/exsrw_post_stat_o3.sh | 2 +- scripts/exsrw_post_stat_pm25.sh | 2 +- scripts/exsrw_pre_post_stat.sh | 2 +- 59 files changed, 151 insertions(+), 151 deletions(-) diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index 83dff8e559..987a84ace1 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -32,10 +32,10 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index 2032078cd0..164d0610bd 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -58,9 +58,9 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow task_get_extrn_lbcs task_get_extrn_ics ; do - --output-block ${sect}) ; do - export $var - done + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index 7bf142f3fe..a08dbbf749 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -29,10 +29,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index 72ec09a748..e6a62559a4 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -35,10 +35,10 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index 1476249a3f..4a14de9015 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -35,10 +35,10 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow task_make_grid ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 79c13bec96..110c31e32c 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -32,10 +32,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index b3e4c83135..84ac58e2b1 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -33,10 +33,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index 0ba7972f02..400f02c5a5 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -31,10 +31,10 @@ # . $USHdir/source_util_funcs.sh for sect in user task_make_orog ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_SFC_CLIMO b/jobs/JREGIONAL_MAKE_SFC_CLIMO index 74f29f118c..cfa9511231 100755 --- a/jobs/JREGIONAL_MAKE_SFC_CLIMO +++ b/jobs/JREGIONAL_MAKE_SFC_CLIMO @@ -34,10 +34,10 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow task_make_sfc_climo ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index f8f8d5ec29..2147a20602 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -49,10 +49,10 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow task_plot_allvars task_run_fcst ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_FCST b/jobs/JREGIONAL_RUN_FCST index bad15aef28..9cd9606bcc 100755 --- a/jobs/JREGIONAL_RUN_FCST +++ b/jobs/JREGIONAL_RUN_FCST @@ -34,10 +34,10 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh "TRUE" # diff --git a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT index 842513a09e..ffe98acfe2 100755 --- a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT +++ b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT @@ -28,10 +28,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index b32a851068..2204f50029 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -28,10 +28,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index 87efa43f23..d6978790bd 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -29,10 +29,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB index bab593d256..4189f3f639 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB @@ -29,10 +29,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS index ed10112581..3658bf6f2f 100755 --- a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS +++ b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS @@ -29,10 +29,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE index e71314a6f3..967e1d1c29 100755 --- a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE +++ b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE @@ -30,10 +30,10 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index 89d16864d7..c3f58b8cea 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -48,10 +48,10 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index ccc610d340..7d1d2c33ef 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -42,10 +42,10 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index a4dc8885aa..28b2a6290f 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -32,10 +32,10 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index 194cda10dc..6a3778f895 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -33,10 +33,10 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ task_make_orog task_make_lbcs task_aqm_lbcs ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index 55851ec8b4..253f797469 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -32,10 +32,10 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ task_bias_correction_o3 ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index 6694c04ff5..af817fc831 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -32,10 +32,10 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ task_bias_correction_pm25 ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index 92abb92704..b48eabcc10 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -31,10 +31,10 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index 99fc59025c..b2fdba1c07 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -31,10 +31,10 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index cbe6551ec9..f00deb0e08 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -31,10 +31,10 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index 3df819870e..a0a2625b3d 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -31,10 +31,10 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index e07bd951fa..e61f7f7e56 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -32,10 +32,10 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ task_run_fcst ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index f049394636..6dea5331a9 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -32,10 +32,10 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done . $USHdir/job_preamble.sh # diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index 7c71450e62..db22aec98f 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -32,10 +32,10 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ task_run_post ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 99b9c96a02..00846d13f8 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -31,10 +31,10 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat ; do - for var in $(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) ; do - export $var - done + while read -r line ; do + source <( echo "${line}" ) + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + --output-block ${sect}) done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 2cdf080f05..82b10d4fb7 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -75,7 +75,7 @@ for sect in user platform workflow global task_get_extrn_lbcs \ task_get_extrn_ics ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index d2a1f4a238..f9618b9f25 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -34,7 +34,7 @@ for sect in user ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index e32c65e6a9..4b8035712b 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -105,7 +105,7 @@ for sect in user platform workflow constants grid_params task_make_grid ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index be3b24bf28..e101a1ede6 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -89,7 +89,7 @@ for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index eb59b2c2fa..5e230f6573 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -89,7 +89,7 @@ for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 847a731503..dcfea7062a 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -92,7 +92,7 @@ for sect in user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index a828ab0f3d..6b756c250b 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -58,7 +58,7 @@ for sect in user platform workflow constants task_make_sfc_climo ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 90ee68a682..372c4e490f 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -120,7 +120,7 @@ for sect in user platform workflow global cpl_aqm_parm constants fixed_files \ task_get_extrn_lbcs task_run_fcst task_run_post ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index a7e93ace05..a460b41bff 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_post task_run_vx_ensgrid ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 74fb2f895b..281b4ee100 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_post task_run_vx_gridstat task_run_vx_pointstat ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index 1329ba7d9c..5e2c62d41c 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index dd1b768b9f..f6081779e5 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index c9af2e8af9..ba21523f6a 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_met_pb2nc_obs ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index 22c2edd2c7..c92191f44a 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_met_pcpcombine task_run_post ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index c667dad6cc..28f4d4e3ed 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -69,7 +69,7 @@ for sect in user platform workflow global cpl_aqm_parm \ task_run_fcst task_run_post ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 0d05cd9fbe..341601e336 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_post task_run_prdgen ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index 68c1eced5c..3f1b71ff73 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_aqm_ics ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 780709ab33..f391584fbf 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index 49e8928264..c549702172 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_bias_correction_o3 ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index 28d69ad6f9..a9a38efa06 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_bias_correction_pm25 ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index 3947a59d84..de4cbead7f 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_fire_emission ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index ecb9c4e8d2..40d494fe43 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_nexus_emission ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 4547248207..6181110304 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_nexus_gfs_sfc ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 35abb14fec..4644edc509 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_nexus_post_split ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index e3370f0d86..7d788da5d9 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_point_source task_run_fcst ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index 2eed7911fa..d5321c3558 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_post task_post_stat_o3 ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index dd078ee1cc..4e7d5d5f33 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_run_post task_post_stat_pm25 ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index b967600cc0..8573410da0 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -13,7 +13,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ task_pre_post task_run_post ; do while read -r line ; do source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ + done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ --output-block ${sect}) done # From f08e3ef72a69dfab330a5a24486271879e33a81a Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Sat, 27 Apr 2024 01:02:41 +0000 Subject: [PATCH 14/34] Boolified. --- jobs/JREGIONAL_RUN_POST | 4 +- jobs/JREGIONAL_RUN_PRDGEN | 2 +- jobs/JSRW_AQM_ICS | 2 +- jobs/JSRW_AQM_LBCS | 2 +- jobs/JSRW_BIAS_CORRECTION_O3 | 2 +- jobs/JSRW_BIAS_CORRECTION_PM25 | 2 +- jobs/JSRW_FIRE_EMISSION | 2 +- jobs/JSRW_NEXUS_EMISSION | 2 +- jobs/JSRW_NEXUS_GFS_SFC | 4 +- jobs/JSRW_NEXUS_POST_SPLIT | 2 +- jobs/JSRW_POINT_SOURCE | 2 +- jobs/JSRW_POST_STAT_O3 | 2 +- jobs/JSRW_POST_STAT_PM25 | 2 +- jobs/JSRW_PRE_POST_STAT | 2 +- modulefiles/build_hera_intel.lua | 3 +- scripts/exregional_check_post_output.sh | 2 +- scripts/exregional_get_extrn_mdl_files.sh | 4 +- scripts/exregional_make_grid.sh | 2 +- scripts/exregional_make_ics.sh | 10 ++-- scripts/exregional_make_lbcs.sh | 4 +- scripts/exregional_run_fcst.sh | 55 ++++++++++--------- ...gional_run_met_gridstat_or_pointstat_vx.sh | 4 +- scripts/exregional_run_met_pcpcombine.sh | 4 +- scripts/exregional_run_post.sh | 12 ++-- scripts/exregional_run_prdgen.sh | 2 +- scripts/exsrw_aqm_lbcs.sh | 6 +- scripts/exsrw_bias_correction_o3.sh | 2 +- scripts/exsrw_bias_correction_pm25.sh | 2 +- scripts/exsrw_nexus_gfs_sfc.sh | 2 +- ush/job_preamble.sh | 2 +- ush/launch_FV3LAM_wflow.sh | 2 +- 31 files changed, 77 insertions(+), 73 deletions(-) diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index c3f58b8cea..c2fb0afbdf 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -95,7 +95,7 @@ on the output files corresponding to a specified forecast hour. # minutes (fmn) are set to "00". This is necessary in order to pass # "fmn" into the post ex-script for the calculation of post_time. # -if [ "${SUB_HOURLY_POST}" != "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}" != "TRUE" ]; then export fmn="00" fi # @@ -123,7 +123,7 @@ if [ "${RUN_ENVIR}" = "community" ]; then mkdir_vrfy -p "${COMOUT}" fi -if [ "${SUB_HOURLY_POST}" = "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}" = "TRUE" ]; then export DATA_FHR="${DATA:-$COMOUT}/$fhr$fmn" else export DATA_FHR="${DATA:-$COMOUT}/$fhr" diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 7d1d2c33ef..b273def940 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -115,7 +115,7 @@ fi mkdir_vrfy -p "${COMOUT}" # subhourly post -if [ "${SUB_HOURLY_POST}" = "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}" = "TRUE" ]; then export DATA_FHR="${DATA:-$COMOUT}/$fhr$fmn" else export DATA_FHR="${DATA:-$COMOUT}/$fhr" diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index 28b2a6290f..2d9106f8dc 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -135,7 +135,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index 6a3778f895..eac848415c 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -137,7 +137,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index 253f797469..682d363a71 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -129,7 +129,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index af817fc831..f8f85d1ded 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -129,7 +129,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index b48eabcc10..7e4685ce7a 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -131,7 +131,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index b2fdba1c07..42aeffd6d7 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -133,7 +133,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index f00deb0e08..2d5801aa8a 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -133,7 +133,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= @@ -148,7 +148,7 @@ fi if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index a0a2625b3d..9736ee213c 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -133,7 +133,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index e61f7f7e56..2924f52483 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -129,7 +129,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index 6dea5331a9..f6d22685d2 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -130,7 +130,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index db22aec98f..c03d8b99b9 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -129,7 +129,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 00846d13f8..561e3f4c4f 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -132,7 +132,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/modulefiles/build_hera_intel.lua b/modulefiles/build_hera_intel.lua index ee11e4a386..9120a9fbd7 100644 --- a/modulefiles/build_hera_intel.lua +++ b/modulefiles/build_hera_intel.lua @@ -26,8 +26,7 @@ load(pathJoin("cmake", cmake_ver)) load("srw_common") load(pathJoin("nccmp", os.getenv("nccmp_ver") or "1.9.0.1")) -load(pathJoin("nco", os.getenv("nco_ver") or "4.9.3")) -load(pathJoin("prod_util", os.getenv("prod_util_ver") or "1.2.2")) +load(pathJoin("nco", os.getenv("nco_ver") or "5.0.6")) setenv("CMAKE_C_COMPILER","mpiicc") setenv("CMAKE_CXX_COMPILER","mpiicpc") diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index 9fc7c9ecb1..ad5f044096 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -106,7 +106,7 @@ or they may be user-staged. #----------------------------------------------------------------------- # i="0" -if [ "${DO_ENSEMBLE}" = "TRUE" ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ]; then i=$( bc -l <<< "${ENSMEM_INDX}-1" ) fi time_lag=$( bc -l <<< "${ENS_TIME_LAG_HRS[$i]}*${SECS_PER_HOUR}" ) diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 82b10d4fb7..7648fd7fa6 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -216,12 +216,12 @@ if [ -n "${input_file_path:-}" ] ; then --input_file_path ${input_file_path}" fi -if [ $SYMLINK_FIX_FILES = "TRUE" ]; then +if [ $(boolify $SYMLINK_FIX_FILES) = "TRUE" ]; then additional_flags="$additional_flags \ --symlink" fi -if [ $DO_ENSEMBLE == "TRUE" ] ; then +if [ $(boolify $DO_ENSEMBLE) = "TRUE" ] ; then mem_dir="/mem{mem:03d}" member_list=(1 ${NUM_ENS_MEMBERS}) additional_flags="$additional_flags \ diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 4b8035712b..45bfd6a8ff 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -471,7 +471,7 @@ res_equiv=${res_equiv//$'\n'/} #----------------------------------------------------------------------- # if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then - if [ "${GFDLgrid_USE_NUM_CELLS_IN_FILENAMES}" = "TRUE" ]; then + if [ $(boolify "${GFDLgrid_USE_NUM_CELLS_IN_FILENAMES}") = "TRUE" ]; then CRES="C${GFDLgrid_NUM_CELLS}" else CRES="C${res_equiv}" diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index e101a1ede6..2e5f690048 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -389,7 +389,7 @@ convert_nst="" nsoill_out="4" if [ "${EXTRN_MDL_NAME_ICS}" = "HRRR" -o \ "${EXTRN_MDL_NAME_ICS}" = "RAP" ] && \ - [ "${SDF_USES_RUC_LSM}" = "TRUE" ]; then + [ $(boolify "${SDF_USES_RUC_LSM}") = "TRUE" ]; then nsoill_out="9" fi # @@ -409,7 +409,7 @@ fi thomp_mp_climo_file="" if [ "${EXTRN_MDL_NAME_ICS}" != "HRRR" -a \ "${EXTRN_MDL_NAME_ICS}" != "RAP" ] && \ - [ "${SDF_USES_THOMPSON_MP}" = "TRUE" ]; then + [ $(boolify "${SDF_USES_THOMPSON_MP}") = "TRUE" ]; then thomp_mp_climo_file="${THOMPSON_MP_CLIMO_FP}" fi # @@ -726,9 +726,9 @@ POST_STEP # #----------------------------------------------------------------------- # -if [ "${CPL_AQM}" = "TRUE" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then COMOUT="${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}" #temporary path, should be removed later - if [ "${COLDSTART}" = "TRUE" ] && [ "${PDY}${cyc}" = "${DATE_FIRST_CYCL:0:10}" ]; then + if [ $(boolify "${COLDSTART}") = "TRUE" ] && [ "${PDY}${cyc}" = "${DATE_FIRST_CYCL:0:10}" ]; then data_trans_path="${COMOUT}" else data_trans_path="${DATA_SHARE}" @@ -750,7 +750,7 @@ fi # #----------------------------------------------------------------------- # -if [ "${USE_FVCOM}" = "TRUE" ]; then +if [ $(boolify "${USE_FVCOM}") = "TRUE" ]; then #Format for fvcom_time: YYYY-MM-DDTHH:00:00.000000 fvcom_exec_fn="fvcom_to_FV3" diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 5e230f6573..c07fd904a1 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -333,7 +333,7 @@ tracers="\"\"" thomp_mp_climo_file="" if [ "${EXTRN_MDL_NAME_LBCS}" != "HRRR" -a \ "${EXTRN_MDL_NAME_LBCS}" != "RAP" ] && \ - [ "${SDF_USES_THOMPSON_MP}" = "TRUE" ]; then + [ $(boolify "${SDF_USES_THOMPSON_MP}") = "TRUE" ]; then thomp_mp_climo_file="${THOMPSON_MP_CLIMO_FP}" fi # @@ -642,7 +642,7 @@ located in the following directory: lbc_spec_fhrs=( "${EXTRN_MDL_FHRS[$i]}" ) fcst_hhh=$(( ${lbc_spec_fhrs} - ${EXTRN_MDL_LBCS_OFFSET_HRS} )) fcst_hhh_FV3LAM=$( printf "%03d" "$fcst_hhh" ) - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then cp -p gfs.bndy.nc ${DATA_SHARE}/${NET}.${cycle}${dot_ensmem}.gfs_bndy.tile7.f${fcst_hhh_FV3LAM}.nc else mv_vrfy gfs.bndy.nc ${INPUT_DATA}/${NET}.${cycle}${dot_ensmem}.gfs_bndy.tile7.f${fcst_hhh_FV3LAM}.nc diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 8e76c21e9f..924c2c9f90 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -172,7 +172,7 @@ export OMP_NUM_THREADS=${OMP_NUM_THREADS_RUN_FCST} export OMP_STACKSIZE=${OMP_STACKSIZE_RUN_FCST} export MPI_TYPE_DEPTH=20 export ESMF_RUNTIME_COMPLIANCECHECK=OFF:depth=4 -if [ "${PRINT_ESMF}" = "TRUE" ]; then +if [ $(boolify "${PRINT_ESMF}") = "TRUE" ]; then export ESMF_RUNTIME_PROFILE=ON export ESMF_RUNTIME_PROFILE_OUTPUT="SUMMARY" fi @@ -342,7 +342,7 @@ cd_vrfy ${DATA}/INPUT # relative_link_flag="FALSE" -if [ "${CPL_AQM}" = "TRUE" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then COMIN="${COMROOT}/${NET}/${model_ver}/${RUN}.${PDY}/${cyc}${SLASH_ENSMEM_SUBDIR}" #temporary path, should be removed later target="${COMIN}/${NET}.${cycle}${dot_ensmem}.gfs_data.tile${TILE_RGNL}.halo${NH0}.nc" @@ -422,7 +422,7 @@ static) files in the FIXam directory: # isn't really an advantage to using relative symlinks, so we use symlinks # with absolute paths. # -if [ "${SYMLINK_FIX_FILES}" == "FALSE" ]; then +if [ $(boolify "${SYMLINK_FIX_FILES}") = "FALSE" ]; then relative_link_flag="TRUE" else relative_link_flag="FALSE" @@ -451,7 +451,7 @@ done # #----------------------------------------------------------------------- # -if [ "${USE_MERRA_CLIMO}" = "TRUE" ]; then +if [ $(boolify "${USE_MERRA_CLIMO}") = "TRUE" ]; then for f_nm_path in ${FIXclim}/*; do f_nm=$( basename "${f_nm_path}" ) pre_f="${f_nm%%.*}" @@ -512,16 +512,16 @@ create_symlink_to_file ${FIELD_TABLE_FP} ${DATA}/${FIELD_TABLE_FN} ${relative_li create_symlink_to_file ${FIELD_DICT_FP} ${DATA}/${FIELD_DICT_FN} ${relative_link_flag} -if [ ${WRITE_DOPOST} = "TRUE" ]; then +if [ $(boolify ${WRITE_DOPOST}) = "TRUE" ]; then cp_vrfy ${PARMdir}/upp/nam_micro_lookup.dat ./eta_micro_lookup.dat - if [ ${USE_CUSTOM_POST_CONFIG_FILE} = "TRUE" ]; then + if [ $(boolify ${USE_CUSTOM_POST_CONFIG_FILE}) = "TRUE" ]; then post_config_fp="${CUSTOM_POST_CONFIG_FP}" print_info_msg " ==================================================================== CUSTOM_POST_CONFIG_FP = \"${CUSTOM_POST_CONFIG_FP}\" ====================================================================" else - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then post_config_fp="${PARMdir}/upp/postxconfig-NT-AQM.txt" else post_config_fp="${PARMdir}/upp/postxconfig-NT-fv3lam.txt" @@ -535,7 +535,7 @@ if [ ${WRITE_DOPOST} = "TRUE" ]; then cp_vrfy ${post_config_fp} ./postxconfig-NT.txt cp_vrfy ${PARMdir}/upp/params_grib2_tbl_new . # Set itag for inline-post: - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then post_itag_add="aqf_on=.true.," else post_itag_add="" @@ -570,11 +570,14 @@ cp_vrfy ${CCPP_PHYS_DIR}/noahmptable.tbl . #----------------------------------------------------------------------- # STOCH="FALSE" -if ([ "${DO_SPP}" = "TRUE" ] || [ "${DO_SPPT}" = "TRUE" ] || [ "${DO_SHUM}" = "TRUE" ] || \ - [ "${DO_SKEB}" = "TRUE" ] || [ "${DO_LSM_SPP}" = "TRUE" ]); then +if ([ $(boolify "${DO_SPP}") = "TRUE" ] || \ + [ $(boolify "${DO_SPPT}") = "TRUE" ] || \ + [ $(boolify "${DO_SHUM}") = "TRUE" ] || \ + [ $(boolify "${DO_SKEB}") = "TRUE" ] || \ + [ $(boolify "${DO_LSM_SPP}") = "TRUE" ]); then STOCH="TRUE" fi -if [ "${STOCH}" == "TRUE" ]; then +if [ $(boolify "${STOCH}") = "TRUE" ]; then cp_vrfy ${FV3_NML_STOCH_FP} ${DATA}/${FV3_NML_FN} else ln_vrfy -sf ${FV3_NML_FP} ${DATA}/${FV3_NML_FN} @@ -587,7 +590,7 @@ fi # #----------------------------------------------------------------------- # -if ([ "$STOCH" == "TRUE" ] && [ "${DO_ENSEMBLE}" = "TRUE" ]); then +if ([ "$STOCH" == "TRUE" ] && [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ]); then python3 $USHdir/set_fv3nml_ens_stoch_seeds.py \ --path-to-defns ${GLOBAL_VAR_DEFNS_FP} \ --cdate "$CDATE" || print_err_msg_exit "\ @@ -604,7 +607,7 @@ fi # #----------------------------------------------------------------------- # -if [ "${CPL_AQM}" = "TRUE" ] && [ "${PREDEF_GRID_NAME}" = "AQM_NA_13km" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ] && [ "${PREDEF_GRID_NAME}" = "AQM_NA_13km" ]; then python3 $USHdir/update_input_nml.py \ --namelist "${DATA}/${FV3_NML_FN}" \ --aqm_na_13km || print_err_msg_exit "\ @@ -622,10 +625,10 @@ fi #----------------------------------------------------------------------- # flag_fcst_restart="FALSE" -if [ "${DO_FCST_RESTART}" = "TRUE" ] && [ "$(ls -A ${DATA}/RESTART )" ]; then +if [ $(boolify "${DO_FCST_RESTART}") = "TRUE" ] && [ "$(ls -A ${DATA}/RESTART )" ]; then cp_vrfy input.nml input.nml_orig cp_vrfy model_configure model_configure_orig - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then cp_vrfy aqm.rc aqm.rc_orig fi relative_link_flag="FALSE" @@ -689,8 +692,10 @@ fi # #----------------------------------------------------------------------- # -if [ "${CPL_AQM}" = "TRUE" ]; then - if [ "${COLDSTART}" = "TRUE" ] && [ "${PDY}${cyc}" = "${DATE_FIRST_CYCL:0:10}" ] && [ "${flag_fcst_restart}" = "FALSE" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then + if [ $(boolify "${COLDSTART}") = "TRUE" ] && \ + [ "${PDY}${cyc}" = "${DATE_FIRST_CYCL:0:10}" ] && \ + [ $(boolify "${flag_fcst_restart}") = "FALSE" ]; then init_concentrations="true" else init_concentrations="false" @@ -781,7 +786,7 @@ fi # #----------------------------------------------------------------------- # -if [ "${RUN_ENVIR}" = "nco" ] && [ "${CPL_AQM}" = "TRUE" ]; then +if [ "${RUN_ENVIR}" = "nco" ] && [ $(boolify "${CPL_AQM}") = "TRUE" ]; then # create an intermediate symlink to RESTART ln_vrfy -sf "${DATA}/RESTART" "${COMIN}/RESTART" fi @@ -840,7 +845,7 @@ POST_STEP # #----------------------------------------------------------------------- # -if [ "${CPL_AQM}" = "TRUE" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then if [ "${RUN_ENVIR}" = "nco" ]; then if [ -d "${COMIN}/RESTART" ] && [ "$(ls -A ${DATA}/RESTART)" ]; then rm_vrfy -rf "${COMIN}/RESTART" @@ -873,8 +878,8 @@ fi # #----------------------------------------------------------------------- # -if [ ${WRITE_DOPOST} = "TRUE" ]; then - +if [ $(boolify ${WRITE_DOPOST}) = "TRUE" ]; then + yyyymmdd=${PDY} hh=${cyc} fmn="00" @@ -900,7 +905,7 @@ if [ ${WRITE_DOPOST} = "TRUE" ]; then post_fn_suffix="GrbF${fhr_d}" post_renamed_fn_suffix="f${fhr}${post_mn_or_null}.${POST_OUTPUT_DOMAIN_NAME}.grib2" - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then fids=( "cmaq" ) else fids=( "prslev" "natlev" ) @@ -910,12 +915,12 @@ if [ ${WRITE_DOPOST} = "TRUE" ]; then FID=$(echo_uppercase $fid) post_orig_fn="${FID}.${post_fn_suffix}" post_renamed_fn="${NET}.${cycle}${dot_ensmem}.${fid}.${post_renamed_fn_suffix}" - + mv_vrfy ${DATA}/${post_orig_fn} ${post_renamed_fn} if [ $RUN_ENVIR != "nco" ]; then basetime=$( $DATE_UTIL --date "$yyyymmdd $hh" +%y%j%H%M ) symlink_suffix="_${basetime}f${fhr}${post_mn}" - create_symlink_to_file ${post_renamed_fn} ${FID}${symlink_suffix} TRUE + create_symlink_to_file ${post_renamed_fn} ${FID}${symlink_suffix} TRUE fi # DBN alert if [ $SENDDBN = "TRUE" ]; then @@ -923,7 +928,7 @@ if [ ${WRITE_DOPOST} = "TRUE" ]; then fi done - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then mv_vrfy ${DATA}/dynf${fhr}.nc ${COMIN}/${NET}.${cycle}${dot_ensmem}.dyn.f${fhr}.nc mv_vrfy ${DATA}/phyf${fhr}.nc ${COMIN}/${NET}.${cycle}${dot_ensmem}.phy.f${fhr}.nc fi diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 281b4ee100..7dcbcbc78a 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -125,7 +125,7 @@ set_vx_params \ #----------------------------------------------------------------------- # i="0" -if [ "${DO_ENSEMBLE}" = "TRUE" ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ]; then i=$( bc -l <<< "${ENSMEM_INDX}-1" ) fi time_lag=$( bc -l <<< "${ENS_TIME_LAG_HRS[$i]}*${SECS_PER_HOUR}" ) @@ -205,7 +205,7 @@ else # or, better, just remove this variale and code "/${ensmem_name}" where # slash_ensmem_subdir_or_null currently appears below. # - if [ "${DO_ENSEMBLE}" = "TRUE" ]; then + if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ]; then slash_ensmem_subdir_or_null="/${ensmem_name}" else slash_ensmem_subdir_or_null="" diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index c92191f44a..bf2bca8ee8 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -129,7 +129,7 @@ set_vx_params \ time_lag="0" if [ "${obs_or_fcst}" = "fcst" ]; then i="0" - if [ "${DO_ENSEMBLE}" = "TRUE" ]; then + if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ]; then i=$( bc -l <<< "${ENSMEM_INDX}-1" ) fi time_lag=$( bc -l <<< "${ENS_TIME_LAG_HRS[$i]}*${SECS_PER_HOUR}" ) @@ -165,7 +165,7 @@ if [ "${obs_or_fcst}" = "fcst" ]; then # or, better, just remove this variale and code "/${ensmem_name}" where # slash_ensmem_subdir_or_null currently appears below. # - if [ "${DO_ENSEMBLE}" = "TRUE" ]; then + if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ]; then slash_ensmem_subdir_or_null="/${ensmem_name}" else slash_ensmem_subdir_or_null="" diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 18c07d5b43..d7e9fa63f0 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -145,7 +145,7 @@ fi # rm_vrfy -f fort.* cp_vrfy ${PARMdir}/upp/nam_micro_lookup.dat ./eta_micro_lookup.dat -if [ ${USE_CUSTOM_POST_CONFIG_FILE} = "TRUE" ]; then +if [ $(boolify ${USE_CUSTOM_POST_CONFIG_FILE}) = "TRUE" ]; then post_config_fp="${CUSTOM_POST_CONFIG_FP}" print_info_msg " ==================================================================== @@ -155,7 +155,7 @@ to the temporary work directory (DATA_FHR): DATA_FHR = \"${DATA_FHR}\" ====================================================================" else - if [ "${CPL_AQM}" = "TRUE" ]; then + if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then post_config_fp="${PARMdir}/upp/postxconfig-NT-AQM.txt" else post_config_fp="${PARMdir}/upp/postxconfig-NT-fv3lam.txt" @@ -170,7 +170,7 @@ temporary work directory (DATA_FHR): fi cp_vrfy ${post_config_fp} ./postxconfig-NT.txt cp_vrfy ${PARMdir}/upp/params_grib2_tbl_new . -if [ ${USE_CRTM} = "TRUE" ]; then +if [ $(boolify ${USE_CRTM}) = "TRUE" ]; then cp_vrfy ${CRTM_DIR}/Nalli.IRwater.EmisCoeff.bin ./ cp_vrfy ${CRTM_DIR}/FAST*.bin ./ cp_vrfy ${CRTM_DIR}/NPOESS.IRland.EmisCoeff.bin ./ @@ -218,7 +218,7 @@ hh=${cyc} # must be set to a null string. # mnts_secs_str="" -if [ "${SUB_HOURLY_POST}" = "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}") = "TRUE" ]; then if [ ${fhr}${fmn} = "00000" ]; then mnts_secs_str=":"$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + ${DT_ATMOS} seconds" "+%M:%S" ) else @@ -248,7 +248,7 @@ post_mn=${post_time:10:2} # # Create the input namelist file to the post-processor executable. # -if [ "${CPL_AQM}" = "TRUE" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then post_itag_add="aqf_on=.true.," else post_itag_add="" @@ -336,7 +336,7 @@ post_renamed_fn_suffix="f${fhr}${post_mn_or_null}.${POST_OUTPUT_DOMAIN_NAME}.gri cd_vrfy "${COMOUT}" basetime=$( $DATE_UTIL --date "$yyyymmdd $hh" +%y%j%H%M ) symlink_suffix="${dot_ensmem}.${basetime}f${fhr}${post_mn}" -if [ "${CPL_AQM}" = "TRUE" ]; then +if [ $(boolify "${CPL_AQM}") = "TRUE" ]; then fids=( "cmaq" ) else fids=( "prslev" "natlev" ) diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 341601e336..04d2d74808 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -182,7 +182,7 @@ done # Remap to additional output grids if requested #----------------------------------------------- -if [ ${DO_PARALLEL_PRDGEN} == "TRUE" ]; then +if [ $(boolify ${DO_PARALLEL_PRDGEN}) = "TRUE" ]; then # # parallel run wgrib2 for product generation # diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index f391584fbf..ce34c9310f 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -107,7 +107,7 @@ for hr in 0 ${LBC_SPEC_FCST_HRS[@]}; do cp -p "${DATA_SHARE}/${aqm_lbcs_fn}" ${DATA} done -if [ "${DO_AQM_CHEM_LBCS}" = "TRUE" ]; then +if [ $(boolify "${DO_AQM_CHEM_LBCS}") = "TRUE" ]; then ext_lbcs_file="${AQM_LBCS_FILES}" chem_lbcs_fn=${ext_lbcs_file///${MM}} chem_lbcs_fp="${FIXaqm}/chemlbc/${chem_lbcs_fn}" @@ -148,7 +148,7 @@ fi # #----------------------------------------------------------------------- # -if [ "${DO_AQM_GEFS_LBCS}" = "TRUE" ]; then +if [ $(boolify "${DO_AQM_GEFS_LBCS}") = "TRUE" ]; then AQM_GEFS_FILE_CYC=${AQM_GEFS_FILE_CYC:-"${HH}"} AQM_GEFS_FILE_CYC=$( printf "%02d" "${AQM_GEFS_FILE_CYC}" ) @@ -160,7 +160,7 @@ if [ "${DO_AQM_GEFS_LBCS}" = "TRUE" ]; then fi aqm_mofile_fn="${AQM_GEFS_FILE_PREFIX}.t${AQM_GEFS_FILE_CYC}z.atmf" - if [ "${DO_REAL_TIME}" = "TRUE" ]; then + if [ $(boolify "${DO_REAL_TIME}") = "TRUE" ]; then aqm_mofile_fp="${COMINgefs}/gefs.${YYYYMMDD}/${AQM_GEFS_FILE_CYC}/chem/sfcsig/${aqm_mofile_fn}" else aqm_mofile_fp="${COMINgefs}/${YYYYMMDD}/${AQM_GEFS_FILE_CYC}/${aqm_mofile_fn}" diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index c549702172..a3dbe475ad 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -206,7 +206,7 @@ POST_STEP cp ${DATA}/out/ozone/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/ozone/${yyyy} -if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then +if [ $(boolify "${DO_AQM_SAVE_AIRNOW_HIST}") = "TRUE" ]; then mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} cp ${DATA}/out/ozone/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/ozone/${yyyy} diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index a9a38efa06..aa12f30bff 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -205,7 +205,7 @@ POST_STEP cp ${DATA}/out/pm25/${yyyy}/*nc ${DATA}/data/bcdata.${yyyymm}/interpolated/pm25/${yyyy} -if [ "${DO_AQM_SAVE_AIRNOW_HIST}" = "TRUE" ]; then +if [ $(boolify "${DO_AQM_SAVE_AIRNOW_HIST}") = "TRUE" ]; then mkdir -p ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} cp ${DATA}/out/pm25/${yyyy}/*nc ${COMOUTbicor}/bcdata.${yyyymm}/interpolated/pm25/${yyyy} fi diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 6181110304..96e62c95b3 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -80,7 +80,7 @@ fcst_len_hrs_offset=$(( FCST_LEN_HRS + TIME_OFFSET_HRS )) GFS_SFC_TAR_DIR="${NEXUS_GFS_SFC_ARCHV_DIR}/rh${YYYY}/${YYYYMM}/${YYYYMMDD}" GFS_SFC_TAR_SUB_DIR="gfs.${YYYYMMDD}/${HH}/atmos" -if [ "${DO_REAL_TIME}" = "TRUE" ]; then +if [ $(boolify "${DO_REAL_TIME}") = "TRUE" ]; then GFS_SFC_LOCAL_DIR="${COMINgfs}/${GFS_SFC_TAR_SUB_DIR}" else GFS_SFC_LOCAL_DIR="${NEXUS_GFS_SFC_DIR}/${GFS_SFC_TAR_SUB_DIR}" diff --git a/ush/job_preamble.sh b/ush/job_preamble.sh index e9c3683c40..1ba9265833 100644 --- a/ush/job_preamble.sh +++ b/ush/job_preamble.sh @@ -73,7 +73,7 @@ else export cycle="t${cyc}z" fi -if [ "${RUN_ENVIR}" = "nco" ] && [ "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z $ENSMEM_INDX ]; then +if [ "${RUN_ENVIR}" = "nco" ] && [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z $ENSMEM_INDX ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index cfbedac9cf..5d533bcdfd 100755 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -369,7 +369,7 @@ by expt_name has completed with the following workflow status (wflow_status): # Thus, there is no need to try to relaunch it. We also append a message # to the completion message above to indicate this. # - if [ "${USE_CRON_TO_RELAUNCH}" = "TRUE" ]; then + if [ $(boolify "${USE_CRON_TO_RELAUNCH}" = "TRUE" ]; then msg="${msg}\ Thus, there is no need to relaunch the workflow via a cron job. Removing From 94d7970305f0405fbd98e0c19b0a4365347908c4 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 11 Jun 2024 01:40:37 +0000 Subject: [PATCH 15/34] WIP --- ush/job_preamble.sh | 2 +- ush/load_modules_run_task.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ush/job_preamble.sh b/ush/job_preamble.sh index 1ba9265833..17cb391ed3 100644 --- a/ush/job_preamble.sh +++ b/ush/job_preamble.sh @@ -73,7 +73,7 @@ else export cycle="t${cyc}z" fi -if [ "${RUN_ENVIR}" = "nco" ] && [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z $ENSMEM_INDX ]; then +if [ "${RUN_ENVIR}" = "nco" ] && [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z $ENSMEM_INDX ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 39f902e7f0..48af2f384d 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -142,7 +142,7 @@ fi set -x +u # Source the necessary blocks of the experiment config YAML -for sect in platform ; do +for sect in platform workflow ; do while read -r line ; do source <( echo "${line}" ) done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ From 874af4b69ce174e96bb0a453f63e4d0b79b244ac Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 11 Jun 2024 02:16:10 +0000 Subject: [PATCH 16/34] Bump uwtools version. --- environment.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/environment.yml b/environment.yml index e2dd6b8300..a735213198 100644 --- a/environment.yml +++ b/environment.yml @@ -5,4 +5,4 @@ channels: dependencies: - pylint=2.17* - pytest=7.2* - - uwtools=2.2* + - uwtools=2.3* From d2a0bc2cf62e521645b00c7d0aeba08e6b0a4843 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 11 Jun 2024 02:16:32 +0000 Subject: [PATCH 17/34] Source from a function. --- jobs/JREGIONAL_CHECK_POST_OUTPUT | 5 +-- jobs/JREGIONAL_GET_EXTRN_MDL_FILES | 4 +- jobs/JREGIONAL_GET_VERIF_OBS | 5 +-- jobs/JREGIONAL_INTEGRATION_TEST | 5 +-- jobs/JREGIONAL_MAKE_GRID | 5 +-- jobs/JREGIONAL_MAKE_ICS | 5 +-- jobs/JREGIONAL_MAKE_LBCS | 5 +-- jobs/JREGIONAL_MAKE_OROG | 5 +-- jobs/JREGIONAL_MAKE_SFC_CLIMO | 5 +-- jobs/JREGIONAL_PLOT_ALLVARS | 5 +-- jobs/JREGIONAL_RUN_FCST | 5 +-- ...EGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT | 5 +-- ...JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 5 +-- ...L_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 5 +-- ...L_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB | 5 +-- jobs/JREGIONAL_RUN_MET_PB2NC_OBS | 5 +-- jobs/JREGIONAL_RUN_MET_PCPCOMBINE | 5 +-- jobs/JREGIONAL_RUN_POST | 5 +-- jobs/JREGIONAL_RUN_PRDGEN | 5 +-- jobs/JSRW_AQM_ICS | 5 +-- jobs/JSRW_AQM_LBCS | 5 +-- jobs/JSRW_BIAS_CORRECTION_O3 | 5 +-- jobs/JSRW_BIAS_CORRECTION_PM25 | 5 +-- jobs/JSRW_FIRE_EMISSION | 5 +-- jobs/JSRW_NEXUS_EMISSION | 5 +-- jobs/JSRW_NEXUS_GFS_SFC | 5 +-- jobs/JSRW_NEXUS_POST_SPLIT | 5 +-- jobs/JSRW_POINT_SOURCE | 5 +-- jobs/JSRW_POST_STAT_O3 | 5 +-- jobs/JSRW_POST_STAT_PM25 | 5 +-- jobs/JSRW_PRE_POST_STAT | 5 +-- scripts/exregional_check_post_output.sh | 5 +-- scripts/exregional_get_extrn_mdl_files.sh | 5 +-- scripts/exregional_get_verif_obs.sh | 5 +-- scripts/exregional_make_grid.sh | 5 +-- scripts/exregional_make_ics.sh | 5 +-- scripts/exregional_make_lbcs.sh | 5 +-- scripts/exregional_make_orog.sh | 5 +-- scripts/exregional_make_sfc_climo.sh | 5 +-- scripts/exregional_run_fcst.sh | 5 +-- ...onal_run_met_genensprod_or_ensemblestat.sh | 5 +-- ...gional_run_met_gridstat_or_pointstat_vx.sh | 5 +-- ...un_met_gridstat_or_pointstat_vx_ensmean.sh | 5 +-- ...un_met_gridstat_or_pointstat_vx_ensprob.sh | 5 +-- scripts/exregional_run_met_pb2nc_obs.sh | 5 +-- scripts/exregional_run_met_pcpcombine.sh | 5 +-- scripts/exregional_run_post.sh | 5 +-- scripts/exregional_run_prdgen.sh | 5 +-- scripts/exsrw_aqm_ics.sh | 5 +-- scripts/exsrw_aqm_lbcs.sh | 5 +-- scripts/exsrw_bias_correction_o3.sh | 5 +-- scripts/exsrw_bias_correction_pm25.sh | 5 +-- scripts/exsrw_fire_emission.sh | 5 +-- scripts/exsrw_nexus_emission.sh | 5 +-- scripts/exsrw_nexus_gfs_sfc.sh | 5 +-- scripts/exsrw_nexus_post_split.sh | 5 +-- scripts/exsrw_point_source.sh | 5 +-- scripts/exsrw_post_stat_o3.sh | 5 +-- scripts/exsrw_post_stat_pm25.sh | 5 +-- scripts/exsrw_pre_post_stat.sh | 5 +-- ush/bash_utils/source_yaml.sh | 40 +++++++++++++++++++ ush/load_modules_run_task.sh | 5 +-- ush/source_util_funcs.sh | 9 +++++ 63 files changed, 110 insertions(+), 243 deletions(-) create mode 100644 ush/bash_utils/source_yaml.sh diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index 3f97f2446f..b806a06d7e 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -32,10 +32,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index 328bb31b47..a58d93db41 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -58,9 +58,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow task_get_extrn_lbcs task_get_extrn_ics ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index a08dbbf749..83bf8eb9f4 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -29,10 +29,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index e6a62559a4..c6e73a53ed 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -35,10 +35,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index ac9835b405..c15aefd0ac 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -35,10 +35,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow task_make_grid ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index e65505fdb8..881dbb9870 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -32,10 +32,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index 217a07ebc7..420c8258dc 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -33,10 +33,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index 400f02c5a5..be4f6846a8 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -31,10 +31,7 @@ # . $USHdir/source_util_funcs.sh for sect in user task_make_orog ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_MAKE_SFC_CLIMO b/jobs/JREGIONAL_MAKE_SFC_CLIMO index 119b4bdb71..de02bedec0 100755 --- a/jobs/JREGIONAL_MAKE_SFC_CLIMO +++ b/jobs/JREGIONAL_MAKE_SFC_CLIMO @@ -34,10 +34,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow task_make_sfc_climo ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index 2147a20602..3f36b0657e 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -49,10 +49,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow task_plot_allvars task_run_fcst ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_FCST b/jobs/JREGIONAL_RUN_FCST index fdda6bf192..d1d4ef2bdf 100755 --- a/jobs/JREGIONAL_RUN_FCST +++ b/jobs/JREGIONAL_RUN_FCST @@ -34,10 +34,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh "TRUE" # diff --git a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT index ffe98acfe2..8e1e37b431 100755 --- a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT +++ b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT @@ -28,10 +28,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index 2204f50029..2800510c88 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -28,10 +28,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index d6978790bd..41f90221f5 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -29,10 +29,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB index 4189f3f639..ff37722c01 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB @@ -29,10 +29,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS index c801e38e04..d583d932da 100755 --- a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS +++ b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS @@ -29,10 +29,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE index 967e1d1c29..abd30e87af 100755 --- a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE +++ b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE @@ -30,10 +30,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index 456230db09..138334f44e 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -48,10 +48,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 8396ce8fce..2090c5a40a 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -42,10 +42,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index 2d9106f8dc..fd38c7e1ea 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -32,10 +32,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index eac848415c..45ef0365f6 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -33,10 +33,7 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ task_make_orog task_make_lbcs task_aqm_lbcs ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index 682d363a71..f3c04dba23 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -32,10 +32,7 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ task_bias_correction_o3 ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index f8f85d1ded..72e2926b7b 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -32,10 +32,7 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ task_bias_correction_pm25 ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index 7e4685ce7a..b7d5216597 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -31,10 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index 42aeffd6d7..e350524e70 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -31,10 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index 2d5801aa8a..b12fa3b04a 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -31,10 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index 9736ee213c..9b0f10a04a 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -31,10 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index 2924f52483..b43c6391d7 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -32,10 +32,7 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ task_run_fcst ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index f6d22685d2..15d183ce9c 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -32,10 +32,7 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh # diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index c03d8b99b9..e2b19c5705 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -32,10 +32,7 @@ export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 561e3f4c4f..2a18f5966f 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -31,10 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index f0e8ceee75..72148537ad 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -47,10 +47,7 @@ # . $USHdir/source_util_funcs.sh for sect in user workflow global verification constants ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 7648fd7fa6..fcef9e4b95 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -73,10 +73,7 @@ . $USHdir/source_util_funcs.sh for sect in user platform workflow global task_get_extrn_lbcs \ task_get_extrn_ics ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index f9618b9f25..f257633ae8 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -32,10 +32,7 @@ # . $USHdir/source_util_funcs.sh for sect in user ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 4650d9f82e..fc2092e875 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -103,10 +103,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow constants grid_params task_make_grid ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 7bf0487acb..6cdeae47aa 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -87,10 +87,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 58388636ce..b8211d31de 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -87,10 +87,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 80017b4735..88dd4b8d4a 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -90,10 +90,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index 9d1ab76c8f..a522006011 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -56,10 +56,7 @@ # . $USHdir/source_util_funcs.sh for sect in user platform workflow constants task_make_sfc_climo ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index cca25d47c5..c86f3ce39c 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -118,10 +118,7 @@ . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm constants fixed_files \ task_get_extrn_lbcs task_run_fcst task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index 4eb35df38f..41dc096250 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_ensgrid ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 089e5ccbb4..355624fd66 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_gridstat task_run_vx_pointstat ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index 9f790ba6e4..a3b77ea4ca 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index 09ad8a32c6..ab3acea0fc 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index 561656bcad..96b55b7ce0 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_met_pb2nc_obs ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index 40e60f837a..1b609bc621 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_met_pcpcombine task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 718005b0f6..245f8a0e0d 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -67,10 +67,7 @@ . $USHdir/source_util_funcs.sh for sect in user platform workflow global cpl_aqm_parm \ task_run_fcst task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 53fbe03e3a..93b5845901 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_prdgen ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index 3f1b71ff73..2cae5c3b37 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_aqm_ics ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index ce34c9310f..4c477522b1 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index a3dbe475ad..3f960b4acd 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_bias_correction_o3 ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index aa12f30bff..bd326b1529 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_bias_correction_pm25 ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index de4cbead7f..5bf112c32a 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_fire_emission ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index 40d494fe43..030a8b8435 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_emission ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 96e62c95b3..76922c67c6 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_gfs_sfc ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 4644edc509..259b888c06 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_post_split ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index 7d788da5d9..ed7d25ff9b 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_point_source task_run_fcst ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index d5321c3558..d54be9f094 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_post_stat_o3 ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index 4e7d5d5f33..44ec5f5b9b 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_post_stat_pm25 ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index 8573410da0..2da0e77b76 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -11,10 +11,7 @@ for sect in user platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_pre_post task_run_post ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # #----------------------------------------------------------------------- diff --git a/ush/bash_utils/source_yaml.sh b/ush/bash_utils/source_yaml.sh new file mode 100644 index 0000000000..038df86d3a --- /dev/null +++ b/ush/bash_utils/source_yaml.sh @@ -0,0 +1,40 @@ + + +function source_yaml () { + + local func_name="${FUNCNAME[0]}" + + if [ "$#" -lt 1 ] ; then + print_err_msg_exit " +Incorrect number of arguments specified: + + Function name: ${func_name} + Number of args specified: $# + +Usage: + + ${func_name} yaml_file [section] + + yaml_file: path to the YAML file to source + section: optional subsection of yaml +" + fi + local section + yaml_file=$1 + section=$2 + + while read -r line ; do + + + # A regex to match list representations + list_regex="^[a-zA-Z_][a-zA-Z0-9_]*='[^']*'$" + if [[ $line =~ $list_regex ]] ; then + line=$(echo "$line" | sed -E "s/='\[(.*)\]'/=(\1)/") + line=${line/,/} + fi + if [[ $line =~ "None" ]] ; then + line=${line/None/} + fi + source <( echo "${line}" ) + done < <(uw config realize -i "${yaml_file} --output-format sh --key-path $section) +} diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 48af2f384d..527787780d 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -143,10 +143,7 @@ fi set -x +u # Source the necessary blocks of the experiment config YAML for sect in platform workflow ; do - while read -r line ; do - source <( echo "${line}" ) - done < <(uw config realize -i ${GLOBAL_VAR_DEFNS_FP} --output-format sh \ - --output-block ${sect}) + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done if [ "${machine}" != "wcoss2" ]; then diff --git a/ush/source_util_funcs.sh b/ush/source_util_funcs.sh index 0868f8ca2a..9feceaf68e 100644 --- a/ush/source_util_funcs.sh +++ b/ush/source_util_funcs.sh @@ -220,6 +220,15 @@ function source_util_funcs() { #----------------------------------------------------------------------- # . ${bashutils_dir}/eval_METplus_timestr_tmpl.sh + +# +#----------------------------------------------------------------------- +# +# Source the file that sources YAML files as if they were bash +# +#----------------------------------------------------------------------- +# + . ${bashutils_dir}/source_yaml.sh } source_util_funcs From 253590f47bfa3e89e8f5e755e56f00a836db24e0 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Mon, 17 Jun 2024 19:41:55 +0000 Subject: [PATCH 18/34] WIP --- jobs/JREGIONAL_GET_VERIF_OBS | 2 +- jobs/JREGIONAL_MAKE_ICS | 7 ++++++- jobs/JREGIONAL_MAKE_LBCS | 2 +- jobs/JREGIONAL_MAKE_OROG | 2 +- jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT | 2 +- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 2 +- ...GIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 2 +- ...GIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB | 2 +- jobs/JREGIONAL_RUN_MET_PB2NC_OBS | 2 +- jobs/JREGIONAL_RUN_MET_PCPCOMBINE | 2 +- jobs/JREGIONAL_RUN_POST | 4 ++-- scripts/exregional_get_extrn_mdl_files.sh | 2 ++ scripts/exregional_make_grid.sh | 13 ++++++++++++- scripts/exregional_make_lbcs.sh | 3 ++- scripts/exregional_run_fcst.sh | 2 +- scripts/exregional_run_post.sh | 2 +- ush/bash_utils/create_symlink_to_file.sh | 1 + ush/bash_utils/print_msg.sh | 2 +- ush/bash_utils/source_yaml.sh | 14 +++++--------- ush/create_aqm_rc_file.py | 4 ++-- ush/create_diag_table_file.py | 4 ++-- ush/create_model_configure_file.py | 4 ++-- ush/create_ufs_configure_file.py | 4 ++-- ush/generate_FV3LAM_wflow.py | 2 +- ush/job_preamble.sh | 2 +- ush/link_fix.py | 4 ++-- ush/load_modules_run_task.sh | 1 - ush/set_fv3nml_ens_stoch_seeds.py | 8 ++++---- ush/set_fv3nml_sfc_climo_filenames.py | 8 ++++---- ush/update_input_nml.py | 4 ++-- 30 files changed, 64 insertions(+), 49 deletions(-) diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index 83bf8eb9f4..ca85948209 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 881dbb9870..37b9134097 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -20,6 +20,9 @@ # SCRIPTSdir # USHdir # +# workflow: +# EXPTDIR +# #----------------------------------------------------------------------- # @@ -31,7 +34,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +set -x +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh @@ -80,6 +84,7 @@ for the FV3 (in NetCDF format). # #----------------------------------------------------------------------- # +set -x if [ $RUN_ENVIR = "nco" ]; then export INPUT_DATA="${COMIN}" else diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index 420c8258dc..4dc6d89c4a 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -32,7 +32,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index be4f6846a8..eeae7eb28a 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -30,7 +30,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user task_make_orog ; do +for sect in user workflow task_make_orog ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT index 8e1e37b431..6694ac6d7a 100755 --- a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT +++ b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT @@ -27,7 +27,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index 2800510c88..ffc49c6f5a 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -27,7 +27,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index 41f90221f5..e60a3846cb 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB index ff37722c01..654450284b 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS index d583d932da..aa8f60b7f3 100755 --- a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS +++ b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE index abd30e87af..8f0eb1a27a 100755 --- a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE +++ b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE @@ -29,7 +29,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index 138334f44e..6e280c3059 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -92,7 +92,7 @@ on the output files corresponding to a specified forecast hour. # minutes (fmn) are set to "00". This is necessary in order to pass # "fmn" into the post ex-script for the calculation of post_time. # -if [ $(boolify "${SUB_HOURLY_POST}" != "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}") != "TRUE" ]; then export fmn="00" fi # @@ -120,7 +120,7 @@ if [ "${RUN_ENVIR}" = "community" ]; then mkdir -p "${COMOUT}" fi -if [ $(boolify "${SUB_HOURLY_POST}" = "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}") = "TRUE" ]; then export DATA_FHR="${DATA:-$COMOUT}/$fhr$fmn" else export DATA_FHR="${DATA:-$COMOUT}/$fhr" diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index fcef9e4b95..9169ed61d1 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -71,6 +71,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh + +set -x for sect in user platform workflow global task_get_extrn_lbcs \ task_get_extrn_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index fc2092e875..9eeb8dbdb7 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -390,6 +390,7 @@ EOF # # Call the executable that generates the grid file. # +set -x PREP_STEP eval $RUN_CMD_SERIAL ${exec_fp} ${rgnl_grid_nml_fp} ${REDIRECT_OUT_ERR} || \ print_err_msg_exit "\ @@ -476,7 +477,17 @@ if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then elif [ "${GRID_GEN_METHOD}" = "ESGgrid" ]; then CRES="C${res_equiv}" fi -set_file_param "${GLOBAL_VAR_DEFNS_FP}" "CRES" "'$CRES'" + + (cat << EOF +workflow: + CRES: ${CRES} +EOF +) | uw config realize \ + --input-file $GLOBAL_VAR_DEFNS_FP \ + --update-format yaml \ + --output-file $GLOBAL_VAR_DEFNS_FP \ + --verbose + # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index b8211d31de..f58883fef0 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -86,7 +86,8 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do +set -x +for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_lbcs task_make_lbcs ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index c86f3ce39c..7e05406466 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -511,7 +511,7 @@ create_symlink_to_file ${FIELD_DICT_FP} ${DATA}/${FIELD_DICT_FN} ${relative_link if [ $(boolify ${WRITE_DOPOST}) = "TRUE" ]; then cp ${PARMdir}/upp/nam_micro_lookup.dat ./eta_micro_lookup.dat - if [ ${USE_CUSTOM_POST_CONFIG_FILE} = "TRUE" ]; then + if [ $(boolify ${USE_CUSTOM_POST_CONFIG_FILE}) = "TRUE" ]; then post_config_fp="${CUSTOM_POST_CONFIG_FP}" print_info_msg " ==================================================================== diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index 245f8a0e0d..cc7bba24cf 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -347,7 +347,7 @@ for fid in "${fids[@]}"; do create_symlink_to_file ${post_renamed_fn} ${FID}${symlink_suffix} TRUE fi # DBN alert - if [ $SENDDBN = "TRUE" ]; then + if [ "$SENDDBN" = "TRUE" ]; then $DBNROOT/bin/dbn_alert MODEL rrfs_post ${job} ${COMOUT}/${post_renamed_fn} fi done diff --git a/ush/bash_utils/create_symlink_to_file.sh b/ush/bash_utils/create_symlink_to_file.sh index c6a5213326..0cfcdc9fdf 100644 --- a/ush/bash_utils/create_symlink_to_file.sh +++ b/ush/bash_utils/create_symlink_to_file.sh @@ -30,6 +30,7 @@ fi target=$1 symlink=$2 relative=${3:-TRUE} +relative=$(boolify $relative) # #----------------------------------------------------------------------- # diff --git a/ush/bash_utils/print_msg.sh b/ush/bash_utils/print_msg.sh index 28a70d1431..8b032f9698 100644 --- a/ush/bash_utils/print_msg.sh +++ b/ush/bash_utils/print_msg.sh @@ -68,7 +68,7 @@ function print_info_msg() { elif [ "$#" -eq 2 ]; then - verbose="$1" + verbose=$(boolify "$1") info_msg="$2" # #----------------------------------------------------------------------- diff --git a/ush/bash_utils/source_yaml.sh b/ush/bash_utils/source_yaml.sh index 038df86d3a..669408416e 100644 --- a/ush/bash_utils/source_yaml.sh +++ b/ush/bash_utils/source_yaml.sh @@ -27,14 +27,10 @@ Usage: # A regex to match list representations - list_regex="^[a-zA-Z_][a-zA-Z0-9_]*='[^']*'$" - if [[ $line =~ $list_regex ]] ; then - line=$(echo "$line" | sed -E "s/='\[(.*)\]'/=(\1)/") - line=${line/,/} - fi - if [[ $line =~ "None" ]] ; then - line=${line/None/} - fi + line=$(echo "$line" | sed -E "s/='\[(.*)\]'/=(\1)/") + line=${line//,/} + line=${line//\"/} + line=${line/None/} source <( echo "${line}" ) - done < <(uw config realize -i "${yaml_file} --output-format sh --key-path $section) + done < <(uw config realize -i "${yaml_file}" --output-format sh --key-path $section) } diff --git a/ush/create_aqm_rc_file.py b/ush/create_aqm_rc_file.py index 739a4d9f18..c37ed05d29 100644 --- a/ush/create_aqm_rc_file.py +++ b/ush/create_aqm_rc_file.py @@ -13,7 +13,7 @@ cfg_to_yaml_str, flatten_dict, import_vars, - load_shell_config, + load_yaml_config, print_info_msg, print_input_args, str_to_type, @@ -158,7 +158,7 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) cfg = flatten_dict(cfg) import_vars(dictionary=cfg) create_aqm_rc_file( diff --git a/ush/create_diag_table_file.py b/ush/create_diag_table_file.py index 975165dfe5..113953172d 100644 --- a/ush/create_diag_table_file.py +++ b/ush/create_diag_table_file.py @@ -14,7 +14,7 @@ cfg_to_yaml_str, flatten_dict, import_vars, - load_shell_config, + load_yaml_config, print_info_msg, print_input_args, ) @@ -102,7 +102,7 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) cfg = flatten_dict(cfg) import_vars(dictionary=cfg) create_diag_table_file(args.run_dir) diff --git a/ush/create_model_configure_file.py b/ush/create_model_configure_file.py index cd39087688..b8767f635a 100644 --- a/ush/create_model_configure_file.py +++ b/ush/create_model_configure_file.py @@ -13,7 +13,7 @@ cfg_to_yaml_str, flatten_dict, import_vars, - load_shell_config, + load_yaml_config, lowercase, print_info_msg, print_input_args, @@ -296,7 +296,7 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) cfg = flatten_dict(cfg) import_vars(dictionary=cfg) create_model_configure_file( diff --git a/ush/create_ufs_configure_file.py b/ush/create_ufs_configure_file.py index 9d4ea8afa4..3fd82f488b 100644 --- a/ush/create_ufs_configure_file.py +++ b/ush/create_ufs_configure_file.py @@ -15,7 +15,7 @@ cfg_to_yaml_str, flatten_dict, import_vars, - load_shell_config, + load_yaml_config, print_info_msg, print_input_args, ) @@ -113,7 +113,7 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) cfg = flatten_dict(cfg) import_vars(dictionary=cfg) create_ufs_configure_file( diff --git a/ush/generate_FV3LAM_wflow.py b/ush/generate_FV3LAM_wflow.py index ba0e9f3a2b..c109bff537 100755 --- a/ush/generate_FV3LAM_wflow.py +++ b/ush/generate_FV3LAM_wflow.py @@ -639,7 +639,7 @@ def generate_FV3LAM_wflow( input_format="nml", output_file=FV3_NML_STOCH_FP, output_format="nml", - supplemental_configs=[settings], + update_config=get_nml_config(settings), ) # diff --git a/ush/job_preamble.sh b/ush/job_preamble.sh index 47f60d3bc6..01871e404c 100644 --- a/ush/job_preamble.sh +++ b/ush/job_preamble.sh @@ -67,7 +67,7 @@ export COMOUTwmo="${COMOUTwmo:-${COMOUT}/wmo}" # #----------------------------------------------------------------------- # -if [ ${subcyc} -ne 0 ]; then +if [ ${subcyc:-0} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" else export cycle="t${cyc}z" diff --git a/ush/link_fix.py b/ush/link_fix.py index fdd9a65f28..f0d103d8ea 100755 --- a/ush/link_fix.py +++ b/ush/link_fix.py @@ -18,7 +18,7 @@ cd_vrfy, mkdir_vrfy, find_pattern_in_str, - load_shell_config, + load_yaml_config, ) @@ -403,7 +403,7 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) link_fix( verbose=cfg["workflow"]["VERBOSE"], file_group=args.file_group, diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 527787780d..acbfff751c 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -132,7 +132,6 @@ fi # 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. -SRW_ENV="DEV-uwtools" if [ -n "${SRW_ENV:-}" ] ; then set +u conda deactivate diff --git a/ush/set_fv3nml_ens_stoch_seeds.py b/ush/set_fv3nml_ens_stoch_seeds.py index 3459fa8707..0b9b186210 100644 --- a/ush/set_fv3nml_ens_stoch_seeds.py +++ b/ush/set_fv3nml_ens_stoch_seeds.py @@ -10,12 +10,12 @@ import sys from textwrap import dedent -from uwtools.api.config import realize +from uwtools.api.config import get_nml_config, realize from python_utils import ( cfg_to_yaml_str, import_vars, - load_shell_config, + load_yaml_config, print_input_args, print_info_msg, ) @@ -112,7 +112,7 @@ def set_fv3nml_ens_stoch_seeds(cdate, expt_config): input_format="nml", output_file=fv3_nml_ensmem_fp, output_format="nml", - supplemental_configs=[settings], + update_config=get_nml_config(settings), ) def parse_args(argv): @@ -142,5 +142,5 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) set_fv3nml_ens_stoch_seeds(args.cdate, cfg) diff --git a/ush/set_fv3nml_sfc_climo_filenames.py b/ush/set_fv3nml_sfc_climo_filenames.py index 417aa0b5ee..7251a5b0e6 100644 --- a/ush/set_fv3nml_sfc_climo_filenames.py +++ b/ush/set_fv3nml_sfc_climo_filenames.py @@ -10,14 +10,14 @@ import sys from textwrap import dedent -from uwtools.api.config import get_yaml_config, realize +from uwtools.api.config import get_nml_config, get_yaml_config, realize from python_utils import ( cfg_to_yaml_str, check_var_valid_value, flatten_dict, import_vars, - load_shell_config, + load_yaml_config, print_info_msg, ) @@ -105,7 +105,7 @@ def set_fv3nml_sfc_climo_filenames(config, debug=False): input_format="nml", output_file=FV3_NML_FP, output_format="nml", - supplemental_configs=[settings], + update_config=get_nml_config(settings), ) def parse_args(argv): @@ -127,6 +127,6 @@ def parse_args(argv): if __name__ == "__main__": args = parse_args(sys.argv[1:]) - cfg = load_shell_config(args.path_to_defns) + cfg = load_yaml_config(args.path_to_defns) cfg = flatten_dict(cfg) set_fv3nml_sfc_climo_filenames(cfg, args.debug) diff --git a/ush/update_input_nml.py b/ush/update_input_nml.py index e975d9bc08..b85bbacd4a 100644 --- a/ush/update_input_nml.py +++ b/ush/update_input_nml.py @@ -9,7 +9,7 @@ import sys from textwrap import dedent -from uwtools.api.config import realize +from uwtools.api.config import get_nml_config, realize from python_utils import ( print_input_args, @@ -77,7 +77,7 @@ def update_input_nml(namelist, restart, aqm_na_13km): input_format="nml", output_file=namelist, output_format="nml", - supplemental_configs=[settings], + update_config=get_nml_config(settings), ) def parse_args(argv): From e2424905840f4d1483770b3875286b146481c9b7 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 18 Jun 2024 16:50:48 +0000 Subject: [PATCH 19/34] Add nco section to be sourced always. --- jobs/JREGIONAL_CHECK_POST_OUTPUT | 2 +- jobs/JREGIONAL_GET_EXTRN_MDL_FILES | 2 +- jobs/JREGIONAL_GET_VERIF_OBS | 2 +- jobs/JREGIONAL_INTEGRATION_TEST | 2 +- jobs/JREGIONAL_MAKE_GRID | 2 +- jobs/JREGIONAL_MAKE_ICS | 2 +- jobs/JREGIONAL_MAKE_LBCS | 2 +- jobs/JREGIONAL_MAKE_OROG | 2 +- jobs/JREGIONAL_MAKE_SFC_CLIMO | 2 +- jobs/JREGIONAL_PLOT_ALLVARS | 7 ++++++- jobs/JREGIONAL_RUN_FCST | 2 +- jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT | 2 +- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX | 2 +- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN | 2 +- jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB | 2 +- jobs/JREGIONAL_RUN_MET_PB2NC_OBS | 2 +- jobs/JREGIONAL_RUN_MET_PCPCOMBINE | 2 +- jobs/JREGIONAL_RUN_POST | 2 +- jobs/JREGIONAL_RUN_PRDGEN | 2 +- jobs/JSRW_AQM_ICS | 2 +- jobs/JSRW_AQM_LBCS | 2 +- jobs/JSRW_BIAS_CORRECTION_O3 | 2 +- jobs/JSRW_BIAS_CORRECTION_PM25 | 2 +- jobs/JSRW_FIRE_EMISSION | 2 +- jobs/JSRW_NEXUS_EMISSION | 2 +- jobs/JSRW_NEXUS_GFS_SFC | 2 +- jobs/JSRW_NEXUS_POST_SPLIT | 2 +- jobs/JSRW_POINT_SOURCE | 2 +- jobs/JSRW_POST_STAT_O3 | 2 +- jobs/JSRW_POST_STAT_PM25 | 2 +- jobs/JSRW_PRE_POST_STAT | 2 +- modulefiles/tasks/hera/plot_allvars.local.lua | 2 +- scripts/exregional_check_post_output.sh | 2 +- scripts/exregional_get_extrn_mdl_files.sh | 2 +- scripts/exregional_get_verif_obs.sh | 2 +- scripts/exregional_make_grid.sh | 2 +- scripts/exregional_make_ics.sh | 2 +- scripts/exregional_make_lbcs.sh | 2 +- scripts/exregional_make_orog.sh | 2 +- scripts/exregional_make_sfc_climo.sh | 2 +- scripts/exregional_run_fcst.sh | 4 ++-- scripts/exregional_run_met_genensprod_or_ensemblestat.sh | 2 +- scripts/exregional_run_met_gridstat_or_pointstat_vx.sh | 2 +- .../exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh | 2 +- .../exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh | 2 +- scripts/exregional_run_met_pb2nc_obs.sh | 2 +- scripts/exregional_run_met_pcpcombine.sh | 2 +- scripts/exregional_run_post.sh | 2 +- scripts/exregional_run_prdgen.sh | 2 +- scripts/exsrw_aqm_ics.sh | 2 +- scripts/exsrw_aqm_lbcs.sh | 2 +- scripts/exsrw_bias_correction_o3.sh | 2 +- scripts/exsrw_bias_correction_pm25.sh | 2 +- scripts/exsrw_fire_emission.sh | 2 +- scripts/exsrw_nexus_emission.sh | 2 +- scripts/exsrw_nexus_gfs_sfc.sh | 2 +- scripts/exsrw_nexus_post_split.sh | 2 +- scripts/exsrw_point_source.sh | 2 +- scripts/exsrw_post_stat_o3.sh | 2 +- scripts/exsrw_post_stat_pm25.sh | 2 +- scripts/exsrw_pre_post_stat.sh | 2 +- ush/job_preamble.sh | 4 +++- ush/load_modules_run_task.sh | 2 +- 63 files changed, 71 insertions(+), 64 deletions(-) diff --git a/jobs/JREGIONAL_CHECK_POST_OUTPUT b/jobs/JREGIONAL_CHECK_POST_OUTPUT index b806a06d7e..358b1fad72 100755 --- a/jobs/JREGIONAL_CHECK_POST_OUTPUT +++ b/jobs/JREGIONAL_CHECK_POST_OUTPUT @@ -31,7 +31,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES index a58d93db41..fbd582201a 100755 --- a/jobs/JREGIONAL_GET_EXTRN_MDL_FILES +++ b/jobs/JREGIONAL_GET_EXTRN_MDL_FILES @@ -57,7 +57,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow task_get_extrn_lbcs task_get_extrn_ics ; do +for sect in user nco workflow task_get_extrn_lbcs task_get_extrn_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_GET_VERIF_OBS b/jobs/JREGIONAL_GET_VERIF_OBS index ca85948209..7c083e96c6 100755 --- a/jobs/JREGIONAL_GET_VERIF_OBS +++ b/jobs/JREGIONAL_GET_VERIF_OBS @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_INTEGRATION_TEST b/jobs/JREGIONAL_INTEGRATION_TEST index c6e73a53ed..983981ecf3 100755 --- a/jobs/JREGIONAL_INTEGRATION_TEST +++ b/jobs/JREGIONAL_INTEGRATION_TEST @@ -34,7 +34,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_GRID b/jobs/JREGIONAL_MAKE_GRID index c15aefd0ac..01484041e9 100755 --- a/jobs/JREGIONAL_MAKE_GRID +++ b/jobs/JREGIONAL_MAKE_GRID @@ -34,7 +34,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow task_make_grid ; do +for sect in user nco workflow task_make_grid ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 37b9134097..6fb429c38c 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -35,7 +35,7 @@ # . $USHdir/source_util_funcs.sh set -x -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_LBCS b/jobs/JREGIONAL_MAKE_LBCS index 4dc6d89c4a..91d9d3edbe 100755 --- a/jobs/JREGIONAL_MAKE_LBCS +++ b/jobs/JREGIONAL_MAKE_LBCS @@ -32,7 +32,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index eeae7eb28a..abd2be03d6 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -30,7 +30,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow task_make_orog ; do +for sect in user nco workflow task_make_orog ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_MAKE_SFC_CLIMO b/jobs/JREGIONAL_MAKE_SFC_CLIMO index de02bedec0..30b2d2c346 100755 --- a/jobs/JREGIONAL_MAKE_SFC_CLIMO +++ b/jobs/JREGIONAL_MAKE_SFC_CLIMO @@ -33,7 +33,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow task_make_sfc_climo ; do +for sect in user nco workflow task_make_sfc_climo ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_PLOT_ALLVARS b/jobs/JREGIONAL_PLOT_ALLVARS index 3f36b0657e..be5ee10f82 100755 --- a/jobs/JREGIONAL_PLOT_ALLVARS +++ b/jobs/JREGIONAL_PLOT_ALLVARS @@ -48,7 +48,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow task_plot_allvars task_run_fcst ; do +for sect in user nco platform workflow task_plot_allvars task_run_fcst ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh @@ -109,6 +109,11 @@ COMOUT_REF=$(eval echo ${COMOUT_REF}) #----------------------------------------------------------------------- # +if [ -n "${SRW_GRAPHICS_ENV:-}" ] ; then + set +u + conda activate ${SRW_GRAPHICS_ENV} + set -u +fi # plot all variables $SCRIPTSdir/exregional_plot_allvars.py \ --cycle ${CDATE} \ diff --git a/jobs/JREGIONAL_RUN_FCST b/jobs/JREGIONAL_RUN_FCST index d1d4ef2bdf..2542ab32f8 100755 --- a/jobs/JREGIONAL_RUN_FCST +++ b/jobs/JREGIONAL_RUN_FCST @@ -33,7 +33,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh "TRUE" diff --git a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT index 6694ac6d7a..c7aee12df1 100755 --- a/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT +++ b/jobs/JREGIONAL_RUN_MET_GENENSPROD_OR_ENSEMBLESTAT @@ -27,7 +27,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX index ffc49c6f5a..e1207e0a81 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX @@ -27,7 +27,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN index e60a3846cb..29b22502a4 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSMEAN @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB index 654450284b..731cf575a5 100755 --- a/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB +++ b/jobs/JREGIONAL_RUN_MET_GRIDSTAT_OR_POINTSTAT_VX_ENSPROB @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS index aa8f60b7f3..89c9bb73f4 100755 --- a/jobs/JREGIONAL_RUN_MET_PB2NC_OBS +++ b/jobs/JREGIONAL_RUN_MET_PB2NC_OBS @@ -28,7 +28,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE index 8f0eb1a27a..8ac29887e8 100755 --- a/jobs/JREGIONAL_RUN_MET_PCPCOMBINE +++ b/jobs/JREGIONAL_RUN_MET_PCPCOMBINE @@ -29,7 +29,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow ; do +for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_POST b/jobs/JREGIONAL_RUN_POST index 6e280c3059..58c469fc6d 100755 --- a/jobs/JREGIONAL_RUN_POST +++ b/jobs/JREGIONAL_RUN_POST @@ -47,7 +47,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow task_run_post ; do +for sect in user nco platform workflow task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 2090c5a40a..3de22f9f9e 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -41,7 +41,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow task_run_post ; do +for sect in user nco platform workflow task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done . $USHdir/job_preamble.sh diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index fd38c7e1ea..a1ecdefbba 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -31,7 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index 45ef0365f6..1b6091ca4d 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -31,7 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ task_make_orog task_make_lbcs task_aqm_lbcs ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index f3c04dba23..3f23203d32 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ task_bias_correction_o3 ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index 72e2926b7b..7cb26ca8f2 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_run_post \ task_bias_correction_pm25 ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index b7d5216597..53e2dc463e 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index e350524e70..09465a285d 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_emission ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index b12fa3b04a..38a8a68558 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index 9b0f10a04a..2c380af288 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index b43c6391d7..5ab1fe8696 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_point_source \ task_run_fcst ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index 15d183ce9c..3827f01d3b 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index e2b19c5705..c1151a1468 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 2a18f5966f..7859b44ad9 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/modulefiles/tasks/hera/plot_allvars.local.lua b/modulefiles/tasks/hera/plot_allvars.local.lua index b7e9528710..85291013c7 100644 --- a/modulefiles/tasks/hera/plot_allvars.local.lua +++ b/modulefiles/tasks/hera/plot_allvars.local.lua @@ -1,2 +1,2 @@ load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/scripts/exregional_check_post_output.sh b/scripts/exregional_check_post_output.sh index 72148537ad..320311cc94 100755 --- a/scripts/exregional_check_post_output.sh +++ b/scripts/exregional_check_post_output.sh @@ -46,7 +46,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user workflow global verification constants ; do +for sect in user nco workflow global verification constants task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 9169ed61d1..3a323b6b80 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -73,7 +73,7 @@ . $USHdir/source_util_funcs.sh set -x -for sect in user platform workflow global task_get_extrn_lbcs \ +for sect in user nco platform workflow global task_get_extrn_lbcs \ task_get_extrn_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/scripts/exregional_get_verif_obs.sh b/scripts/exregional_get_verif_obs.sh index f257633ae8..6ad6aaed0e 100755 --- a/scripts/exregional_get_verif_obs.sh +++ b/scripts/exregional_get_verif_obs.sh @@ -31,7 +31,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user ; do +for sect in user nco ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 9eeb8dbdb7..edca06f135 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -102,7 +102,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow constants grid_params task_make_grid ; do +for sect in user nco platform workflow constants grid_params task_make_grid ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_make_ics.sh b/scripts/exregional_make_ics.sh index 6cdeae47aa..8cd49076b0 100755 --- a/scripts/exregional_make_ics.sh +++ b/scripts/exregional_make_ics.sh @@ -86,7 +86,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do +for sect in user nco platform workflow global cpl_aqm_parm constants task_get_extrn_ics task_make_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index f58883fef0..58d0434bcc 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -87,7 +87,7 @@ # . $USHdir/source_util_funcs.sh set -x -for sect in user platform workflow global cpl_aqm_parm constants task_get_extrn_lbcs task_make_lbcs ; do +for sect in user nco platform workflow global cpl_aqm_parm constants task_get_extrn_lbcs task_make_lbcs ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_make_orog.sh b/scripts/exregional_make_orog.sh index 88dd4b8d4a..34b1675d8c 100755 --- a/scripts/exregional_make_orog.sh +++ b/scripts/exregional_make_orog.sh @@ -89,7 +89,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow constants grid_params task_make_grid task_make_orog task_make_grid ; do +for sect in user nco platform workflow constants grid_params task_make_grid task_make_orog task_make_grid ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/scripts/exregional_make_sfc_climo.sh b/scripts/exregional_make_sfc_climo.sh index a522006011..a916228b1f 100755 --- a/scripts/exregional_make_sfc_climo.sh +++ b/scripts/exregional_make_sfc_climo.sh @@ -55,7 +55,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow constants task_make_sfc_climo ; do +for sect in user nco platform workflow constants task_make_sfc_climo ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 7e05406466..735f8b26ef 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -116,7 +116,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow global cpl_aqm_parm constants fixed_files \ +for sect in user nco platform workflow global cpl_aqm_parm constants fixed_files \ task_get_extrn_lbcs task_run_fcst task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done @@ -920,7 +920,7 @@ if [ $(boolify ${WRITE_DOPOST}) = "TRUE" ]; then create_symlink_to_file ${post_renamed_fn} ${FID}${symlink_suffix} TRUE fi # DBN alert - if [ $SENDDBN = "TRUE" ]; then + if [ "$SENDDBN" = "TRUE" ]; then $DBNROOT/bin/dbn_alert MODEL rrfs_post ${job} ${COMOUT}/${post_renamed_fn} fi done diff --git a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh index 41dc096250..05503bb963 100755 --- a/scripts/exregional_run_met_genensprod_or_ensemblestat.sh +++ b/scripts/exregional_run_met_genensprod_or_ensemblestat.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_ensgrid ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh index 355624fd66..03c6093943 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_gridstat task_run_vx_pointstat ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh index a3b77ea4ca..12a54dc21b 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensmean.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_vx_ensgrid_mean task_run_vx_enspoint_mean ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh index ab3acea0fc..8fd4a59dfe 100755 --- a/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh +++ b/scripts/exregional_run_met_gridstat_or_pointstat_vx_ensprob.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_vx_ensgrid_prob task_run_vx_enspoint_prob task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_run_met_pb2nc_obs.sh b/scripts/exregional_run_met_pb2nc_obs.sh index 96b55b7ce0..5281021f01 100755 --- a/scripts/exregional_run_met_pb2nc_obs.sh +++ b/scripts/exregional_run_met_pb2nc_obs.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_met_pb2nc_obs ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_run_met_pcpcombine.sh b/scripts/exregional_run_met_pcpcombine.sh index 1b609bc621..ce9e78ab17 100755 --- a/scripts/exregional_run_met_pcpcombine.sh +++ b/scripts/exregional_run_met_pcpcombine.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_met_pcpcombine task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exregional_run_post.sh b/scripts/exregional_run_post.sh index cc7bba24cf..3f0ca93df9 100755 --- a/scripts/exregional_run_post.sh +++ b/scripts/exregional_run_post.sh @@ -65,7 +65,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow global cpl_aqm_parm \ +for sect in user nco platform workflow global cpl_aqm_parm \ task_run_fcst task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done diff --git a/scripts/exregional_run_prdgen.sh b/scripts/exregional_run_prdgen.sh index 93b5845901..5baa779821 100755 --- a/scripts/exregional_run_prdgen.sh +++ b/scripts/exregional_run_prdgen.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_run_prdgen ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index 2cae5c3b37..5cc8a7984c 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_aqm_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 4c477522b1..545b9bee9a 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_bias_correction_o3.sh b/scripts/exsrw_bias_correction_o3.sh index 3f960b4acd..343e7e6f2b 100755 --- a/scripts/exsrw_bias_correction_o3.sh +++ b/scripts/exsrw_bias_correction_o3.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_bias_correction_o3 ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_bias_correction_pm25.sh b/scripts/exsrw_bias_correction_pm25.sh index bd326b1529..70cf512589 100755 --- a/scripts/exsrw_bias_correction_pm25.sh +++ b/scripts/exsrw_bias_correction_pm25.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_bias_correction_pm25 ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index 5bf112c32a..c8782bfd78 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_fire_emission ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_nexus_emission.sh b/scripts/exsrw_nexus_emission.sh index 030a8b8435..0fa8c48754 100755 --- a/scripts/exsrw_nexus_emission.sh +++ b/scripts/exsrw_nexus_emission.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_emission ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 76922c67c6..19fee5e789 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_gfs_sfc ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 259b888c06..9c2e1cee73 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_nexus_post_split ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_point_source.sh b/scripts/exsrw_point_source.sh index ed7d25ff9b..4cd693506c 100755 --- a/scripts/exsrw_point_source.sh +++ b/scripts/exsrw_point_source.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_point_source task_run_fcst ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index d54be9f094..d92e409dc3 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_post_stat_o3 ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index 44ec5f5b9b..99645fb96d 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_run_post task_post_stat_pm25 ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index 2da0e77b76..b2e8d693cb 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -8,7 +8,7 @@ #----------------------------------------------------------------------- # . ${USHsrw}/source_util_funcs.sh -for sect in user platform workflow nco global verification cpl_aqm_parm \ +for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ task_pre_post task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} diff --git a/ush/job_preamble.sh b/ush/job_preamble.sh index 01871e404c..dbe4219b15 100644 --- a/ush/job_preamble.sh +++ b/ush/job_preamble.sh @@ -1,5 +1,7 @@ #!/bin/bash +set +u + # #----------------------------------------------------------------------- # @@ -215,4 +217,4 @@ In directory: \"${scrfunc_dir}\" ========================================================================" } - +set -u diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index acbfff751c..e99b3818b5 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -224,7 +224,7 @@ Launching J-job (jjob_fp) for task \"${task_name}\" ... jjob_fp = \"${jjob_fp}\" " -/bin/bash "${jjob_fp}" +source "${jjob_fp}" # #----------------------------------------------------------------------- From 241ef5d664c30764d2ddbdc82ad251fbb45d1be8 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 18 Jun 2024 23:13:55 +0000 Subject: [PATCH 20/34] A bit of clean up --- jobs/JREGIONAL_MAKE_ICS | 2 -- scripts/exregional_get_extrn_mdl_files.sh | 3 --- scripts/exregional_make_grid.sh | 1 - scripts/exregional_run_fcst.sh | 4 ++-- ush/job_preamble.sh | 1 - ush/load_modules_run_task.sh | 2 +- 6 files changed, 3 insertions(+), 10 deletions(-) diff --git a/jobs/JREGIONAL_MAKE_ICS b/jobs/JREGIONAL_MAKE_ICS index 6fb429c38c..10a3b36fb7 100755 --- a/jobs/JREGIONAL_MAKE_ICS +++ b/jobs/JREGIONAL_MAKE_ICS @@ -34,7 +34,6 @@ #----------------------------------------------------------------------- # . $USHdir/source_util_funcs.sh -set -x for sect in user nco workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done @@ -84,7 +83,6 @@ for the FV3 (in NetCDF format). # #----------------------------------------------------------------------- # -set -x if [ $RUN_ENVIR = "nco" ]; then export INPUT_DATA="${COMIN}" else diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 3a323b6b80..2d6f58f3e2 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -60,9 +60,6 @@ #----------------------------------------------------------------------- # - - - # #----------------------------------------------------------------------- # diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index edca06f135..9786d75ba4 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -390,7 +390,6 @@ EOF # # Call the executable that generates the grid file. # -set -x PREP_STEP eval $RUN_CMD_SERIAL ${exec_fp} ${rgnl_grid_nml_fp} ${REDIRECT_OUT_ERR} || \ print_err_msg_exit "\ diff --git a/scripts/exregional_run_fcst.sh b/scripts/exregional_run_fcst.sh index 735f8b26ef..0241dbd728 100755 --- a/scripts/exregional_run_fcst.sh +++ b/scripts/exregional_run_fcst.sh @@ -574,7 +574,7 @@ if ([ $(boolify "${DO_SPP}") = "TRUE" ] || \ [ $(boolify "${DO_LSM_SPP}") = "TRUE" ]); then STOCH="TRUE" fi -if [ $(boolify "${STOCH}") = "TRUE" ]; then +if [ "${STOCH}" = "TRUE" ]; then cp ${FV3_NML_STOCH_FP} ${DATA}/${FV3_NML_FN} else ln -sf ${FV3_NML_FP} ${DATA}/${FV3_NML_FN} @@ -917,7 +917,7 @@ if [ $(boolify ${WRITE_DOPOST}) = "TRUE" ]; then if [ $RUN_ENVIR != "nco" ]; then basetime=$( $DATE_UTIL --date "$yyyymmdd $hh" +%y%j%H%M ) symlink_suffix="_${basetime}f${fhr}${post_mn}" - create_symlink_to_file ${post_renamed_fn} ${FID}${symlink_suffix} TRUE + create_symlink_to_file ${post_renamed_fn} ${FID}${symlink_suffix} TRUE fi # DBN alert if [ "$SENDDBN" = "TRUE" ]; then diff --git a/ush/job_preamble.sh b/ush/job_preamble.sh index dbe4219b15..ecfb94fb50 100644 --- a/ush/job_preamble.sh +++ b/ush/job_preamble.sh @@ -217,4 +217,3 @@ In directory: \"${scrfunc_dir}\" ========================================================================" } -set -u diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index e99b3818b5..9813cd9eff 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -103,7 +103,7 @@ else export pid=${pid:-$$} fi export jobid=${job}.${pid} -#set -u +set -u # #----------------------------------------------------------------------- # From f360da3712c5728f89be6318586c98966a192435 Mon Sep 17 00:00:00 2001 From: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com> Date: Fri, 28 Jun 2024 08:24:21 -0600 Subject: [PATCH 21/34] Update jobs/JREGIONAL_MAKE_OROG Co-authored-by: Michael Lueken <63728921+MichaelLueken@users.noreply.github.com> --- jobs/JREGIONAL_MAKE_OROG | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jobs/JREGIONAL_MAKE_OROG b/jobs/JREGIONAL_MAKE_OROG index abd2be03d6..28e2f965a5 100755 --- a/jobs/JREGIONAL_MAKE_OROG +++ b/jobs/JREGIONAL_MAKE_OROG @@ -3,8 +3,8 @@ # #----------------------------------------------------------------------- # -# The J-job to run chgres_cube for preparing lateral boundary conditions -# for the FV3 forecast +# The J-Job that generates input NetCDF orography files for running the +# regional configuration of FV3 # # Run-time environment variables: # From b31f6c78a9a2396b829f50486ce5374a14efdeba Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Fri, 12 Jul 2024 22:41:29 +0000 Subject: [PATCH 22/34] Applying suggested changes from review. --- .../tasks/cheyenne/plot_allvars.local.lua | 2 +- .../tasks/derecho/plot_allvars.local.lua | 2 +- modulefiles/tasks/gaea/plot_allvars.local.lua | 2 +- .../tasks/hercules/plot_allvars.local.lua | 2 +- modulefiles/tasks/jet/plot_allvars.local.lua | 2 +- .../tasks/noaacloud/plot_allvars.local.lua | 2 +- .../tasks/orion/plot_allvars.local.lua | 2 +- tests/WE2E/utils.py | 6 ++--- ush/bash_utils/check_var_valid_value.sh | 2 +- ush/generate_FV3LAM_wflow.py | 23 ++++++++++++++++--- ush/launch_FV3LAM_wflow.sh | 9 ++++++-- 11 files changed, 38 insertions(+), 16 deletions(-) diff --git a/modulefiles/tasks/cheyenne/plot_allvars.local.lua b/modulefiles/tasks/cheyenne/plot_allvars.local.lua index b49b8bb863..7cee04231e 100644 --- a/modulefiles/tasks/cheyenne/plot_allvars.local.lua +++ b/modulefiles/tasks/cheyenne/plot_allvars.local.lua @@ -1,3 +1,3 @@ unload("python") load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/modulefiles/tasks/derecho/plot_allvars.local.lua b/modulefiles/tasks/derecho/plot_allvars.local.lua index b49b8bb863..7cee04231e 100644 --- a/modulefiles/tasks/derecho/plot_allvars.local.lua +++ b/modulefiles/tasks/derecho/plot_allvars.local.lua @@ -1,3 +1,3 @@ unload("python") load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/modulefiles/tasks/gaea/plot_allvars.local.lua b/modulefiles/tasks/gaea/plot_allvars.local.lua index 104da06f5c..41da34ecca 100644 --- a/modulefiles/tasks/gaea/plot_allvars.local.lua +++ b/modulefiles/tasks/gaea/plot_allvars.local.lua @@ -1,4 +1,4 @@ unload("python") load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/modulefiles/tasks/hercules/plot_allvars.local.lua b/modulefiles/tasks/hercules/plot_allvars.local.lua index b49b8bb863..7cee04231e 100644 --- a/modulefiles/tasks/hercules/plot_allvars.local.lua +++ b/modulefiles/tasks/hercules/plot_allvars.local.lua @@ -1,3 +1,3 @@ unload("python") load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/modulefiles/tasks/jet/plot_allvars.local.lua b/modulefiles/tasks/jet/plot_allvars.local.lua index b7e9528710..85291013c7 100644 --- a/modulefiles/tasks/jet/plot_allvars.local.lua +++ b/modulefiles/tasks/jet/plot_allvars.local.lua @@ -1,2 +1,2 @@ load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/modulefiles/tasks/noaacloud/plot_allvars.local.lua b/modulefiles/tasks/noaacloud/plot_allvars.local.lua index cc122f69b2..2fd9b41eb5 100644 --- a/modulefiles/tasks/noaacloud/plot_allvars.local.lua +++ b/modulefiles/tasks/noaacloud/plot_allvars.local.lua @@ -2,4 +2,4 @@ unload("python") append_path("MODULEPATH","/contrib/EPIC/miniconda3/modulefiles") load(pathJoin("miniconda3", os.getenv("miniconda3_ver") or "4.12.0")) -setenv("SRW_ENV", "regional_workflow") +setenv("SRW_GRAPHICS_ENV", "regional_workflow") diff --git a/modulefiles/tasks/orion/plot_allvars.local.lua b/modulefiles/tasks/orion/plot_allvars.local.lua index b49b8bb863..7cee04231e 100644 --- a/modulefiles/tasks/orion/plot_allvars.local.lua +++ b/modulefiles/tasks/orion/plot_allvars.local.lua @@ -1,3 +1,3 @@ unload("python") load("conda") -setenv("SRW_ENV", "srw_graphics") +setenv("SRW_GRAPHICS_ENV", "srw_graphics") diff --git a/tests/WE2E/utils.py b/tests/WE2E/utils.py index fb96dab004..eb3c49fcba 100755 --- a/tests/WE2E/utils.py +++ b/tests/WE2E/utils.py @@ -21,7 +21,7 @@ cfg_to_yaml_str, flatten_dict, load_config_file, - load_shell_config + load_yaml_config ) REPORT_WIDTH = 100 @@ -154,13 +154,13 @@ def calculate_core_hours(expts_dict: dict) -> dict: for expt in expts_dict: # Read variable definitions file - vardefs_file = os.path.join(expts_dict[expt]["expt_dir"],"var_defns.sh") + vardefs_file = os.path.join(expts_dict[expt]["expt_dir"],"var_defns.yaml") if not os.path.isfile(vardefs_file): logging.warning(f"\nWARNING: For experiment {expt}, variable definitions file") logging.warning(f"{vardefs_file}\ndoes not exist!\n\nDropping experiment from summary") continue logging.debug(f'Reading variable definitions file {vardefs_file}') - vardefs = load_shell_config(vardefs_file) + vardefs = load_yaml_config(vardefs_file) vdf = flatten_dict(vardefs) cores_per_node = vdf["NCORES_PER_NODE"] for task in expts_dict[expt]: diff --git a/ush/bash_utils/check_var_valid_value.sh b/ush/bash_utils/check_var_valid_value.sh index 21288184db..5b942c1f73 100644 --- a/ush/bash_utils/check_var_valid_value.sh +++ b/ush/bash_utils/check_var_valid_value.sh @@ -96,7 +96,7 @@ where the arguments are defined as follows: var_value=${!var_name} valid_var_values_at="$valid_var_values_array_name[@]" - valid_var_values=("${!valid_var_values_at}") + valid_var_values=("${!valid_var_values_at:-}") if [ "$#" -eq 3 ]; then err_msg="$3" diff --git a/ush/generate_FV3LAM_wflow.py b/ush/generate_FV3LAM_wflow.py index c109bff537..6b703bed61 100755 --- a/ush/generate_FV3LAM_wflow.py +++ b/ush/generate_FV3LAM_wflow.py @@ -10,13 +10,16 @@ import argparse import logging import os +import stat import sys +from string import Template from textwrap import dedent from uwtools.api.config import get_nml_config, get_yaml_config, realize from uwtools.api.template import render from python_utils import ( + list_to_str, log_info, import_vars, export_vars, @@ -137,9 +140,23 @@ def generate_FV3LAM_wflow( verbose=debug, ) - create_symlink_to_file( - wflow_launch_script_fp, os.path.join(exptdir, wflow_launch_script_fn), False - ) + with open(wflow_launch_script_fp, "r") as launch_script_file: + launch_script_content = launch_script_file.read() + + # Stage an experiment-specific launch file in the experiment directory + template = Template(launch_script_content) + + # The script needs several variables from the workflow and user sections + template_variables = {**expt_config["user"], **expt_config["workflow"], + "valid_vals_BOOLEAN": list_to_str(expt_config["constants"]["valid_vals_BOOLEAN"])} + launch_content = template.safe_substitute(template_variables) + + launch_fp = os.path.join(exptdir, wflow_launch_script_fn) + with open(launch_fp, "w") as expt_launch_fn: + expt_launch_fn.write(launch_content) + + os.chmod(launch_fp, os.stat(launch_fp).st_mode|stat.S_IXUSR) + # # ----------------------------------------------------------------------- # diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index 7c4427a9f2..6b7f43e134 100755 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -94,7 +94,12 @@ fi # #----------------------------------------------------------------------- # -. $exptdir/var_defns.sh + +# These variables are assumed to exist in the global environment by the +# bash_utils, which is a Very Bad (TM) thing. +export USHdir=$USHdir +export valid_vals_BOOLEAN=${valid_vals_BOOLEAN} + . $USHdir/source_util_funcs.sh # #----------------------------------------------------------------------- @@ -369,7 +374,7 @@ by expt_name has completed with the following workflow status (wflow_status): # Thus, there is no need to try to relaunch it. We also append a message # to the completion message above to indicate this. # - if [ $(boolify "${USE_CRON_TO_RELAUNCH}" = "TRUE" ]; then + if [ $(boolify "${USE_CRON_TO_RELAUNCH}") = "TRUE" ]; then msg="${msg}\ Thus, there is no need to relaunch the workflow via a cron job. Removing From 2ed368f61bba52b5123a4cb18c6901146129b2eb Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Fri, 12 Jul 2024 22:47:04 +0000 Subject: [PATCH 23/34] Update docs for default values. --- doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst b/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst index 960275d2bb..f97c8e8dfd 100644 --- a/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst +++ b/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst @@ -293,7 +293,7 @@ WORKFLOW Configuration Parameters If non-default parameters are selected for the variables in this section, they should be added to the ``workflow:`` section of the ``config.yaml`` file. -``WORKFLOW_ID``: (Default: ``!nowtimestamp ''``) +``WORKFLOW_ID``: (Default: ``''``) Unique ID for the workflow run that will be set in ``setup.py``. ``RELATIVE_LINK_FLAG``: (Default: "--relative") @@ -458,8 +458,8 @@ This section contains files and paths to files that are staged in the experiment ``WFLOW_XML_FN``: (Default: "FV3LAM_wflow.xml") Name of the Rocoto workflow XML file that the experiment generation script creates. This file defines the workflow for the experiment. -``GLOBAL_VAR_DEFNS_FN``: (Default: "var_defns.sh") - Name of the file (a shell script) containing definitions of the primary and secondary experiment variables (parameters). This file is sourced by many scripts (e.g., the J-job scripts corresponding to each workflow task) in order to make all the experiment variables available in those scripts. The primary variables are defined in the default configuration file (``config_defaults.yaml``) and in the user configuration file (``config.yaml``). The secondary experiment variables are generated by the experiment generation script. +``GLOBAL_VAR_DEFNS_FN``: (Default: "var_defns.yaml") + Name of the experiment configuration file. It contains the primary experiment variables defined in this default configuration script and in the user-specified configuration as well as secondary experiment variables generated by the experiment generation script. This file is the primary source of information used in the scripts at run time. ``ROCOTO_YAML_FN``: (Default: "rocoto_defns.yaml") Name of the YAML file containing the YAML workflow definition from which the Rocoto XML file is created. From 5502cdcc88b191ad6ea655dc0eb7082d057fcc91 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Fri, 12 Jul 2024 22:58:49 +0000 Subject: [PATCH 24/34] This should no longer be an executable bash file. --- ush/launch_FV3LAM_wflow.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 ush/launch_FV3LAM_wflow.sh diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh old mode 100755 new mode 100644 From b3689747b5f068c4c248d62c8d6cc0859471dcdc Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Sat, 13 Jul 2024 02:42:24 +0000 Subject: [PATCH 25/34] Linting. --- ush/generate_FV3LAM_wflow.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ush/generate_FV3LAM_wflow.py b/ush/generate_FV3LAM_wflow.py index 6b703bed61..d5b83d57c8 100755 --- a/ush/generate_FV3LAM_wflow.py +++ b/ush/generate_FV3LAM_wflow.py @@ -27,7 +27,6 @@ ln_vrfy, mkdir_vrfy, mv_vrfy, - create_symlink_to_file, check_for_preexist_dir_file, cfg_to_yaml_str, find_pattern_in_str, @@ -140,7 +139,7 @@ def generate_FV3LAM_wflow( verbose=debug, ) - with open(wflow_launch_script_fp, "r") as launch_script_file: + with open(wflow_launch_script_fp, "r", encoding='utf-8') as launch_script_file: launch_script_content = launch_script_file.read() # Stage an experiment-specific launch file in the experiment directory @@ -152,7 +151,7 @@ def generate_FV3LAM_wflow( launch_content = template.safe_substitute(template_variables) launch_fp = os.path.join(exptdir, wflow_launch_script_fn) - with open(launch_fp, "w") as expt_launch_fn: + with open(launch_fp, "w", encoding='utf-8') as expt_launch_fn: expt_launch_fn.write(launch_content) os.chmod(launch_fp, os.stat(launch_fp).st_mode|stat.S_IXUSR) From b7bacbc4a5e42276a997bdaf9c9f6e6baa2bca47 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Mon, 15 Jul 2024 23:55:56 +0000 Subject: [PATCH 26/34] Addressing PR comments. --- scripts/exregional_make_grid.sh | 9 ++++---- scripts/exregional_make_lbcs.sh | 1 + ush/launch_FV3LAM_wflow.sh | 41 ++++----------------------------- ush/load_modules_run_task.sh | 1 - 4 files changed, 9 insertions(+), 43 deletions(-) diff --git a/scripts/exregional_make_grid.sh b/scripts/exregional_make_grid.sh index 9786d75ba4..104875f8dc 100755 --- a/scripts/exregional_make_grid.sh +++ b/scripts/exregional_make_grid.sh @@ -372,6 +372,7 @@ generation executable (exec_fp): 'pazi': ${PAZI} " + # UW takes input from stdin when no -i/--input-config flag is provided (cat << EOF $settings EOF @@ -477,11 +478,9 @@ elif [ "${GRID_GEN_METHOD}" = "ESGgrid" ]; then CRES="C${res_equiv}" fi - (cat << EOF -workflow: - CRES: ${CRES} -EOF -) | uw config realize \ + # UW takes the update values from stdin when no --update-file flag is + # provided. It needs --update-format to do it correctly, though. +echo "workflow: {CRES: ${CRES}}" | uw config realize \ --input-file $GLOBAL_VAR_DEFNS_FP \ --update-format yaml \ --output-file $GLOBAL_VAR_DEFNS_FP \ diff --git a/scripts/exregional_make_lbcs.sh b/scripts/exregional_make_lbcs.sh index 58d0434bcc..35b4da388a 100755 --- a/scripts/exregional_make_lbcs.sh +++ b/scripts/exregional_make_lbcs.sh @@ -576,6 +576,7 @@ FORTRAN namelist file has not specified for this external LBC model (EXTRN_MDL_N " nml_fn="fort.41" + # UW takes input from stdin when no -i/--input-config flag is provided (cat << EOF $settings EOF diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index 6b7f43e134..7c26511f4f 100644 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -34,43 +34,10 @@ scrfunc_dir=$( dirname "${scrfunc_fp}" ) # #----------------------------------------------------------------------- # -# Get the experiment directory. We assume that there is a symlink to -# this script in the experiment directory, and this script is called via -# that symlink. Thus, finding the directory in which the symlink is -# located will give us the experiment directory. We find this by first -# obtaining the directory portion (i.e. the portion without the name of -# this script) of the command that was used to called this script (i.e. -# "$0") and then use the "readlink -f" command to obtain the corresponding -# absolute path. This will work for all four of the following ways in -# which the symlink in the experiment directory pointing to this script -# may be called: -# -# 1) Call this script from the experiment directory: -# > cd /path/to/experiment/directory -# > launch_FV3LAM_wflow.sh -# -# 2) Call this script from the experiment directory but using "./" before -# the script name: -# > cd /path/to/experiment/directory -# > ./launch_FV3LAM_wflow.sh -# -# 3) Call this script from any directory using the absolute path to the -# symlink in the experiment directory: -# > /path/to/experiment/directory/launch_FV3LAM_wflow.sh -# -# 4) Call this script from a directory that is several levels up from the -# experiment directory (but not necessarily at the root directory): -# > cd /path/to -# > experiment/directory/launch_FV3LAM_wflow.sh -# -# Note that given just a file name, e.g. the name of this script without -# any path before it, the "dirname" command will return a ".", e.g. in -# bash, -# -# > exptdir=$( dirname "launch_FV3LAM_wflow.sh" ) -# > echo $exptdir -# -# will print out ".". +# This script will be configured for a specific experiment when +# generate_FV3LAM_wflow.py. That process fills in what is necessary so +# this configured script in the experiment directory will need no +# additional information at run time. # #----------------------------------------------------------------------- # diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 9813cd9eff..5ede278bfd 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -139,7 +139,6 @@ if [ -n "${SRW_ENV:-}" ] ; then set -u fi -set -x +u # Source the necessary blocks of the experiment config YAML for sect in platform workflow ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} From d7378dcaa4489f1c9efbf0b0449a68f0ab857907 Mon Sep 17 00:00:00 2001 From: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:58:49 -0600 Subject: [PATCH 27/34] Apply suggestions from code review Co-authored-by: Michael Kavulich --- doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst | 2 +- scripts/exregional_get_extrn_mdl_files.sh | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst b/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst index 09ce913ede..5161268980 100644 --- a/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst +++ b/doc/UsersGuide/CustomizingTheWorkflow/ConfigWorkflow.rst @@ -459,7 +459,7 @@ This section contains files and paths to files that are staged in the experiment Name of the Rocoto workflow XML file that the experiment generation script creates. This file defines the workflow for the experiment. ``GLOBAL_VAR_DEFNS_FN``: (Default: "var_defns.yaml") - Name of the experiment configuration file. It contains the primary experiment variables defined in this default configuration script and in the user-specified configuration as well as secondary experiment variables generated by the experiment generation script. This file is the primary source of information used in the scripts at run time. + Name of the auto-generated experiment configuration file. It contains the primary experiment variables defined in this default configuration script and in the user-specified configuration as well as secondary experiment variables generated by the experiment generation script from machine files and other settings. This file is the primary source of information used in the scripts at run time. ``ROCOTO_YAML_FN``: (Default: "rocoto_defns.yaml") Name of the YAML file containing the YAML workflow definition from which the Rocoto XML file is created. diff --git a/scripts/exregional_get_extrn_mdl_files.sh b/scripts/exregional_get_extrn_mdl_files.sh index 2d6f58f3e2..96c3136e33 100755 --- a/scripts/exregional_get_extrn_mdl_files.sh +++ b/scripts/exregional_get_extrn_mdl_files.sh @@ -69,7 +69,6 @@ # . $USHdir/source_util_funcs.sh -set -x for sect in user nco platform workflow global task_get_extrn_lbcs \ task_get_extrn_ics ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} From e29b3b4e348140db2c883f458d474dd5e3952be0 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 16 Jul 2024 00:00:43 +0000 Subject: [PATCH 28/34] Fix reported stat namespace collision. --- ush/generate_FV3LAM_wflow.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ush/generate_FV3LAM_wflow.py b/ush/generate_FV3LAM_wflow.py index d5b83d57c8..c671a69da8 100755 --- a/ush/generate_FV3LAM_wflow.py +++ b/ush/generate_FV3LAM_wflow.py @@ -10,8 +10,8 @@ import argparse import logging import os -import stat import sys +from stat import S_IXUSR from string import Template from textwrap import dedent @@ -154,7 +154,7 @@ def generate_FV3LAM_wflow( with open(launch_fp, "w", encoding='utf-8') as expt_launch_fn: expt_launch_fn.write(launch_content) - os.chmod(launch_fp, os.stat(launch_fp).st_mode|stat.S_IXUSR) + os.chmod(launch_fp, os.stat(launch_fp).st_mode|S_IXUSR) # # ----------------------------------------------------------------------- From 8f7ac15810b59d471f9bccadd7ceff674b236392 Mon Sep 17 00:00:00 2001 From: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:40:29 -0600 Subject: [PATCH 29/34] Apply suggestions from code review Co-authored-by: Michael Lueken <63728921+MichaelLueken@users.noreply.github.com> --- jobs/JREGIONAL_RUN_PRDGEN | 2 +- jobs/JSRW_AQM_ICS | 2 +- jobs/JSRW_AQM_LBCS | 4 ++-- jobs/JSRW_BIAS_CORRECTION_O3 | 2 +- jobs/JSRW_BIAS_CORRECTION_PM25 | 2 +- jobs/JSRW_FIRE_EMISSION | 4 ++-- jobs/JSRW_NEXUS_EMISSION | 2 +- jobs/JSRW_NEXUS_GFS_SFC | 6 +++--- jobs/JSRW_NEXUS_POST_SPLIT | 4 ++-- jobs/JSRW_POINT_SOURCE | 2 +- jobs/JSRW_POST_STAT_O3 | 4 ++-- jobs/JSRW_POST_STAT_PM25 | 4 ++-- jobs/JSRW_PRE_POST_STAT | 4 ++-- scripts/exsrw_aqm_ics.sh | 3 +-- scripts/exsrw_aqm_lbcs.sh | 2 +- scripts/exsrw_fire_emission.sh | 3 +-- scripts/exsrw_nexus_gfs_sfc.sh | 3 +-- scripts/exsrw_nexus_post_split.sh | 3 +-- scripts/exsrw_post_stat_o3.sh | 2 +- scripts/exsrw_post_stat_pm25.sh | 2 +- scripts/exsrw_pre_post_stat.sh | 2 +- 21 files changed, 29 insertions(+), 33 deletions(-) diff --git a/jobs/JREGIONAL_RUN_PRDGEN b/jobs/JREGIONAL_RUN_PRDGEN index 3de22f9f9e..1cf933b666 100755 --- a/jobs/JREGIONAL_RUN_PRDGEN +++ b/jobs/JREGIONAL_RUN_PRDGEN @@ -112,7 +112,7 @@ fi mkdir -p "${COMOUT}" # subhourly post -if [ $(boolify "${SUB_HOURLY_POST}" = "TRUE" ]; then +if [ $(boolify "${SUB_HOURLY_POST}") = "TRUE" ]; then export DATA_FHR="${DATA:-$COMOUT}/$fhr$fmn" else export DATA_FHR="${DATA:-$COMOUT}/$fhr" diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index a1ecdefbba..b6ec385d7a 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -31,7 +31,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_aqm_ics ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/jobs/JSRW_AQM_LBCS b/jobs/JSRW_AQM_LBCS index 1b6091ca4d..9279dbe190 100755 --- a/jobs/JSRW_AQM_LBCS +++ b/jobs/JSRW_AQM_LBCS @@ -32,7 +32,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_get_extrn_lbcs \ - task_make_orog task_make_lbcs task_aqm_lbcs ; do + task_make_orog task_make_lbcs ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # @@ -134,7 +134,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_BIAS_CORRECTION_O3 b/jobs/JSRW_BIAS_CORRECTION_O3 index 3f23203d32..0849614840 100755 --- a/jobs/JSRW_BIAS_CORRECTION_O3 +++ b/jobs/JSRW_BIAS_CORRECTION_O3 @@ -126,7 +126,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_BIAS_CORRECTION_PM25 b/jobs/JSRW_BIAS_CORRECTION_PM25 index 7cb26ca8f2..a0a7f76dad 100755 --- a/jobs/JSRW_BIAS_CORRECTION_PM25 +++ b/jobs/JSRW_BIAS_CORRECTION_PM25 @@ -126,7 +126,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_FIRE_EMISSION b/jobs/JSRW_FIRE_EMISSION index 53e2dc463e..8a2b581274 100755 --- a/jobs/JSRW_FIRE_EMISSION +++ b/jobs/JSRW_FIRE_EMISSION @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_fire_emission ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # @@ -128,7 +128,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_NEXUS_EMISSION b/jobs/JSRW_NEXUS_EMISSION index 09465a285d..aab5869cff 100755 --- a/jobs/JSRW_NEXUS_EMISSION +++ b/jobs/JSRW_NEXUS_EMISSION @@ -130,7 +130,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_NEXUS_GFS_SFC b/jobs/JSRW_NEXUS_GFS_SFC index 38a8a68558..ceed6be32a 100755 --- a/jobs/JSRW_NEXUS_GFS_SFC +++ b/jobs/JSRW_NEXUS_GFS_SFC @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_gfs_sfc ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # @@ -130,7 +130,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= @@ -145,7 +145,7 @@ fi if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_NEXUS_POST_SPLIT b/jobs/JSRW_NEXUS_POST_SPLIT index 2c380af288..10f4101d5c 100755 --- a/jobs/JSRW_NEXUS_POST_SPLIT +++ b/jobs/JSRW_NEXUS_POST_SPLIT @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_nexus_post_split ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # @@ -130,7 +130,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_POINT_SOURCE b/jobs/JSRW_POINT_SOURCE index 5ab1fe8696..6218acaa99 100755 --- a/jobs/JSRW_POINT_SOURCE +++ b/jobs/JSRW_POINT_SOURCE @@ -126,7 +126,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_POST_STAT_O3 b/jobs/JSRW_POST_STAT_O3 index 3827f01d3b..5fadd70d30 100755 --- a/jobs/JSRW_POST_STAT_O3 +++ b/jobs/JSRW_POST_STAT_O3 @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_o3 \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm \ task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done @@ -127,7 +127,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_POST_STAT_PM25 b/jobs/JSRW_POST_STAT_PM25 index c1151a1468..2d7d6e9e88 100755 --- a/jobs/JSRW_POST_STAT_PM25 +++ b/jobs/JSRW_POST_STAT_PM25 @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_post_stat_pm25 \ +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm \ task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done @@ -126,7 +126,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/jobs/JSRW_PRE_POST_STAT b/jobs/JSRW_PRE_POST_STAT index 7859b44ad9..8c51e18510 100755 --- a/jobs/JSRW_PRE_POST_STAT +++ b/jobs/JSRW_PRE_POST_STAT @@ -30,7 +30,7 @@ export SCRIPTSsrw="${HOMEdir}/scripts" # export USHdir="${USHsrw}" # should be removed later . ${USHsrw}/source_util_funcs.sh -for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm task_pre_post_stat ; do +for sect in user nco platform workflow nco global cpl_aqm_parm cpl_aqm_parm ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # @@ -129,7 +129,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= diff --git a/scripts/exsrw_aqm_ics.sh b/scripts/exsrw_aqm_ics.sh index 5cc8a7984c..4fd040e597 100755 --- a/scripts/exsrw_aqm_ics.sh +++ b/scripts/exsrw_aqm_ics.sh @@ -9,8 +9,7 @@ # . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_aqm_ics ; do + constants fixed_files grid_params ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_aqm_lbcs.sh b/scripts/exsrw_aqm_lbcs.sh index 545b9bee9a..7b3058ef34 100755 --- a/scripts/exsrw_aqm_lbcs.sh +++ b/scripts/exsrw_aqm_lbcs.sh @@ -10,7 +10,7 @@ . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_aqm_lbcs task_get_extrn_lbcs task_make_lbcs task_make_orog ; do + task_get_extrn_lbcs task_make_lbcs task_make_orog ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_fire_emission.sh b/scripts/exsrw_fire_emission.sh index c8782bfd78..3ae78422f5 100755 --- a/scripts/exsrw_fire_emission.sh +++ b/scripts/exsrw_fire_emission.sh @@ -9,8 +9,7 @@ # . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_fire_emission ; do + constants fixed_files grid_params ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_nexus_gfs_sfc.sh b/scripts/exsrw_nexus_gfs_sfc.sh index 19fee5e789..cadc27b89c 100755 --- a/scripts/exsrw_nexus_gfs_sfc.sh +++ b/scripts/exsrw_nexus_gfs_sfc.sh @@ -9,8 +9,7 @@ # . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_nexus_gfs_sfc ; do + constants fixed_files grid_params ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_nexus_post_split.sh b/scripts/exsrw_nexus_post_split.sh index 9c2e1cee73..151e0a2ea5 100755 --- a/scripts/exsrw_nexus_post_split.sh +++ b/scripts/exsrw_nexus_post_split.sh @@ -9,8 +9,7 @@ # . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ - constants fixed_files grid_params \ - task_nexus_post_split ; do + constants fixed_files grid_params ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_post_stat_o3.sh b/scripts/exsrw_post_stat_o3.sh index d92e409dc3..dfcdd24ffa 100755 --- a/scripts/exsrw_post_stat_o3.sh +++ b/scripts/exsrw_post_stat_o3.sh @@ -10,7 +10,7 @@ . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_post_stat_o3 ; do + task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_post_stat_pm25.sh b/scripts/exsrw_post_stat_pm25.sh index 99645fb96d..bdbf1fcbc5 100755 --- a/scripts/exsrw_post_stat_pm25.sh +++ b/scripts/exsrw_post_stat_pm25.sh @@ -10,7 +10,7 @@ . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_run_post task_post_stat_pm25 ; do + task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # diff --git a/scripts/exsrw_pre_post_stat.sh b/scripts/exsrw_pre_post_stat.sh index b2e8d693cb..f6ec6a9a7d 100755 --- a/scripts/exsrw_pre_post_stat.sh +++ b/scripts/exsrw_pre_post_stat.sh @@ -10,7 +10,7 @@ . ${USHsrw}/source_util_funcs.sh for sect in user nco platform workflow nco global verification cpl_aqm_parm \ constants fixed_files grid_params \ - task_pre_post task_run_post ; do + task_run_post ; do source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} done # From 50be36aee4db1f7e14b6aec100cd3eeec31fd340 Mon Sep 17 00:00:00 2001 From: Christina Holt <56881914+christinaholtNOAA@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:41:18 -0600 Subject: [PATCH 30/34] Missed one! Co-authored-by: Michael Lueken <63728921+MichaelLueken@users.noreply.github.com> --- jobs/JSRW_AQM_ICS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jobs/JSRW_AQM_ICS b/jobs/JSRW_AQM_ICS index b6ec385d7a..5d5f6d970e 100755 --- a/jobs/JSRW_AQM_ICS +++ b/jobs/JSRW_AQM_ICS @@ -132,7 +132,7 @@ setpdy.sh if [ ${subcyc} -ne 0 ]; then export cycle="t${cyc}${subcyc}z" fi -if [ $(boolify "${DO_ENSEMBLE}" = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then +if [ $(boolify "${DO_ENSEMBLE}") = "TRUE" ] && [ ! -z ${ENSMEM_INDX} ]; then export dot_ensmem=".mem${ENSMEM_INDX}" else export dot_ensmem= From 1acdb4839bbff46638b423922240f962bde7681d Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Wed, 17 Jul 2024 20:31:58 +0000 Subject: [PATCH 31/34] Making additional PR requested changes. --- aqm_environment.yml | 2 +- ush/setup.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/aqm_environment.yml b/aqm_environment.yml index afd8a7b634..11bf9e57e3 100644 --- a/aqm_environment.yml +++ b/aqm_environment.yml @@ -9,5 +9,5 @@ dependencies: - pylint=2.17* - pytest=7.2* - scipy=1.10.* - - uwtools=2.1* + - uwtools=2.3* - xarray=2022.11.* diff --git a/ush/setup.py b/ush/setup.py index cd85bdf6ed..51d5b2a084 100644 --- a/ush/setup.py +++ b/ush/setup.py @@ -15,6 +15,7 @@ from python_utils import ( log_info, cd_vrfy, + date_to_str, mkdir_vrfy, rm_vrfy, check_var_valid_value, @@ -1502,6 +1503,10 @@ def dict_find(user_dict, substring): var_defns_cfg = get_yaml_config(config=expt_config) del var_defns_cfg["rocoto"] + + # Fixup a couple of data types: + for dates in ("DATE_FIRST_CYCL", "DATE_LAST_CYCL"): + var_defns_cfg["workflow"][dates] = date_to_str(var_defns_cfg["workflow"][dates]) var_defns_cfg.dump(global_var_defns_fp) From ff4f0303161e3bce91ecb413de0483a39ce7b204 Mon Sep 17 00:00:00 2001 From: "michael.lueken" Date: Tue, 23 Jul 2024 19:31:24 +0000 Subject: [PATCH 32/34] [to_yaml] Update wrapper scripts to allow them to run using var_defns.yaml through source_yaml. --- ush/wrappers/run_fcst.sh | 7 +++++-- ush/wrappers/run_get_ics.sh | 7 +++++-- ush/wrappers/run_get_lbcs.sh | 7 +++++-- ush/wrappers/run_make_grid.sh | 7 +++++-- ush/wrappers/run_make_ics.sh | 7 +++++-- ush/wrappers/run_make_lbcs.sh | 7 +++++-- ush/wrappers/run_make_orog.sh | 7 +++++-- ush/wrappers/run_make_sfc_climo.sh | 7 +++++-- ush/wrappers/run_post.sh | 7 +++++-- 9 files changed, 45 insertions(+), 18 deletions(-) diff --git a/ush/wrappers/run_fcst.sh b/ush/wrappers/run_fcst.sh index 7450de7cc5..c875cb16c0 100755 --- a/ush/wrappers/run_fcst.sh +++ b/ush/wrappers/run_fcst.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} export cyc=${DATE_FIRST_CYCL:8:2} diff --git a/ush/wrappers/run_get_ics.sh b/ush/wrappers/run_get_ics.sh index 0ee521a67d..494eab6850 100755 --- a/ush/wrappers/run_get_ics.sh +++ b/ush/wrappers/run_get_ics.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow task_get_extrn_ics ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} export cyc=${DATE_FIRST_CYCL:8:2} diff --git a/ush/wrappers/run_get_lbcs.sh b/ush/wrappers/run_get_lbcs.sh index 543ab6e47d..ec6fa23892 100755 --- a/ush/wrappers/run_get_lbcs.sh +++ b/ush/wrappers/run_get_lbcs.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow task_get_extrn_lbcs ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} export cyc=${DATE_FIRST_CYCL:8:2} diff --git a/ush/wrappers/run_make_grid.sh b/ush/wrappers/run_make_grid.sh index 2d55beaf94..f7a6f8aeed 100755 --- a/ush/wrappers/run_make_grid.sh +++ b/ush/wrappers/run_make_grid.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} diff --git a/ush/wrappers/run_make_ics.sh b/ush/wrappers/run_make_ics.sh index 5c629722fc..adcdc16180 100755 --- a/ush/wrappers/run_make_ics.sh +++ b/ush/wrappers/run_make_ics.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} export cyc=${DATE_FIRST_CYCL:8:2} diff --git a/ush/wrappers/run_make_lbcs.sh b/ush/wrappers/run_make_lbcs.sh index 27c94c127f..f9fe35d9da 100755 --- a/ush/wrappers/run_make_lbcs.sh +++ b/ush/wrappers/run_make_lbcs.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} export cyc=${DATE_FIRST_CYCL:8:2} diff --git a/ush/wrappers/run_make_orog.sh b/ush/wrappers/run_make_orog.sh index 5f02ff9599..ebc5259ec1 100755 --- a/ush/wrappers/run_make_orog.sh +++ b/ush/wrappers/run_make_orog.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} diff --git a/ush/wrappers/run_make_sfc_climo.sh b/ush/wrappers/run_make_sfc_climo.sh index fab33f75d6..8024f529fc 100755 --- a/ush/wrappers/run_make_sfc_climo.sh +++ b/ush/wrappers/run_make_sfc_climo.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} diff --git a/ush/wrappers/run_post.sh b/ush/wrappers/run_post.sh index 46ef104365..ca060acb1f 100755 --- a/ush/wrappers/run_post.sh +++ b/ush/wrappers/run_post.sh @@ -1,7 +1,10 @@ #!/usr/bin/env bash -export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.sh" +export GLOBAL_VAR_DEFNS_FP="${EXPTDIR}/var_defns.yaml" +. $USHdir/source_util_funcs.sh +for sect in workflow ; do + source_yaml ${GLOBAL_VAR_DEFNS_FP} ${sect} +done set -xa -source ${GLOBAL_VAR_DEFNS_FP} export CDATE=${DATE_FIRST_CYCL} export CYCLE_DIR=${EXPTDIR}/${CDATE} export cyc=${DATE_FIRST_CYCL:8:2} From 060ecc9e4e6808e8b0d1613779c911bdce467312 Mon Sep 17 00:00:00 2001 From: "Christina.Holt" Date: Tue, 23 Jul 2024 22:21:26 +0000 Subject: [PATCH 33/34] Remove tests that are no longer relevant. --- tests/test_python/test_retrieve_data.py | 58 ------------------------- 1 file changed, 58 deletions(-) diff --git a/tests/test_python/test_retrieve_data.py b/tests/test_python/test_retrieve_data.py index 1d54e0904c..2c749c97ac 100644 --- a/tests/test_python/test_retrieve_data.py +++ b/tests/test_python/test_retrieve_data.py @@ -493,61 +493,3 @@ def test_ufs_lbcs_from_aws(self): # Testing that there is no failure retrieve_data.main(args) - - @unittest.skipIf(os.environ.get("CI") == "true", "Skipping HPSS tests") - def test_rap_obs_from_hpss(self): - - """Get RAP observations from hpss for a 06z time""" - - with tempfile.TemporaryDirectory(dir=self.path) as tmp_dir: - os.chdir(tmp_dir) - - # fmt: off - args = [ - '--file_set', 'obs', - '--config', self.config, - '--cycle_date', '2023032106', - '--data_stores', 'hpss', - '--data_type', 'RAP_obs', - '--output_path', tmp_dir, - '--debug', - ] - # fmt: on - - retrieve_data.main(args) - - # Verify files exist in temp dir - - path = os.path.join(tmp_dir, "*") - files_on_disk = glob.glob(path) - self.assertEqual(len(files_on_disk), 30) - - @unittest.skipIf(os.environ.get("CI") == "true", "Skipping HPSS tests") - def test_rap_e_obs_from_hpss(self): - - """Get RAP observations from hpss for a 12z time; - at 00z and 12z we expect to see additional files - with the 'rap_e' naming convention""" - - with tempfile.TemporaryDirectory(dir=self.path) as tmp_dir: - os.chdir(tmp_dir) - - # fmt: off - args = [ - '--file_set', 'obs', - '--config', self.config, - '--cycle_date', '2023032112', - '--data_stores', 'hpss', - '--data_type', 'RAP_obs', - '--output_path', tmp_dir, - '--debug', - ] - # fmt: on - - retrieve_data.main(args) - - # Verify files exist in temp dir - - path = os.path.join(tmp_dir, "*") - files_on_disk = glob.glob(path) - self.assertEqual(len(files_on_disk), 37) From 2ce08ae50de77f758feefb10589caf0b53d6f911 Mon Sep 17 00:00:00 2001 From: "michael.lueken" Date: Thu, 25 Jul 2024 14:12:43 -0400 Subject: [PATCH 34/34] [to_yaml] Update .cicd/scripts/wrapper_srw_ftest.sh to add third argument to call to load_modules_run_task.sh --- .cicd/scripts/wrapper_srw_ftest.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.cicd/scripts/wrapper_srw_ftest.sh b/.cicd/scripts/wrapper_srw_ftest.sh index 950ceb7a34..ee26edadaf 100755 --- a/.cicd/scripts/wrapper_srw_ftest.sh +++ b/.cicd/scripts/wrapper_srw_ftest.sh @@ -24,7 +24,8 @@ fi if [[ "${SRW_PLATFORM}" == gaea ]]; then sed -i '15i #SBATCH --clusters=c5' ${WORKSPACE}/${SRW_PLATFORM}/.cicd/scripts/${workflow_cmd}_srw_ftest.sh sed -i 's|qos=batch|qos=normal|g' ${WORKSPACE}/${SRW_PLATFORM}/.cicd/scripts/${workflow_cmd}_srw_ftest.sh - sed -i 's|${JOBSdir}/JREGIONAL_RUN_POST|$USHdir/load_modules_run_task.sh "run_post" ${JOBSdir}/JREGIONAL_RUN_POST|g' ${WORKSPACE}/${SRW_PLATFORM}/ush/wrappers/run_post.sh + sed -i 's|00:30:00|00:45:00|g' ${WORKSPACE}/${SRW_PLATFORM}/.cicd/scripts/${workflow_cmd}_srw_ftest.sh + sed -i 's|${JOBSdir}/JREGIONAL_RUN_POST|$USHdir/load_modules_run_task.sh "gaea" "run_post" ${JOBSdir}/JREGIONAL_RUN_POST|g' ${WORKSPACE}/${SRW_PLATFORM}/ush/wrappers/run_post.sh fi if [[ "${SRW_PLATFORM}" == hera ]]; then