From bbb2978cd7730f87011adf579c937eaba33687b3 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 12 May 2022 14:55:36 -0600 Subject: [PATCH 01/26] Fix error in help message. --- tests/WE2E/get_expts_status.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/WE2E/get_expts_status.sh b/tests/WE2E/get_expts_status.sh index 91de215d2..b07c9ed23 100755 --- a/tests/WE2E/get_expts_status.sh +++ b/tests/WE2E/get_expts_status.sh @@ -79,6 +79,7 @@ Usage: ${scrfunc_fn} \\ expts_basedir=\"...\" \\ + [num_log_lines=\"...\"] \\ [verbose=\"...\"] The arguments in brackets are optional. The arguments are defined as From 69bbccd51298bcf787858313ff833613c5c233c8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 12 May 2022 14:56:50 -0600 Subject: [PATCH 02/26] Add the ESGgrid_PAZI parameter to the list of ESGgrid parameters that get set. --- tests/WE2E/test_configs/wflow_features/config.new_ESGgrid.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/WE2E/test_configs/wflow_features/config.new_ESGgrid.sh b/tests/WE2E/test_configs/wflow_features/config.new_ESGgrid.sh index fc34f4a0c..374002dc2 100644 --- a/tests/WE2E/test_configs/wflow_features/config.new_ESGgrid.sh +++ b/tests/WE2E/test_configs/wflow_features/config.new_ESGgrid.sh @@ -36,6 +36,8 @@ ESGgrid_DELY="25000.0" ESGgrid_NX="216" ESGgrid_NY="156" +ESGgrid_PAZI="0.0" + ESGgrid_WIDE_HALO_WIDTH="6" DT_ATMOS="40" From 9a3bfc24db8c0ffa73d6917de0b2e61eeaa707a8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 16 May 2022 14:41:21 -0600 Subject: [PATCH 03/26] Improvements to the way shell functions return arguments: 1) Change names of variables that specify names of output variables from "output_varname_..." to "outvarname_...". 2) When setting the value of an output variable, do so only if the corresponding "outvarname_..." variable is passed into the function. 3) Bugfix: In "printf -v ..." statements, the "%s" was omitted. Include these. --- .../WE2E/get_WE2Etest_names_subdirs_descs.sh | 109 +++++++++--------- tests/WE2E/run_WE2E_tests.sh | 8 +- ush/bash_utils/get_bash_file_contents.sh | 4 +- ush/check_expt_config_vars.sh | 4 +- ush/set_gridparams_ESGgrid.sh | 92 ++++++++++----- ush/set_gridparams_GFDLgrid.sh | 87 +++++++++----- ush/setup.sh | 52 +++++---- 7 files changed, 209 insertions(+), 147 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index d0db858b3..1f255ea7f 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -27,29 +27,29 @@ # Optional verbosity flag. Should be set to "TRUE" or "FALSE". Default # is "FALSE". # -# output_varname_test_configs_basedir: +# outvarname_test_configs_basedir: # Name of output variable in which to return the base directory of the # WE2E test configuration files. # -# output_varname_test_names: +# outvarname_test_names: # Name of output array variable in which to return the names of the WE2E # tests. # -# output_varname_test_subdirs: +# outvarname_test_subdirs: # Name of output array variable in which to return the category subdirectories # in which the WE2E tests are located. # -# output_varname_test_ids: +# outvarname_test_ids: # Name of output array variable in which to return the IDs of the WE2E # tests. # -# output_varname_test_descs: +# outvarname_test_descs: # Name of output array variable in which to return the descriptions of # the WE2E tests. # # Note that any input argument that is not specified in the call to this # function gets set to a null string in the body of the function. In -# particular, if any of the arguments that start with "output_varname_" +# particular, if any of the arguments that start with "outvarname_" # (indicating that they specify the name of an output variable) are not # set in the call, the values corresponding to those variables are not # returned to the calling script or function. @@ -61,10 +61,10 @@ # # test_configs_basedir="${WE2Edir}/test_configs" # -# If the argument output_varname_test_configs_basedir is specified in -# the call to this function, then the value of test_configs_basedir will -# be returned to the calling script or function (in the variable specified -# by output_varname_test_configs_basedir). +# If the argument outvarname_test_configs_basedir is specified in the +# call to this function, then the value of test_configs_basedir will be +# returned to the calling script or function (in the variable specified +# by outvarname_test_configs_basedir). # # The WE2E test configuration files are located in subdirectories under # the base directory. This function sets the names of these subdirectories @@ -170,8 +170,8 @@ # in which the test configuration files corresponding to each test # name are located. # 3) The IDs corresponding to each of the test names. -# 4) The test descriptions (if output_varname_test_descs is specified in -# the call to this function or if generate_csv_file is or gets set to +# 4) The test descriptions (if outvarname_test_descs is specified in the +# call to this function or if generate_csv_file is or gets set to # "TRUE"; see below). # # These local arrays are sorted in order of increasing test ID. Within @@ -189,10 +189,10 @@ # the arrays in which each of the quantities listed above should be # returned (to the calling script or function): # -# output_varname_test_names -# output_varname_test_subdirs -# output_varname_test_ids -# output_varname_test_descs +# outvarname_test_names +# outvarname_test_subdirs +# outvarname_test_ids +# outvarname_test_descs # # If any of these is not specified in the call to this function, then # the corresponding quantity will not be returned to the calling script @@ -206,7 +206,7 @@ # 1) The user explicitly asks for the descriptions to be returned by # specifying in the call to this function the name of the array in # which to return them (by setting a value for the argument -# output_varname_test_descs). +# outvarname_test_descs). # 2) A CSV file summarizing the WE2E tests will be generated (see below) # # For convenience, this function can generate a CSV (comma-separated @@ -267,11 +267,11 @@ function get_WE2Etest_names_subdirs_descs() { "WE2Edir" \ "generate_csv_file" \ "verbose" \ - "output_varname_test_configs_basedir" \ - "output_varname_test_names" \ - "output_varname_test_subdirs" \ - "output_varname_test_ids" \ - "output_varname_test_descs" \ + "outvarname_test_configs_basedir" \ + "outvarname_test_names" \ + "outvarname_test_subdirs" \ + "outvarname_test_ids" \ + "outvarname_test_descs" \ ) process_args "valid_args" "$@" # @@ -859,18 +859,18 @@ they correspond to unique test names and rerun." # #----------------------------------------------------------------------- # -# If the input argument output_varname_test_descs is not set to a null -# string (meaning that the name of the array in which to return the WE2E -# test descriptions is specified in the call to this function), or if -# the flag generate_csv_file is set to "TRUE", we need to obtain the -# WE2E test descriptions from the test configuration files. In these -# cases, set the local variable get_test_descs to "TRUE". Otherwise, -# set it to "FALSE". +# If the input argument outvarname_test_descs is not set to a null string +# (meaning that the name of the array in which to return the WE2E test +# descriptions is specified in the call to this function), or if the flag +# generate_csv_file is set to "TRUE", we need to obtain the WE2E test +# descriptions from the test configuration files. In these cases, set +# the local variable get_test_descs to "TRUE". Otherwise, set it to +# "FALSE". # #----------------------------------------------------------------------- # get_test_descs="FALSE" - if [ ! -z "${output_varname_test_descs}" ] || \ + if [ ! -z "${outvarname_test_descs}" ] || \ [ "${generate_csv_file}" = "TRUE" ]; then get_test_descs="TRUE" fi @@ -1455,41 +1455,40 @@ containing information on all WE2E tests: # #----------------------------------------------------------------------- # - if [ ! -z "${output_varname_test_configs_basedir}" ]; then - eval ${output_varname_test_configs_basedir}="${test_configs_basedir}" + if [ ! -z "${outvarname_test_configs_basedir}" ]; then + eval ${outvarname_test_configs_basedir}="${test_configs_basedir}" fi - if [ ! -z "${output_varname_test_names}" ]; then + if [ ! -z "${outvarname_test_names}" ]; then test_names_str="( "$( printf "\"%s\" " "${test_names[@]}" )")" - eval ${output_varname_test_names}="${test_names_str}" + eval ${outvarname_test_names}="${test_names_str}" fi - if [ ! -z "${output_varname_test_subdirs}" ]; then + if [ ! -z "${outvarname_test_subdirs}" ]; then test_subdirs_str="( "$( printf "\"%s\" " "${test_subdirs[@]}" )")" - eval ${output_varname_test_subdirs}="${test_subdirs_str}" + eval ${outvarname_test_subdirs}="${test_subdirs_str}" fi - if [ ! -z "${output_varname_test_ids}" ]; then + if [ ! -z "${outvarname_test_ids}" ]; then test_ids_str="( "$( printf "\"%s\" " "${test_ids[@]}" )")" - eval ${output_varname_test_ids}="${test_ids_str}" + eval ${outvarname_test_ids}="${test_ids_str}" fi - if [ ! -z "${output_varname_test_descs}" ]; then + if [ ! -z "${outvarname_test_descs}" ]; then # # We want to treat all characters in the test descriptions literally -# when evaluating the array specified by output_varname_test_descs -# below using the eval function because otherwise, characters such as -# "$", "(", ")", etc will be interpreted as indicating the value of a -# variable, the start of an array, the end of an array, etc, and lead to -# errors. Thus, below, when forming the array that will be passed to -# eval, we will surround each element of the local array test_descs -# in single quotes. However, the test descriptions themselves may -# include single quotes (e.g. when a description contains a phrase such -# as "Please see the User's Guide for..."). In order to treat these -# single quotes literally (as opposed to as delimiters indicating the -# start or end of array elements), we have to pass them as separate -# strings by replacing each single quote with the following series of -# characters: +# when evaluating the array specified by outvarname_test_descs below +# using the eval function because otherwise, characters such as "$", +# "(", ")", etc will be interpreted as indicating the value of a variable, +# the start of an array, the end of an array, etc, and lead to errors. +# Thus, below, when forming the array that will be passed to eval, we +# will surround each element of the local array test_descs in single +# quotes. However, the test descriptions themselves may include single +# quotes (e.g. when a description contains a phrase such as "Please see +# the User's Guide for..."). In order to treat these single quotes +# literally (as opposed to as delimiters indicating the start or end of +# array elements), we have to pass them as separate strings by replacing +# each single quote with the following series of characters: # # '"'"' # @@ -1507,8 +1506,8 @@ containing information on all WE2E tests: # # See description of ${DOT_OR_USCORE} in the configuration file. # -# Then, if output_varname_test_descs is set to "some_array", the -# exact string we want to pass to eval is: +# Then, if outvarname_test_descs is set to "some_array", the exact string +# we want to pass to eval is: # # some_array=('Please see the User'"'"'s Guide.' 'See description of ${DOT_OR_USCORE} in the configuration file.') # @@ -1518,7 +1517,7 @@ containing information on all WE2E tests: sed -r -e "s/'/'\"'\"'/g" ) done test_descs_str="( "$( printf "'%s' " "${test_descs_esc_sq[@]}" )")" - eval ${output_varname_test_descs}="${test_descs_str}" + eval ${outvarname_test_descs}="${test_descs_str}" fi # #----------------------------------------------------------------------- diff --git a/tests/WE2E/run_WE2E_tests.sh b/tests/WE2E/run_WE2E_tests.sh index a11dfaba3..4d664185f 100755 --- a/tests/WE2E/run_WE2E_tests.sh +++ b/tests/WE2E/run_WE2E_tests.sh @@ -491,10 +491,10 @@ Getting information about all available WE2E tests..." get_WE2Etest_names_subdirs_descs \ WE2Edir="${WE2Edir}" \ - output_varname_test_configs_basedir="avail_WE2E_test_configs_basedir" \ - output_varname_test_names="avail_WE2E_test_names" \ - output_varname_test_subdirs="avail_WE2E_test_subdirs" \ - output_varname_test_ids="avail_WE2E_test_ids" + outvarname_test_configs_basedir="avail_WE2E_test_configs_basedir" \ + outvarname_test_names="avail_WE2E_test_names" \ + outvarname_test_subdirs="avail_WE2E_test_subdirs" \ + outvarname_test_ids="avail_WE2E_test_ids" # # Get the total number of available WE2E test names (including alternate # names). diff --git a/ush/bash_utils/get_bash_file_contents.sh b/ush/bash_utils/get_bash_file_contents.sh index 3b3ab7b30..fdfb62692 100644 --- a/ush/bash_utils/get_bash_file_contents.sh +++ b/ush/bash_utils/get_bash_file_contents.sh @@ -21,7 +21,7 @@ function get_bash_file_contents() { local valid_args=( \ "fp" \ - "output_varname_contents" \ + "outvarname_contents" \ ) process_args valid_args "$@" print_input_args "valid_args" @@ -63,7 +63,7 @@ read was not specified in the call to this function: # # Set output variables. # - printf -v ${output_varname_contents} "${contents}" + printf -v ${outvarname_contents} "%s" "${contents}" { restore_shell_opts; } > /dev/null 2>&1 diff --git a/ush/check_expt_config_vars.sh b/ush/check_expt_config_vars.sh index 7476de779..c55a39229 100644 --- a/ush/check_expt_config_vars.sh +++ b/ush/check_expt_config_vars.sh @@ -47,10 +47,10 @@ function check_expt_config_vars() { # configuration file. # get_bash_file_contents fp="${default_config_fp}" \ - output_varname_contents="var_list_default" + outvarname_contents="var_list_default" get_bash_file_contents fp="${config_fp}" \ - output_varname_contents="var_list_user" + outvarname_contents="var_list_user" # # Loop through each line/variable in var_list_user. For each line, # extract the the name of the variable that is being set (say VAR) and diff --git a/ush/set_gridparams_ESGgrid.sh b/ush/set_gridparams_ESGgrid.sh index 41efbfe58..c7e8a32c0 100644 --- a/ush/set_gridparams_ESGgrid.sh +++ b/ush/set_gridparams_ESGgrid.sh @@ -48,25 +48,25 @@ function set_gridparams_ESGgrid() { #----------------------------------------------------------------------- # local valid_args=( \ -"lon_ctr" \ -"lat_ctr" \ -"nx" \ -"ny" \ -"halo_width" \ -"delx" \ -"dely" \ -"pazi" \ -"output_varname_lon_ctr" \ -"output_varname_lat_ctr" \ -"output_varname_nx" \ -"output_varname_ny" \ -"output_varname_pazi" \ -"output_varname_halo_width" \ -"output_varname_stretch_factor" \ -"output_varname_del_angle_x_sg" \ -"output_varname_del_angle_y_sg" \ -"output_varname_neg_nx_of_dom_with_wide_halo" \ -"output_varname_neg_ny_of_dom_with_wide_halo" \ + "lon_ctr" \ + "lat_ctr" \ + "nx" \ + "ny" \ + "halo_width" \ + "delx" \ + "dely" \ + "pazi" \ + "outvarname_lon_ctr" \ + "outvarname_lat_ctr" \ + "outvarname_nx" \ + "outvarname_ny" \ + "outvarname_pazi" \ + "outvarname_halo_width" \ + "outvarname_stretch_factor" \ + "outvarname_del_angle_x_sg" \ + "outvarname_del_angle_y_sg" \ + "outvarname_neg_nx_of_dom_with_wide_halo" \ + "outvarname_neg_ny_of_dom_with_wide_halo" \ ) process_args valid_args "$@" # @@ -149,17 +149,49 @@ function set_gridparams_ESGgrid() { # #----------------------------------------------------------------------- # - eval ${output_varname_lon_ctr}="${lon_ctr}" - eval ${output_varname_lat_ctr}="${lat_ctr}" - eval ${output_varname_nx}="${nx}" - eval ${output_varname_ny}="${ny}" - eval ${output_varname_halo_width}="${halo_width}" - eval ${output_varname_stretch_factor}="${stretch_factor}" - eval ${output_varname_pazi}="${pazi}" - eval ${output_varname_del_angle_x_sg}="${del_angle_x_sg}" - eval ${output_varname_del_angle_y_sg}="${del_angle_y_sg}" - eval ${output_varname_neg_nx_of_dom_with_wide_halo}="${neg_nx_of_dom_with_wide_halo}" - eval ${output_varname_neg_ny_of_dom_with_wide_halo}="${neg_ny_of_dom_with_wide_halo}" + if [ ! -z "${outvarname_lon_ctr}" ]; then + printf -v ${outvarname_lon_ctr} "%s" "${lon_ctr}" + fi + + if [ ! -z "${outvarname_lat_ctr}" ]; then + printf -v ${outvarname_lat_ctr} "%s" "${lat_ctr}" + fi + + if [ ! -z "${outvarname_nx}" ]; then + printf -v ${outvarname_nx} "%s" "${nx}" + fi + + if [ ! -z "${outvarname_ny}" ]; then + printf -v ${outvarname_ny} "%s" "${ny}" + fi + + if [ ! -z "${outvarname_halo_width}" ]; then + printf -v ${outvarname_halo_width} "%s" "${halo_width}" + fi + + if [ ! -z "${outvarname_stretch_factor}" ]; then + printf -v ${outvarname_stretch_factor} "%s" "${stretch_factor}" + fi + + if [ ! -z "${outvarname_pazi}" ]; then + printf -v ${outvarname_pazi} "%s" "${pazi}" + fi + + if [ ! -z "${outvarname_del_angle_x_sg}" ]; then + printf -v ${outvarname_del_angle_x_sg} "%s" "${del_angle_x_sg}" + fi + + if [ ! -z "${outvarname_del_angle_y_sg}" ]; then + printf -v ${outvarname_del_angle_y_sg} "%s" "${del_angle_y_sg}" + fi + + if [ ! -z "${outvarname_neg_nx_of_dom_with_wide_halo}" ]; then + printf -v ${outvarname_neg_nx_of_dom_with_wide_halo} "%s" "${neg_nx_of_dom_with_wide_halo}" + fi + + if [ ! -z "${outvarname_neg_ny_of_dom_with_wide_halo}" ]; then + printf -v ${outvarname_neg_ny_of_dom_with_wide_halo} "%s" "${neg_ny_of_dom_with_wide_halo}" + fi # #----------------------------------------------------------------------- # diff --git a/ush/set_gridparams_GFDLgrid.sh b/ush/set_gridparams_GFDLgrid.sh index a76b9a58a..61142e6e4 100644 --- a/ush/set_gridparams_GFDLgrid.sh +++ b/ush/set_gridparams_GFDLgrid.sh @@ -48,25 +48,25 @@ function set_gridparams_GFDLgrid() { #----------------------------------------------------------------------- # local valid_args=( \ -"lon_of_t6_ctr" \ -"lat_of_t6_ctr" \ -"res_of_t6g" \ -"stretch_factor" \ -"refine_ratio_t6g_to_t7g" \ -"istart_of_t7_on_t6g" \ -"iend_of_t7_on_t6g" \ -"jstart_of_t7_on_t6g" \ -"jend_of_t7_on_t6g" \ -"output_varname_lon_of_t7_ctr" \ -"output_varname_lat_of_t7_ctr" \ -"output_varname_nx_of_t7_on_t7g" \ -"output_varname_ny_of_t7_on_t7g" \ -"output_varname_halo_width_on_t7g" \ -"output_varname_stretch_factor" \ -"output_varname_istart_of_t7_with_halo_on_t6sg" \ -"output_varname_iend_of_t7_with_halo_on_t6sg" \ -"output_varname_jstart_of_t7_with_halo_on_t6sg" \ -"output_varname_jend_of_t7_with_halo_on_t6sg" \ + "lon_of_t6_ctr" \ + "lat_of_t6_ctr" \ + "res_of_t6g" \ + "stretch_factor" \ + "refine_ratio_t6g_to_t7g" \ + "istart_of_t7_on_t6g" \ + "iend_of_t7_on_t6g" \ + "jstart_of_t7_on_t6g" \ + "jend_of_t7_on_t6g" \ + "outvarname_lon_of_t7_ctr" \ + "outvarname_lat_of_t7_ctr" \ + "outvarname_nx_of_t7_on_t7g" \ + "outvarname_ny_of_t7_on_t7g" \ + "outvarname_halo_width_on_t7g" \ + "outvarname_stretch_factor" \ + "outvarname_istart_of_t7_with_halo_on_t6sg" \ + "outvarname_iend_of_t7_with_halo_on_t6sg" \ + "outvarname_jstart_of_t7_with_halo_on_t6sg" \ + "outvarname_jend_of_t7_with_halo_on_t6sg" \ ) process_args valid_args "$@" # @@ -505,16 +505,45 @@ jend_of_t7_with_halo_on_t6sg = ${jend_of_t7_with_halo_on_t6sg})" # #----------------------------------------------------------------------- # - eval ${output_varname_lon_of_t7_ctr}="${lon_of_t7_ctr}" - eval ${output_varname_lat_of_t7_ctr}="${lat_of_t7_ctr}" - eval ${output_varname_nx_of_t7_on_t7g}="${nx_of_t7_on_t7g}" - eval ${output_varname_ny_of_t7_on_t7g}="${ny_of_t7_on_t7g}" - eval ${output_varname_halo_width_on_t7g}="${halo_width_on_t7g}" - eval ${output_varname_stretch_factor}="${stretch_factor}" - eval ${output_varname_istart_of_t7_with_halo_on_t6sg}="${istart_of_t7_with_halo_on_t6sg}" - eval ${output_varname_iend_of_t7_with_halo_on_t6sg}="${iend_of_t7_with_halo_on_t6sg}" - eval ${output_varname_jstart_of_t7_with_halo_on_t6sg}="${jstart_of_t7_with_halo_on_t6sg}" - eval ${output_varname_jend_of_t7_with_halo_on_t6sg}="${jend_of_t7_with_halo_on_t6sg}" + if [ ! -z "${outvarname_lon_of_t7_ctr}" ]; then + printf -v ${outvarname_lon_of_t7_ctr} "%s" "${lon_of_t7_ctr}" + fi + + if [ ! -z "${outvarname_lat_of_t7_ctr}" ]; then + printf -v ${outvarname_lat_of_t7_ctr} "%s" "${lat_of_t7_ctr}" + fi + + if [ ! -z "${outvarname_nx_of_t7_on_t7g}" ]; then + printf -v ${outvarname_nx_of_t7_on_t7g} "%s" "${nx_of_t7_on_t7g}" + fi + + if [ ! -z "${outvarname_ny_of_t7_on_t7g}" ]; then + printf -v ${outvarname_ny_of_t7_on_t7g} "%s" "${ny_of_t7_on_t7g}" + fi + + if [ ! -z "${outvarname_halo_width_on_t7g}" ]; then + printf -v ${outvarname_halo_width_on_t7g} "%s" "${halo_width_on_t7g}" + fi + + if [ ! -z "${outvarname_stretch_factor}" ]; then + printf -v ${outvarname_stretch_factor} "%s" "${stretch_factor}" + fi + + if [ ! -z "${outvarname_istart_of_t7_with_halo_on_t6sg}" ]; then + printf -v ${outvarname_istart_of_t7_with_halo_on_t6sg} "%s" "${istart_of_t7_with_halo_on_t6sg}" + fi + + if [ ! -z "${outvarname_iend_of_t7_with_halo_on_t6sg}" ]; then + printf -v ${outvarname_iend_of_t7_with_halo_on_t6sg} "%s" "${iend_of_t7_with_halo_on_t6sg}" + fi + + if [ ! -z "${outvarname_jstart_of_t7_with_halo_on_t6sg}" ]; then + printf -v ${outvarname_jstart_of_t7_with_halo_on_t6sg} "%s" "${jstart_of_t7_with_halo_on_t6sg}" + fi + + if [ ! -z "${outvarname_jend_of_t7_with_halo_on_t6sg}" ]; then + printf -v ${outvarname_jend_of_t7_with_halo_on_t6sg} "%s" "${jend_of_t7_with_halo_on_t6sg}" + fi # #----------------------------------------------------------------------- # diff --git a/ush/setup.sh b/ush/setup.sh index 67b677692..b2896aa78 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -1838,16 +1838,18 @@ if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then iend_of_t7_on_t6g="${GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G}" \ jstart_of_t7_on_t6g="${GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G}" \ jend_of_t7_on_t6g="${GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G}" \ - output_varname_lon_of_t7_ctr="LON_CTR" \ - output_varname_lat_of_t7_ctr="LAT_CTR" \ - output_varname_nx_of_t7_on_t7g="NX" \ - output_varname_ny_of_t7_on_t7g="NY" \ - output_varname_halo_width_on_t7g="NHW" \ - output_varname_stretch_factor="STRETCH_FAC" \ - output_varname_istart_of_t7_with_halo_on_t6sg="ISTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" \ - output_varname_iend_of_t7_with_halo_on_t6sg="IEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" \ - output_varname_jstart_of_t7_with_halo_on_t6sg="JSTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" \ - output_varname_jend_of_t7_with_halo_on_t6sg="JEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" + run_envir="${RUN_ENVIR}" \ + verbose="${VERBOSE}" \ + outvarname_lon_of_t7_ctr="LON_CTR" \ + outvarname_lat_of_t7_ctr="LAT_CTR" \ + outvarname_nx_of_t7_on_t7g="NX" \ + outvarname_ny_of_t7_on_t7g="NY" \ + outvarname_halo_width_on_t7g="NHW" \ + outvarname_stretch_factor="STRETCH_FAC" \ + outvarname_istart_of_t7_with_halo_on_t6sg="ISTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" \ + outvarname_iend_of_t7_with_halo_on_t6sg="IEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" \ + outvarname_jstart_of_t7_with_halo_on_t6sg="JSTART_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" \ + outvarname_jend_of_t7_with_halo_on_t6sg="JEND_OF_RGNL_DOM_WITH_WIDE_HALO_ON_T6SG" # #----------------------------------------------------------------------- # @@ -1866,17 +1868,17 @@ elif [ "${GRID_GEN_METHOD}" = "ESGgrid" ]; then halo_width="${ESGgrid_WIDE_HALO_WIDTH}" \ delx="${ESGgrid_DELX}" \ dely="${ESGgrid_DELY}" \ - output_varname_lon_ctr="LON_CTR" \ - output_varname_lat_ctr="LAT_CTR" \ - output_varname_nx="NX" \ - output_varname_ny="NY" \ - output_varname_pazi="PAZI" \ - output_varname_halo_width="NHW" \ - output_varname_stretch_factor="STRETCH_FAC" \ - output_varname_del_angle_x_sg="DEL_ANGLE_X_SG" \ - output_varname_del_angle_y_sg="DEL_ANGLE_Y_SG" \ - output_varname_neg_nx_of_dom_with_wide_halo="NEG_NX_OF_DOM_WITH_WIDE_HALO" \ - output_varname_neg_ny_of_dom_with_wide_halo="NEG_NY_OF_DOM_WITH_WIDE_HALO" + outvarname_lon_ctr="LON_CTR" \ + outvarname_lat_ctr="LAT_CTR" \ + outvarname_nx="NX" \ + outvarname_ny="NY" \ + outvarname_pazi="PAZI" \ + outvarname_halo_width="NHW" \ + outvarname_stretch_factor="STRETCH_FAC" \ + outvarname_del_angle_x_sg="DEL_ANGLE_X_SG" \ + outvarname_del_angle_y_sg="DEL_ANGLE_Y_SG" \ + outvarname_neg_nx_of_dom_with_wide_halo="NEG_NX_OF_DOM_WITH_WIDE_HALO" \ + outvarname_neg_ny_of_dom_with_wide_halo="NEG_NY_OF_DOM_WITH_WIDE_HALO" fi # @@ -2165,7 +2167,7 @@ print_info_msg " Creating list of default experiment variable definitions..." get_bash_file_contents fp="$USHDIR/${EXPT_DEFAULT_CONFIG_FN}" \ - output_varname_contents="default_var_defns" + outvarname_contents="default_var_defns" print_info_msg "$DEBUG" " The variable \"default_var_defns\" containing default values of primary @@ -2279,9 +2281,9 @@ var_name = \"${var_name}\"" else var_value="" - printf -v "var_value" "${escbksl_nl_or_null}" + printf -v "var_value" "%s" "${escbksl_nl_or_null}" for (( i=0; i<${num_elems}; i++ )); do - printf -v "var_value" "${var_value}\"${array[$i]}\" ${escbksl_nl_or_null}" + printf -v "var_value" "%s" "${var_value}\"${array[$i]}\" ${escbksl_nl_or_null}" done rhs="( ${var_value})" @@ -2308,7 +2310,7 @@ Setting its value in the variable definitions file to an empty string." # to the list of all variable definitions. # var_defn="${var_name}=$rhs" - printf -v "var_defns" "${var_defns}${var_defn}\n" + printf -v "var_defns" "%s" "${var_defns}${var_defn}\n" # # If var_name is empty, then a variable name was not found on the current # line in default_var_defns. In this case, print out a warning and move From a0d60f3f307c6e80c78036e27151ce807b67916b Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 18 May 2022 12:31:00 -0600 Subject: [PATCH 04/26] Improvements to set_gridparams_GFDLgrid() function to make it easier to call independently: 1) Replace the global variable VERBOSE with the input argument "verbose". 2) Remove if-statements involving RUN_ENVIR. These were needed when EMC was using GFDLgrid type grids that were not symmetric about the center of the tile, but now that EMC is using ESGgrid-type grids, they are no longer needed. --- ush/set_gridparams_GFDLgrid.sh | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/ush/set_gridparams_GFDLgrid.sh b/ush/set_gridparams_GFDLgrid.sh index 61142e6e4..25e2d8545 100644 --- a/ush/set_gridparams_GFDLgrid.sh +++ b/ush/set_gridparams_GFDLgrid.sh @@ -57,6 +57,7 @@ function set_gridparams_GFDLgrid() { "iend_of_t7_on_t6g" \ "jstart_of_t7_on_t6g" \ "jend_of_t7_on_t6g" \ + "verbose" \ "outvarname_lon_of_t7_ctr" \ "outvarname_lat_of_t7_ctr" \ "outvarname_nx_of_t7_on_t7g" \ @@ -140,7 +141,6 @@ function set_gridparams_GFDLgrid() { # This if-statement can hopefully be removed once EMC agrees to make their # GFDLgrid type grids (tile 7) symmetric about tile 6. -if [ "${RUN_ENVIR}" != "nco" ]; then if [ ${num_left_margin_cells_on_t6g} -ne ${num_right_margin_cells_on_t6g} ]; then print_err_msg_exit "\ In order for tile 7 to be centered in the x direction on tile 6, the x- @@ -159,14 +159,12 @@ ven by: nx_of_t6_on_t6g = ${nx_of_t6_on_t6g} Please reset istart_of_t7_on_t6g and iend_of_t7_on_t6g and rerun." fi -fi num_bot_margin_cells_on_t6g=$(( jstart_of_t7_on_t6g - 1 )) num_top_margin_cells_on_t6g=$(( ny_of_t6_on_t6g - jend_of_t7_on_t6g )) # This if-statement can hopefully be removed once EMC agrees to make their # GFDLgrid type grids (tile 7) symmetric about tile 6. -if [ "${RUN_ENVIR}" != "nco" ]; then if [ ${num_bot_margin_cells_on_t6g} -ne ${num_top_margin_cells_on_t6g} ]; then print_err_msg_exit "\ In order for tile 7 to be centered in the y direction on tile 6, the y- @@ -185,7 +183,6 @@ ven by: ny_of_t6_on_t6g = ${ny_of_t6_on_t6g} Please reset jstart_of_t7_on_t6g and jend_of_t7_on_t6g and rerun." fi -fi lon_of_t7_ctr="${lon_of_t6_ctr}" lat_of_t7_ctr="${lat_of_t6_ctr}" @@ -386,7 +383,7 @@ fi # #----------------------------------------------------------------------- # - print_info_msg "$VERBOSE" " + print_info_msg "$verbose" " Original values of the halo width on the tile 6 supergrid and on the tile 7 grid are: halo_width_on_t6sg = ${halo_width_on_t6sg} @@ -396,7 +393,7 @@ tile 7 grid are: halo_width_on_t6g=$(( halo_width_on_t6sg/2 )) halo_width_on_t7g=$(( halo_width_on_t6g*refine_ratio_t6g_to_t7g )) - print_info_msg "$VERBOSE" " + print_info_msg "$verbose" " Values of the halo width on the tile 6 supergrid and on the tile 7 grid AFTER adjustments are: halo_width_on_t6sg = ${halo_width_on_t6sg} @@ -428,7 +425,7 @@ AFTER adjustments are: prime_factors_nx_of_t7_on_t7g=$( factor ${nx_of_t7_on_t7g} | $SED -r -e 's/^[0-9]+: (.*)/\1/' ) prime_factors_ny_of_t7_on_t7g=$( factor ${ny_of_t7_on_t7g} | $SED -r -e 's/^[0-9]+: (.*)/\1/' ) - print_info_msg "$VERBOSE" " + print_info_msg "$verbose" " The number of cells in the two horizontal directions (x and y) on the parent tile's (tile 6) grid and supergrid are: nx_of_t6_on_t6g = ${nx_of_t6_on_t6g} @@ -489,12 +486,12 @@ determining an MPI task layout): ny_of_t7_with_halo_on_t6g=$(( ny_of_t7_with_halo_on_t6sg/2 )) ny_of_t7_with_halo_on_t7g=$(( ny_of_t7_with_halo_on_t6g*refine_ratio_t6g_to_t7g )) - print_info_msg "$VERBOSE" " + print_info_msg "$verbose" " nx_of_t7_with_halo_on_t7g = ${nx_of_t7_with_halo_on_t7g} \ (istart_of_t7_with_halo_on_t6sg = ${istart_of_t7_with_halo_on_t6sg}, \ iend_of_t7_with_halo_on_t6sg = ${iend_of_t7_with_halo_on_t6sg})" - print_info_msg "$VERBOSE" " + print_info_msg "$verbose" " ny_of_t7_with_halo_on_t7g = ${ny_of_t7_with_halo_on_t7g} \ (jstart_of_t7_with_halo_on_t6sg = ${jstart_of_t7_with_halo_on_t6sg}, \ jend_of_t7_with_halo_on_t6sg = ${jend_of_t7_with_halo_on_t6sg})" From d2ed44699e44d07180f5b01b2d9f3e351849340a Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 18 May 2022 14:48:20 -0600 Subject: [PATCH 05/26] Move constants NH0, NH3, and NH4 to the constants.sh file so that they can be available outside of workflow generation (e.g. during the generation of the CSV file containing test information) by sourcing constants.sh. Details: 1) Move constants NH0, NH3, and NH4 needed in grid generation from setup.sh to the constants.sh. 2) During experiment generation (in setup.sh), place the contents of constants.sh at the top of var_defns.sh. 3) Define new variable CONSTANTS_FN in config_defaults.sh that defines the name of the constants definition file. 4) Source constants.sh in get_gridparams_GFDLgrid.sh in order to have access to NH0, NH3, and NH4 (since those are no longer in config_defaults.sh). 5) Bug fixes in "printf -v ..." commands in setup.sh. 6) Source constants.sh in valid_param_vals.sh so that the constant array "valid_vals_Boolean" can be used in valid_param_vals.sh. --- ush/config_defaults.sh | 5 +++ ush/constants.sh | 46 +++++++++++++++++-- ush/set_gridparams_GFDLgrid.sh | 17 +++++++ ush/setup.sh | 81 +++++++++++++++------------------- ush/valid_param_vals.sh | 60 +++++++++++++------------ 5 files changed, 132 insertions(+), 77 deletions(-) diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index 8af4590a6..6f872b15d 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -307,6 +307,10 @@ DOT_OR_USCORE="_" # EXPT_CONFIG_FN: # Name of the user-specified configuration file for the forecast experiment. # +# CONSTANTS_FN: +# Name of the file containing definitions of various mathematical, physical, +# and SRW App contants. +# # RGNL_GRID_NML_FN: # Name of file containing the namelist settings for the code that generates # a "ESGgrid" type of regional grid. @@ -388,6 +392,7 @@ DOT_OR_USCORE="_" #----------------------------------------------------------------------- # EXPT_CONFIG_FN="config.sh" +CONSTANTS_FN="constants.sh" RGNL_GRID_NML_FN="regional_grid.nml" diff --git a/ush/constants.sh b/ush/constants.sh index 0d68019ae..26f4cb1b3 100644 --- a/ush/constants.sh +++ b/ush/constants.sh @@ -10,16 +10,56 @@ pi_geom="3.14159265358979323846264338327" # Degrees per radian. -degs_per_radian=$( bc -l <<< "360.0/(2.0*$pi_geom)" ) +degs_per_radian=$( bc -l <<< "360.0/(2.0*${pi_geom})" ) # Radius of the Earth in meters. radius_Earth="6371200.0" - # #----------------------------------------------------------------------- # -# Other. +# Valid values that a user may set a boolean variable to (e.g. in the +# SRW App's experiment configuration file). # #----------------------------------------------------------------------- # valid_vals_BOOLEAN=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +# +#----------------------------------------------------------------------- +# +# Any regional model must be supplied lateral boundary conditions (in +# addition to initial conditions) to be able to perform a forecast. In +# the FV3-LAM model, these boundary conditions (BCs) are supplied using +# a "halo" of grid cells around the regional domain that extend beyond +# the boundary of the domain. The model is formulated such that along +# with files containing these BCs, it needs as input the following files +# (in NetCDF format): +# +# 1) A grid file that includes a halo of 3 cells beyond the boundary of +# the domain. +# 2) A grid file that includes a halo of 4 cells beyond the boundary of +# the domain. +# 3) A (filtered) orography file without a halo, i.e. a halo of width +# 0 cells. +# 4) A (filtered) orography file that includes a halo of 4 cells beyond +# the boundary of the domain. +# +# Note that the regional grid is referred to as "tile 7" in the code. +# We will let: +# +# * NH0 denote the width (in units of number of cells on tile 7) of +# the 0-cell-wide halo, i.e. NH0 = 0; +# +# * NH3 denote the width (in units of number of cells on tile 7) of +# the 3-cell-wide halo, i.e. NH3 = 3; and +# +# * NH4 denote the width (in units of number of cells on tile 7) of +# the 4-cell-wide halo, i.e. NH4 = 4. +# +# We define these variables next. +# +#----------------------------------------------------------------------- +# +NH0=0 +NH3=3 +NH4=4 + diff --git a/ush/set_gridparams_GFDLgrid.sh b/ush/set_gridparams_GFDLgrid.sh index 25e2d8545..68b6937be 100644 --- a/ush/set_gridparams_GFDLgrid.sh +++ b/ush/set_gridparams_GFDLgrid.sh @@ -40,6 +40,23 @@ function set_gridparams_GFDLgrid() { # #----------------------------------------------------------------------- # +# Set directories. +# +#----------------------------------------------------------------------- +# + local homerrfs=${scrfunc_dir%/*} + local ushdir="$homerrfs/ush" +# +#----------------------------------------------------------------------- +# +# Source the file containing various mathematical, physical, etc constants. +# +#----------------------------------------------------------------------- +# + . $ushdir/constants.sh +# +#----------------------------------------------------------------------- +# # Specify the set of valid argument names for this script/function. # Then process the arguments provided to this script/function (which # should consist of a set of name-value pairs of the form arg1="value1", diff --git a/ush/setup.sh b/ush/setup.sh index b2896aa78..7d328a981 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -1781,45 +1781,6 @@ fi # #----------------------------------------------------------------------- # -# Any regional model must be supplied lateral boundary conditions (in -# addition to initial conditions) to be able to perform a forecast. In -# the FV3-LAM model, these boundary conditions (BCs) are supplied using a -# "halo" of grid cells around the regional domain that extend beyond the -# boundary of the domain. The model is formulated such that along with -# files containing these BCs, it needs as input the following files (in -# NetCDF format): -# -# 1) A grid file that includes a halo of 3 cells beyond the boundary of -# the domain. -# 2) A grid file that includes a halo of 4 cells beyond the boundary of -# the domain. -# 3) A (filtered) orography file without a halo, i.e. a halo of width -# 0 cells. -# 4) A (filtered) orography file that includes a halo of 4 cells beyond -# the boundary of the domain. -# -# Note that the regional grid is referred to as "tile 7" in the code. -# We will let: -# -# * NH0 denote the width (in units of number of cells on tile 7) of -# the 0-cell-wide halo, i.e. NH0 = 0; -# -# * NH3 denote the width (in units of number of cells on tile 7) of -# the 3-cell-wide halo, i.e. NH3 = 3; and -# -# * NH4 denote the width (in units of number of cells on tile 7) of -# the 4-cell-wide halo, i.e. NH4 = 4. -# -# We define these variables next. -# -#----------------------------------------------------------------------- -# -NH0=0 -NH3=3 -NH4=4 -# -#----------------------------------------------------------------------- -# # Set parameters according to the type of horizontal grid generation # method specified. First consider GFDL's global-parent-grid based # method. @@ -2153,6 +2114,27 @@ GLOBAL_VAR_DEFNS_FP="$EXPTDIR/${GLOBAL_VAR_DEFNS_FN}" # #----------------------------------------------------------------------- # +# Get the list of constants and their values. The result is saved in +# the variable "constant_defns". This will be written to the experiment's +# variable defintions file later below. +# +#----------------------------------------------------------------------- +# +print_info_msg " +Creating list of constants..." + +get_bash_file_contents fp="$USHDIR/${CONSTANTS_FN}" \ + outvarname_contents="constant_defns" + +print_info_msg "$DEBUG" " +The variable \"constant_defns\" containing definitions of various +constants is set as follows: + +${constant_defns} +" +# +#----------------------------------------------------------------------- +# # Get the list of primary experiment variables and their default values # from the default experiment configuration file (EXPT_DEFAULT_CONFIG_FN). # By "primary", we mean those variables that are defined in the default @@ -2281,9 +2263,9 @@ var_name = \"${var_name}\"" else var_value="" - printf -v "var_value" "%s" "${escbksl_nl_or_null}" + printf -v "var_value" "%s${escbksl_nl_or_null}" "" for (( i=0; i<${num_elems}; i++ )); do - printf -v "var_value" "%s" "${var_value}\"${array[$i]}\" ${escbksl_nl_or_null}" + printf -v "var_value" "%s${escbksl_nl_or_null}" "${var_value}\"${array[$i]}\" " done rhs="( ${var_value})" @@ -2310,7 +2292,7 @@ Setting its value in the variable definitions file to an empty string." # to the list of all variable definitions. # var_defn="${var_name}=$rhs" - printf -v "var_defns" "%s" "${var_defns}${var_defn}\n" + printf -v "var_defns" "%s\n" "${var_defns}${var_defn}" # # If var_name is empty, then a variable name was not found on the current # line in default_var_defns. In this case, print out a warning and move @@ -2353,6 +2335,16 @@ var_defns_file_contents="\ #----------------------------------------------------------------------- #----------------------------------------------------------------------- # Section 1: +# This section contains definitions of the various constants defined in +# the file ${CONSTANTS_FN}. +#----------------------------------------------------------------------- +#----------------------------------------------------------------------- +# +${constant_defns} +# +#----------------------------------------------------------------------- +#----------------------------------------------------------------------- +# Section 2: # This section contains (most of) the primary experiment variables, i.e. # those variables that are defined in the default configuration file # (${EXPT_DEFAULT_CONFIG_FN}) and that can be reset via the user-specified @@ -2375,7 +2367,7 @@ var_defns_file_contents=${var_defns_file_contents}"\ # #----------------------------------------------------------------------- #----------------------------------------------------------------------- -# Section 2: +# Section 3: # This section defines variables that have been derived from the primary # set of experiment variables above (we refer to these as \"derived\" or # \"secondary\" variables). @@ -2518,9 +2510,6 @@ SDF_USES_THOMPSON_MP='${SDF_USES_THOMPSON_MP}' # GTYPE='$GTYPE' TILE_RGNL='${TILE_RGNL}' -NH0='${NH0}' -NH3='${NH3}' -NH4='${NH4}' LON_CTR='${LON_CTR}' LAT_CTR='${LAT_CTR}' diff --git a/ush/valid_param_vals.sh b/ush/valid_param_vals.sh index 69c08984e..e7870e5cd 100644 --- a/ush/valid_param_vals.sh +++ b/ush/valid_param_vals.sh @@ -1,9 +1,13 @@ # +# Source file containing useful constants. +# +. ./constants.sh +# # Define valid values for various global experiment/workflow variables. # valid_vals_RUN_ENVIR=("nco" "community") -valid_vals_VERBOSE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_DEBUG=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_VERBOSE=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_DEBUG=( ${valid_vals_BOOLEAN[@]} ) valid_vals_MACHINE=("WCOSS_DELL_P3" "HERA" "ORION" "JET" "ODIN" "CHEYENNE" "STAMPEDE" "LINUX" "MACOS" "NOAACLOUD" "SINGULARITY" "GAEA") valid_vals_SCHED=("slurm" "pbspro" "lsf" "lsfcray" "none") valid_vals_FCST_MODEL=("ufs-weather-model" "fv3gfs_aqm") @@ -46,40 +50,40 @@ valid_vals_CCPP_PHYS_SUITE=( \ valid_vals_GFDLgrid_RES=("48" "96" "192" "384" "768" "1152" "3072") valid_vals_EXTRN_MDL_NAME_ICS=("GSMGFS" "FV3GFS" "RAP" "HRRR" "NAM") valid_vals_EXTRN_MDL_NAME_LBCS=("GSMGFS" "FV3GFS" "RAP" "HRRR" "NAM") -valid_vals_USE_USER_STAGED_EXTRN_FILES=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_USE_USER_STAGED_EXTRN_FILES=( ${valid_vals_BOOLEAN[@]} ) valid_vals_FV3GFS_FILE_FMT_ICS=("nemsio" "grib2" "netcdf") valid_vals_FV3GFS_FILE_FMT_LBCS=("nemsio" "grib2" "netcdf") valid_vals_GRID_GEN_METHOD=("GFDLgrid" "ESGgrid") valid_vals_PREEXISTING_DIR_METHOD=("delete" "rename" "quit") valid_vals_GTYPE=("regional") valid_vals_WRTCMP_output_grid=("rotated_latlon" "lambert_conformal" "regional_latlon") -valid_vals_RUN_TASK_MAKE_GRID=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_MAKE_OROG=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_MAKE_SFC_CLIMO=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_RUN_POST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_WRITE_DOPOST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_VX_GRIDSTAT=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_VX_POINTSTAT=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_VX_ENSGRID=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_RUN_TASK_VX_ENSPOINT=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_QUILTING=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_PRINT_ESMF=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_USE_CRON_TO_RELAUNCH=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_RUN_TASK_MAKE_GRID=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_MAKE_OROG=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_MAKE_SFC_CLIMO=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_RUN_POST=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_WRITE_DOPOST=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_VX_GRIDSTAT=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_VX_POINTSTAT=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_VX_ENSGRID=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_RUN_TASK_VX_ENSPOINT=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_QUILTING=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_PRINT_ESMF=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_USE_CRON_TO_RELAUNCH=( ${valid_vals_BOOLEAN[@]} ) valid_vals_DOT_OR_USCORE=("." "_") -valid_vals_NOMADS=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_NOMADS=( ${valid_vals_BOOLEAN[@]} ) valid_vals_NOMADS_file_type=("GRIB2" "grib2" "NEMSIO" "nemsio") -valid_vals_DO_ENSEMBLE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_USE_CUSTOM_POST_CONFIG_FILE=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_USE_CRTM=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_DO_SHUM=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_DO_SPPT=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_DO_SPP=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_DO_LSM_SPP=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_DO_SKEB=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_USE_ZMTNBLCK=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") -valid_vals_USE_FVCOM=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_DO_ENSEMBLE=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_USE_CUSTOM_POST_CONFIG_FILE=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_USE_CRTM=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_DO_SHUM=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_DO_SPPT=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_DO_SPP=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_DO_LSM_SPP=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_DO_SKEB=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_USE_ZMTNBLCK=( ${valid_vals_BOOLEAN[@]} ) +valid_vals_USE_FVCOM=( ${valid_vals_BOOLEAN[@]} ) valid_vals_FVCOM_WCSTART=("warm" "WARM" "cold" "COLD") valid_vals_COMPILER=("intel" "gnu") -valid_vals_SUB_HOURLY_POST=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_SUB_HOURLY_POST=( ${valid_vals_BOOLEAN[@]} ) valid_vals_DT_SUBHOURLY_POST_MNTS=("1" "01" "2" "02" "3" "03" "4" "04" "5" "05" "6" "06" "10" "12" "15" "20" "30") -valid_vals_USE_MERRA_CLIMO=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") +valid_vals_USE_MERRA_CLIMO=( ${valid_vals_BOOLEAN[@]} ) From 3123459367b33ae6393ff89805ef790faebce551 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 18 May 2022 14:54:42 -0600 Subject: [PATCH 06/26] In the function set_gridparams_ESGgrid(), change USHDIR to the local variable ushdir and set it within the function to allow the function to be used outside of the workflow generation (e.g. when creating a CSV file containing WE2E test information). --- ush/set_gridparams_ESGgrid.sh | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/ush/set_gridparams_ESGgrid.sh b/ush/set_gridparams_ESGgrid.sh index c7e8a32c0..4b8137771 100644 --- a/ush/set_gridparams_ESGgrid.sh +++ b/ush/set_gridparams_ESGgrid.sh @@ -40,6 +40,23 @@ function set_gridparams_ESGgrid() { # #----------------------------------------------------------------------- # +# Set directories. +# +#----------------------------------------------------------------------- +# + local homerrfs=${scrfunc_dir%/*} + local ushdir="$homerrfs/ush" +# +#----------------------------------------------------------------------- +# +# Source the file containing various mathematical, physical, etc constants. +# +#----------------------------------------------------------------------- +# + . $ushdir/constants.sh +# +#----------------------------------------------------------------------- +# # Specify the set of valid argument names for this script/function. # Then process the arguments provided to this script/function (which # should consist of a set of name-value pairs of the form arg1="value1", @@ -78,15 +95,7 @@ function set_gridparams_ESGgrid() { # #----------------------------------------------------------------------- # - print_input_args valid_args -# -#----------------------------------------------------------------------- -# -# Source the file containing various mathematical, physical, etc constants. -# -#----------------------------------------------------------------------- -# - . ${USHDIR}/constants.sh +# print_input_args valid_args # #----------------------------------------------------------------------- # From b919577342d51eb1eb6c8daf3a8419c9f49df0c6 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 18 May 2022 16:04:17 -0600 Subject: [PATCH 07/26] Changes to allow the function set_predef_grid_params() to be called outside of the workflow generation framework (e.g. to enable calling it from get_WE2Etest_names_subdirs_descs.sh to generate the CSV file containing WE2E test information): 1) Change USHDIR to the local variable ushdir and set the latter locally within the function. 2) Change PREDEF_GRID_NAME to predef_grid_name and make the latter a required input argument. 3) Change DT_ATMOS, LAYOUT_X, LAYOUT_Y, and BLOCKSIZE to dt_atmos, layout_x, layout_y, and blocksize and and make the latter set optional input arguments. If these are provided, then they remain the same within the function. If they are not provided (or are provided but their value is a null string), they get reset to the default value for the specified predefined grid (predef_grid_name). 4) Change QUILTING to quilting and make the latter a required input argument. 5) Change the grid parameters that this function sets for a given grid into local variables that get reset to null strings and instead provide as input arguments the names of output variables ("outvarname_...") that can be used to return these local variables back to the calling function or script. Such local variables are returned only if a corresponding "outvarname_..." input argument is specified by the calling function or script. 6) Edit comments; add double quotes for consistency where necessary; remove empty lines or add them as needed. 7) Remove call to the function from within the file (at the end of the file). This means the function cannot be called simply by sourcing the file containing it. Instead, the file must be sourced, but then the function must be called separately (along with an argument list). This is to bring things in line with the way other functions are called in the SRW App. --- ush/set_predef_grid_params.sh | 1897 +++++++++++++++++++-------------- 1 file changed, 1099 insertions(+), 798 deletions(-) diff --git a/ush/set_predef_grid_params.sh b/ush/set_predef_grid_params.sh index 1a5e398f2..6f265c92d 100644 --- a/ush/set_predef_grid_params.sh +++ b/ush/set_predef_grid_params.sh @@ -15,7 +15,7 @@ function set_predef_grid_params() { # #----------------------------------------------------------------------- # -{ save_shell_opts; set -u +x; } > /dev/null 2>&1 + { save_shell_opts; set -u +x; } > /dev/null 2>&1 # #----------------------------------------------------------------------- # @@ -25,9 +25,9 @@ function set_predef_grid_params() { # #----------------------------------------------------------------------- # -local scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) -local scrfunc_fn=$( basename "${scrfunc_fp}" ) -local scrfunc_dir=$( dirname "${scrfunc_fp}" ) + local scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" ) + local scrfunc_fn=$( basename "${scrfunc_fp}" ) + local scrfunc_dir=$( dirname "${scrfunc_fp}" ) # #----------------------------------------------------------------------- # @@ -35,7 +35,16 @@ local scrfunc_dir=$( dirname "${scrfunc_fp}" ) # #----------------------------------------------------------------------- # -local func_name="${FUNCNAME[0]}" + local func_name="${FUNCNAME[0]}" +# +#----------------------------------------------------------------------- +# +# Set directories. +# +#----------------------------------------------------------------------- +# + local homerrfs=${scrfunc_dir%/*} + local ushdir="$homerrfs/ush" # #----------------------------------------------------------------------- # @@ -43,13 +52,142 @@ local func_name="${FUNCNAME[0]}" # #----------------------------------------------------------------------- # -. ${USHDIR}/constants.sh + . $ushdir/constants.sh +# +#----------------------------------------------------------------------- +# +# Specify the set of valid argument names for this script/function. +# Then process the arguments provided to this script/function (which +# should consist of a set of name-value pairs of the form arg1="value1", +# etc). +# +#----------------------------------------------------------------------- +# + local valid_args=( \ + "predef_grid_name" \ + "dt_atmos" \ + "layout_x" \ + "layout_y" \ + "blocksize" \ + "quilting" \ + "outvarname_grid_gen_method" \ + "outvarname_esggrid_lon_ctr" \ + "outvarname_esggrid_lat_ctr" \ + "outvarname_esggrid_delx" \ + "outvarname_esggrid_dely" \ + "outvarname_esggrid_nx" \ + "outvarname_esggrid_ny" \ + "outvarname_esggrid_pazi" \ + "outvarname_esggrid_wide_halo_width" \ + "outvarname_gfdlgrid_lon_t6_ctr" \ + "outvarname_gfdlgrid_lat_t6_ctr" \ + "outvarname_gfdlgrid_stretch_fac" \ + "outvarname_gfdlgrid_res" \ + "outvarname_gfdlgrid_refine_ratio" \ + "outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g" \ + "outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g" \ + "outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g" \ + "outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g" \ + "outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames" \ + "outvarname_dt_atmos" \ + "outvarname_layout_x" \ + "outvarname_layout_y" \ + "outvarname_blocksize" \ + "outvarname_wrtcmp_write_groups" \ + "outvarname_wrtcmp_write_tasks_per_group" \ + "outvarname_wrtcmp_output_grid" \ + "outvarname_wrtcmp_cen_lon" \ + "outvarname_wrtcmp_cen_lat" \ + "outvarname_wrtcmp_stdlat1" \ + "outvarname_wrtcmp_stdlat2" \ + "outvarname_wrtcmp_nx" \ + "outvarname_wrtcmp_ny" \ + "outvarname_wrtcmp_lon_lwr_left" \ + "outvarname_wrtcmp_lat_lwr_left" \ + "outvarname_wrtcmp_lon_upr_rght" \ + "outvarname_wrtcmp_lat_upr_rght" \ + "outvarname_wrtcmp_dx" \ + "outvarname_wrtcmp_dy" \ + "outvarname_wrtcmp_dlon" \ + "outvarname_wrtcmp_dlat" \ + ) + process_args valid_args "$@" +# +#----------------------------------------------------------------------- +# +# Declare and initialize local variables. +# +#----------------------------------------------------------------------- +# + local grid_gen_method="" \ + esggrid_lon_ctr="" \ + esggrid_lat_ctr="" \ + esggrid_delx="" \ + esggrid_dely="" \ + esggrid_nx="" \ + esggrid_ny="" \ + esggrid_pazi="" \ + esggrid_wide_halo_width="" \ + gfdlgrid_lon_t6_ctr="" \ + gfdlgrid_lat_t6_ctr="" \ + gfdlgrid_stretch_fac="" \ + gfdlgrid_res="" \ + gfdlgrid_refine_ratio="" \ + gfdlgrid_istart_of_rgnl_dom_on_t6g="" \ + gfdlgrid_iend_of_rgnl_dom_on_t6g="" \ + gfdlgrid_jstart_of_rgnl_dom_on_t6g="" \ + gfdlgrid_jend_of_rgnl_dom_on_t6g="" \ + gfdlgrid_use_gfdlgrid_res_in_filenames="" \ + dt_atmos="" \ + layout_x="" \ + layout_y="" \ + blocksize="" \ + wrtcmp_write_groups="" \ + wrtcmp_write_tasks_per_group="" \ + wrtcmp_output_grid="" \ + wrtcmp_cen_lon="" \ + wrtcmp_cen_lat="" \ + wrtcmp_stdlat1="" \ + wrtcmp_stdlat2="" \ + wrtcmp_nx="" \ + wrtcmp_ny="" \ + wrtcmp_lon_lwr_left="" \ + wrtcmp_lat_lwr_left="" \ + wrtcmp_lon_upr_rght="" \ + wrtcmp_lat_upr_rght="" \ + wrtcmp_dx="" \ + wrtcmp_dy="" \ + wrtcmp_dlon="" \ + wrtcmp_dlat="" \ + num_margin_cells_T6_left="" \ + num_margin_cells_T6_right="" \ + num_margin_cells_T6_bottom="" \ + num_margin_cells_T6_top="" +# +#----------------------------------------------------------------------- +# +# For debugging purposes, print out values of arguments passed to this +# script. Note that these will be printed out only if VERBOSE is set to +# TRUE. +# +#----------------------------------------------------------------------- +# +# print_input_args valid_args +# +#----------------------------------------------------------------------- +# +# Make sure that the input argument "quilting" is set to a valid value. +# +#----------------------------------------------------------------------- +# + check_var_valid_value "quilting" "valid_vals_BOOLEAN" + quilting=$(boolify $quilting) # #----------------------------------------------------------------------- # # Set grid and other parameters according to the value of the predefined -# domain (PREDEF_GRID_NAME). Note that the code will enter this script -# only if PREDEF_GRID_NAME has a valid (and non-empty) value. +# domain (predef_grid_name). Note that the code will enter this script +# only if predef_grid_name has a valid (and non-empty) value. # #################### # The following comments need to be updated: @@ -57,7 +195,7 @@ local func_name="${FUNCNAME[0]}" # # 1) Reset the experiment title (expt_title). # 2) Reset the grid parameters. -# 3) If the write component is to be used (i.e. QUILTING is set to +# 3) If the write component is to be used (i.e. "quilting" is set to # "TRUE") and the variable WRTCMP_PARAMS_TMPL_FN containing the name # of the write-component template file is unset or empty, set that # filename variable to the appropriate preexisting template file. @@ -91,7 +229,7 @@ local func_name="${FUNCNAME[0]}" # #----------------------------------------------------------------------- # -case ${PREDEF_GRID_NAME} in + case "${predef_grid_name}" in # #----------------------------------------------------------------------- # @@ -99,91 +237,92 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_CONUS_25km") + "RRFS_CONUS_25km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="25000.0" - ESGgrid_DELY="25000.0" + esggrid_delx="25000.0" + esggrid_dely="25000.0" - ESGgrid_NX="219" - ESGgrid_NY="131" + esggrid_nx="219" + esggrid_ny="131" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-40}" + dt_atmos="${dt_atmos:-40}" - LAYOUT_X="${LAYOUT_X:-5}" - LAYOUT_Y="${LAYOUT_Y:-2}" - BLOCKSIZE="${BLOCKSIZE:-40}" + layout_x="${layout_x:-5}" + layout_y="${layout_y:-2}" + blocksize="${blocksize:-40}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="2" - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="217" - WRTCMP_ny="128" - WRTCMP_lon_lwr_left="-122.719528" - WRTCMP_lat_lwr_left="21.138123" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="2" + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="217" + wrtcmp_ny="128" + wrtcmp_lon_lwr_left="-122.719528" + wrtcmp_lat_lwr_left="21.138123" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # -# The RRFS CONUS domain with ~25km cells that can be initialized from the HRRR. +# The RRFS CONUS domain with ~25km cells that can be initialized from +# the HRRR. # #----------------------------------------------------------------------- # -"RRFS_CONUScompact_25km") + "RRFS_CONUScompact_25km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="25000.0" - ESGgrid_DELY="25000.0" + esggrid_delx="25000.0" + esggrid_dely="25000.0" - ESGgrid_NX="202" - ESGgrid_NY="116" + esggrid_nx="202" + esggrid_ny="116" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-40}" + dt_atmos="${dt_atmos:-40}" - LAYOUT_X="${LAYOUT_X:-5}" - LAYOUT_Y="${LAYOUT_Y:-2}" - BLOCKSIZE="${BLOCKSIZE:-40}" + layout_x="${layout_x:-5}" + layout_y="${layout_y:-2}" + blocksize="${blocksize:-40}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="2" - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="199" - WRTCMP_ny="111" - WRTCMP_lon_lwr_left="-121.23349066" - WRTCMP_lat_lwr_left="23.41731593" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="2" + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="199" + wrtcmp_ny="111" + wrtcmp_lon_lwr_left="-121.23349066" + wrtcmp_lat_lwr_left="23.41731593" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -191,45 +330,45 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_CONUS_13km") + "RRFS_CONUS_13km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="13000.0" - ESGgrid_DELY="13000.0" + esggrid_delx="13000.0" + esggrid_dely="13000.0" - ESGgrid_NX="420" - ESGgrid_NY="252" + esggrid_nx="420" + esggrid_ny="252" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-45}" + dt_atmos="${dt_atmos:-45}" - LAYOUT_X="${LAYOUT_X:-16}" - LAYOUT_Y="${LAYOUT_Y:-10}" - BLOCKSIZE="${BLOCKSIZE:-32}" + layout_x="${layout_x:-16}" + layout_y="${layout_y:-10}" + blocksize="${blocksize:-32}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="416" - WRTCMP_ny="245" - WRTCMP_lon_lwr_left="-122.719528" - WRTCMP_lat_lwr_left="21.138123" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="416" + wrtcmp_ny="245" + wrtcmp_lon_lwr_left="-122.719528" + wrtcmp_lat_lwr_left="21.138123" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -237,45 +376,45 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_CONUScompact_13km") + "RRFS_CONUScompact_13km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="13000.0" - ESGgrid_DELY="13000.0" + esggrid_delx="13000.0" + esggrid_dely="13000.0" - ESGgrid_NX="396" - ESGgrid_NY="232" + esggrid_nx="396" + esggrid_ny="232" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-45}" + dt_atmos="${dt_atmos:-45}" - LAYOUT_X="${LAYOUT_X:-16}" - LAYOUT_Y="${LAYOUT_Y:-10}" - BLOCKSIZE="${BLOCKSIZE:-32}" + layout_x="${layout_x:-16}" + layout_y="${layout_y:-10}" + blocksize="${blocksize:-32}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="393" - WRTCMP_ny="225" - WRTCMP_lon_lwr_left="-121.70231097" - WRTCMP_lat_lwr_left="22.57417972" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="393" + wrtcmp_ny="225" + wrtcmp_lon_lwr_left="-121.70231097" + wrtcmp_lat_lwr_left="22.57417972" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -283,91 +422,92 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_CONUS_3km") + "RRFS_CONUS_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="1820" - ESGgrid_NY="1092" + esggrid_nx="1820" + esggrid_ny="1092" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-36}" + dt_atmos="${dt_atmos:-36}" - LAYOUT_X="${LAYOUT_X:-28}" - LAYOUT_Y="${LAYOUT_Y:-28}" - BLOCKSIZE="${BLOCKSIZE:-29}" + layout_x="${layout_x:-28}" + layout_y="${layout_y:-28}" + blocksize="${blocksize:-29}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="1799" - WRTCMP_ny="1059" - WRTCMP_lon_lwr_left="-122.719528" - WRTCMP_lat_lwr_left="21.138123" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="1799" + wrtcmp_ny="1059" + wrtcmp_lon_lwr_left="-122.719528" + wrtcmp_lat_lwr_left="21.138123" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # -# The RRFS CONUS domain with ~3km cells that can be initialized from the HRRR. +# The RRFS CONUS domain with ~3km cells that can be initialized from +# the HRRR. # #----------------------------------------------------------------------- # -"RRFS_CONUScompact_3km") + "RRFS_CONUScompact_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="1748" - ESGgrid_NY="1038" + esggrid_nx="1748" + esggrid_ny="1038" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-40}" + dt_atmos="${dt_atmos:-40}" - LAYOUT_X="${LAYOUT_X:-30}" - LAYOUT_Y="${LAYOUT_Y:-16}" - BLOCKSIZE="${BLOCKSIZE:-32}" + layout_x="${layout_x:-30}" + layout_y="${layout_y:-16}" + blocksize="${blocksize:-32}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="1746" - WRTCMP_ny="1014" - WRTCMP_lon_lwr_left="-122.17364391" - WRTCMP_lat_lwr_left="21.88588562" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="1746" + wrtcmp_ny="1014" + wrtcmp_lon_lwr_left="-122.17364391" + wrtcmp_lat_lwr_left="21.88588562" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -375,45 +515,45 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_SUBCONUS_3km") + "RRFS_SUBCONUS_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="35.0" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="35.0" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="840" - ESGgrid_NY="600" + esggrid_nx="840" + esggrid_ny="600" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-40}" + dt_atmos="${dt_atmos:-40}" - LAYOUT_X="${LAYOUT_X:-30}" - LAYOUT_Y="${LAYOUT_Y:-24}" - BLOCKSIZE="${BLOCKSIZE:-35}" + layout_x="${layout_x:-30}" + layout_y="${layout_y:-24}" + blocksize="${blocksize:-35}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="837" - WRTCMP_ny="595" - WRTCMP_lon_lwr_left="-109.97410429" - WRTCMP_lat_lwr_left="26.31459843" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="837" + wrtcmp_ny="595" + wrtcmp_lon_lwr_left="-109.97410429" + wrtcmp_lat_lwr_left="26.31459843" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -423,45 +563,45 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"SUBCONUS_Ind_3km") + "SUBCONUS_Ind_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-86.16" - ESGgrid_LAT_CTR="39.77" + esggrid_lon_ctr="-86.16" + esggrid_lat_ctr="39.77" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="200" - ESGgrid_NY="200" + esggrid_nx="200" + esggrid_ny="200" - ESGgrid_PAZI="0.0" - - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_pazi="0.0" - DT_ATMOS="${DT_ATMOS:-40}" + esggrid_wide_halo_width="6" - LAYOUT_X="${LAYOUT_X:-5}" - LAYOUT_Y="${LAYOUT_Y:-5}" - BLOCKSIZE="${BLOCKSIZE:-40}" + dt_atmos="${dt_atmos:-40}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="197" - WRTCMP_ny="195" - WRTCMP_lon_lwr_left="-89.47120417" - WRTCMP_lat_lwr_left="37.07809642" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + layout_x="${layout_x:-5}" + layout_y="${layout_y:-5}" + blocksize="${blocksize:-40}" + + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="197" + wrtcmp_ny="195" + wrtcmp_lon_lwr_left="-89.47120417" + wrtcmp_lat_lwr_left="37.07809642" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -472,70 +612,71 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_AK_13km") + "RRFS_AK_13km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-161.5" - ESGgrid_LAT_CTR="63.0" + esggrid_lon_ctr="-161.5" + esggrid_lat_ctr="63.0" - ESGgrid_DELX="13000.0" - ESGgrid_DELY="13000.0" + esggrid_delx="13000.0" + esggrid_dely="13000.0" - ESGgrid_NX="320" - ESGgrid_NY="240" + esggrid_nx="320" + esggrid_ny="240" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" -# DT_ATMOS="${DT_ATMOS:-50}" - DT_ATMOS="${DT_ATMOS:-10}" +# dt_atmos="${dt_atmos:-50}" + dt_atmos="${dt_atmos:-10}" - LAYOUT_X="${LAYOUT_X:-16}" - LAYOUT_Y="${LAYOUT_Y:-12}" - BLOCKSIZE="${BLOCKSIZE:-40}" + layout_x="${layout_x:-16}" + layout_y="${layout_y:-12}" + blocksize="${blocksize:-40}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" -# The following work. They were obtained using the NCL scripts but only -# after manually modifying the longitutes of two of the 4 corners of the -# domain to add 360.0 to them. Need to automate that procedure. - WRTCMP_nx="318" - WRTCMP_ny="234" -# WRTCMP_lon_lwr_left="-187.76660836" - WRTCMP_lon_lwr_left="172.23339164" - WRTCMP_lat_lwr_left="45.77691870" +# The following works. The numbers were obtained using the NCL scripts +# but only after manually modifying the longitutes of two of the four +# corners of the domain to add 360.0 to them. Need to automate that +# procedure. + wrtcmp_nx="318" + wrtcmp_ny="234" +# wrtcmp_lon_lwr_left="-187.76660836" + wrtcmp_lon_lwr_left="172.23339164" + wrtcmp_lat_lwr_left="45.77691870" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi # The following rotated_latlon coordinate system parameters were obtained # using the NCL code and work. -# if [ "$QUILTING" = "TRUE" ]; then -# WRTCMP_write_groups="1" -# WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) -# WRTCMP_output_grid="rotated_latlon" -# WRTCMP_cen_lon="${ESGgrid_LON_CTR}" -# WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" -# WRTCMP_lon_lwr_left="-18.47206579" -# WRTCMP_lat_lwr_left="-13.56176982" -# WRTCMP_lon_upr_rght="18.47206579" -# WRTCMP_lat_upr_rght="13.56176982" -## WRTCMP_dlon="0.11691181" -## WRTCMP_dlat="0.11691181" -# WRTCMP_dlon=$( printf "%.9f" $( bc -l <<< "(${ESGgrid_DELX}/${radius_Earth})*${degs_per_radian}" ) ) -# WRTCMP_dlat=$( printf "%.9f" $( bc -l <<< "(${ESGgrid_DELY}/${radius_Earth})*${degs_per_radian}" ) ) -# fi - ;; +# if [ "$quilting" = "TRUE" ]; then +# wrtcmp_write_groups="1" +# wrtcmp_write_tasks_per_group=$(( 1*layout_y )) +# wrtcmp_output_grid="rotated_latlon" +# wrtcmp_cen_lon="${esggrid_lon_ctr}" +# wrtcmp_cen_lat="${esggrid_lat_ctr}" +# wrtcmp_lon_lwr_left="-18.47206579" +# wrtcmp_lat_lwr_left="-13.56176982" +# wrtcmp_lon_upr_rght="18.47206579" +# wrtcmp_lat_upr_rght="13.56176982" +## wrtcmp_dlon="0.11691181" +## wrtcmp_dlat="0.11691181" +# wrtcmp_dlon=$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) +# wrtcmp_dlat=$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) +# fi + ;; # #----------------------------------------------------------------------- # @@ -546,92 +687,92 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_AK_3km") + "RRFS_AK_3km") -# if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then +# if [ "${grid_gen_method}" = "GFDLgrid" ]; then # -# GFDLgrid_LON_T6_CTR="-160.8" -# GFDLgrid_LAT_T6_CTR="63.0" -# GFDLgrid_STRETCH_FAC="1.161" -# GFDLgrid_RES="768" -# GFDLgrid_REFINE_RATIO="4" +# gfdlgrid_lon_t6_ctr="-160.8" +# gfdlgrid_lat_t6_ctr="63.0" +# gfdlgrid_stretch_fac="1.161" +# gfdlgrid_res="768" +# gfdlgrid_refine_ratio="4" # -# num_margin_cells_T6_left="204" -# GFDLgrid_ISTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_left + 1 )) +# num_margin_cells_T6_left="204" +# gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) # -# num_margin_cells_T6_right="204" -# GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_right )) +# num_margin_cells_T6_right="204" +# gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) # -# num_margin_cells_T6_bottom="249" -# GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_bottom + 1 )) +# num_margin_cells_T6_bottom="249" +# gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) # -# num_margin_cells_T6_top="249" -# GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_top )) +# num_margin_cells_T6_top="249" +# gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) # -# GFDLgrid_USE_GFDLgrid_RES_IN_FILENAMES="FALSE" +# gfdlgrid_use_gfdlgrid_res_in_filenames="FALSE" # -# DT_ATMOS="${DT_ATMOS:-18}" +# dt_atmos="${dt_atmos:-18}" # -# LAYOUT_X="${LAYOUT_X:-24}" -# LAYOUT_Y="${LAYOUT_Y:-24}" -# BLOCKSIZE="${BLOCKSIZE:-15}" +# layout_x="${layout_x:-24}" +# layout_y="${layout_y:-24}" +# blocksize="${blocksize:-15}" # -# if [ "$QUILTING" = "TRUE" ]; then -# WRTCMP_write_groups="1" -# WRTCMP_write_tasks_per_group="2" -# WRTCMP_output_grid="lambert_conformal" -# WRTCMP_cen_lon="${GFDLgrid_LON_T6_CTR}" -# WRTCMP_cen_lat="${GFDLgrid_LAT_T6_CTR}" -# WRTCMP_stdlat1="${GFDLgrid_LAT_T6_CTR}" -# WRTCMP_stdlat2="${GFDLgrid_LAT_T6_CTR}" -# WRTCMP_nx="1320" -# WRTCMP_ny="950" -# WRTCMP_lon_lwr_left="173.734" -# WRTCMP_lat_lwr_left="46.740347" -# WRTCMP_dx="3000.0" -# WRTCMP_dy="3000.0" -# fi +# if [ "$quilting" = "TRUE" ]; then +# wrtcmp_write_groups="1" +# wrtcmp_write_tasks_per_group="2" +# wrtcmp_output_grid="lambert_conformal" +# wrtcmp_cen_lon="${gfdlgrid_lon_t6_ctr}" +# wrtcmp_cen_lat="${gfdlgrid_lat_t6_ctr}" +# wrtcmp_stdlat1="${gfdlgrid_lat_t6_ctr}" +# wrtcmp_stdlat2="${gfdlgrid_lat_t6_ctr}" +# wrtcmp_nx="1320" +# wrtcmp_ny="950" +# wrtcmp_lon_lwr_left="173.734" +# wrtcmp_lat_lwr_left="46.740347" +# wrtcmp_dx="3000.0" +# wrtcmp_dy="3000.0" +# fi # -# elif [ "${GRID_GEN_METHOD}" = "ESGgrid" ]; then +# elif [ "${grid_gen_method}" = "ESGgrid" ]; then - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-161.5" - ESGgrid_LAT_CTR="63.0" + esggrid_lon_ctr="-161.5" + esggrid_lat_ctr="63.0" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="1380" - ESGgrid_NY="1020" + esggrid_nx="1380" + esggrid_ny="1020" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" -# DT_ATMOS="${DT_ATMOS:-50}" - DT_ATMOS="${DT_ATMOS:-10}" +# dt_atmos="${dt_atmos:-50}" + dt_atmos="${dt_atmos:-10}" - LAYOUT_X="${LAYOUT_X:-30}" - LAYOUT_Y="${LAYOUT_Y:-17}" - BLOCKSIZE="${BLOCKSIZE:-40}" + layout_x="${layout_x:-30}" + layout_y="${layout_y:-17}" + blocksize="${blocksize:-40}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="1379" - WRTCMP_ny="1003" - WRTCMP_lon_lwr_left="-187.89737923" - WRTCMP_lat_lwr_left="45.84576053" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="1379" + wrtcmp_ny="1003" + wrtcmp_lon_lwr_left="-187.89737923" + wrtcmp_lat_lwr_left="45.84576053" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -639,53 +780,53 @@ case ${PREDEF_GRID_NAME} in # # Note: # The WoFS domain will generate a 301 x 301 output grid (WRITE COMPONENT) and -# will eventually be movable (ESGgrid_LON_CTR/ESGgrid_LAT_CTR). A python script +# will eventually be movable (esggrid_lon_ctr/esggrid_lat_ctr). A python script # python_utils/fv3write_parms_lambert will be useful to determine -# WRTCMP_lon_lwr_left and WRTCMP_lat_lwr_left locations (only for Lambert map -# projection currently) of the quilting output when the domain location is +# wrtcmp_lon_lwr_left and wrtcmp_lat_lwr_left locations (only for Lambert map +# projection currently) of the quilting output when the domain location is # moved. Later, it should be integrated into the workflow. # #----------------------------------------------------------------------- # -"WoFS_3km") + "WoFS_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-97.5" - ESGgrid_LAT_CTR="38.5" + esggrid_lon_ctr="-97.5" + esggrid_lat_ctr="38.5" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="361" - ESGgrid_NY="361" + esggrid_nx="361" + esggrid_ny="361" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-20}" + dt_atmos="${dt_atmos:-20}" - LAYOUT_X="${LAYOUT_X:-18}" - LAYOUT_Y="${LAYOUT_Y:-12}" - BLOCKSIZE="${BLOCKSIZE:-30}" + layout_x="${layout_x:-18}" + layout_y="${layout_y:-12}" + blocksize="${blocksize:-30}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="301" - WRTCMP_ny="301" - WRTCMP_lon_lwr_left="-102.3802487" - WRTCMP_lat_lwr_left="34.3407918" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="301" + wrtcmp_ny="301" + wrtcmp_lon_lwr_left="-102.3802487" + wrtcmp_lat_lwr_left="34.3407918" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -697,50 +838,50 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"CONUS_25km_GFDLgrid") + "CONUS_25km_GFDLgrid") - GRID_GEN_METHOD="GFDLgrid" + grid_gen_method="GFDLgrid" - GFDLgrid_LON_T6_CTR="-97.5" - GFDLgrid_LAT_T6_CTR="38.5" - GFDLgrid_STRETCH_FAC="1.4" - GFDLgrid_RES="96" - GFDLgrid_REFINE_RATIO="3" + gfdlgrid_lon_t6_ctr="-97.5" + gfdlgrid_lat_t6_ctr="38.5" + gfdlgrid_stretch_fac="1.4" + gfdlgrid_res="96" + gfdlgrid_refine_ratio="3" - num_margin_cells_T6_left="12" - GFDLgrid_ISTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_left + 1 )) + num_margin_cells_T6_left="12" + gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) - num_margin_cells_T6_right="12" - GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_right )) + num_margin_cells_T6_right="12" + gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) - num_margin_cells_T6_bottom="16" - GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_bottom + 1 )) + num_margin_cells_T6_bottom="16" + gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) - num_margin_cells_T6_top="16" - GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_top )) + num_margin_cells_T6_top="16" + gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) - GFDLgrid_USE_GFDLgrid_RES_IN_FILENAMES="TRUE" + gfdlgrid_use_gfdlgrid_res_in_filenames="TRUE" - DT_ATMOS="${DT_ATMOS:-225}" + dt_atmos="${dt_atmos:-225}" - LAYOUT_X="${LAYOUT_X:-6}" - LAYOUT_Y="${LAYOUT_Y:-4}" - BLOCKSIZE="${BLOCKSIZE:-36}" + layout_x="${layout_x:-6}" + layout_y="${layout_y:-4}" + blocksize="${blocksize:-36}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="rotated_latlon" - WRTCMP_cen_lon="${GFDLgrid_LON_T6_CTR}" - WRTCMP_cen_lat="${GFDLgrid_LAT_T6_CTR}" - WRTCMP_lon_lwr_left="-24.40085141" - WRTCMP_lat_lwr_left="-19.65624142" - WRTCMP_lon_upr_rght="24.40085141" - WRTCMP_lat_upr_rght="19.65624142" - WRTCMP_dlon="0.22593381" - WRTCMP_dlat="0.22593381" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="rotated_latlon" + wrtcmp_cen_lon="${gfdlgrid_lon_t6_ctr}" + wrtcmp_cen_lat="${gfdlgrid_lat_t6_ctr}" + wrtcmp_lon_lwr_left="-24.40085141" + wrtcmp_lat_lwr_left="-19.65624142" + wrtcmp_lon_upr_rght="24.40085141" + wrtcmp_lat_upr_rght="19.65624142" + wrtcmp_dlon="0.22593381" + wrtcmp_dlat="0.22593381" + fi + ;; # #----------------------------------------------------------------------- # @@ -752,50 +893,50 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"CONUS_3km_GFDLgrid") + "CONUS_3km_GFDLgrid") - GRID_GEN_METHOD="GFDLgrid" + grid_gen_method="GFDLgrid" - GFDLgrid_LON_T6_CTR="-97.5" - GFDLgrid_LAT_T6_CTR="38.5" - GFDLgrid_STRETCH_FAC="1.5" - GFDLgrid_RES="768" - GFDLgrid_REFINE_RATIO="3" + gfdlgrid_lon_t6_ctr="-97.5" + gfdlgrid_lat_t6_ctr="38.5" + gfdlgrid_stretch_fac="1.5" + gfdlgrid_res="768" + gfdlgrid_refine_ratio="3" - num_margin_cells_T6_left="69" - GFDLgrid_ISTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_left + 1 )) + num_margin_cells_T6_left="69" + gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) - num_margin_cells_T6_right="69" - GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_right )) + num_margin_cells_T6_right="69" + gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) - num_margin_cells_T6_bottom="164" - GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_bottom + 1 )) + num_margin_cells_T6_bottom="164" + gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) - num_margin_cells_T6_top="164" - GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_top )) + num_margin_cells_T6_top="164" + gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) - GFDLgrid_USE_GFDLgrid_RES_IN_FILENAMES="TRUE" + gfdlgrid_use_gfdlgrid_res_in_filenames="TRUE" - DT_ATMOS="${DT_ATMOS:-18}" + dt_atmos="${dt_atmos:-18}" - LAYOUT_X="${LAYOUT_X:-30}" - LAYOUT_Y="${LAYOUT_Y:-22}" - BLOCKSIZE="${BLOCKSIZE:-35}" + layout_x="${layout_x:-30}" + layout_y="${layout_y:-22}" + blocksize="${blocksize:-35}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group=$(( 1*LAYOUT_Y )) - WRTCMP_output_grid="rotated_latlon" - WRTCMP_cen_lon="${GFDLgrid_LON_T6_CTR}" - WRTCMP_cen_lat="${GFDLgrid_LAT_T6_CTR}" - WRTCMP_lon_lwr_left="-25.23144805" - WRTCMP_lat_lwr_left="-15.82130419" - WRTCMP_lon_upr_rght="25.23144805" - WRTCMP_lat_upr_rght="15.82130419" - WRTCMP_dlon="0.02665763" - WRTCMP_dlat="0.02665763" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group=$(( 1*layout_y )) + wrtcmp_output_grid="rotated_latlon" + wrtcmp_cen_lon="${gfdlgrid_lon_t6_ctr}" + wrtcmp_cen_lat="${gfdlgrid_lat_t6_ctr}" + wrtcmp_lon_lwr_left="-25.23144805" + wrtcmp_lat_lwr_left="-15.82130419" + wrtcmp_lon_upr_rght="25.23144805" + wrtcmp_lat_upr_rght="15.82130419" + wrtcmp_dlon="0.02665763" + wrtcmp_dlat="0.02665763" + fi + ;; # #----------------------------------------------------------------------- # @@ -803,9 +944,9 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"EMC_AK") + "EMC_AK") -# if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then +# if [ "${grid_gen_method}" = "GFDLgrid" ]; then # Values from an EMC script. @@ -841,61 +982,61 @@ case ${PREDEF_GRID_NAME} in #dlon=0.03 #dlat=0.03 -# GFDLgrid_LON_T6_CTR="-153.0" -# GFDLgrid_LAT_T6_CTR="61.0" -# GFDLgrid_STRETCH_FAC="1.0" # ??? -# GFDLgrid_RES="768" -# GFDLgrid_REFINE_RATIO="3" # ??? +# gfdlgrid_lon_t6_ctr="-153.0" +# gfdlgrid_lat_t6_ctr="61.0" +# gfdlgrid_stretch_fac="1.0" # ??? +# gfdlgrid_res="768" +# gfdlgrid_refine_ratio="3" # ??? # -# num_margin_cells_T6_left="61" -# GFDLgrid_ISTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_left + 1 )) +# num_margin_cells_T6_left="61" +# gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) # -# num_margin_cells_T6_right="67" -# GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_right )) +# num_margin_cells_T6_right="67" +# gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) # -# num_margin_cells_T6_bottom="165" -# GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G=$(( num_margin_cells_T6_bottom + 1 )) +# num_margin_cells_T6_bottom="165" +# gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) # -# num_margin_cells_T6_top="171" -# GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G=$(( GFDLgrid_RES - num_margin_cells_T6_top )) +# num_margin_cells_T6_top="171" +# gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) # -# GFDLgrid_USE_GFDLgrid_RES_IN_FILENAMES="TRUE" +# gfdlgrid_use_gfdlgrid_res_in_filenames="TRUE" # -# DT_ATMOS="${DT_ATMOS:-18}" +# dt_atmos="${dt_atmos:-18}" # -# LAYOUT_X="${LAYOUT_X:-16}" -# LAYOUT_Y="${LAYOUT_Y:-48}" -# WRTCMP_write_groups="2" -# WRTCMP_write_tasks_per_group="24" -# BLOCKSIZE="${BLOCKSIZE:-32}" +# layout_x="${layout_x:-16}" +# layout_y="${layout_y:-48}" +# wrtcmp_write_groups="2" +# wrtcmp_write_tasks_per_group="24" +# blocksize="${blocksize:-32}" # -# elif [ "${GRID_GEN_METHOD}" = "ESGgrid" ]; then +# elif [ "${grid_gen_method}" = "ESGgrid" ]; then - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - ESGgrid_LON_CTR="-153.0" - ESGgrid_LAT_CTR="61.0" + esggrid_lon_ctr="-153.0" + esggrid_lat_ctr="61.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/ak/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - ESGgrid_NX="1344" # Supergrid value 2704 - ESGgrid_NY="1152" # Supergrid value 2320 + esggrid_nx="1344" # Supergrid value 2704 + esggrid_ny="1152" # Supergrid value 2320 # Rotation of the ESG grid in degrees. - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -906,41 +1047,41 @@ case ${PREDEF_GRID_NAME} in # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - DT_ATMOS="${DT_ATMOS:-18}" + dt_atmos="${dt_atmos:-18}" -#Factors for MPI decomposition. ESGgrid_NX must be divisible by LAYOUT_X, ESGgrid_NY must be divisible by LAYOUT_Y - LAYOUT_X="${LAYOUT_X:-28}" - LAYOUT_Y="${LAYOUT_Y:-16}" +#Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y + layout_x="${layout_x:-28}" + layout_y="${layout_y:-16}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - BLOCKSIZE="${BLOCKSIZE:-24}" + blocksize="${blocksize:-24}" #This section is all for the write component, which you need for output during model integration - if [ "$QUILTING" = "TRUE" ]; then + if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - WRTCMP_write_groups="1" -#Number of tasks per write group. Ny must be divisible my this number. LAYOUT_Y is usually a good value - WRTCMP_write_tasks_per_group="24" + wrtcmp_write_groups="1" +#Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value + wrtcmp_write_tasks_per_group="24" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - WRTCMP_output_grid="lambert_conformal" + wrtcmp_output_grid="lambert_conformal" #These should always be set the same as compute grid - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" #Write component grid must always be <= compute grid (without haloes) - WRTCMP_nx="1344" - WRTCMP_ny="1152" + wrtcmp_nx="1344" + wrtcmp_ny="1152" #Lower left latlon (southwest corner) - WRTCMP_lon_lwr_left="-177.0" - WRTCMP_lat_lwr_left="42.5" - WRTCMP_dx="$ESGgrid_DELX" - WRTCMP_dy="$ESGgrid_DELY" - fi - ;; + wrtcmp_lon_lwr_left="-177.0" + wrtcmp_lat_lwr_left="42.5" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -948,32 +1089,32 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"EMC_HI") + "EMC_HI") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar/hi/C768_grid.tile7.nc # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - ESGgrid_LON_CTR="-157.0" - ESGgrid_LAT_CTR="20.0" + esggrid_lon_ctr="-157.0" + esggrid_lat_ctr="20.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx (plus or minus some grid stretch factor) - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/hi/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - ESGgrid_NX="432" # Supergrid value 880 - ESGgrid_NY="360" # Supergrid value 736 + esggrid_nx="432" # Supergrid value 880 + esggrid_ny="360" # Supergrid value 736 # Rotation of the ESG grid in degrees. - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -984,41 +1125,41 @@ case ${PREDEF_GRID_NAME} in # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - DT_ATMOS="${DT_ATMOS:-18}" + dt_atmos="${dt_atmos:-18}" -#Factors for MPI decomposition. ESGgrid_NX must be divisible by LAYOUT_X, ESGgrid_NY must be divisible by LAYOUT_Y - LAYOUT_X="${LAYOUT_X:-8}" - LAYOUT_Y="${LAYOUT_Y:-8}" +#Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y + layout_x="${layout_x:-8}" + layout_y="${layout_y:-8}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - BLOCKSIZE="${BLOCKSIZE:-27}" + blocksize="${blocksize:-27}" #This section is all for the write component, which you need for output during model integration - if [ "$QUILTING" = "TRUE" ]; then + if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - WRTCMP_write_groups="1" -#Number of tasks per write group. Ny must be divisible my this number. LAYOUT_Y is usually a good value - WRTCMP_write_tasks_per_group="8" + wrtcmp_write_groups="1" +#Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value + wrtcmp_write_tasks_per_group="8" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - WRTCMP_output_grid="lambert_conformal" + wrtcmp_output_grid="lambert_conformal" #These should usually be set the same as compute grid - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" #Write component grid should be close to the ESGgrid values unless you are doing something weird - WRTCMP_nx="420" - WRTCMP_ny="348" + wrtcmp_nx="420" + wrtcmp_ny="348" #Lower left latlon (southwest corner) - WRTCMP_lon_lwr_left="-162.8" - WRTCMP_lat_lwr_left="15.2" - WRTCMP_dx="$ESGgrid_DELX" - WRTCMP_dy="$ESGgrid_DELY" - fi - ;; + wrtcmp_lon_lwr_left="-162.8" + wrtcmp_lat_lwr_left="15.2" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -1026,32 +1167,32 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"EMC_PR") + "EMC_PR") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar/pr/C768_grid.tile7.nc # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - ESGgrid_LON_CTR="-69.0" - ESGgrid_LAT_CTR="18.0" + esggrid_lon_ctr="-69.0" + esggrid_lat_ctr="18.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx (plus or minus some grid stretch factor) - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/pr/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - ESGgrid_NX="576" # Supergrid value 1168 - ESGgrid_NY="432" # Supergrid value 880 + esggrid_nx="576" # Supergrid value 1168 + esggrid_ny="432" # Supergrid value 880 # Rotation of the ESG grid in degrees. - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -1062,41 +1203,41 @@ case ${PREDEF_GRID_NAME} in # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - DT_ATMOS="${DT_ATMOS:-18}" + dt_atmos="${dt_atmos:-18}" -#Factors for MPI decomposition. ESGgrid_NX must be divisible by LAYOUT_X, ESGgrid_NY must be divisible by LAYOUT_Y - LAYOUT_X="${LAYOUT_X:-16}" - LAYOUT_Y="${LAYOUT_Y:-8}" +#Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y + layout_x="${layout_x:-16}" + layout_y="${layout_y:-8}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - BLOCKSIZE="${BLOCKSIZE:-24}" + blocksize="${blocksize:-24}" #This section is all for the write component, which you need for output during model integration - if [ "$QUILTING" = "TRUE" ]; then + if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - WRTCMP_write_groups="1" -#Number of tasks per write group. Ny must be divisible my this number. LAYOUT_Y is usually a good value - WRTCMP_write_tasks_per_group="24" + wrtcmp_write_groups="1" +#Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value + wrtcmp_write_tasks_per_group="24" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - WRTCMP_output_grid="lambert_conformal" + wrtcmp_output_grid="lambert_conformal" #These should always be set the same as compute grid - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" #Write component grid must always be <= compute grid (without haloes) - WRTCMP_nx="576" - WRTCMP_ny="432" + wrtcmp_nx="576" + wrtcmp_ny="432" #Lower left latlon (southwest corner) - WRTCMP_lon_lwr_left="-77" - WRTCMP_lat_lwr_left="12" - WRTCMP_dx="$ESGgrid_DELX" - WRTCMP_dy="$ESGgrid_DELY" - fi - ;; + wrtcmp_lon_lwr_left="-77" + wrtcmp_lat_lwr_left="12" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -1104,32 +1245,32 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"EMC_GU") + "EMC_GU") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar/guam/C768_grid.tile7.nc # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - ESGgrid_LON_CTR="146.0" - ESGgrid_LAT_CTR="15.0" + esggrid_lon_ctr="146.0" + esggrid_lat_ctr="15.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx (plus or minus some grid stretch factor) - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/guam/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - ESGgrid_NX="432" # Supergrid value 880 - ESGgrid_NY="360" # Supergrid value 736 + esggrid_nx="432" # Supergrid value 880 + esggrid_ny="360" # Supergrid value 736 # Rotation of the ESG grid in degrees. - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -1140,40 +1281,40 @@ case ${PREDEF_GRID_NAME} in # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - DT_ATMOS="${DT_ATMOS:-18}" + dt_atmos="${dt_atmos:-18}" -#Factors for MPI decomposition. ESGgrid_NX must be divisible by LAYOUT_X, ESGgrid_NY must be divisible by LAYOUT_Y - LAYOUT_X="${LAYOUT_X:-16}" - LAYOUT_Y="${LAYOUT_Y:-12}" +#Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y + layout_x="${layout_x:-16}" + layout_y="${layout_y:-12}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - BLOCKSIZE="${BLOCKSIZE:-27}" + blocksize="${blocksize:-27}" #This section is all for the write component, which you need for output during model integration - if [ "$QUILTING" = "TRUE" ]; then + if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - WRTCMP_write_groups="1" -#Number of tasks per write group. Ny must be divisible my this number. LAYOUT_Y is usually a good value - WRTCMP_write_tasks_per_group="24" + wrtcmp_write_groups="1" +#Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value + wrtcmp_write_tasks_per_group="24" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - WRTCMP_output_grid="lambert_conformal" + wrtcmp_output_grid="lambert_conformal" #These should always be set the same as compute grid - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" #Write component grid must always be <= compute grid (without haloes) - WRTCMP_nx="420" - WRTCMP_ny="348" + wrtcmp_nx="420" + wrtcmp_ny="348" #Lower left latlon (southwest corner) Used /scratch2/NCEPDEV/fv3-cam/Dusan.Jovic/dbrowse/fv3grid utility to find best value - WRTCMP_lon_lwr_left="140" - WRTCMP_lat_lwr_left="10" - WRTCMP_dx="$ESGgrid_DELX" - WRTCMP_dy="$ESGgrid_DELY" - fi - ;; + wrtcmp_lon_lwr_left="140" + wrtcmp_lat_lwr_left="10" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -1181,43 +1322,43 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"GSL_HAFSV0.A_25km") + "GSL_HAFSV0.A_25km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-62.0" - ESGgrid_LAT_CTR="22.0" + esggrid_lon_ctr="-62.0" + esggrid_lat_ctr="22.0" - ESGgrid_DELX="25000.0" - ESGgrid_DELY="25000.0" + esggrid_delx="25000.0" + esggrid_dely="25000.0" - ESGgrid_NX="345" - ESGgrid_NY="230" + esggrid_nx="345" + esggrid_ny="230" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-300}" + dt_atmos="${dt_atmos:-300}" - LAYOUT_X="${LAYOUT_X:-5}" - LAYOUT_Y="${LAYOUT_Y:-5}" - BLOCKSIZE="${BLOCKSIZE:-6}" + layout_x="${layout_x:-5}" + layout_y="${layout_y:-5}" + blocksize="${blocksize:-6}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="32" - WRTCMP_output_grid="regional_latlon" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="25.0" - WRTCMP_lon_lwr_left="-114.5" - WRTCMP_lat_lwr_left="-5.0" - WRTCMP_lon_upr_rght="-9.5" - WRTCMP_lat_upr_rght="55.0" - WRTCMP_dlon="0.25" - WRTCMP_dlat="0.25" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="32" + wrtcmp_output_grid="regional_latlon" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="25.0" + wrtcmp_lon_lwr_left="-114.5" + wrtcmp_lat_lwr_left="-5.0" + wrtcmp_lon_upr_rght="-9.5" + wrtcmp_lat_upr_rght="55.0" + wrtcmp_dlon="0.25" + wrtcmp_dlat="0.25" + fi + ;; # #----------------------------------------------------------------------- # @@ -1225,43 +1366,43 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"GSL_HAFSV0.A_13km") + "GSL_HAFSV0.A_13km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-62.0" - ESGgrid_LAT_CTR="22.0" + esggrid_lon_ctr="-62.0" + esggrid_lat_ctr="22.0" - ESGgrid_DELX="13000.0" - ESGgrid_DELY="13000.0" + esggrid_delx="13000.0" + esggrid_dely="13000.0" - ESGgrid_NX="665" - ESGgrid_NY="444" + esggrid_nx="665" + esggrid_ny="444" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-180}" + dt_atmos="${dt_atmos:-180}" - LAYOUT_X="${LAYOUT_X:-19}" - LAYOUT_Y="${LAYOUT_Y:-12}" - BLOCKSIZE="${BLOCKSIZE:-35}" + layout_x="${layout_x:-19}" + layout_y="${layout_y:-12}" + blocksize="${blocksize:-35}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="32" - WRTCMP_output_grid="regional_latlon" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="25.0" - WRTCMP_lon_lwr_left="-114.5" - WRTCMP_lat_lwr_left="-5.0" - WRTCMP_lon_upr_rght="-9.5" - WRTCMP_lat_upr_rght="55.0" - WRTCMP_dlon="0.13" - WRTCMP_dlat="0.13" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="32" + wrtcmp_output_grid="regional_latlon" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="25.0" + wrtcmp_lon_lwr_left="-114.5" + wrtcmp_lat_lwr_left="-5.0" + wrtcmp_lon_upr_rght="-9.5" + wrtcmp_lat_upr_rght="55.0" + wrtcmp_dlon="0.13" + wrtcmp_dlat="0.13" + fi + ;; # #----------------------------------------------------------------------- # @@ -1269,43 +1410,43 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"GSL_HAFSV0.A_3km") + "GSL_HAFSV0.A_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-62.0" - ESGgrid_LAT_CTR="22.0" + esggrid_lon_ctr="-62.0" + esggrid_lat_ctr="22.0" - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX="2880" - ESGgrid_NY="1920" + esggrid_nx="2880" + esggrid_ny="1920" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-40}" + dt_atmos="${dt_atmos:-40}" - LAYOUT_X="${LAYOUT_X:-32}" - LAYOUT_Y="${LAYOUT_Y:-24}" - BLOCKSIZE="${BLOCKSIZE:-32}" + layout_x="${layout_x:-32}" + layout_y="${layout_y:-24}" + blocksize="${blocksize:-32}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="32" - WRTCMP_output_grid="regional_latlon" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="25.0" - WRTCMP_lon_lwr_left="-114.5" - WRTCMP_lat_lwr_left="-5.0" - WRTCMP_lon_upr_rght="-9.5" - WRTCMP_lat_upr_rght="55.0" - WRTCMP_dlon="0.03" - WRTCMP_dlat="0.03" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="32" + wrtcmp_output_grid="regional_latlon" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="25.0" + wrtcmp_lon_lwr_left="-114.5" + wrtcmp_lat_lwr_left="-5.0" + wrtcmp_lon_upr_rght="-9.5" + wrtcmp_lat_upr_rght="55.0" + wrtcmp_dlon="0.03" + wrtcmp_dlat="0.03" + fi + ;; # #----------------------------------------------------------------------- # @@ -1313,45 +1454,45 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"GSD_HRRR_AK_50km") + "GSD_HRRR_AK_50km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-163.5" - ESGgrid_LAT_CTR="62.8" + esggrid_lon_ctr="-163.5" + esggrid_lat_ctr="62.8" - ESGgrid_DELX="50000.0" - ESGgrid_DELY="50000.0" + esggrid_delx="50000.0" + esggrid_dely="50000.0" - ESGgrid_NX="74" - ESGgrid_NY="51" + esggrid_nx="74" + esggrid_ny="51" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-600}" + dt_atmos="${dt_atmos:-600}" - LAYOUT_X="${LAYOUT_X:-2}" - LAYOUT_Y="${LAYOUT_Y:-3}" - BLOCKSIZE="${BLOCKSIZE:-37}" + layout_x="${layout_x:-2}" + layout_y="${layout_y:-3}" + blocksize="${blocksize:-37}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="1" - WRTCMP_output_grid="lambert_conformal" - WRTCMP_cen_lon="${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat1="${ESGgrid_LAT_CTR}" - WRTCMP_stdlat2="${ESGgrid_LAT_CTR}" - WRTCMP_nx="70" - WRTCMP_ny="45" - WRTCMP_lon_lwr_left="172.0" - WRTCMP_lat_lwr_left="49.0" - WRTCMP_dx="${ESGgrid_DELX}" - WRTCMP_dy="${ESGgrid_DELY}" - fi - ;; + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="1" + wrtcmp_output_grid="lambert_conformal" + wrtcmp_cen_lon="${esggrid_lon_ctr}" + wrtcmp_cen_lat="${esggrid_lat_ctr}" + wrtcmp_stdlat1="${esggrid_lat_ctr}" + wrtcmp_stdlat2="${esggrid_lat_ctr}" + wrtcmp_nx="70" + wrtcmp_ny="45" + wrtcmp_lon_lwr_left="172.0" + wrtcmp_lat_lwr_left="49.0" + wrtcmp_dx="${esggrid_delx}" + wrtcmp_dy="${esggrid_dely}" + fi + ;; # #----------------------------------------------------------------------- # @@ -1359,44 +1500,43 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_NA_13km") + "RRFS_NA_13km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR="-112.5" - ESGgrid_LAT_CTR="55.0" + esggrid_lon_ctr="-112.5" + esggrid_lat_ctr="55.0" - ESGgrid_DELX="13000.0" - ESGgrid_DELY="13000.0" + esggrid_delx="13000.0" + esggrid_dely="13000.0" - ESGgrid_NX="912" - ESGgrid_NY="623" + esggrid_nx="912" + esggrid_ny="623" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH="6" + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-50}" + dt_atmos="${dt_atmos:-50}" - LAYOUT_X="${LAYOUT_X:-16}" - LAYOUT_Y="${LAYOUT_Y:-16}" - BLOCKSIZE="${BLOCKSIZE:-30}" - - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="16" - WRTCMP_output_grid="rotated_latlon" - WRTCMP_cen_lon="-113.0" #"${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="55.0" #"${ESGgrid_LAT_CTR}" - WRTCMP_lon_lwr_left="-61.0" - WRTCMP_lat_lwr_left="-37.0" - WRTCMP_lon_upr_rght="61.0" - WRTCMP_lat_upr_rght="37.0" - WRTCMP_dlon=$( printf "%.9f" $( bc -l <<< "(${ESGgrid_DELX}/${radius_Earth})*${degs_per_radian}" ) ) - WRTCMP_dlat=$( printf "%.9f" $( bc -l <<< "(${ESGgrid_DELY}/${radius_Earth})*${degs_per_radian}" ) ) - fi - ;; + layout_x="${layout_x:-16}" + layout_y="${layout_y:-16}" + blocksize="${blocksize:-30}" + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="16" + wrtcmp_output_grid="rotated_latlon" + wrtcmp_cen_lon="-113.0" #"${esggrid_lon_ctr}" + wrtcmp_cen_lat="55.0" #"${esggrid_lat_ctr}" + wrtcmp_lon_lwr_left="-61.0" + wrtcmp_lat_lwr_left="-37.0" + wrtcmp_lon_upr_rght="61.0" + wrtcmp_lat_upr_rght="37.0" + wrtcmp_dlon=$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) + wrtcmp_dlat=$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) + fi + ;; # #----------------------------------------------------------------------- # @@ -1404,61 +1544,222 @@ case ${PREDEF_GRID_NAME} in # #----------------------------------------------------------------------- # -"RRFS_NA_3km") + "RRFS_NA_3km") - GRID_GEN_METHOD="ESGgrid" + grid_gen_method="ESGgrid" - ESGgrid_LON_CTR=-112.5 - ESGgrid_LAT_CTR=55.0 + esggrid_lon_ctr=-112.5 + esggrid_lat_ctr=55.0 - ESGgrid_DELX="3000.0" - ESGgrid_DELY="3000.0" + esggrid_delx="3000.0" + esggrid_dely="3000.0" - ESGgrid_NX=3950 - ESGgrid_NY=2700 + esggrid_nx="3950" + esggrid_ny="2700" - ESGgrid_PAZI="0.0" + esggrid_pazi="0.0" - ESGgrid_WIDE_HALO_WIDTH=6 + esggrid_wide_halo_width="6" - DT_ATMOS="${DT_ATMOS:-36}" + dt_atmos="${dt_atmos:-36}" - LAYOUT_X="${LAYOUT_X:-20}" # 40 - EMC operational configuration - LAYOUT_Y="${LAYOUT_Y:-35}" # 45 - EMC operational configuration - BLOCKSIZE="${BLOCKSIZE:-28}" + layout_x="${layout_x:-20}" # 40 - EMC operational configuration + layout_y="${layout_y:-35}" # 45 - EMC operational configuration + blocksize="${blocksize:-28}" - if [ "$QUILTING" = "TRUE" ]; then - WRTCMP_write_groups="1" - WRTCMP_write_tasks_per_group="144" - WRTCMP_output_grid="rotated_latlon" - WRTCMP_cen_lon="-113.0" #"${ESGgrid_LON_CTR}" - WRTCMP_cen_lat="55.0" #"${ESGgrid_LAT_CTR}" - WRTCMP_lon_lwr_left="-61.0" - WRTCMP_lat_lwr_left="-37.0" - WRTCMP_lon_upr_rght="61.0" - WRTCMP_lat_upr_rght="37.0" - WRTCMP_dlon="0.025" #$( printf "%.9f" $( bc -l <<< "(${ESGgrid_DELX}/${radius_Earth})*${degs_per_radian}" ) ) - WRTCMP_dlat="0.025" #$( printf "%.9f" $( bc -l <<< "(${ESGgrid_DELY}/${radius_Earth})*${degs_per_radian}" ) ) - fi - ;; -esac + if [ "$quilting" = "TRUE" ]; then + wrtcmp_write_groups="1" + wrtcmp_write_tasks_per_group="144" + wrtcmp_output_grid="rotated_latlon" + wrtcmp_cen_lon="-113.0" #"${esggrid_lon_ctr}" + wrtcmp_cen_lat="55.0" #"${esggrid_lat_ctr}" + wrtcmp_lon_lwr_left="-61.0" + wrtcmp_lat_lwr_left="-37.0" + wrtcmp_lon_upr_rght="61.0" + wrtcmp_lat_upr_rght="37.0" + wrtcmp_dlon="0.025" #$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) + wrtcmp_dlat="0.025" #$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) + fi + ;; + + esac # #----------------------------------------------------------------------- # -# Restore the shell options saved at the beginning of this script/func- -# tion. +# Use the printf utility with the -v flag to set this function's output +# variables. Note that each of these is set only if the corresponding +# input variable specifying the name to use for the output variable is +# not empty. # #----------------------------------------------------------------------- # -{ restore_shell_opts; } > /dev/null 2>&1 + if [ ! -z "${outvarname_grid_gen_method}" ]; then + printf -v ${outvarname_grid_gen_method} "%s" "${grid_gen_method}" + fi -} + if [ ! -z "${outvarname_esggrid_lon_ctr}" ]; then + printf -v ${outvarname_esggrid_lon_ctr} "%s" "${esggrid_lon_ctr}" + fi + + if [ ! -z "${outvarname_esggrid_lat_ctr}" ]; then + printf -v ${outvarname_esggrid_lat_ctr} "%s" "${esggrid_lat_ctr}" + fi + + if [ ! -z "${outvarname_esggrid_delx}" ]; then + printf -v ${outvarname_esggrid_delx} "%s" "${esggrid_delx}" + fi + + if [ ! -z "${outvarname_esggrid_dely}" ]; then + printf -v ${outvarname_esggrid_dely} "%s" "${esggrid_dely}" + fi + + if [ ! -z "${outvarname_esggrid_nx}" ]; then + printf -v ${outvarname_esggrid_nx} "%s" "${esggrid_nx}" + fi + + if [ ! -z "${outvarname_esggrid_ny}" ]; then + printf -v ${outvarname_esggrid_ny} "%s" "${esggrid_ny}" + fi + + if [ ! -z "${outvarname_esggrid_pazi}" ]; then + printf -v ${outvarname_esggrid_pazi} "%s" "${esggrid_pazi}" + fi + + if [ ! -z "${outvarname_esggrid_wide_halo_width}" ]; then + printf -v ${outvarname_esggrid_wide_halo_width} "%s" "${esggrid_wide_halo_width}" + fi + + if [ ! -z "${outvarname_gfdlgrid_lon_t6_ctr}" ]; then + printf -v ${outvarname_gfdlgrid_lon_t6_ctr} "%s" "${gfdlgrid_lon_t6_ctr}" + fi + + if [ ! -z "${outvarname_gfdlgrid_lat_t6_ctr}" ]; then + printf -v ${outvarname_gfdlgrid_lat_t6_ctr} "%s" "${gfdlgrid_lat_t6_ctr}" + fi + + if [ ! -z "${outvarname_gfdlgrid_stretch_fac}" ]; then + printf -v ${outvarname_gfdlgrid_stretch_fac} "%s" "${gfdlgrid_stretch_fac}" + fi + + if [ ! -z "${outvarname_gfdlgrid_res}" ]; then + printf -v ${outvarname_gfdlgrid_res} "%s" "${gfdlgrid_res}" + fi + + if [ ! -z "${outvarname_gfdlgrid_refine_ratio}" ]; then + printf -v ${outvarname_gfdlgrid_refine_ratio} "%s" "${gfdlgrid_refine_ratio}" + fi + + if [ ! -z "${outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g}" ]; then + printf -v ${outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_istart_of_rgnl_dom_on_t6g}" + fi + + if [ ! -z "${outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g}" ]; then + printf -v ${outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_iend_of_rgnl_dom_on_t6g}" + fi + + if [ ! -z "${outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g}" ]; then + printf -v ${outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_jstart_of_rgnl_dom_on_t6g}" + fi + + if [ ! -z "${outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g}" ]; then + printf -v ${outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_jend_of_rgnl_dom_on_t6g}" + fi + + if [ ! -z "${outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames}" ]; then + printf -v ${outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames} "%s" "${gfdlgrid_use_gfdlgrid_res_in_filenames}" + fi + + if [ ! -z "${outvarname_dt_atmos}" ]; then + printf -v ${outvarname_dt_atmos} "%s" "${dt_atmos}" + fi + + if [ ! -z "${outvarname_layout_x}" ]; then + printf -v ${outvarname_layout_x} "%s" "${layout_x}" + fi + + if [ ! -z "${outvarname_layout_y}" ]; then + printf -v ${outvarname_layout_y} "%s" "${layout_y}" + fi + + if [ ! -z "${outvarname_blocksize}" ]; then + printf -v ${outvarname_blocksize} "%s" "${blocksize}" + fi + + if [ ! -z "${outvarname_wrtcmp_write_groups}" ]; then + printf -v ${outvarname_wrtcmp_write_groups} "%s" "${wrtcmp_write_groups}" + fi + + if [ ! -z "${outvarname_wrtcmp_write_tasks_per_group}" ]; then + printf -v ${outvarname_wrtcmp_write_tasks_per_group} "%s" "${wrtcmp_write_tasks_per_group}" + fi + + if [ ! -z "${outvarname_wrtcmp_output_grid}" ]; then + printf -v ${outvarname_wrtcmp_output_grid} "%s" "${wrtcmp_output_grid}" + fi + + if [ ! -z "${outvarname_wrtcmp_cen_lon}" ]; then + printf -v ${outvarname_wrtcmp_cen_lon} "%s" "${wrtcmp_cen_lon}" + fi + + if [ ! -z "${outvarname_wrtcmp_cen_lat}" ]; then + printf -v ${outvarname_wrtcmp_cen_lat} "%s" "${wrtcmp_cen_lat}" + fi + + if [ ! -z "${outvarname_wrtcmp_stdlat1}" ]; then + printf -v ${outvarname_wrtcmp_stdlat1} "%s" "${wrtcmp_stdlat1}" + fi + + if [ ! -z "${outvarname_wrtcmp_stdlat2}" ]; then + printf -v ${outvarname_wrtcmp_stdlat2} "%s" "${wrtcmp_stdlat2}" + fi + + if [ ! -z "${outvarname_wrtcmp_nx}" ]; then + printf -v ${outvarname_wrtcmp_nx} "%s" "${wrtcmp_nx}" + fi + + if [ ! -z "${outvarname_wrtcmp_ny}" ]; then + printf -v ${outvarname_wrtcmp_ny} "%s" "${wrtcmp_ny}" + fi + + if [ ! -z "${outvarname_wrtcmp_lon_lwr_left}" ]; then + printf -v ${outvarname_wrtcmp_lon_lwr_left} "%s" "${wrtcmp_lon_lwr_left}" + fi + + if [ ! -z "${outvarname_wrtcmp_lat_lwr_left}" ]; then + printf -v ${outvarname_wrtcmp_lat_lwr_left} "%s" "${wrtcmp_lat_lwr_left}" + fi + + if [ ! -z "${outvarname_wrtcmp_lon_upr_rght}" ]; then + printf -v ${outvarname_wrtcmp_lon_upr_rght} "%s" "${wrtcmp_lon_upr_rght}" + fi + + if [ ! -z "${outvarname_wrtcmp_lat_upr_rght}" ]; then + printf -v ${outvarname_wrtcmp_lat_upr_rght} "%s" "${wrtcmp_lat_upr_rght}" + fi + + if [ ! -z "${outvarname_wrtcmp_dx}" ]; then + printf -v ${outvarname_wrtcmp_dx} "%s" "${wrtcmp_dx}" + fi + + if [ ! -z "${outvarname_wrtcmp_dy}" ]; then + printf -v ${outvarname_wrtcmp_dy} "%s" "${wrtcmp_dy}" + fi + + if [ ! -z "${outvarname_wrtcmp_dlon}" ]; then + printf -v ${outvarname_wrtcmp_dlon} "%s" "${wrtcmp_dlon}" + fi + + if [ ! -z "${outvarname_wrtcmp_dlat}" ]; then + printf -v ${outvarname_wrtcmp_dlat} "%s" "${wrtcmp_dlat}" + fi # #----------------------------------------------------------------------- # -# Call the function defined above. +# Restore the shell options saved at the beginning of this script/func- +# tion. # #----------------------------------------------------------------------- # -set_predef_grid_params + { restore_shell_opts; } > /dev/null 2>&1 +} From 3f585be2dfc8001094485356eb46fc47d4d1cfe5 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 18 May 2022 16:12:00 -0600 Subject: [PATCH 08/26] (1) Call the function set_predef_grid_params() with arguments (as required with the new version of this function); (2) Rename local variables in set_predef_grid_params.sh (by adding double underscores to start and end) so they do not conflict with variable names passed to the function that will be the output variables (i.e. varaible names specified via "outvarname_..." input arguments). --- ush/set_predef_grid_params.sh | 1456 ++++++++++++++++----------------- ush/setup.sh | 56 +- 2 files changed, 781 insertions(+), 731 deletions(-) diff --git a/ush/set_predef_grid_params.sh b/ush/set_predef_grid_params.sh index 6f265c92d..9066668ea 100644 --- a/ush/set_predef_grid_params.sh +++ b/ush/set_predef_grid_params.sh @@ -119,46 +119,46 @@ function set_predef_grid_params() { # #----------------------------------------------------------------------- # - local grid_gen_method="" \ - esggrid_lon_ctr="" \ - esggrid_lat_ctr="" \ - esggrid_delx="" \ - esggrid_dely="" \ - esggrid_nx="" \ - esggrid_ny="" \ - esggrid_pazi="" \ - esggrid_wide_halo_width="" \ - gfdlgrid_lon_t6_ctr="" \ - gfdlgrid_lat_t6_ctr="" \ - gfdlgrid_stretch_fac="" \ - gfdlgrid_res="" \ - gfdlgrid_refine_ratio="" \ - gfdlgrid_istart_of_rgnl_dom_on_t6g="" \ - gfdlgrid_iend_of_rgnl_dom_on_t6g="" \ - gfdlgrid_jstart_of_rgnl_dom_on_t6g="" \ - gfdlgrid_jend_of_rgnl_dom_on_t6g="" \ - gfdlgrid_use_gfdlgrid_res_in_filenames="" \ - dt_atmos="" \ - layout_x="" \ - layout_y="" \ - blocksize="" \ - wrtcmp_write_groups="" \ - wrtcmp_write_tasks_per_group="" \ - wrtcmp_output_grid="" \ - wrtcmp_cen_lon="" \ - wrtcmp_cen_lat="" \ - wrtcmp_stdlat1="" \ - wrtcmp_stdlat2="" \ - wrtcmp_nx="" \ - wrtcmp_ny="" \ - wrtcmp_lon_lwr_left="" \ - wrtcmp_lat_lwr_left="" \ - wrtcmp_lon_upr_rght="" \ - wrtcmp_lat_upr_rght="" \ - wrtcmp_dx="" \ - wrtcmp_dy="" \ - wrtcmp_dlon="" \ - wrtcmp_dlat="" \ + local __grid_gen_method__="" \ + __esggrid_lon_ctr__="" \ + __esggrid_lat_ctr__="" \ + __esggrid_delx__="" \ + __esggrid_dely__="" \ + __esggrid_nx__="" \ + __esggrid_ny__="" \ + __esggrid_pazi__="" \ + __esggrid_wide_halo_width__="" \ + __gfdlgrid_lon_t6_ctr__="" \ + __gfdlgrid_lat_t6_ctr__="" \ + __gfdlgrid_stretch_fac__="" \ + __gfdlgrid_res__="" \ + __gfdlgrid_refine_ratio__="" \ + __gfdlgrid_istart_of_rgnl_dom_on_t6g__="" \ + __gfdlgrid_iend_of_rgnl_dom_on_t6g__="" \ + __gfdlgrid_jstart_of_rgnl_dom_on_t6g__="" \ + __gfdlgrid_jend_of_rgnl_dom_on_t6g__="" \ + __gfdlgrid_use_gfdlgrid_res_in_filenames__="" \ + __dt_atmos__="" \ + __layout_x__="" \ + __layout_y__="" \ + __blocksize__="" \ + __wrtcmp_write_groups__="" \ + __wrtcmp_write_tasks_per_group__="" \ + __wrtcmp_output_grid__="" \ + __wrtcmp_cen_lon__="" \ + __wrtcmp_cen_lat__="" \ + __wrtcmp_stdlat1__="" \ + __wrtcmp_stdlat2__="" \ + __wrtcmp_nx__="" \ + __wrtcmp_ny__="" \ + __wrtcmp_lon_lwr_left__="" \ + __wrtcmp_lat_lwr_left__="" \ + __wrtcmp_lon_upr_rght__="" \ + __wrtcmp_lat_upr_rght__="" \ + __wrtcmp_dx__="" \ + __wrtcmp_dy__="" \ + __wrtcmp_dlon__="" \ + __wrtcmp_dlat__="" \ num_margin_cells_T6_left="" \ num_margin_cells_T6_right="" \ num_margin_cells_T6_bottom="" \ @@ -239,41 +239,41 @@ function set_predef_grid_params() { # "RRFS_CONUS_25km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="25000.0" - esggrid_dely="25000.0" + __esggrid_delx__="25000.0" + __esggrid_dely__="25000.0" - esggrid_nx="219" - esggrid_ny="131" + __esggrid_nx__="219" + __esggrid_ny__="131" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-40}" + __dt_atmos__="${dt_atmos:-40}" - layout_x="${layout_x:-5}" - layout_y="${layout_y:-2}" - blocksize="${blocksize:-40}" + __layout_x__="${layout_x:-5}" + __layout_y__="${layout_y:-2}" + __blocksize__="${blocksize:-40}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="2" - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="217" - wrtcmp_ny="128" - wrtcmp_lon_lwr_left="-122.719528" - wrtcmp_lat_lwr_left="21.138123" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="2" + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="217" + __wrtcmp_ny__="128" + __wrtcmp_lon_lwr_left__="-122.719528" + __wrtcmp_lat_lwr_left__="21.138123" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -286,41 +286,41 @@ function set_predef_grid_params() { # "RRFS_CONUScompact_25km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="25000.0" - esggrid_dely="25000.0" + __esggrid_delx__="25000.0" + __esggrid_dely__="25000.0" - esggrid_nx="202" - esggrid_ny="116" + __esggrid_nx__="202" + __esggrid_ny__="116" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-40}" + __dt_atmos__="${dt_atmos:-40}" - layout_x="${layout_x:-5}" - layout_y="${layout_y:-2}" - blocksize="${blocksize:-40}" + __layout_x__="${layout_x:-5}" + __layout_y__="${layout_y:-2}" + __blocksize__="${blocksize:-40}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="2" - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="199" - wrtcmp_ny="111" - wrtcmp_lon_lwr_left="-121.23349066" - wrtcmp_lat_lwr_left="23.41731593" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="2" + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="199" + __wrtcmp_ny__="111" + __wrtcmp_lon_lwr_left__="-121.23349066" + __wrtcmp_lat_lwr_left__="23.41731593" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -332,41 +332,41 @@ function set_predef_grid_params() { # "RRFS_CONUS_13km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="13000.0" - esggrid_dely="13000.0" + __esggrid_delx__="13000.0" + __esggrid_dely__="13000.0" - esggrid_nx="420" - esggrid_ny="252" + __esggrid_nx__="420" + __esggrid_ny__="252" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-45}" + __dt_atmos__="${dt_atmos:-45}" - layout_x="${layout_x:-16}" - layout_y="${layout_y:-10}" - blocksize="${blocksize:-32}" + __layout_x__="${layout_x:-16}" + __layout_y__="${layout_y:-10}" + __blocksize__="${blocksize:-32}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="416" - wrtcmp_ny="245" - wrtcmp_lon_lwr_left="-122.719528" - wrtcmp_lat_lwr_left="21.138123" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="416" + __wrtcmp_ny__="245" + __wrtcmp_lon_lwr_left__="-122.719528" + __wrtcmp_lat_lwr_left__="21.138123" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -378,41 +378,41 @@ function set_predef_grid_params() { # "RRFS_CONUScompact_13km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="13000.0" - esggrid_dely="13000.0" + __esggrid_delx__="13000.0" + __esggrid_dely__="13000.0" - esggrid_nx="396" - esggrid_ny="232" + __esggrid_nx__="396" + __esggrid_ny__="232" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-45}" + __dt_atmos__="${dt_atmos:-45}" - layout_x="${layout_x:-16}" - layout_y="${layout_y:-10}" - blocksize="${blocksize:-32}" + __layout_x__="${layout_x:-16}" + __layout_y__="${layout_y:-10}" + __blocksize__="${blocksize:-32}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="393" - wrtcmp_ny="225" - wrtcmp_lon_lwr_left="-121.70231097" - wrtcmp_lat_lwr_left="22.57417972" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="393" + __wrtcmp_ny__="225" + __wrtcmp_lon_lwr_left__="-121.70231097" + __wrtcmp_lat_lwr_left__="22.57417972" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -424,41 +424,41 @@ function set_predef_grid_params() { # "RRFS_CONUS_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="1820" - esggrid_ny="1092" + __esggrid_nx__="1820" + __esggrid_ny__="1092" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-36}" + __dt_atmos__="${dt_atmos:-36}" - layout_x="${layout_x:-28}" - layout_y="${layout_y:-28}" - blocksize="${blocksize:-29}" + __layout_x__="${layout_x:-28}" + __layout_y__="${layout_y:-28}" + __blocksize__="${blocksize:-29}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="1799" - wrtcmp_ny="1059" - wrtcmp_lon_lwr_left="-122.719528" - wrtcmp_lat_lwr_left="21.138123" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="1799" + __wrtcmp_ny__="1059" + __wrtcmp_lon_lwr_left__="-122.719528" + __wrtcmp_lat_lwr_left__="21.138123" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -471,41 +471,41 @@ function set_predef_grid_params() { # "RRFS_CONUScompact_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="1748" - esggrid_ny="1038" + __esggrid_nx__="1748" + __esggrid_ny__="1038" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-40}" + __dt_atmos__="${dt_atmos:-40}" - layout_x="${layout_x:-30}" - layout_y="${layout_y:-16}" - blocksize="${blocksize:-32}" + __layout_x__="${layout_x:-30}" + __layout_y__="${layout_y:-16}" + __blocksize__="${blocksize:-32}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="1746" - wrtcmp_ny="1014" - wrtcmp_lon_lwr_left="-122.17364391" - wrtcmp_lat_lwr_left="21.88588562" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="1746" + __wrtcmp_ny__="1014" + __wrtcmp_lon_lwr_left__="-122.17364391" + __wrtcmp_lat_lwr_left__="21.88588562" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -517,41 +517,41 @@ function set_predef_grid_params() { # "RRFS_SUBCONUS_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="35.0" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="35.0" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="840" - esggrid_ny="600" + __esggrid_nx__="840" + __esggrid_ny__="600" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-40}" + __dt_atmos__="${dt_atmos:-40}" - layout_x="${layout_x:-30}" - layout_y="${layout_y:-24}" - blocksize="${blocksize:-35}" + __layout_x__="${layout_x:-30}" + __layout_y__="${layout_y:-24}" + __blocksize__="${blocksize:-35}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="837" - wrtcmp_ny="595" - wrtcmp_lon_lwr_left="-109.97410429" - wrtcmp_lat_lwr_left="26.31459843" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="837" + __wrtcmp_ny__="595" + __wrtcmp_lon_lwr_left__="-109.97410429" + __wrtcmp_lat_lwr_left__="26.31459843" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -565,41 +565,41 @@ function set_predef_grid_params() { # "SUBCONUS_Ind_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-86.16" - esggrid_lat_ctr="39.77" + __esggrid_lon_ctr__="-86.16" + __esggrid_lat_ctr__="39.77" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="200" - esggrid_ny="200" + __esggrid_nx__="200" + __esggrid_ny__="200" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-40}" + __dt_atmos__="${dt_atmos:-40}" - layout_x="${layout_x:-5}" - layout_y="${layout_y:-5}" - blocksize="${blocksize:-40}" + __layout_x__="${layout_x:-5}" + __layout_y__="${layout_y:-5}" + __blocksize__="${blocksize:-40}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="197" - wrtcmp_ny="195" - wrtcmp_lon_lwr_left="-89.47120417" - wrtcmp_lat_lwr_left="37.07809642" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="197" + __wrtcmp_ny__="195" + __wrtcmp_lon_lwr_left__="-89.47120417" + __wrtcmp_lat_lwr_left__="37.07809642" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -614,67 +614,67 @@ function set_predef_grid_params() { # "RRFS_AK_13km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-161.5" - esggrid_lat_ctr="63.0" + __esggrid_lon_ctr__="-161.5" + __esggrid_lat_ctr__="63.0" - esggrid_delx="13000.0" - esggrid_dely="13000.0" + __esggrid_delx__="13000.0" + __esggrid_dely__="13000.0" - esggrid_nx="320" - esggrid_ny="240" + __esggrid_nx__="320" + __esggrid_ny__="240" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" -# dt_atmos="${dt_atmos:-50}" - dt_atmos="${dt_atmos:-10}" +# __dt_atmos__="${dt_atmos:-50}" + __dt_atmos__="${dt_atmos:-10}" - layout_x="${layout_x:-16}" - layout_y="${layout_y:-12}" - blocksize="${blocksize:-40}" + __layout_x__="${layout_x:-16}" + __layout_y__="${layout_y:-12}" + __blocksize__="${blocksize:-40}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" # The following works. The numbers were obtained using the NCL scripts # but only after manually modifying the longitutes of two of the four # corners of the domain to add 360.0 to them. Need to automate that # procedure. - wrtcmp_nx="318" - wrtcmp_ny="234" -# wrtcmp_lon_lwr_left="-187.76660836" - wrtcmp_lon_lwr_left="172.23339164" - wrtcmp_lat_lwr_left="45.77691870" - - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_nx__="318" + __wrtcmp_ny__="234" +# __wrtcmp_lon_lwr_left__="-187.76660836" + __wrtcmp_lon_lwr_left__="172.23339164" + __wrtcmp_lat_lwr_left__="45.77691870" + + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi # The following rotated_latlon coordinate system parameters were obtained # using the NCL code and work. # if [ "$quilting" = "TRUE" ]; then -# wrtcmp_write_groups="1" -# wrtcmp_write_tasks_per_group=$(( 1*layout_y )) -# wrtcmp_output_grid="rotated_latlon" -# wrtcmp_cen_lon="${esggrid_lon_ctr}" -# wrtcmp_cen_lat="${esggrid_lat_ctr}" -# wrtcmp_lon_lwr_left="-18.47206579" -# wrtcmp_lat_lwr_left="-13.56176982" -# wrtcmp_lon_upr_rght="18.47206579" -# wrtcmp_lat_upr_rght="13.56176982" -## wrtcmp_dlon="0.11691181" -## wrtcmp_dlat="0.11691181" -# wrtcmp_dlon=$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) -# wrtcmp_dlat=$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) +# __wrtcmp_write_groups__="1" +# __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) +# __wrtcmp_output_grid__="rotated_latlon" +# __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" +# __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" +# __wrtcmp_lon_lwr_left__="-18.47206579" +# __wrtcmp_lat_lwr_left__="-13.56176982" +# __wrtcmp_lon_upr_rght__="18.47206579" +# __wrtcmp_lat_upr_rght__="13.56176982" +## __wrtcmp_dlon__="0.11691181" +## __wrtcmp_dlat__="0.11691181" +# __wrtcmp_dlon__=$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) +# __wrtcmp_dlat__=$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) # fi ;; # @@ -691,86 +691,86 @@ function set_predef_grid_params() { # if [ "${grid_gen_method}" = "GFDLgrid" ]; then # -# gfdlgrid_lon_t6_ctr="-160.8" -# gfdlgrid_lat_t6_ctr="63.0" -# gfdlgrid_stretch_fac="1.161" -# gfdlgrid_res="768" -# gfdlgrid_refine_ratio="4" +# __gfdlgrid_lon_t6_ctr__="-160.8" +# __gfdlgrid_lat_t6_ctr__="63.0" +# __gfdlgrid_stretch_fac__="1.161" +# __gfdlgrid_res__="768" +# __gfdlgrid_refine_ratio__="4" # # num_margin_cells_T6_left="204" -# gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) +# __gfdlgrid_istart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_left + 1 )) # # num_margin_cells_T6_right="204" -# gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) +# __gfdlgrid_iend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_right )) # # num_margin_cells_T6_bottom="249" -# gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) +# __gfdlgrid_jstart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_bottom + 1 )) # # num_margin_cells_T6_top="249" -# gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) +# __gfdlgrid_jend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_top )) # -# gfdlgrid_use_gfdlgrid_res_in_filenames="FALSE" +# __gfdlgrid_use_gfdlgrid_res_in_filenames__="FALSE" # -# dt_atmos="${dt_atmos:-18}" +# __dt_atmos__="${dt_atmos:-18}" # -# layout_x="${layout_x:-24}" -# layout_y="${layout_y:-24}" -# blocksize="${blocksize:-15}" +# __layout_x__="${layout_x:-24}" +# __layout_y__="${layout_y:-24}" +# __blocksize__="${blocksize:-15}" # # if [ "$quilting" = "TRUE" ]; then -# wrtcmp_write_groups="1" -# wrtcmp_write_tasks_per_group="2" -# wrtcmp_output_grid="lambert_conformal" -# wrtcmp_cen_lon="${gfdlgrid_lon_t6_ctr}" -# wrtcmp_cen_lat="${gfdlgrid_lat_t6_ctr}" -# wrtcmp_stdlat1="${gfdlgrid_lat_t6_ctr}" -# wrtcmp_stdlat2="${gfdlgrid_lat_t6_ctr}" -# wrtcmp_nx="1320" -# wrtcmp_ny="950" -# wrtcmp_lon_lwr_left="173.734" -# wrtcmp_lat_lwr_left="46.740347" -# wrtcmp_dx="3000.0" -# wrtcmp_dy="3000.0" +# __wrtcmp_write_groups__="1" +# __wrtcmp_write_tasks_per_group__="2" +# __wrtcmp_output_grid__="lambert_conformal" +# __wrtcmp_cen_lon__="${__gfdlgrid_lon_t6_ctr__}" +# __wrtcmp_cen_lat__="${__gfdlgrid_lat_t6_ctr__}" +# __wrtcmp_stdlat1__="${__gfdlgrid_lat_t6_ctr__}" +# __wrtcmp_stdlat2__="${__gfdlgrid_lat_t6_ctr__}" +# __wrtcmp_nx__="1320" +# __wrtcmp_ny__="950" +# __wrtcmp_lon_lwr_left__="173.734" +# __wrtcmp_lat_lwr_left__="46.740347" +# __wrtcmp_dx__="3000.0" +# __wrtcmp_dy__="3000.0" # fi # # elif [ "${grid_gen_method}" = "ESGgrid" ]; then - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-161.5" - esggrid_lat_ctr="63.0" + __esggrid_lon_ctr__="-161.5" + __esggrid_lat_ctr__="63.0" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="1380" - esggrid_ny="1020" + __esggrid_nx__="1380" + __esggrid_ny__="1020" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" -# dt_atmos="${dt_atmos:-50}" - dt_atmos="${dt_atmos:-10}" +# __dt_atmos__="${dt_atmos:-50}" + __dt_atmos__="${dt_atmos:-10}" - layout_x="${layout_x:-30}" - layout_y="${layout_y:-17}" - blocksize="${blocksize:-40}" + __layout_x__="${layout_x:-30}" + __layout_y__="${layout_y:-17}" + __blocksize__="${blocksize:-40}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="1379" - wrtcmp_ny="1003" - wrtcmp_lon_lwr_left="-187.89737923" - wrtcmp_lat_lwr_left="45.84576053" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="1379" + __wrtcmp_ny__="1003" + __wrtcmp_lon_lwr_left__="-187.89737923" + __wrtcmp_lat_lwr_left__="45.84576053" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -790,41 +790,41 @@ function set_predef_grid_params() { # "WoFS_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-97.5" - esggrid_lat_ctr="38.5" + __esggrid_lon_ctr__="-97.5" + __esggrid_lat_ctr__="38.5" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="361" - esggrid_ny="361" + __esggrid_nx__="361" + __esggrid_ny__="361" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-20}" + __dt_atmos__="${dt_atmos:-20}" - layout_x="${layout_x:-18}" - layout_y="${layout_y:-12}" - blocksize="${blocksize:-30}" + __layout_x__="${layout_x:-18}" + __layout_y__="${layout_y:-12}" + __blocksize__="${blocksize:-30}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="301" - wrtcmp_ny="301" - wrtcmp_lon_lwr_left="-102.3802487" - wrtcmp_lat_lwr_left="34.3407918" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="301" + __wrtcmp_ny__="301" + __wrtcmp_lon_lwr_left__="-102.3802487" + __wrtcmp_lat_lwr_left__="34.3407918" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -840,46 +840,46 @@ function set_predef_grid_params() { # "CONUS_25km_GFDLgrid") - grid_gen_method="GFDLgrid" + __grid_gen_method__="GFDLgrid" - gfdlgrid_lon_t6_ctr="-97.5" - gfdlgrid_lat_t6_ctr="38.5" - gfdlgrid_stretch_fac="1.4" - gfdlgrid_res="96" - gfdlgrid_refine_ratio="3" + __gfdlgrid_lon_t6_ctr__="-97.5" + __gfdlgrid_lat_t6_ctr__="38.5" + __gfdlgrid_stretch_fac__="1.4" + __gfdlgrid_res__="96" + __gfdlgrid_refine_ratio__="3" num_margin_cells_T6_left="12" - gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) + __gfdlgrid_istart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_left + 1 )) num_margin_cells_T6_right="12" - gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) + __gfdlgrid_iend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_right )) num_margin_cells_T6_bottom="16" - gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) + __gfdlgrid_jstart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_bottom + 1 )) num_margin_cells_T6_top="16" - gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) + __gfdlgrid_jend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_top )) - gfdlgrid_use_gfdlgrid_res_in_filenames="TRUE" + __gfdlgrid_use_gfdlgrid_res_in_filenames__="TRUE" - dt_atmos="${dt_atmos:-225}" + __dt_atmos__="${dt_atmos:-225}" - layout_x="${layout_x:-6}" - layout_y="${layout_y:-4}" - blocksize="${blocksize:-36}" + __layout_x__="${layout_x:-6}" + __layout_y__="${layout_y:-4}" + __blocksize__="${blocksize:-36}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="rotated_latlon" - wrtcmp_cen_lon="${gfdlgrid_lon_t6_ctr}" - wrtcmp_cen_lat="${gfdlgrid_lat_t6_ctr}" - wrtcmp_lon_lwr_left="-24.40085141" - wrtcmp_lat_lwr_left="-19.65624142" - wrtcmp_lon_upr_rght="24.40085141" - wrtcmp_lat_upr_rght="19.65624142" - wrtcmp_dlon="0.22593381" - wrtcmp_dlat="0.22593381" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="rotated_latlon" + __wrtcmp_cen_lon__="${__gfdlgrid_lon_t6_ctr__}" + __wrtcmp_cen_lat__="${__gfdlgrid_lat_t6_ctr__}" + __wrtcmp_lon_lwr_left__="-24.40085141" + __wrtcmp_lat_lwr_left__="-19.65624142" + __wrtcmp_lon_upr_rght__="24.40085141" + __wrtcmp_lat_upr_rght__="19.65624142" + __wrtcmp_dlon__="0.22593381" + __wrtcmp_dlat__="0.22593381" fi ;; # @@ -895,46 +895,46 @@ function set_predef_grid_params() { # "CONUS_3km_GFDLgrid") - grid_gen_method="GFDLgrid" + __grid_gen_method__="GFDLgrid" - gfdlgrid_lon_t6_ctr="-97.5" - gfdlgrid_lat_t6_ctr="38.5" - gfdlgrid_stretch_fac="1.5" - gfdlgrid_res="768" - gfdlgrid_refine_ratio="3" + __gfdlgrid_lon_t6_ctr__="-97.5" + __gfdlgrid_lat_t6_ctr__="38.5" + __gfdlgrid_stretch_fac__="1.5" + __gfdlgrid_res__="768" + __gfdlgrid_refine_ratio__="3" num_margin_cells_T6_left="69" - gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) + __gfdlgrid_istart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_left + 1 )) num_margin_cells_T6_right="69" - gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) + __gfdlgrid_iend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_right )) num_margin_cells_T6_bottom="164" - gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) + __gfdlgrid_jstart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_bottom + 1 )) num_margin_cells_T6_top="164" - gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) + __gfdlgrid_jend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_top )) - gfdlgrid_use_gfdlgrid_res_in_filenames="TRUE" + __gfdlgrid_use_gfdlgrid_res_in_filenames__="TRUE" - dt_atmos="${dt_atmos:-18}" + __dt_atmos__="${dt_atmos:-18}" - layout_x="${layout_x:-30}" - layout_y="${layout_y:-22}" - blocksize="${blocksize:-35}" + __layout_x__="${layout_x:-30}" + __layout_y__="${layout_y:-22}" + __blocksize__="${blocksize:-35}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group=$(( 1*layout_y )) - wrtcmp_output_grid="rotated_latlon" - wrtcmp_cen_lon="${gfdlgrid_lon_t6_ctr}" - wrtcmp_cen_lat="${gfdlgrid_lat_t6_ctr}" - wrtcmp_lon_lwr_left="-25.23144805" - wrtcmp_lat_lwr_left="-15.82130419" - wrtcmp_lon_upr_rght="25.23144805" - wrtcmp_lat_upr_rght="15.82130419" - wrtcmp_dlon="0.02665763" - wrtcmp_dlat="0.02665763" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_output_grid__="rotated_latlon" + __wrtcmp_cen_lon__="${__gfdlgrid_lon_t6_ctr__}" + __wrtcmp_cen_lat__="${__gfdlgrid_lat_t6_ctr__}" + __wrtcmp_lon_lwr_left__="-25.23144805" + __wrtcmp_lat_lwr_left__="-15.82130419" + __wrtcmp_lon_upr_rght__="25.23144805" + __wrtcmp_lat_upr_rght__="15.82130419" + __wrtcmp_dlon__="0.02665763" + __wrtcmp_dlat__="0.02665763" fi ;; # @@ -982,61 +982,61 @@ function set_predef_grid_params() { #dlon=0.03 #dlat=0.03 -# gfdlgrid_lon_t6_ctr="-153.0" -# gfdlgrid_lat_t6_ctr="61.0" -# gfdlgrid_stretch_fac="1.0" # ??? -# gfdlgrid_res="768" -# gfdlgrid_refine_ratio="3" # ??? +# __gfdlgrid_lon_t6_ctr__="-153.0" +# __gfdlgrid_lat_t6_ctr__="61.0" +# __gfdlgrid_stretch_fac__="1.0" # ??? +# __gfdlgrid_res__="768" +# __gfdlgrid_refine_ratio__="3" # ??? # # num_margin_cells_T6_left="61" -# gfdlgrid_istart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_left + 1 )) +# __gfdlgrid_istart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_left + 1 )) # # num_margin_cells_T6_right="67" -# gfdlgrid_iend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_right )) +# __gfdlgrid_iend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_right )) # # num_margin_cells_T6_bottom="165" -# gfdlgrid_jstart_of_rgnl_dom_on_t6g=$(( num_margin_cells_T6_bottom + 1 )) +# __gfdlgrid_jstart_of_rgnl_dom_on_t6g__=$(( num_margin_cells_T6_bottom + 1 )) # # num_margin_cells_T6_top="171" -# gfdlgrid_jend_of_rgnl_dom_on_t6g=$(( gfdlgrid_res - num_margin_cells_T6_top )) +# __gfdlgrid_jend_of_rgnl_dom_on_t6g__=$(( __gfdlgrid_res__ - num_margin_cells_T6_top )) # -# gfdlgrid_use_gfdlgrid_res_in_filenames="TRUE" +# __gfdlgrid_use_gfdlgrid_res_in_filenames__="TRUE" # -# dt_atmos="${dt_atmos:-18}" +# __dt_atmos__="${dt_atmos:-18}" # -# layout_x="${layout_x:-16}" -# layout_y="${layout_y:-48}" -# wrtcmp_write_groups="2" -# wrtcmp_write_tasks_per_group="24" -# blocksize="${blocksize:-32}" +# __layout_x__="${layout_x:-16}" +# __layout_y__="${layout_y:-48}" +# __wrtcmp_write_groups__="2" +# __wrtcmp_write_tasks_per_group__="24" +# __blocksize__="${blocksize:-32}" # # elif [ "${grid_gen_method}" = "ESGgrid" ]; then - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - esggrid_lon_ctr="-153.0" - esggrid_lat_ctr="61.0" + __esggrid_lon_ctr__="-153.0" + __esggrid_lat_ctr__="61.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/ak/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - esggrid_nx="1344" # Supergrid value 2704 - esggrid_ny="1152" # Supergrid value 2320 + __esggrid_nx__="1344" # Supergrid value 2704 + __esggrid_ny__="1152" # Supergrid value 2320 # Rotation of the ESG grid in degrees. - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -1047,39 +1047,39 @@ function set_predef_grid_params() { # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - dt_atmos="${dt_atmos:-18}" + __dt_atmos__="${dt_atmos:-18}" #Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y - layout_x="${layout_x:-28}" - layout_y="${layout_y:-16}" + __layout_x__="${layout_x:-28}" + __layout_y__="${layout_y:-16}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - blocksize="${blocksize:-24}" + __blocksize__="${blocksize:-24}" #This section is all for the write component, which you need for output during model integration if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - wrtcmp_write_groups="1" + __wrtcmp_write_groups__="1" #Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value - wrtcmp_write_tasks_per_group="24" + __wrtcmp_write_tasks_per_group__="24" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - wrtcmp_output_grid="lambert_conformal" + __wrtcmp_output_grid__="lambert_conformal" #These should always be set the same as compute grid - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" #Write component grid must always be <= compute grid (without haloes) - wrtcmp_nx="1344" - wrtcmp_ny="1152" + __wrtcmp_nx__="1344" + __wrtcmp_ny__="1152" #Lower left latlon (southwest corner) - wrtcmp_lon_lwr_left="-177.0" - wrtcmp_lat_lwr_left="42.5" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_lon_lwr_left__="-177.0" + __wrtcmp_lat_lwr_left__="42.5" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -1091,30 +1091,30 @@ function set_predef_grid_params() { # "EMC_HI") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar/hi/C768_grid.tile7.nc # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - esggrid_lon_ctr="-157.0" - esggrid_lat_ctr="20.0" + __esggrid_lon_ctr__="-157.0" + __esggrid_lat_ctr__="20.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx (plus or minus some grid stretch factor) - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/hi/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - esggrid_nx="432" # Supergrid value 880 - esggrid_ny="360" # Supergrid value 736 + __esggrid_nx__="432" # Supergrid value 880 + __esggrid_ny__="360" # Supergrid value 736 # Rotation of the ESG grid in degrees. - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -1125,39 +1125,39 @@ function set_predef_grid_params() { # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - dt_atmos="${dt_atmos:-18}" + __dt_atmos__="${dt_atmos:-18}" #Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y - layout_x="${layout_x:-8}" - layout_y="${layout_y:-8}" + __layout_x__="${layout_x:-8}" + __layout_y__="${layout_y:-8}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - blocksize="${blocksize:-27}" + __blocksize__="${blocksize:-27}" #This section is all for the write component, which you need for output during model integration if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - wrtcmp_write_groups="1" + __wrtcmp_write_groups__="1" #Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value - wrtcmp_write_tasks_per_group="8" + __wrtcmp_write_tasks_per_group__="8" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - wrtcmp_output_grid="lambert_conformal" + __wrtcmp_output_grid__="lambert_conformal" #These should usually be set the same as compute grid - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" #Write component grid should be close to the ESGgrid values unless you are doing something weird - wrtcmp_nx="420" - wrtcmp_ny="348" + __wrtcmp_nx__="420" + __wrtcmp_ny__="348" #Lower left latlon (southwest corner) - wrtcmp_lon_lwr_left="-162.8" - wrtcmp_lat_lwr_left="15.2" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_lon_lwr_left__="-162.8" + __wrtcmp_lat_lwr_left__="15.2" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -1169,30 +1169,30 @@ function set_predef_grid_params() { # "EMC_PR") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar/pr/C768_grid.tile7.nc # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - esggrid_lon_ctr="-69.0" - esggrid_lat_ctr="18.0" + __esggrid_lon_ctr__="-69.0" + __esggrid_lat_ctr__="18.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx (plus or minus some grid stretch factor) - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/pr/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - esggrid_nx="576" # Supergrid value 1168 - esggrid_ny="432" # Supergrid value 880 + __esggrid_nx__="576" # Supergrid value 1168 + __esggrid_ny__="432" # Supergrid value 880 # Rotation of the ESG grid in degrees. - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -1203,39 +1203,39 @@ function set_predef_grid_params() { # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - dt_atmos="${dt_atmos:-18}" + __dt_atmos__="${dt_atmos:-18}" #Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y - layout_x="${layout_x:-16}" - layout_y="${layout_y:-8}" + __layout_x__="${layout_x:-16}" + __layout_y__="${layout_y:-8}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - blocksize="${blocksize:-24}" + __blocksize__="${blocksize:-24}" #This section is all for the write component, which you need for output during model integration if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - wrtcmp_write_groups="1" + __wrtcmp_write_groups__="1" #Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value - wrtcmp_write_tasks_per_group="24" + __wrtcmp_write_tasks_per_group__="24" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - wrtcmp_output_grid="lambert_conformal" + __wrtcmp_output_grid__="lambert_conformal" #These should always be set the same as compute grid - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" #Write component grid must always be <= compute grid (without haloes) - wrtcmp_nx="576" - wrtcmp_ny="432" + __wrtcmp_nx__="576" + __wrtcmp_ny__="432" #Lower left latlon (southwest corner) - wrtcmp_lon_lwr_left="-77" - wrtcmp_lat_lwr_left="12" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_lon_lwr_left__="-77" + __wrtcmp_lat_lwr_left__="12" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -1247,30 +1247,30 @@ function set_predef_grid_params() { # "EMC_GU") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" # Values taken from pre-generated files in /scratch4/NCEPDEV/fv3-cam/save/Benjamin.Blake/regional_workflow/fix/fix_sar/guam/C768_grid.tile7.nc # With move to Hera, those files were lost; a backup can be found here: /scratch2/BMC/det/kavulich/fix/fix_sar # Longitude and latitude for center of domain - esggrid_lon_ctr="146.0" - esggrid_lat_ctr="15.0" + __esggrid_lon_ctr__="146.0" + __esggrid_lat_ctr__="15.0" # Projected grid spacing in meters...in the static files (e.g. "C768_grid.tile7.nc"), the "dx" is actually the resolution # of the supergrid, which is HALF of this dx (plus or minus some grid stretch factor) - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" # Number of x and y points for your domain (halo not included); # Divide "supergrid" values from /scratch2/BMC/det/kavulich/fix/fix_sar/guam/C768_grid.tile7.halo4.nc by 2 and subtract 8 to eliminate halo - esggrid_nx="432" # Supergrid value 880 - esggrid_ny="360" # Supergrid value 736 + __esggrid_nx__="432" # Supergrid value 880 + __esggrid_ny__="360" # Supergrid value 736 # Rotation of the ESG grid in degrees. - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" # Number of halo points for a wide grid (before trimming)...this should almost always be 6 for now # Within the model we actually have a 4-point halo and a 3-point halo - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" # Side note: FV3 is lagrangian and vertical coordinates are dynamically remapped during model integration # 'ksplit' is the factor that determines the timestep for this process (divided @@ -1281,38 +1281,38 @@ function set_predef_grid_params() { # # Preliminary standard values: 18 for 3-km runs, 90 for 13-km runs per config_defaults.sh - dt_atmos="${dt_atmos:-18}" + __dt_atmos__="${dt_atmos:-18}" #Factors for MPI decomposition. esggrid_nx must be divisible by layout_x, esggrid_ny must be divisible by layout_y - layout_x="${layout_x:-16}" - layout_y="${layout_y:-12}" + __layout_x__="${layout_x:-16}" + __layout_y__="${layout_y:-12}" #Take number of points on a tile (nx/lx*ny/ly), must divide by block size to get an integer. #This integer must be small enough to fit into a processor's cache, so it is machine-dependent magic # For Theia, must be ~40 or less # Check setup.sh for more details - blocksize="${blocksize:-27}" + __blocksize__="${blocksize:-27}" #This section is all for the write component, which you need for output during model integration if [ "$quilting" = "TRUE" ]; then #Write component reserves MPI tasks for writing output. The number of "groups" is usually 1, but if you have a case where group 1 is not done writing before the next write step, you need group 2, etc. - wrtcmp_write_groups="1" + __wrtcmp_write_groups__="1" #Number of tasks per write group. Ny must be divisible my this number. layout_y is usually a good value - wrtcmp_write_tasks_per_group="24" + __wrtcmp_write_tasks_per_group__="24" #lambert_conformal or rotated_latlon. lambert_conformal not well tested and probably doesn't work for our purposes - wrtcmp_output_grid="lambert_conformal" + __wrtcmp_output_grid__="lambert_conformal" #These should always be set the same as compute grid - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" #Write component grid must always be <= compute grid (without haloes) - wrtcmp_nx="420" - wrtcmp_ny="348" + __wrtcmp_nx__="420" + __wrtcmp_ny__="348" #Lower left latlon (southwest corner) Used /scratch2/NCEPDEV/fv3-cam/Dusan.Jovic/dbrowse/fv3grid utility to find best value - wrtcmp_lon_lwr_left="140" - wrtcmp_lat_lwr_left="10" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_lon_lwr_left__="140" + __wrtcmp_lat_lwr_left__="10" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -1324,39 +1324,39 @@ function set_predef_grid_params() { # "GSL_HAFSV0.A_25km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-62.0" - esggrid_lat_ctr="22.0" + __esggrid_lon_ctr__="-62.0" + __esggrid_lat_ctr__="22.0" - esggrid_delx="25000.0" - esggrid_dely="25000.0" + __esggrid_delx__="25000.0" + __esggrid_dely__="25000.0" - esggrid_nx="345" - esggrid_ny="230" + __esggrid_nx__="345" + __esggrid_ny__="230" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-300}" + __dt_atmos__="${dt_atmos:-300}" - layout_x="${layout_x:-5}" - layout_y="${layout_y:-5}" - blocksize="${blocksize:-6}" + __layout_x__="${layout_x:-5}" + __layout_y__="${layout_y:-5}" + __blocksize__="${blocksize:-6}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="32" - wrtcmp_output_grid="regional_latlon" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="25.0" - wrtcmp_lon_lwr_left="-114.5" - wrtcmp_lat_lwr_left="-5.0" - wrtcmp_lon_upr_rght="-9.5" - wrtcmp_lat_upr_rght="55.0" - wrtcmp_dlon="0.25" - wrtcmp_dlat="0.25" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="32" + __wrtcmp_output_grid__="regional_latlon" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="25.0" + __wrtcmp_lon_lwr_left__="-114.5" + __wrtcmp_lat_lwr_left__="-5.0" + __wrtcmp_lon_upr_rght__="-9.5" + __wrtcmp_lat_upr_rght__="55.0" + __wrtcmp_dlon__="0.25" + __wrtcmp_dlat__="0.25" fi ;; # @@ -1368,39 +1368,39 @@ function set_predef_grid_params() { # "GSL_HAFSV0.A_13km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-62.0" - esggrid_lat_ctr="22.0" + __esggrid_lon_ctr__="-62.0" + __esggrid_lat_ctr__="22.0" - esggrid_delx="13000.0" - esggrid_dely="13000.0" + __esggrid_delx__="13000.0" + __esggrid_dely__="13000.0" - esggrid_nx="665" - esggrid_ny="444" + __esggrid_nx__="665" + __esggrid_ny__="444" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-180}" + __dt_atmos__="${dt_atmos:-180}" - layout_x="${layout_x:-19}" - layout_y="${layout_y:-12}" - blocksize="${blocksize:-35}" + __layout_x__="${layout_x:-19}" + __layout_y__="${layout_y:-12}" + __blocksize__="${blocksize:-35}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="32" - wrtcmp_output_grid="regional_latlon" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="25.0" - wrtcmp_lon_lwr_left="-114.5" - wrtcmp_lat_lwr_left="-5.0" - wrtcmp_lon_upr_rght="-9.5" - wrtcmp_lat_upr_rght="55.0" - wrtcmp_dlon="0.13" - wrtcmp_dlat="0.13" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="32" + __wrtcmp_output_grid__="regional_latlon" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="25.0" + __wrtcmp_lon_lwr_left__="-114.5" + __wrtcmp_lat_lwr_left__="-5.0" + __wrtcmp_lon_upr_rght__="-9.5" + __wrtcmp_lat_upr_rght__="55.0" + __wrtcmp_dlon__="0.13" + __wrtcmp_dlat__="0.13" fi ;; # @@ -1412,39 +1412,39 @@ function set_predef_grid_params() { # "GSL_HAFSV0.A_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-62.0" - esggrid_lat_ctr="22.0" + __esggrid_lon_ctr__="-62.0" + __esggrid_lat_ctr__="22.0" - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="2880" - esggrid_ny="1920" + __esggrid_nx__="2880" + __esggrid_ny__="1920" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-40}" + __dt_atmos__="${dt_atmos:-40}" - layout_x="${layout_x:-32}" - layout_y="${layout_y:-24}" - blocksize="${blocksize:-32}" + __layout_x__="${layout_x:-32}" + __layout_y__="${layout_y:-24}" + __blocksize__="${blocksize:-32}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="32" - wrtcmp_output_grid="regional_latlon" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="25.0" - wrtcmp_lon_lwr_left="-114.5" - wrtcmp_lat_lwr_left="-5.0" - wrtcmp_lon_upr_rght="-9.5" - wrtcmp_lat_upr_rght="55.0" - wrtcmp_dlon="0.03" - wrtcmp_dlat="0.03" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="32" + __wrtcmp_output_grid__="regional_latlon" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="25.0" + __wrtcmp_lon_lwr_left__="-114.5" + __wrtcmp_lat_lwr_left__="-5.0" + __wrtcmp_lon_upr_rght__="-9.5" + __wrtcmp_lat_upr_rght__="55.0" + __wrtcmp_dlon__="0.03" + __wrtcmp_dlat__="0.03" fi ;; # @@ -1456,41 +1456,41 @@ function set_predef_grid_params() { # "GSD_HRRR_AK_50km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-163.5" - esggrid_lat_ctr="62.8" + __esggrid_lon_ctr__="-163.5" + __esggrid_lat_ctr__="62.8" - esggrid_delx="50000.0" - esggrid_dely="50000.0" + __esggrid_delx__="50000.0" + __esggrid_dely__="50000.0" - esggrid_nx="74" - esggrid_ny="51" + __esggrid_nx__="74" + __esggrid_ny__="51" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-600}" + __dt_atmos__="${dt_atmos:-600}" - layout_x="${layout_x:-2}" - layout_y="${layout_y:-3}" - blocksize="${blocksize:-37}" + __layout_x__="${layout_x:-2}" + __layout_y__="${layout_y:-3}" + __blocksize__="${blocksize:-37}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="1" - wrtcmp_output_grid="lambert_conformal" - wrtcmp_cen_lon="${esggrid_lon_ctr}" - wrtcmp_cen_lat="${esggrid_lat_ctr}" - wrtcmp_stdlat1="${esggrid_lat_ctr}" - wrtcmp_stdlat2="${esggrid_lat_ctr}" - wrtcmp_nx="70" - wrtcmp_ny="45" - wrtcmp_lon_lwr_left="172.0" - wrtcmp_lat_lwr_left="49.0" - wrtcmp_dx="${esggrid_delx}" - wrtcmp_dy="${esggrid_dely}" + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="1" + __wrtcmp_output_grid__="lambert_conformal" + __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" + __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" + __wrtcmp_nx__="70" + __wrtcmp_ny__="45" + __wrtcmp_lon_lwr_left__="172.0" + __wrtcmp_lat_lwr_left__="49.0" + __wrtcmp_dx__="${__esggrid_delx__}" + __wrtcmp_dy__="${__esggrid_dely__}" fi ;; # @@ -1502,39 +1502,39 @@ function set_predef_grid_params() { # "RRFS_NA_13km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr="-112.5" - esggrid_lat_ctr="55.0" + __esggrid_lon_ctr__="-112.5" + __esggrid_lat_ctr__="55.0" - esggrid_delx="13000.0" - esggrid_dely="13000.0" + __esggrid_delx__="13000.0" + __esggrid_dely__="13000.0" - esggrid_nx="912" - esggrid_ny="623" + __esggrid_nx__="912" + __esggrid_ny__="623" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-50}" + __dt_atmos__="${dt_atmos:-50}" - layout_x="${layout_x:-16}" - layout_y="${layout_y:-16}" - blocksize="${blocksize:-30}" + __layout_x__="${layout_x:-16}" + __layout_y__="${layout_y:-16}" + __blocksize__="${blocksize:-30}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="16" - wrtcmp_output_grid="rotated_latlon" - wrtcmp_cen_lon="-113.0" #"${esggrid_lon_ctr}" - wrtcmp_cen_lat="55.0" #"${esggrid_lat_ctr}" - wrtcmp_lon_lwr_left="-61.0" - wrtcmp_lat_lwr_left="-37.0" - wrtcmp_lon_upr_rght="61.0" - wrtcmp_lat_upr_rght="37.0" - wrtcmp_dlon=$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) - wrtcmp_dlat=$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="16" + __wrtcmp_output_grid__="rotated_latlon" + __wrtcmp_cen_lon__="-113.0" #"${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="55.0" #"${__esggrid_lat_ctr__}" + __wrtcmp_lon_lwr_left__="-61.0" + __wrtcmp_lat_lwr_left__="-37.0" + __wrtcmp_lon_upr_rght__="61.0" + __wrtcmp_lat_upr_rght__="37.0" + __wrtcmp_dlon__=$( printf "%.9f" $( bc -l <<< "(${__esggrid_delx__}/${radius_Earth})*${degs_per_radian}" ) ) + __wrtcmp_dlat__=$( printf "%.9f" $( bc -l <<< "(${__esggrid_dely__}/${radius_Earth})*${degs_per_radian}" ) ) fi ;; # @@ -1546,39 +1546,39 @@ function set_predef_grid_params() { # "RRFS_NA_3km") - grid_gen_method="ESGgrid" + __grid_gen_method__="ESGgrid" - esggrid_lon_ctr=-112.5 - esggrid_lat_ctr=55.0 + __esggrid_lon_ctr__=-112.5 + __esggrid_lat_ctr__=55.0 - esggrid_delx="3000.0" - esggrid_dely="3000.0" + __esggrid_delx__="3000.0" + __esggrid_dely__="3000.0" - esggrid_nx="3950" - esggrid_ny="2700" + __esggrid_nx__="3950" + __esggrid_ny__="2700" - esggrid_pazi="0.0" + __esggrid_pazi__="0.0" - esggrid_wide_halo_width="6" + __esggrid_wide_halo_width__="6" - dt_atmos="${dt_atmos:-36}" + __dt_atmos__="${dt_atmos:-36}" - layout_x="${layout_x:-20}" # 40 - EMC operational configuration - layout_y="${layout_y:-35}" # 45 - EMC operational configuration - blocksize="${blocksize:-28}" + __layout_x__="${layout_x:-20}" # 40 - EMC operational configuration + __layout_y__="${layout_y:-35}" # 45 - EMC operational configuration + __blocksize__="${blocksize:-28}" if [ "$quilting" = "TRUE" ]; then - wrtcmp_write_groups="1" - wrtcmp_write_tasks_per_group="144" - wrtcmp_output_grid="rotated_latlon" - wrtcmp_cen_lon="-113.0" #"${esggrid_lon_ctr}" - wrtcmp_cen_lat="55.0" #"${esggrid_lat_ctr}" - wrtcmp_lon_lwr_left="-61.0" - wrtcmp_lat_lwr_left="-37.0" - wrtcmp_lon_upr_rght="61.0" - wrtcmp_lat_upr_rght="37.0" - wrtcmp_dlon="0.025" #$( printf "%.9f" $( bc -l <<< "(${esggrid_delx}/${radius_Earth})*${degs_per_radian}" ) ) - wrtcmp_dlat="0.025" #$( printf "%.9f" $( bc -l <<< "(${esggrid_dely}/${radius_Earth})*${degs_per_radian}" ) ) + __wrtcmp_write_groups__="1" + __wrtcmp_write_tasks_per_group__="144" + __wrtcmp_output_grid__="rotated_latlon" + __wrtcmp_cen_lon__="-113.0" #"${__esggrid_lon_ctr__}" + __wrtcmp_cen_lat__="55.0" #"${__esggrid_lat_ctr__}" + __wrtcmp_lon_lwr_left__="-61.0" + __wrtcmp_lat_lwr_left__="-37.0" + __wrtcmp_lon_upr_rght__="61.0" + __wrtcmp_lat_upr_rght__="37.0" + __wrtcmp_dlon__="0.025" #$( printf "%.9f" $( bc -l <<< "(${__esggrid_delx__}/${radius_Earth})*${degs_per_radian}" ) ) + __wrtcmp_dlat__="0.025" #$( printf "%.9f" $( bc -l <<< "(${__esggrid_dely__}/${radius_Earth})*${degs_per_radian}" ) ) fi ;; @@ -1594,163 +1594,163 @@ function set_predef_grid_params() { #----------------------------------------------------------------------- # if [ ! -z "${outvarname_grid_gen_method}" ]; then - printf -v ${outvarname_grid_gen_method} "%s" "${grid_gen_method}" + printf -v ${outvarname_grid_gen_method} "%s" "${__grid_gen_method__}" fi if [ ! -z "${outvarname_esggrid_lon_ctr}" ]; then - printf -v ${outvarname_esggrid_lon_ctr} "%s" "${esggrid_lon_ctr}" + printf -v ${outvarname_esggrid_lon_ctr} "%s" "${__esggrid_lon_ctr__}" fi if [ ! -z "${outvarname_esggrid_lat_ctr}" ]; then - printf -v ${outvarname_esggrid_lat_ctr} "%s" "${esggrid_lat_ctr}" + printf -v ${outvarname_esggrid_lat_ctr} "%s" "${__esggrid_lat_ctr__}" fi if [ ! -z "${outvarname_esggrid_delx}" ]; then - printf -v ${outvarname_esggrid_delx} "%s" "${esggrid_delx}" + printf -v ${outvarname_esggrid_delx} "%s" "${__esggrid_delx__}" fi if [ ! -z "${outvarname_esggrid_dely}" ]; then - printf -v ${outvarname_esggrid_dely} "%s" "${esggrid_dely}" + printf -v ${outvarname_esggrid_dely} "%s" "${__esggrid_dely__}" fi if [ ! -z "${outvarname_esggrid_nx}" ]; then - printf -v ${outvarname_esggrid_nx} "%s" "${esggrid_nx}" + printf -v ${outvarname_esggrid_nx} "%s" "${__esggrid_nx__}" fi if [ ! -z "${outvarname_esggrid_ny}" ]; then - printf -v ${outvarname_esggrid_ny} "%s" "${esggrid_ny}" + printf -v ${outvarname_esggrid_ny} "%s" "${__esggrid_ny__}" fi if [ ! -z "${outvarname_esggrid_pazi}" ]; then - printf -v ${outvarname_esggrid_pazi} "%s" "${esggrid_pazi}" + printf -v ${outvarname_esggrid_pazi} "%s" "${__esggrid_pazi__}" fi if [ ! -z "${outvarname_esggrid_wide_halo_width}" ]; then - printf -v ${outvarname_esggrid_wide_halo_width} "%s" "${esggrid_wide_halo_width}" + printf -v ${outvarname_esggrid_wide_halo_width} "%s" "${__esggrid_wide_halo_width__}" fi if [ ! -z "${outvarname_gfdlgrid_lon_t6_ctr}" ]; then - printf -v ${outvarname_gfdlgrid_lon_t6_ctr} "%s" "${gfdlgrid_lon_t6_ctr}" + printf -v ${outvarname_gfdlgrid_lon_t6_ctr} "%s" "${__gfdlgrid_lon_t6_ctr__}" fi if [ ! -z "${outvarname_gfdlgrid_lat_t6_ctr}" ]; then - printf -v ${outvarname_gfdlgrid_lat_t6_ctr} "%s" "${gfdlgrid_lat_t6_ctr}" + printf -v ${outvarname_gfdlgrid_lat_t6_ctr} "%s" "${__gfdlgrid_lat_t6_ctr__}" fi if [ ! -z "${outvarname_gfdlgrid_stretch_fac}" ]; then - printf -v ${outvarname_gfdlgrid_stretch_fac} "%s" "${gfdlgrid_stretch_fac}" + printf -v ${outvarname_gfdlgrid_stretch_fac} "%s" "${__gfdlgrid_stretch_fac__}" fi if [ ! -z "${outvarname_gfdlgrid_res}" ]; then - printf -v ${outvarname_gfdlgrid_res} "%s" "${gfdlgrid_res}" + printf -v ${outvarname_gfdlgrid_res} "%s" "${__gfdlgrid_res__}" fi if [ ! -z "${outvarname_gfdlgrid_refine_ratio}" ]; then - printf -v ${outvarname_gfdlgrid_refine_ratio} "%s" "${gfdlgrid_refine_ratio}" + printf -v ${outvarname_gfdlgrid_refine_ratio} "%s" "${__gfdlgrid_refine_ratio__}" fi if [ ! -z "${outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g}" ]; then - printf -v ${outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_istart_of_rgnl_dom_on_t6g}" + printf -v ${outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g} "%s" "${__gfdlgrid_istart_of_rgnl_dom_on_t6g__}" fi if [ ! -z "${outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g}" ]; then - printf -v ${outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_iend_of_rgnl_dom_on_t6g}" + printf -v ${outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g} "%s" "${__gfdlgrid_iend_of_rgnl_dom_on_t6g__}" fi if [ ! -z "${outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g}" ]; then - printf -v ${outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_jstart_of_rgnl_dom_on_t6g}" + printf -v ${outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g} "%s" "${__gfdlgrid_jstart_of_rgnl_dom_on_t6g__}" fi if [ ! -z "${outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g}" ]; then - printf -v ${outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g} "%s" "${gfdlgrid_jend_of_rgnl_dom_on_t6g}" + printf -v ${outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g} "%s" "${__gfdlgrid_jend_of_rgnl_dom_on_t6g__}" fi if [ ! -z "${outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames}" ]; then - printf -v ${outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames} "%s" "${gfdlgrid_use_gfdlgrid_res_in_filenames}" + printf -v ${outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames} "%s" "${__gfdlgrid_use_gfdlgrid_res_in_filenames__}" fi if [ ! -z "${outvarname_dt_atmos}" ]; then - printf -v ${outvarname_dt_atmos} "%s" "${dt_atmos}" + printf -v ${outvarname_dt_atmos} "%s" "${__dt_atmos__}" fi if [ ! -z "${outvarname_layout_x}" ]; then - printf -v ${outvarname_layout_x} "%s" "${layout_x}" + printf -v ${outvarname_layout_x} "%s" "${__layout_x__}" fi if [ ! -z "${outvarname_layout_y}" ]; then - printf -v ${outvarname_layout_y} "%s" "${layout_y}" + printf -v ${outvarname_layout_y} "%s" "${__layout_y__}" fi if [ ! -z "${outvarname_blocksize}" ]; then - printf -v ${outvarname_blocksize} "%s" "${blocksize}" + printf -v ${outvarname_blocksize} "%s" "${__blocksize__}" fi if [ ! -z "${outvarname_wrtcmp_write_groups}" ]; then - printf -v ${outvarname_wrtcmp_write_groups} "%s" "${wrtcmp_write_groups}" + printf -v ${outvarname_wrtcmp_write_groups} "%s" "${__wrtcmp_write_groups__}" fi if [ ! -z "${outvarname_wrtcmp_write_tasks_per_group}" ]; then - printf -v ${outvarname_wrtcmp_write_tasks_per_group} "%s" "${wrtcmp_write_tasks_per_group}" + printf -v ${outvarname_wrtcmp_write_tasks_per_group} "%s" "${__wrtcmp_write_tasks_per_group__}" fi if [ ! -z "${outvarname_wrtcmp_output_grid}" ]; then - printf -v ${outvarname_wrtcmp_output_grid} "%s" "${wrtcmp_output_grid}" + printf -v ${outvarname_wrtcmp_output_grid} "%s" "${__wrtcmp_output_grid__}" fi if [ ! -z "${outvarname_wrtcmp_cen_lon}" ]; then - printf -v ${outvarname_wrtcmp_cen_lon} "%s" "${wrtcmp_cen_lon}" + printf -v ${outvarname_wrtcmp_cen_lon} "%s" "${__wrtcmp_cen_lon__}" fi if [ ! -z "${outvarname_wrtcmp_cen_lat}" ]; then - printf -v ${outvarname_wrtcmp_cen_lat} "%s" "${wrtcmp_cen_lat}" + printf -v ${outvarname_wrtcmp_cen_lat} "%s" "${__wrtcmp_cen_lat__}" fi if [ ! -z "${outvarname_wrtcmp_stdlat1}" ]; then - printf -v ${outvarname_wrtcmp_stdlat1} "%s" "${wrtcmp_stdlat1}" + printf -v ${outvarname_wrtcmp_stdlat1} "%s" "${__wrtcmp_stdlat1__}" fi if [ ! -z "${outvarname_wrtcmp_stdlat2}" ]; then - printf -v ${outvarname_wrtcmp_stdlat2} "%s" "${wrtcmp_stdlat2}" + printf -v ${outvarname_wrtcmp_stdlat2} "%s" "${__wrtcmp_stdlat2__}" fi if [ ! -z "${outvarname_wrtcmp_nx}" ]; then - printf -v ${outvarname_wrtcmp_nx} "%s" "${wrtcmp_nx}" + printf -v ${outvarname_wrtcmp_nx} "%s" "${__wrtcmp_nx__}" fi if [ ! -z "${outvarname_wrtcmp_ny}" ]; then - printf -v ${outvarname_wrtcmp_ny} "%s" "${wrtcmp_ny}" + printf -v ${outvarname_wrtcmp_ny} "%s" "${__wrtcmp_ny__}" fi if [ ! -z "${outvarname_wrtcmp_lon_lwr_left}" ]; then - printf -v ${outvarname_wrtcmp_lon_lwr_left} "%s" "${wrtcmp_lon_lwr_left}" + printf -v ${outvarname_wrtcmp_lon_lwr_left} "%s" "${__wrtcmp_lon_lwr_left__}" fi if [ ! -z "${outvarname_wrtcmp_lat_lwr_left}" ]; then - printf -v ${outvarname_wrtcmp_lat_lwr_left} "%s" "${wrtcmp_lat_lwr_left}" + printf -v ${outvarname_wrtcmp_lat_lwr_left} "%s" "${__wrtcmp_lat_lwr_left__}" fi if [ ! -z "${outvarname_wrtcmp_lon_upr_rght}" ]; then - printf -v ${outvarname_wrtcmp_lon_upr_rght} "%s" "${wrtcmp_lon_upr_rght}" + printf -v ${outvarname_wrtcmp_lon_upr_rght} "%s" "${__wrtcmp_lon_upr_rght__}" fi if [ ! -z "${outvarname_wrtcmp_lat_upr_rght}" ]; then - printf -v ${outvarname_wrtcmp_lat_upr_rght} "%s" "${wrtcmp_lat_upr_rght}" + printf -v ${outvarname_wrtcmp_lat_upr_rght} "%s" "${__wrtcmp_lat_upr_rght__}" fi if [ ! -z "${outvarname_wrtcmp_dx}" ]; then - printf -v ${outvarname_wrtcmp_dx} "%s" "${wrtcmp_dx}" + printf -v ${outvarname_wrtcmp_dx} "%s" "${__wrtcmp_dx__}" fi if [ ! -z "${outvarname_wrtcmp_dy}" ]; then - printf -v ${outvarname_wrtcmp_dy} "%s" "${wrtcmp_dy}" + printf -v ${outvarname_wrtcmp_dy} "%s" "${__wrtcmp_dy__}" fi if [ ! -z "${outvarname_wrtcmp_dlon}" ]; then - printf -v ${outvarname_wrtcmp_dlon} "%s" "${wrtcmp_dlon}" + printf -v ${outvarname_wrtcmp_dlon} "%s" "${__wrtcmp_dlon__}" fi if [ ! -z "${outvarname_wrtcmp_dlat}" ]; then - printf -v ${outvarname_wrtcmp_dlat} "%s" "${wrtcmp_dlat}" + printf -v ${outvarname_wrtcmp_dlat} "%s" "${__wrtcmp_dlat__}" fi # #----------------------------------------------------------------------- diff --git a/ush/setup.sh b/ush/setup.sh index 7d328a981..d86e0b2fd 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -66,6 +66,7 @@ Starting function ${func_name}() in \"${scrfunc_fn}\"... # . ./check_expt_config_vars.sh . ./set_cycle_dates.sh +. ./set_predef_grid_params.sh . ./set_gridparams_GFDLgrid.sh . ./set_gridparams_ESGgrid.sh . ./link_fix.sh @@ -889,13 +890,62 @@ LBC_SPEC_FCST_HRS=($( seq ${LBC_SPEC_INTVL_HRS} ${LBC_SPEC_INTVL_HRS} \ # #----------------------------------------------------------------------- # -# If PREDEF_GRID_NAME is set to a non-empty string, set or reset parameters -# according to the predefined domain specified. +# If PREDEF_GRID_NAME is set to a non-empty string, set or reset native +# and write-component grid parameters according to the specified predefined +# domain. # #----------------------------------------------------------------------- # if [ ! -z "${PREDEF_GRID_NAME}" ]; then - . $USHDIR/set_predef_grid_params.sh + + set_predef_grid_params \ + predef_grid_name="${PREDEF_GRID_NAME}" \ + dt_atmos="${DT_ATMOS}" \ + layout_x="${LAYOUT_X}" \ + layout_y="${LAYOUT_Y}" \ + blocksize="${BLOCKSIZE}" \ + quilting="${QUILTING}" \ + outvarname_grid_gen_method="GRID_GEN_METHOD" \ + outvarname_esggrid_lon_ctr="ESGgrid_LON_CTR" \ + outvarname_esggrid_lat_ctr="ESGgrid_LAT_CTR" \ + outvarname_esggrid_delx="ESGgrid_DELX" \ + outvarname_esggrid_dely="ESGgrid_DELY" \ + outvarname_esggrid_nx="ESGgrid_NX" \ + outvarname_esggrid_ny="ESGgrid_NY" \ + outvarname_esggrid_pazi="ESGgrid_PAZI" \ + outvarname_esggrid_wide_halo_width="ESGgrid_WIDE_HALO_WIDTH" \ + outvarname_gfdlgrid_lon_t6_ctr="GFDLgrid_LON_T6_CTR" \ + outvarname_gfdlgrid_lat_t6_ctr="GFDLgrid_LAT_T6_CTR" \ + outvarname_gfdlgrid_stretch_fac="GFDLgrid_STRETCH_FAC" \ + outvarname_gfdlgrid_res="GFDLgrid_RES" \ + outvarname_gfdlgrid_refine_ratio="GFDLgrid_REFINE_RATIO" \ + outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g="GFDLgrid_ISTART_OF_RGNL_DOM_ON_T6G" \ + outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g="GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G" \ + outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g="GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G" \ + outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g="GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G" \ + outvarname_gfdlgrid_use_gfdlgrid_res_in_filenames="GFDLgrid_USE_GFDLgrid_RES_IN_FILENAMES" \ + outvarname_dt_atmos="DT_ATMOS" \ + outvarname_layout_x="LAYOUT_X" \ + outvarname_layout_y="LAYOUT_Y" \ + outvarname_blocksize="BLOCKSIZE" \ + outvarname_wrtcmp_write_groups="WRTCMP_write_groups" \ + outvarname_wrtcmp_write_tasks_per_group="WRTCMP_write_tasks_per_group" \ + outvarname_wrtcmp_output_grid="WRTCMP_output_grid" \ + outvarname_wrtcmp_cen_lon="WRTCMP_cen_lon" \ + outvarname_wrtcmp_cen_lat="WRTCMP_cen_lat" \ + outvarname_wrtcmp_stdlat1="WRTCMP_stdlat1" \ + outvarname_wrtcmp_stdlat2="WRTCMP_stdlat2" \ + outvarname_wrtcmp_nx="WRTCMP_nx" \ + outvarname_wrtcmp_ny="WRTCMP_ny" \ + outvarname_wrtcmp_lon_lwr_left="WRTCMP_lon_lwr_left" \ + outvarname_wrtcmp_lat_lwr_left="WRTCMP_lat_lwr_left" \ + outvarname_wrtcmp_lon_upr_rght="WRTCMP_lon_upr_rght" \ + outvarname_wrtcmp_lat_upr_rght="WRTCMP_lat_upr_rght" \ + outvarname_wrtcmp_dx="WRTCMP_dx" \ + outvarname_wrtcmp_dy="WRTCMP_dy" \ + outvarname_wrtcmp_dlon="WRTCMP_dlon" \ + outvarname_wrtcmp_dlat="WRTCMP_dlat" + fi # #----------------------------------------------------------------------- From 6ec83213606941084d612b1f112df82bd5b212ef Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 19 May 2022 13:07:14 -0600 Subject: [PATCH 09/26] Minor change. --- ush/set_predef_grid_params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/set_predef_grid_params.sh b/ush/set_predef_grid_params.sh index 9066668ea..666850a0c 100644 --- a/ush/set_predef_grid_params.sh +++ b/ush/set_predef_grid_params.sh @@ -111,7 +111,7 @@ function set_predef_grid_params() { "outvarname_wrtcmp_dlon" \ "outvarname_wrtcmp_dlat" \ ) - process_args valid_args "$@" + process_args "valid_args" "$@" # #----------------------------------------------------------------------- # From 1b008afd7e207c92ee8e606444a3142cc6f042a2 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 19 May 2022 13:58:26 -0600 Subject: [PATCH 10/26] Add new column listing the relative cost of running the dynamics in each test (relative to running a single 6-hour forecast on the RRFS_CONUS_25km predefined grid). --- .../WE2E/get_WE2Etest_names_subdirs_descs.sh | 332 ++++++++++++++++-- 1 file changed, 309 insertions(+), 23 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index 1f255ea7f..272875d74 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -302,7 +302,9 @@ function get_WE2Etest_names_subdirs_descs() { # #----------------------------------------------------------------------- # - local all_items \ + local abs_cost_ref \ + ac \ + all_items \ alt_test_name \ alt_test_names \ alt_test_names_subdirs \ @@ -321,6 +323,8 @@ function get_WE2Etest_names_subdirs_descs() { csv_fp \ cwd \ default_val \ + fcst_len_hrs \ + get_test_descs \ hash_or_null \ i \ ii \ @@ -331,6 +335,7 @@ function get_WE2Etest_names_subdirs_descs() { mod_time_csv \ mod_time_subdir \ msg \ + nf \ num_alt_tests \ num_category_subdirs \ num_cdates \ @@ -338,10 +343,12 @@ function get_WE2Etest_names_subdirs_descs() { num_days \ num_fcsts \ num_fcsts_orig \ + num_grid_pts \ num_items \ num_occurrences \ num_prim_tests \ num_tests \ + num_time_steps \ num_vars_to_extract \ prim_array_names_vars_to_extract \ prim_test_descs \ @@ -349,9 +356,11 @@ function get_WE2Etest_names_subdirs_descs() { prim_test_name_subdir \ prim_test_names \ prim_test_num_fcsts \ + prim_test_rel_cost \ prim_test_subdirs \ - get_test_descs \ + rc \ regex_search \ + rel_cost \ row_content \ sort_inds \ stripped_line \ @@ -386,11 +395,48 @@ function get_WE2Etest_names_subdirs_descs() { test_subdirs_orig \ test_subdirs_str \ test_type \ + ushdir \ val \ valid_vals_generate_csv_file \ var_name \ var_name_at \ vars_to_extract + + local grid_gen_method \ + \ + gfdlgrid_lon_t6_ctr \ + gfdlgrid_lat_t6_ctr \ + gfdlgrid_res \ + gfdlgrid_stretch_fac \ + gfdlgrid_refine_ratio \ + gfdlgrid_istart_of_rgnl_dom_on_t6g \ + gfdlgrid_iend_of_rgnl_dom_on_t6g \ + gfdlgrid_jstart_of_rgnl_dom_on_t6g \ + gfdlgrid_jend_of_rgnl_dom_on_t6g \ + \ + esggrid_lon_ctr \ + esggrid_lat_ctr \ + esggrid_nx \ + esggrid_ny \ + esggrid_pazi \ + esggrid_wide_halo_width \ + esggrid_delx \ + esggrid_dely \ + \ + nx \ + ny \ + dt_atmos +# +#----------------------------------------------------------------------- +# +# Source files. +# +#----------------------------------------------------------------------- +# + ushdir=$( readlink -f "$WE2Edir/../../ush" ) + . $ushdir/set_predef_grid_params.sh + . $ushdir/set_gridparams_GFDLgrid.sh + . $ushdir/set_gridparams_ESGgrid.sh # #----------------------------------------------------------------------- # @@ -521,6 +567,7 @@ information on all WE2E tests: prim_test_ids=() prim_test_subdirs=() prim_test_num_fcsts=() + prim_test_rel_cost=() alt_test_names=() alt_test_subdirs=() @@ -924,9 +971,9 @@ they correspond to unique test names and rerun." prim_array_names_vars_to_extract=( $( printf "prim_test_%s_vals " "${vars_to_extract[@]}" ) ) array_names_vars_to_extract=( $( printf "%s_vals " "${vars_to_extract[@]}" ) ) for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do - cmd="${prim_array_names_vars_to_extract[$k]}=()" + cmd="local ${prim_array_names_vars_to_extract[$k]}=()" eval $cmd - cmd="${array_names_vars_to_extract[$k]}=()" + cmd="local ${array_names_vars_to_extract[$k]}=()" eval $cmd done @@ -1117,20 +1164,214 @@ ${test_desc}${stripped_line} " # # Calculate the number of forecasts that will be launched by the current # test. The "10#" forces bash to treat the following number as a decimal -# (not hexadecimal, etc). +# (not hexadecimal, etc). Note that INCR_CYCL_FREQ is in units of hours, +# so the factor of 24 is needed to convert the number of days to hours. # num_cycles_per_day=${#CYCL_HRS[@]} num_days=$(( (${DATE_LAST_CYCL} - ${DATE_FIRST_CYCL} + 1)*24/10#${INCR_CYCL_FREQ} )) num_cdates=$(( ${num_cycles_per_day}*${num_days} )) nf=$(( ${num_cdates}*10#${NUM_ENS_MEMBERS} )) # -# In the following, the single quote at the beginning forces Google Sheets -# to interpret this quantity as a string. This prevents any automatic -# number fomatting from being applied when the CSV file is imported into -# Google Sheets. +# Save the number of forecasts launched by the current test in an +# appropriately named array. In the following, the single quote at the +# beginning forces Google Sheets to interpret this quantity as a string. +# This prevents any automatic number fomatting from being applied when +# the CSV file is imported into Google Sheets. # prim_test_num_fcsts+=( "'$nf" ) # +#----------------------------------------------------------------------- +# +# Calculate the relative dynamics cost of the test, i.e. the relative +# cost of running only the dynamics portion of the forecast model. Here, +# we define the absolute cost of running the dynamics as +# +# abs_cost = nx*ny*num_time_steps*num_fcsts +# +# where nx and ny are the horizontal dimensions of the grid, num_time_steps +# is the number of time steps that need to be taken to complete one +# forecast within the test, and num_fcsts are the number of forecasts +# the test makes (e.g. if the test performs an ensemble forecast, the +# value of this parameter will be greater than 1). +# +# The relative cost is obtained by dividing the absolute cost of a test +# by the absolute cost of a reference 6-hour forecast on the RRFS_CONUS_25km +# predefined grid using the default time step for that grid. This is +# calculated later below and saved in the variable abs_cost_ref. Thus, +# the relative cost is given by +# +# rel_cost = abs_cost/abs_cost_ref +# +# defined as abs_cost_ref. +# +# Note that the (absolute or relative) cost defined here does not take +# into account the costs of running different physics suites, nor does +# it take into account the costs of workflow tasks other than the forecast +# task (e.g. generation of initial and boundary conditions, post processing, +# verification, etc; that is why it is referred to as the relative DYNAMICS +# cost). Note also that if in the future the number of levels in the +# vertical becomes a user-specified parameter, that will also have to be +# added to the definition of the cost. +# +#----------------------------------------------------------------------- +# + +# +# To calculate the absolute cost as defined above, we need the number of +# points in the two horizontal directions, nx and ny. Also, to calculate +# the number of time steps, we need the size of the time step (dt_atmos). +# These depend on the grid being used and must be extracted from the grid +# parameters. The way the latter are obtained depends on whether or not +# a predefined grid is being used. +# +# If using a predefined grid, call the set_predef_grid_params() function +# to get the grid parameters. +# + if [ ! -z "${PREDEF_GRID_NAME}" ]; then +# +# Note: +# Can set "quilting" to "FALSE" in the following argument list because +# the write-component parameters are not needed below; only those of the +# native grid are needed. +# + set_predef_grid_params \ + predef_grid_name="${PREDEF_GRID_NAME}" \ + quilting="FALSE" \ + outvarname_grid_gen_method="grid_gen_method" \ + outvarname_esggrid_lon_ctr="esggrid_lon_ctr" \ + outvarname_esggrid_lat_ctr="esggrid_lat_ctr" \ + outvarname_esggrid_delx="esggrid_delx" \ + outvarname_esggrid_dely="esggrid_dely" \ + outvarname_esggrid_nx="esggrid_nx" \ + outvarname_esggrid_ny="esggrid_ny" \ + outvarname_esggrid_pazi="esggrid_pazi" \ + outvarname_esggrid_wide_halo_width="esggrid_wide_halo_width" \ + outvarname_gfdlgrid_lon_t6_ctr="gfdlgrid_lon_t6_ctr" \ + outvarname_gfdlgrid_lat_t6_ctr="gfdlgrid_lat_t6_ctr" \ + outvarname_gfdlgrid_stretch_fac="gfdlgrid_stretch_fac" \ + outvarname_gfdlgrid_res="gfdlgrid_res" \ + outvarname_gfdlgrid_refine_ratio="gfdlgrid_refine_ratio" \ + outvarname_gfdlgrid_istart_of_rgnl_dom_on_t6g="gfdlgrid_istart_of_rgnl_dom_on_t6g" \ + outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g="gfdlgrid_iend_of_rgnl_dom_on_t6g" \ + outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g="gfdlgrid_jstart_of_rgnl_dom_on_t6g" \ + outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g="gfdlgrid_jend_of_rgnl_dom_on_t6g" \ + outvarname_dt_atmos="dt_atmos" +# +# If using a custom grid, the test's configuration file should contain +# the grid parameters. Source this file and set the values of the grid +# parameters it contains to local variables. +# + else + + . ./${config_fn} + grid_gen_method="${GRID_GEN_METHOD}" + if [ "${grid_gen_method}" = "GFDLgrid" ]; then + gfdlgrid_lon_t6_ctr="${GFDLgrid_LON_T6_CTR}" + gfdlgrid_lat_t6_ctr="${GFDLgrid_LAT_T6_CTR}" + gfdlgrid_res="${GFDLgrid_RES}" + gfdlgrid_stretch_fac="${GFDLgrid_STRETCH_FAC}" + gfdlgrid_refine_ratio="${GFDLgrid_REFINE_RATIO}" + gfdlgrid_istart_of_rgnl_dom_on_t6g="${GFDLgrid_ISTART_OF_RGNL_DOM_ON_T6G}" + gfdlgrid_iend_of_rgnl_dom_on_t6g="${GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G}" + gfdlgrid_jstart_of_rgnl_dom_on_t6g="${GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G}" + gfdlgrid_jend_of_rgnl_dom_on_t6g="${GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G}" + elif [ "${grid_gen_method}" = "ESGgrid" ]; then + esggrid_lon_ctr="${ESGgrid_LON_CTR}" + esggrid_lat_ctr="${ESGgrid_LAT_CTR}" + esggrid_delx="${ESGgrid_DELX}" + esggrid_dely="${ESGgrid_DELY}" + esggrid_nx="${ESGgrid_NX}" + esggrid_ny="${ESGgrid_NY}" + esggrid_pazi="${ESGgrid_PAZI}" + esggrid_wide_halo_width="${ESGgrid_WIDE_HALO_WIDTH}" + fi + dt_atmos="${DT_ATMOS}" + + fi +# +# The way the number of grid points in the horizontal directions (nx and +# ny) are calculated depends on the method used to generate the grid as +# well as the grid parameters for that method. +# + if [ "${grid_gen_method}" = "GFDLgrid" ]; then +# +# Note: +# The workflow generation mode (run_envir) can be set to "community" here +# since this does not affect the values of nx and ny. +# + set_gridparams_GFDLgrid \ + lon_of_t6_ctr="${gfdlgrid_lon_t6_ctr}" \ + lat_of_t6_ctr="${gfdlgrid_lat_t6_ctr}" \ + res_of_t6g="${gfdlgrid_res}" \ + stretch_factor="${gfdlgrid_stretch_fac}" \ + refine_ratio_t6g_to_t7g="${gfdlgrid_refine_ratio}" \ + istart_of_t7_on_t6g="${gfdlgrid_istart_of_rgnl_dom_on_t6g}" \ + iend_of_t7_on_t6g="${gfdlgrid_iend_of_rgnl_dom_on_t6g}" \ + jstart_of_t7_on_t6g="${gfdlgrid_jstart_of_rgnl_dom_on_t6g}" \ + jend_of_t7_on_t6g="${gfdlgrid_jend_of_rgnl_dom_on_t6g}" \ + verbose="$verbose" \ + outvarname_nx_of_t7_on_t7g="nx" \ + outvarname_ny_of_t7_on_t7g="ny" + + elif [ "${grid_gen_method}" = "ESGgrid" ]; then + + set_gridparams_ESGgrid \ + lon_ctr="${esggrid_lon_ctr}" \ + lat_ctr="${esggrid_lat_ctr}" \ + nx="${esggrid_nx}" \ + ny="${esggrid_ny}" \ + pazi="${esggrid_pazi}" \ + halo_width="${esggrid_wide_halo_width}" \ + delx="${esggrid_delx}" \ + dely="${esggrid_dely}" \ + outvarname_nx="nx" \ + outvarname_ny="ny" + + fi +# +# Calculate the total number of horizontal grid points. +# + num_grid_pts=$(( nx*ny )) +# +# Calculate the number of time steps for the test. Note that FCST_LEN_HRS +# is in units of hours while dt_atmos is in units of seconds. +# + num_time_steps=$(( FCST_LEN_HRS*3600/dt_atmos + 1 )) +# +# Calculate the absolute cost of the test. +# + ac=$(( num_grid_pts*num_time_steps*nf )) +# +# Unset all grid paramters so that they are not accidentally reused for +# the next test. +# + unset gfdlgrid_lon_t6_ctr \ + gfdlgrid_lat_t6_ctr \ + gfdlgrid_res \ + gfdlgrid_stretch_fac \ + gfdlgrid_refine_ratio \ + gfdlgrid_istart_of_rgnl_dom_on_t6g \ + gfdlgrid_iend_of_rgnl_dom_on_t6g \ + gfdlgrid_jstart_of_rgnl_dom_on_t6g \ + gfdlgrid_jend_of_rgnl_dom_on_t6g \ + esggrid_lon_ctr \ + esggrid_lat_ctr \ + esggrid_nx \ + esggrid_ny \ + esggrid_pazi \ + esggrid_wide_halo_width \ + esggrid_delx \ + esggrid_dely \ + dt_atmos \ + nx \ + ny +# +# Save the absolute cost for this test in the array that will eventually +# contain the relative cost. The values in this array will be divided +# by abs_cost_ref later below to obtain relative costs. +# + prim_test_rel_cost+=( "$ac" ) +# # Unset the experiment variables defined for the current test so that # they are not accidentally used for the next one. # @@ -1140,6 +1381,37 @@ ${test_desc}${stripped_line} " eval $cmd done + done # End loop over primary tests +# +#----------------------------------------------------------------------- +# +# Normalize the absolute costs calculated above for each test by the +# absolute cost of a reference 6-hour forecast on the RRFS_CONUS_25km +# predefined grid (using the default time step for that grid). +# +#----------------------------------------------------------------------- +# + set_predef_grid_params \ + predef_grid_name="RRFS_CONUS_25km" \ + quilting="FALSE" \ + outvarname_esggrid_nx="nx" \ + outvarname_esggrid_ny="ny" \ + outvarname_dt_atmos="dt_atmos" + + num_grid_pts=$(( nx*ny )) + fcst_len_hrs="6" + num_time_steps=$(( fcst_len_hrs*3600/dt_atmos + 1 )) + abs_cost_ref=$(( num_grid_pts*num_time_steps )) + + for (( i=0; i<=$((num_prim_tests-1)); i++ )); do +# +# In the following, the single quote at the beginning forces Google Sheets +# to interpret this quantity as a string. This prevents any automatic +# number fomatting from being applied when the CSV file is imported into +# Google Sheets. +# + prim_test_rel_cost[$i]="'"$( printf "%g" \ + $( bc -l <<< " ${prim_test_rel_cost[$i]}/${abs_cost_ref}" ) ) done fi @@ -1158,6 +1430,7 @@ ${test_desc}${stripped_line} " if [ "${get_test_descs}" = "TRUE" ]; then test_descs=("${prim_test_descs[@]}") num_fcsts=("${prim_test_num_fcsts[@]}") + rel_cost=("${prim_test_rel_cost[@]}") for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="${array_names_vars_to_extract[$k]}=(\"\${${prim_array_names_vars_to_extract[$k]}[@]}\")" eval $cmd @@ -1187,6 +1460,7 @@ ${test_desc}${stripped_line} " if [ "${get_test_descs}" = "TRUE" ]; then test_descs+=("${prim_test_descs[$j]}") num_fcsts+=("${prim_test_num_fcsts[$j]}") + rel_cost+=("${prim_test_rel_cost[$j]}") for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="${array_names_vars_to_extract[$k]}+=(\"\${${prim_array_names_vars_to_extract[$k]}[$j]}\")" eval $cmd @@ -1266,9 +1540,9 @@ Please correct and rerun." sed -n -r -e "s/${regex_search}/\2/p" ) done - test_names_orig=( "${test_names[@]}" ) - test_subdirs_orig=( "${test_subdirs[@]}" ) - test_ids_orig=( "${test_ids[@]}" ) + local test_names_orig=( "${test_names[@]}" ) + local test_subdirs_orig=( "${test_subdirs[@]}" ) + local test_ids_orig=( "${test_ids[@]}" ) for (( i=0; i<=$((num_tests-1)); i++ )); do ii="${sort_inds[$i]}" test_names[$i]="${test_names_orig[$ii]}" @@ -1278,10 +1552,11 @@ Please correct and rerun." if [ "${get_test_descs}" = "TRUE" ]; then - test_descs_orig=( "${test_descs[@]}" ) - num_fcsts_orig=( "${num_fcsts[@]}" ) + local test_descs_orig=( "${test_descs[@]}" ) + local num_fcsts_orig=( "${num_fcsts[@]}" ) + local rel_cost_orig=( "${rel_cost[@]}" ) for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do - cmd="${array_names_vars_to_extract[$k]}_orig=(\"\${${array_names_vars_to_extract[$k]}[@]}\")" + cmd="local ${array_names_vars_to_extract[$k]}_orig=(\"\${${array_names_vars_to_extract[$k]}[@]}\")" eval $cmd done @@ -1289,6 +1564,7 @@ Please correct and rerun." ii="${sort_inds[$i]}" test_descs[$i]="${test_descs_orig[$ii]}" num_fcsts[$i]="${num_fcsts_orig[$ii]}" + rel_cost[$i]="${rel_cost_orig[$ii]}" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="${array_names_vars_to_extract[$k]}[$i]=\"\${${array_names_vars_to_extract[$k]}_orig[$ii]}\"" eval $cmd @@ -1328,6 +1604,8 @@ Please correct and rerun." \"Test Name (Subdirectory)\" ${csv_delimiter} \ \"Alternate Test Names (Subdirectories)\" ${csv_delimiter} \ \"Test Purpose/Description\" ${csv_delimiter} \ +\"Relative Cost of Running Dynamics +(1 corresponds to running a 6-hour forecast on the RRFS_CONUS_25km predefined grid using the default time step)\" ${csv_delimiter} \ \"Number of Forecast Model Runs\"" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do column_titles="\ @@ -1365,8 +1643,11 @@ ${column_titles} ${csv_delimiter} \ # test_desc=$( printf "%s" "${test_desc}" | sed -r -e "s/\"/\"\"/g" ) # -# Get the number of forecasts (number of times the forcast model is run, -# due to a unique starting date, an ensemble member, etc). +# Get the relative cost. +# + rc="${rel_cost[$j]}" +# +# Get the number of forecasts (number of times the forcast model is run). # nf="${num_fcsts[$j]}" # @@ -1382,15 +1663,15 @@ ${column_titles} ${csv_delimiter} \ while [ "$jp1" -lt "${num_tests}" ]; do test_id_next="${test_ids[$jp1]}" if [ "${test_id_next}" -eq "${test_id}" ]; then - alt_test_names_subdirs="\ -${alt_test_names_subdirs} -${test_names[$jp1]} (${test_subdirs[$jp1]})" + alt_test_names_subdirs="${alt_test_names_subdirs}${test_names[$jp1]} (${test_subdirs[$jp1]})"$'\n' j="$jp1" jp1=$((j+1)) else break fi done +# Remove trailing newline. + alt_test_names_subdirs="${alt_test_names_subdirs%$'\n'}" # # Write a line to the CSV file representing a single row of the spreadsheet. # This row contains the following columns: @@ -1409,17 +1690,22 @@ ${test_names[$jp1]} (${test_subdirs[$jp1]})" # The test description. # # Column 4: +# The relative cost of running the dynamics in the test. See above for +# details. +# +# Column 5: # The number of times the forecast model will be run by the test. This -# has been calculated above using the quantities that go in Columns 5, -# 6, .... +# has been calculated above using the quantities that go in Columns 6, +# 7, .... # -# Columns 5...: +# Columns 6...: # The values of the experiment variables specified in vars_to_extract. # row_content="\ \"${prim_test_name_subdir}\" ${csv_delimiter} \ \"${alt_test_names_subdirs}\" ${csv_delimiter} \ \"${test_desc}\" ${csv_delimiter} \ +\"${rc}\" ${csv_delimiter} \ \"${nf}\"" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do From 975c16f2be9740ec4cfd00dbc559cc0a7a790752 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 19 May 2022 15:15:32 -0600 Subject: [PATCH 11/26] Add DT_ATMOS as one of the columns; add units to some of the column titles. --- .../WE2E/get_WE2Etest_names_subdirs_descs.sh | 77 +++++++++++++++---- 1 file changed, 63 insertions(+), 14 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index 272875d74..0d0b1fd2b 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -318,11 +318,13 @@ function get_WE2Etest_names_subdirs_descs() { column_titles \ config_fn \ crnt_item \ + crnt_title \ csv_delimiter \ csv_fn \ csv_fp \ cwd \ default_val \ + dt_atmos \ fcst_len_hrs \ get_test_descs \ hash_or_null \ @@ -352,6 +354,7 @@ function get_WE2Etest_names_subdirs_descs() { num_vars_to_extract \ prim_array_names_vars_to_extract \ prim_test_descs \ + prim_test_dt_atmos \ prim_test_ids \ prim_test_name_subdir \ prim_test_names \ @@ -395,6 +398,7 @@ function get_WE2Etest_names_subdirs_descs() { test_subdirs_orig \ test_subdirs_str \ test_type \ + units \ ushdir \ val \ valid_vals_generate_csv_file \ @@ -425,7 +429,7 @@ function get_WE2Etest_names_subdirs_descs() { \ nx \ ny \ - dt_atmos + dta # #----------------------------------------------------------------------- # @@ -567,6 +571,7 @@ information on all WE2E tests: prim_test_ids=() prim_test_subdirs=() prim_test_num_fcsts=() + prim_test_dt_atmos=() prim_test_rel_cost=() alt_test_names=() @@ -1255,7 +1260,7 @@ ${test_desc}${stripped_line} " outvarname_gfdlgrid_iend_of_rgnl_dom_on_t6g="gfdlgrid_iend_of_rgnl_dom_on_t6g" \ outvarname_gfdlgrid_jstart_of_rgnl_dom_on_t6g="gfdlgrid_jstart_of_rgnl_dom_on_t6g" \ outvarname_gfdlgrid_jend_of_rgnl_dom_on_t6g="gfdlgrid_jend_of_rgnl_dom_on_t6g" \ - outvarname_dt_atmos="dt_atmos" + outvarname_dt_atmos="dta" # # If using a custom grid, the test's configuration file should contain # the grid parameters. Source this file and set the values of the grid @@ -1285,10 +1290,14 @@ ${test_desc}${stripped_line} " esggrid_pazi="${ESGgrid_PAZI}" esggrid_wide_halo_width="${ESGgrid_WIDE_HALO_WIDTH}" fi - dt_atmos="${DT_ATMOS}" + dta="${DT_ATMOS}" fi # +# Save the value of dta (which is just dt_atmos) in an array. +# + prim_test_dt_atmos+=( "${dta}" ) +# # The way the number of grid points in the horizontal directions (nx and # ny) are calculated depends on the method used to generate the grid as # well as the grid parameters for that method. @@ -1334,9 +1343,9 @@ ${test_desc}${stripped_line} " num_grid_pts=$(( nx*ny )) # # Calculate the number of time steps for the test. Note that FCST_LEN_HRS -# is in units of hours while dt_atmos is in units of seconds. +# is in units of hours while dta is in units of seconds. # - num_time_steps=$(( FCST_LEN_HRS*3600/dt_atmos + 1 )) + num_time_steps=$(( FCST_LEN_HRS*3600/dta + 1 )) # # Calculate the absolute cost of the test. # @@ -1362,7 +1371,7 @@ ${test_desc}${stripped_line} " esggrid_wide_halo_width \ esggrid_delx \ esggrid_dely \ - dt_atmos \ + dta \ nx \ ny # @@ -1396,11 +1405,11 @@ ${test_desc}${stripped_line} " quilting="FALSE" \ outvarname_esggrid_nx="nx" \ outvarname_esggrid_ny="ny" \ - outvarname_dt_atmos="dt_atmos" + outvarname_dt_atmos="dta" num_grid_pts=$(( nx*ny )) fcst_len_hrs="6" - num_time_steps=$(( fcst_len_hrs*3600/dt_atmos + 1 )) + num_time_steps=$(( fcst_len_hrs*3600/dta+ 1 )) abs_cost_ref=$(( num_grid_pts*num_time_steps )) for (( i=0; i<=$((num_prim_tests-1)); i++ )); do @@ -1430,6 +1439,7 @@ ${test_desc}${stripped_line} " if [ "${get_test_descs}" = "TRUE" ]; then test_descs=("${prim_test_descs[@]}") num_fcsts=("${prim_test_num_fcsts[@]}") + dt_atmos=("${prim_test_dt_atmos[@]}") rel_cost=("${prim_test_rel_cost[@]}") for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="${array_names_vars_to_extract[$k]}=(\"\${${prim_array_names_vars_to_extract[$k]}[@]}\")" @@ -1460,6 +1470,7 @@ ${test_desc}${stripped_line} " if [ "${get_test_descs}" = "TRUE" ]; then test_descs+=("${prim_test_descs[$j]}") num_fcsts+=("${prim_test_num_fcsts[$j]}") + dt_atmos+=("${prim_test_dt_atmos[$j]}") rel_cost+=("${prim_test_rel_cost[$j]}") for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="${array_names_vars_to_extract[$k]}+=(\"\${${prim_array_names_vars_to_extract[$k]}[$j]}\")" @@ -1554,6 +1565,7 @@ Please correct and rerun." local test_descs_orig=( "${test_descs[@]}" ) local num_fcsts_orig=( "${num_fcsts[@]}" ) + local dt_atmos_orig=( "${dt_atmos[@]}" ) local rel_cost_orig=( "${rel_cost[@]}" ) for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="local ${array_names_vars_to_extract[$k]}_orig=(\"\${${array_names_vars_to_extract[$k]}[@]}\")" @@ -1564,6 +1576,7 @@ Please correct and rerun." ii="${sort_inds[$i]}" test_descs[$i]="${test_descs_orig[$ii]}" num_fcsts[$i]="${num_fcsts_orig[$ii]}" + dt_atmos[$i]="${dt_atmos_orig[$ii]}" rel_cost[$i]="${rel_cost_orig[$ii]}" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do cmd="${array_names_vars_to_extract[$k]}[$i]=\"\${${array_names_vars_to_extract[$k]}_orig[$ii]}\"" @@ -1608,9 +1621,35 @@ Please correct and rerun." (1 corresponds to running a 6-hour forecast on the RRFS_CONUS_25km predefined grid using the default time step)\" ${csv_delimiter} \ \"Number of Forecast Model Runs\"" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do - column_titles="\ -${column_titles} ${csv_delimiter} \ -\"${vars_to_extract[$k]}\"" + + crnt_title="${vars_to_extract[$k]}" + # + # Add units for select fields. + # + units="" + case "${vars_to_extract[$k]}" in + "INCR_CYCL_FREQ") + units="[hr]" + ;; + "FCST_LEN_HRS") + units="[hr]" + ;; + "LBC_SPEC_INTVL_HRS") + units="[hr]" + ;; + esac + crnt_title="${crnt_title}${units:+ $units}" + + column_titles="${column_titles} ${csv_delimiter} \"${crnt_title}\"" + # + # Insert a column for DT_ATMOS right after the one for FCST_LEN_HRS. + # + if [ "${vars_to_extract[$k]}" = "FCST_LEN_HRS" ]; then + units="[sec]" + crnt_title="DT_ATMOS${units:+ $units}" + column_titles="${column_titles} ${csv_delimiter} \"${crnt_title}\"" + fi + done printf "%s\n" "${column_titles}" >> "${csv_fp}" # @@ -1643,6 +1682,10 @@ ${column_titles} ${csv_delimiter} \ # test_desc=$( printf "%s" "${test_desc}" | sed -r -e "s/\"/\"\"/g" ) # +# Get the time step. +# + dta="${dt_atmos[$j]}" +# # Get the relative cost. # rc="${rel_cost[$j]}" @@ -1709,12 +1752,18 @@ ${column_titles} ${csv_delimiter} \ \"${nf}\"" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do + unset "val" cmd="val=\"\${${array_names_vars_to_extract[$k]}[$j]}\"" eval $cmd - row_content="\ -${row_content} ${csv_delimiter} \ -\"${val}\"" + row_content="${row_content} ${csv_delimiter} \"${val}\"" +# +# Insert value of DT_ATMOS right after value of FCST_LEN_HRS. +# + if [ "${vars_to_extract[$k]}" = "FCST_LEN_HRS" ]; then + row_content="${row_content} ${csv_delimiter} \"${dta}\"" + fi + done printf "%s\n" "${row_content}" >> "${csv_fp}" From d3122e73fd4a2c586d97aa234487646513d61d51 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 19 May 2022 15:52:43 -0600 Subject: [PATCH 12/26] Add single quote to field value in CSV file to make sure it gets treated as a string in google sheets (and doesn't get a number format automatically applied to it). --- tests/WE2E/get_WE2Etest_names_subdirs_descs.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index 0d0b1fd2b..5c84172f8 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -1294,9 +1294,12 @@ ${test_desc}${stripped_line} " fi # -# Save the value of dta (which is just dt_atmos) in an array. +# Save the value of dta (which is just dt_atmos) in an array. The single +# quote at the beginning forces Google Sheets to interpret this quantity +# as a string. This prevents any automatic number fomatting from being +# applied when the CSV file is imported into Google Sheets. # - prim_test_dt_atmos+=( "${dta}" ) + prim_test_dt_atmos+=( "'${dta}" ) # # The way the number of grid points in the horizontal directions (nx and # ny) are calculated depends on the method used to generate the grid as From 4b11c678dfc48e8533311c560d3c54b57da85343 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Thu, 19 May 2022 17:37:10 -0600 Subject: [PATCH 13/26] Update y-dimension of write-component grid for 3km Indianapolis domain to correct value. --- ush/set_predef_grid_params.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ush/set_predef_grid_params.sh b/ush/set_predef_grid_params.sh index 666850a0c..dd8f0b812 100644 --- a/ush/set_predef_grid_params.sh +++ b/ush/set_predef_grid_params.sh @@ -595,7 +595,7 @@ function set_predef_grid_params() { __wrtcmp_stdlat1__="${__esggrid_lat_ctr__}" __wrtcmp_stdlat2__="${__esggrid_lat_ctr__}" __wrtcmp_nx__="197" - __wrtcmp_ny__="195" + __wrtcmp_ny__="197" __wrtcmp_lon_lwr_left__="-89.47120417" __wrtcmp_lat_lwr_left__="37.07809642" __wrtcmp_dx__="${__esggrid_delx__}" From 8376e0c63d0961cecbf0104576a55037ff3ea6e0 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 20 May 2022 11:11:24 -0600 Subject: [PATCH 14/26] In the WE2E test info CSV file, for readability split the test name and alternate test name column contents into two lines. --- tests/WE2E/get_WE2Etest_names_subdirs_descs.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index 5c84172f8..c70f95ec0 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -1617,10 +1617,12 @@ Please correct and rerun." # detail further below. # column_titles="\ -\"Test Name (Subdirectory)\" ${csv_delimiter} \ -\"Alternate Test Names (Subdirectories)\" ${csv_delimiter} \ +\"Test Name +(Subdirectory)\" ${csv_delimiter} \ +\"Alternate Test Names +(Subdirectories)\" ${csv_delimiter} \ \"Test Purpose/Description\" ${csv_delimiter} \ -\"Relative Cost of Running Dynamics +\"Relative Cost of Running Dynamics (1 corresponds to running a 6-hour forecast on the RRFS_CONUS_25km predefined grid using the default time step)\" ${csv_delimiter} \ \"Number of Forecast Model Runs\"" for (( k=0; k<=$((num_vars_to_extract-1)); k++ )); do @@ -1669,7 +1671,7 @@ Please correct and rerun." # Get the primary name of the test and the category subdirectory in which # it is located. # - prim_test_name_subdir="${test_names[$j]} (${test_subdirs[$j]})" + prim_test_name_subdir="${test_names[$j]}"$'\n'"(${test_subdirs[$j]})" # # Get the test ID. # @@ -1709,7 +1711,7 @@ Please correct and rerun." while [ "$jp1" -lt "${num_tests}" ]; do test_id_next="${test_ids[$jp1]}" if [ "${test_id_next}" -eq "${test_id}" ]; then - alt_test_names_subdirs="${alt_test_names_subdirs}${test_names[$jp1]} (${test_subdirs[$jp1]})"$'\n' + alt_test_names_subdirs="${alt_test_names_subdirs}${test_names[$jp1]}"$'\n'"(${test_subdirs[$jp1]})"$'\n' j="$jp1" jp1=$((j+1)) else From d7d523c9c85c7ee0ec38473ab8286ead9c7b5f58 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 20 May 2022 17:13:21 -0600 Subject: [PATCH 15/26] Clean up comments and output messages involving the build and workflow module files. --- ush/config_defaults.sh | 11 +++++++---- ush/launch_FV3LAM_wflow.sh | 2 +- ush/load_modules_run_task.sh | 4 ++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/ush/config_defaults.sh b/ush/config_defaults.sh index b10a01d5e..966bf343d 100644 --- a/ush/config_defaults.sh +++ b/ush/config_defaults.sh @@ -74,12 +74,15 @@ RUN_ENVIR="nco" # for supported machines. # # BUILD_MOD_FN: -# Name of alternative build module file to use if using an -# unsupported platform. Is set automatically for supported machines. +# Name of build module file to load before running a workflow task. If +# this is not specified by the user in the experiment configuration file +# (EXPT_CONFIG_FN), it will be set automatically for supported machines. # # WFLOW_MOD_FN: -# Name of alternative workflow module file to use if using an -# unsupported platform. Is set automatically for supported machines. +# Name of workflow module file to load before (re)launching the experiment's +# ROCOTO workflow (using the "rocotorun" command). If this is not specified +# by the user in the experiment configuration file (EXPT_CONFIG_FN), it +# will be set automatically for supported machines. # # SCHED: # The job scheduler to use (e.g. slurm). Set this to an empty string in diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index 9184cb0e0..d289c06bb 100755 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -151,7 +151,7 @@ expt_name="${EXPT_SUBDIR}" # module use "${SR_WX_APP_TOP_DIR}/modulefiles" module load "${WFLOW_MOD_FN}" > /dev/null 2>&1 || print_err_msg_exit "\ -Loading platform-specific module file (WFLOW_MOD_FN) for the workflow +Loading of platform-specific module file (WFLOW_MOD_FN) for the workflow task failed: WFLOW_MOD_FN = \"${WFLOW_MOD_FN}\"" # diff --git a/ush/load_modules_run_task.sh b/ush/load_modules_run_task.sh index 7a9547fe0..73c7c7eed 100755 --- a/ush/load_modules_run_task.sh +++ b/ush/load_modules_run_task.sh @@ -95,8 +95,8 @@ machine=$(echo_lowercase $MACHINE) source "${SR_WX_APP_TOP_DIR}/etc/lmod-setup.sh" module use "${SR_WX_APP_TOP_DIR}/modulefiles" module load "${BUILD_MOD_FN}" || print_err_msg_exit "\ -Sourcing platform- and compiler-specific module file (BUILD_MOD_FN) for the -workflow task specified by task_name failed: +Loading of platform- and compiler-specific module file (BUILD_MOD_FN) +for the workflow task specified by task_name failed: task_name = \"${task_name}\" BUILD_MOD_FN = \"${BUILD_MOD_FN}\"" # From 55a8960277150bffafa7324ed46f323f17802ec9 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 20 May 2022 17:17:13 -0600 Subject: [PATCH 16/26] Quote the argument to the boolify() function because without quotes, if the variable being passed is empty, boolify() will think no argument is being passed to it. --- ush/get_crontab_contents.sh | 2 +- ush/launch_FV3LAM_wflow.sh | 2 +- ush/set_predef_grid_params.sh | 2 +- ush/setup.sh | 50 +++++++++++++++++------------------ 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/ush/get_crontab_contents.sh b/ush/get_crontab_contents.sh index 182cf1936..a7a00854e 100644 --- a/ush/get_crontab_contents.sh +++ b/ush/get_crontab_contents.sh @@ -42,7 +42,7 @@ function get_crontab_contents() { # source $USHDIR/constants.sh check_var_valid_value "called_from_cron" "valid_vals_BOOLEAN" - called_from_cron=$( boolify ${called_from_cron} ) + called_from_cron=$(boolify "${called_from_cron}") if [ "$MACHINE" = "WCOSS_DELL_P3" ]; then __crontab_cmd__="" diff --git a/ush/launch_FV3LAM_wflow.sh b/ush/launch_FV3LAM_wflow.sh index d289c06bb..8a4dbe603 100755 --- a/ush/launch_FV3LAM_wflow.sh +++ b/ush/launch_FV3LAM_wflow.sh @@ -121,7 +121,7 @@ print_input_args "valid_args" # called_from_cron=${called_from_cron:-"FALSE"} check_var_valid_value "called_from_cron" "valid_vals_BOOLEAN" -called_from_cron=$(boolify ${called_from_cron}) +called_from_cron=$(boolify "${called_from_cron}") # #----------------------------------------------------------------------- # diff --git a/ush/set_predef_grid_params.sh b/ush/set_predef_grid_params.sh index dd8f0b812..9c9800381 100644 --- a/ush/set_predef_grid_params.sh +++ b/ush/set_predef_grid_params.sh @@ -181,7 +181,7 @@ function set_predef_grid_params() { #----------------------------------------------------------------------- # check_var_valid_value "quilting" "valid_vals_BOOLEAN" - quilting=$(boolify $quilting) + quilting=$(boolify "$quilting") # #----------------------------------------------------------------------- # diff --git a/ush/setup.sh b/ush/setup.sh index 8eed1cc4e..6d444b646 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -144,10 +144,10 @@ fi check_var_valid_value "RUN_ENVIR" "valid_vals_RUN_ENVIR" check_var_valid_value "VERBOSE" "valid_vals_VERBOSE" -VERBOSE=$(boolify $VERBOSE) +VERBOSE=$(boolify "$VERBOSE") check_var_valid_value "DEBUG" "valid_vals_DEBUG" -DEBUG=$(boolify $DEBUG) +DEBUG=$(boolify "$DEBUG") # #----------------------------------------------------------------------- # @@ -163,51 +163,51 @@ Setting VERBOSE to \"TRUE\" because DEBUG has been set to \"TRUE\"..." fi check_var_valid_value "USE_CRON_TO_RELAUNCH" "valid_vals_USE_CRON_TO_RELAUNCH" -USE_CRON_TO_RELAUNCH=$(boolify $USE_CRON_TO_RELAUNCH) +USE_CRON_TO_RELAUNCH=$(boolify "${USE_CRON_TO_RELAUNCH}") check_var_valid_value "RUN_TASK_MAKE_GRID" "valid_vals_RUN_TASK_MAKE_GRID" -RUN_TASK_MAKE_GRID=$(boolify $RUN_TASK_MAKE_GRID) +RUN_TASK_MAKE_GRID=$(boolify "${RUN_TASK_MAKE_GRID}") check_var_valid_value "RUN_TASK_MAKE_OROG" "valid_vals_RUN_TASK_MAKE_OROG" -RUN_TASK_MAKE_OROG=$(boolify $RUN_TASK_MAKE_OROG) +RUN_TASK_MAKE_OROG=$(boolify "${RUN_TASK_MAKE_OROG}") check_var_valid_value \ "RUN_TASK_MAKE_SFC_CLIMO" "valid_vals_RUN_TASK_MAKE_SFC_CLIMO" -RUN_TASK_MAKE_SFC_CLIMO=$(boolify $RUN_TASK_MAKE_SFC_CLIMO) +RUN_TASK_MAKE_SFC_CLIMO=$(boolify "${RUN_TASK_MAKE_SFC_CLIMO}") check_var_valid_value \ "RUN_TASK_RUN_POST" "valid_vals_RUN_TASK_RUN_POST" -RUN_TASK_RUN_POST=$(boolify $RUN_TASK_RUN_POST) +RUN_TASK_RUN_POST=$(boolify "${RUN_TASK_RUN_POST}") check_var_valid_value "RUN_TASK_VX_GRIDSTAT" "valid_vals_RUN_TASK_VX_GRIDSTAT" -RUN_TASK_VX_GRIDSTAT=$(boolify $RUN_TASK_VX_GRIDSTAT) +RUN_TASK_VX_GRIDSTAT=$(boolify "${RUN_TASK_VX_GRIDSTAT}") check_var_valid_value "RUN_TASK_VX_POINTSTAT" "valid_vals_RUN_TASK_VX_POINTSTAT" -RUN_TASK_VX_POINTSTAT=$(boolify $RUN_TASK_VX_POINTSTAT) +RUN_TASK_VX_POINTSTAT=$(boolify "${RUN_TASK_VX_POINTSTAT}") check_var_valid_value "RUN_TASK_VX_ENSGRID" "valid_vals_RUN_TASK_VX_ENSGRID" -RUN_TASK_VX_ENSGRID=$(boolify $RUN_TASK_VX_ENSGRID) +RUN_TASK_VX_ENSGRID=$(boolify "${RUN_TASK_VX_ENSGRID}") check_var_valid_value "RUN_TASK_VX_ENSPOINT" "valid_vals_RUN_TASK_VX_ENSPOINT" -RUN_TASK_VX_ENSPOINT=$(boolify $RUN_TASK_VX_ENSPOINT) +RUN_TASK_VX_ENSPOINT=$(boolify "${RUN_TASK_VX_ENSPOINT}") check_var_valid_value "USE_FVCOM" "valid_vals_USE_FVCOM" -USE_FVCOM=$(boolify $USE_FVCOM) +USE_FVCOM=$(boolify "${USE_FVCOM}") check_var_valid_value "DO_SHUM" "valid_vals_DO_SHUM" -DO_SHUM=$(boolify $DO_SHUM) +DO_SHUM=$(boolify "${DO_SHUM}") check_var_valid_value "DO_SPPT" "valid_vals_DO_SPPT" -DO_SPPT=$(boolify $DO_SPPT) +DO_SPPT=$(boolify "${DO_SPPT}") check_var_valid_value "DO_SKEB" "valid_vals_DO_SKEB" -DO_SKEB=$(boolify $DO_SKEB) +DO_SKEB=$(boolify "${DO_SKEB}") check_var_valid_value "DO_SPP" "valid_vals_DO_SPP" -DO_SPP=$(boolify $DO_SPP) +DO_SPP=$(boolify "${DO_SPP}") check_var_valid_value "DO_LSM_SPP" "valid_vals_DO_LSM_SPP" -DO_LSM_SPP=$(boolify $DO_LSM_SPP) +DO_LSM_SPP=$(boolify "${DO_LSM_SPP}") # #----------------------------------------------------------------------- # @@ -312,7 +312,7 @@ fi #----------------------------------------------------------------------- # check_var_valid_value "SUB_HOURLY_POST" "valid_vals_SUB_HOURLY_POST" -SUB_HOURLY_POST=$(boolify $SUB_HOURLY_POST) +SUB_HOURLY_POST=$(boolify "${SUB_HOURLY_POST}") # #----------------------------------------------------------------------- # @@ -332,7 +332,7 @@ check_var_valid_value "DOT_OR_USCORE" "valid_vals_DOT_OR_USCORE" #----------------------------------------------------------------------- # check_var_valid_value "USE_FVCOM" "valid_vals_USE_FVCOM" -USE_FVCOM=$(boolify $USE_FVCOM) +USE_FVCOM=$(boolify "${USE_FVCOM}") check_var_valid_value "FVCOM_WCSTART" "valid_vals_FVCOM_WCSTART" FVCOM_WCSTART=$(echo_lowercase $FVCOM_WCSTART) # @@ -640,7 +640,7 @@ check_var_valid_value "USE_MERRA_CLIMO" "valid_vals_USE_MERRA_CLIMO" # Set USE_MERRA_CLIMO to either "TRUE" or "FALSE" so we don't # have to consider other valid values later on. # -USE_MERRA_CLIMO=$(boolify $USE_MERRA_CLIMO) +USE_MERRA_CLIMO=$(boolify "${USE_MERRA_CLIMO}") # Force to "TRUE" in case of FV3_GFS_v15_thompson_mynn_lam3km: if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v15_thompson_mynn_lam3km" ]; then USE_MERRA_CLIMO="TRUE" @@ -1404,7 +1404,7 @@ NEMS_CONFIG_FP="${EXPTDIR}/${NEMS_CONFIG_FN}" check_var_valid_value "USE_USER_STAGED_EXTRN_FILES" "valid_vals_USE_USER_STAGED_EXTRN_FILES" -USE_USER_STAGED_EXTRN_FILES=$(boolify $USE_USER_STAGED_EXTRN_FILES) +USE_USER_STAGED_EXTRN_FILES=$(boolify "${USE_USER_STAGED_EXTRN_FILES}") # #----------------------------------------------------------------------- @@ -1444,7 +1444,7 @@ fi #----------------------------------------------------------------------- # check_var_valid_value "DO_ENSEMBLE" "valid_vals_DO_ENSEMBLE" -DO_ENSEMBLE=$(boolify $DO_ENSEMBLE) +DO_ENSEMBLE=$(boolify "${DO_ENSEMBLE}") NDIGITS_ENSMEM_NAMES="0" ENSMEM_NAMES=("") @@ -2045,7 +2045,7 @@ check_var_valid_value "WRITE_DOPOST" "valid_vals_WRITE_DOPOST" # Set WRITE_DOPOST to either "TRUE" or "FALSE" so we don't have to consider # other valid values later on. # -WRITE_DOPOST=$(boolify $WRITE_DOPOST) +WRITE_DOPOST=$(boolify "${WRITE_DOPOST}") if [ "$WRITE_DOPOST" = "TRUE" ] ; then @@ -2060,10 +2060,10 @@ SUB_HOURLY_POST is NOT available with Inline Post yet." fi check_var_valid_value "QUILTING" "valid_vals_QUILTING" -QUILTING=$(boolify $QUILTING) +QUILTING=$(boolify "$QUILTING") check_var_valid_value "PRINT_ESMF" "valid_vals_PRINT_ESMF" -PRINT_ESMF=$(boolify $PRINT_ESMF) +PRINT_ESMF=$(boolify "${PRINT_ESMF}") # #----------------------------------------------------------------------- From 85e84543e9c583490d5e5ba72059375fa4d8a413 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 20 May 2022 17:19:53 -0600 Subject: [PATCH 17/26] Add a check to ensure the experiment variable "COMPILER" is set to a valid value. --- ush/setup.sh | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/ush/setup.sh b/ush/setup.sh index 6d444b646..fa608515d 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -524,10 +524,19 @@ fi # #----------------------------------------------------------------------- # -# Set the names of the build and workflow module files (if not -# already specified by the user). These are the files that need to be -# sourced before building the component SRW App codes and running various -# workflow scripts, respectively. +# Make sure COMPILER is set to a valid value. +# +#----------------------------------------------------------------------- +# +COMPILER=$(echo_lowercase $COMPILER) +check_var_valid_value "COMPILER" "valid_vals_COMPILER" +# +#----------------------------------------------------------------------- +# +# Set the names of the build and workflow module files (if not already +# specified by the user). These are the files that need to be loaded +# before building the component SRW App codes and running various workflow +# scripts, respectively. # #----------------------------------------------------------------------- # @@ -548,7 +557,7 @@ PPN_RUN_FCST=${PPN_RUN_FCST:-${ppn_run_fcst_default}} # #----------------------------------------------------------------------- # -# Make sure that the job scheduler set above is valid. +# Make sure SCHED is set to a valid value. # #----------------------------------------------------------------------- # From d8187acd7ebafc61df4e94a1a715e0ec930e2873 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 20 May 2022 17:40:02 -0600 Subject: [PATCH 18/26] Use the variable valid_vals_BOOLEAN provided in constants.sh to check validity of the value of generate_csv_file. Use the boolify() function to set its value to "TRUE" or "FALSE". --- tests/WE2E/get_WE2Etest_names_subdirs_descs.sh | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index c70f95ec0..45ddea539 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -401,7 +401,6 @@ function get_WE2Etest_names_subdirs_descs() { units \ ushdir \ val \ - valid_vals_generate_csv_file \ var_name \ var_name_at \ vars_to_extract @@ -438,6 +437,7 @@ function get_WE2Etest_names_subdirs_descs() { #----------------------------------------------------------------------- # ushdir=$( readlink -f "$WE2Edir/../../ush" ) + . $ushdir/constants.sh . $ushdir/set_predef_grid_params.sh . $ushdir/set_gridparams_GFDLgrid.sh . $ushdir/set_gridparams_ESGgrid.sh @@ -460,17 +460,8 @@ function get_WE2Etest_names_subdirs_descs() { # if [ ! -z "${generate_csv_file}" ]; then - valid_vals_generate_csv_file=("TRUE" "true" "YES" "yes" "FALSE" "false" "NO" "no") - check_var_valid_value "generate_csv_file" "valid_vals_generate_csv_file" - - generate_csv_file=${generate_csv_file^^} - if [ "${generate_csv_file}" = "TRUE" ] || \ - [ "${generate_csv_file}" = "YES" ]; then - generate_csv_file="TRUE" - elif [ "${generate_csv_file}" = "FALSE" ] || \ - [ "${generate_csv_file}" = "NO" ]; then - generate_csv_file="FALSE" - fi + check_var_valid_value "generate_csv_file" "valid_vals_BOOLEAN" + generate_csv_file=$(boolify "${generate_csv_file}") # # If generate_csv_file was not specified as an input argument in the # call to this function, then it will have been set above to a null From 803946847a645720e549b5e5de4b9910900c71a7 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Fri, 20 May 2022 17:44:43 -0600 Subject: [PATCH 19/26] Add quotes around argument to boolify() function to make sure it understands that an argument is being passed in even if that argument happens to be an empty string. --- tests/WE2E/get_WE2Etest_names_subdirs_descs.sh | 2 +- tests/WE2E/get_expts_status.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index 45ddea539..41d516f31 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -294,7 +294,7 @@ function get_WE2Etest_names_subdirs_descs() { # verbose=${verbose:-"FALSE"} check_var_valid_value "verbose" "valid_vals_BOOLEAN" - verbose=$(boolify $verbose) + verbose=$(boolify "$verbose") # #----------------------------------------------------------------------- # diff --git a/tests/WE2E/get_expts_status.sh b/tests/WE2E/get_expts_status.sh index b07c9ed23..a17b4e08f 100755 --- a/tests/WE2E/get_expts_status.sh +++ b/tests/WE2E/get_expts_status.sh @@ -145,7 +145,7 @@ num_log_lines=${num_log_lines:-"40"} # verbose=${verbose:-"FALSE"} check_var_valid_value "verbose" "valid_vals_BOOLEAN" -verbose=$(boolify $verbose) +verbose=$(boolify "$verbose") # #----------------------------------------------------------------------- # From eb9edb6b996ac199ee7d921d6f7611d6d80471d8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 21 May 2022 00:52:34 -0600 Subject: [PATCH 20/26] Edits to argument descriptions in the usage statement of run_WE2E_tests.sh. --- tests/WE2E/run_WE2E_tests.sh | 142 +++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 65 deletions(-) diff --git a/tests/WE2E/run_WE2E_tests.sh b/tests/WE2E/run_WE2E_tests.sh index 4d664185f..7d3d983fa 100755 --- a/tests/WE2E/run_WE2E_tests.sh +++ b/tests/WE2E/run_WE2E_tests.sh @@ -117,76 +117,79 @@ run. (A description of ACCOUNT can be found in the default experiment configuration file.) This is a required argument. expt_basedir: -Argument used to explicitly set the experiment variable EXPT_BASEDIR in -the experiment configuration files of all the WE2E tests the user wants -to run. (A description of EXPT_BASEDIR can be found in the default -experiment configuration file.) If expt_basedir is specified in the call -to this script, its value is used to set EXPT_BASEDIR in the configuration -files. If it is not specified, EXPT_BASEDIR is not set in the configuration -files, in which case the workflow generation script sets it to a default -value. Note that if expt_basedir is set to a relative path (e.g. -expt_basedir=\"testset1\" in the call to this script), then the workflow -generation script will set EXPT_BASEDIR for the experiment to a default -absolute path followed by \${expt_basedir}. This feature can be used to -group the WE2E tests into subdirectories for convenience, e.g. a set of -tests under subdirectory testset1, another set of tests under testset2, -etc. +Optional argument used to explicitly set the experiment variable +EXPT_BASEDIR in the experiment configuration files of all the WE2E tests +the user wants to run. (A description of EXPT_BASEDIR can be found in +the default experiment configuration file.) If expt_basedir is specified +in the call to this script, its value is used to set EXPT_BASEDIR in the +configuration files. If it is not specified, EXPT_BASEDIR is not set in +the configuration files, in which case the workflow generation script +sets it to a default value. Note that if expt_basedir is set to a +relative path (e.g. expt_basedir=\"testset1\" in the call to this script), +then the experiment generation script will set EXPT_BASEDIR for the +experiment to a default absolute path followed by \${expt_basedir}. +This feature can be used to group the WE2E tests into subdirectories for +convenience, e.g. a set of tests under subdirectory testset1, another +set of tests under testset2, etc. exec_subdir: -Optional. Argument used to set the EXEC_SUBDIR experiment variable. -Please see the default experiment configuration file \"config_defaults.sh\" -for a full description of EXEC_SUBDIR. +Optional argument used to explicitly set the experiment variable +EXEC_SUBDIR in the experiment configuration files of all the WE2E tests +the user wants to run. See the default experiment configuration file +\"config_defaults.sh\" for a full description of EXEC_SUBDIR. use_cron_to_relaunch: -Argument used to explicitly set the experiment variable USE_CRON_TO_RELAUNCH -in the experiment configuration files of all the WE2E tests the user wants -to run. (A description of USE_CRON_TO_RELAUNCH can be found in the default -experiment configuration file.) If use_cron_to_relaunch is specified in -the call to this script, its value is used to set USE_CRON_TO_RELAUNCH -in the configuration files. If it is not specified, USE_CRON_TO_RELAUNCH -is set to \"TRUE\" in the configuration files, in which case cron jobs -are used to (re)launch the workflows for all tests (one cron job per test). -Thus, use_cron_to_relaunch needs to be specified only if the user wants -to turn off use of cron jobs for all tests (by specifying use_cron_to_relaunch= -\"FALSE\" on the command line). Note that it is not possible to specify -a different value for USE_CRON_TO_RELAUNCH for each test via this argument; -either all tests use cron jobs or none do. +Optional argument used to explicitly set the experiment variable +USE_CRON_TO_RELAUNCH in the experiment configuration files of all the +WE2E tests the user wants to run. (A description of USE_CRON_TO_RELAUNCH +can be found in the default experiment configuration file.) If +use_cron_to_relaunch is specified in the call to this script, its value +is used to set USE_CRON_TO_RELAUNCH in the configuration files. If it +is not specified, USE_CRON_TO_RELAUNCH is set to \"TRUE\" in the +configuration files, in which case cron jobs are used to (re)launch the +workflows for all tests (one cron job per test). Thus, use_cron_to_relaunch +needs to be specified only if the user wants to turn off use of cron jobs +for all tests (by specifying use_cron_to_relaunch=\"FALSE\" on the command +line). Note that it is not possible to specify a different value for +USE_CRON_TO_RELAUNCH for each test via this argument; either all tests +use cron jobs or none do. cron_relaunch_intvl_mnts: -Argument used to explicitly set the experiment variable CRON_RELAUNCH_INTVL_MNTS -in the experiment configuration files of all the WE2E tests the user wants -to run. (A description of CRON_RELAUNCH_INTVL_MNTS can be found in the -default experiment configuration file.) If cron_relaunch_intvl_mnts is -specified in the call to this script, its value is used to set -CRON_RELAUNCH_INTVL_MNTS in the configuration files. If it is not -specified, CRON_RELAUNCH_INTVL_MNTS is set to \"02\" (i.e. two minutes) -in the configuration files. Note that it is not possible to specify a -different value for CRON_RELAUNCH_INTVL_MNTS for each test via this -argument; all tests will use the same value for USE_CRON_TO_RELAUNCH -(either the value specified in the call to this script or the default -value of \"02\"). Note also that the value of this argument matters only -if the argument use_cron_to_relaunch is not explicitly set to \"FALSE\" -in the call to this script. +Optional argument used to explicitly set the experiment variable +CRON_RELAUNCH_INTVL_MNTS in the experiment configuration files of +all the WE2E tests the user wants to run. (A description of +CRON_RELAUNCH_INTVL_MNTS can be found in the default experiment +configuration file.) If cron_relaunch_intvl_mnts is specified in the +call to this script, its value is used to set CRON_RELAUNCH_INTVL_MNTS +in the configuration files. If it is not specified, CRON_RELAUNCH_INTVL_MNTS +is set to \"02\" (i.e. two minutes) in the configuration files. Note +that it is not possible to specify a different value for +CRON_RELAUNCH_INTVL_MNTS for each test via this argument; all tests will +use the same value for USE_CRON_TO_RELAUNCH (either the value specified +in the call to this script or the default value of \"02\"). Note also +that the value of this argument matters only if the argument +use_cron_to_relaunch is not explicitly set to \"FALSE\" in the call to +this script. verbose: -Argument used to explicitly set the experiment variable VERBOSE in the -experiment configuration files of all the WE2E tests the user wants to -run. (A description of VERBOSE can be found in the default experiment -configuration file.) If verbose is specified in the call to this script, -its value is used to set VERBOSE in the configuration files. If it is -not specified, VERBOSE is set to \"TRUE\" in the configuration files. -Note that it is not possible to specify a different value for VERBOSE -for each test via this argument; either all tests will have VERBOSE set -to \"TRUE\" or all will have it set to \"FALSE\". +Optional argument used to explicitly set the experiment variable VERBOSE +in the experiment configuration files of all the WE2E tests the user +wants to run. (A description of VERBOSE can be found in the default +experiment configuration file.) If verbose is specified in the call to +this script, its value is used to set VERBOSE in the configuration files. +If it is not specified, VERBOSE is set to \"TRUE\" in the configuration +files. Note that it is not possible to specify a different value for +VERBOSE for each test via this argument; either all tests will have +VERBOSE set to \"TRUE\" or all will have it set to \"FALSE\". machine_file: -Optional argument to set the full path to a machine configuration file. -If not set, a supported platform machine file may be used. +Optional argument specifying the full path to a machine configuration +file. If not set, a supported platform machine file may be used. stmp: -Argument used to explicitly set the experiment variable STMP in the -experiment configuration files of all the WE2E tests the user wants to -run that are in NCO mode, i.e. they have test configuration files that +Optional argument used to explicitly set the experiment variable STMP in +the experiment configuration files of all the WE2E tests the user wants +to run that are in NCO mode, i.e. they have test configuration files that set the experiment variable RUN_ENVIR to \"nco\". (A description of STMP can be found in the default experiment configuration file.) If stmp is specified in the call to this script, its value is used to set @@ -208,14 +211,23 @@ Same as the argument \"stmp\" described above but for setting the experiment variable PTMP for all tests that will run in NCO mode. compiler: -Type of compiler to use for the workflow. Options are \"intel\" and \"gnu\". -Default is \"intel\". +Optional argument used to explicitly set the experiment variable COMPILER +in the experiment configuration files of all the WE2E tests the user +wants to run. (A description of COMPILER can be found in the default +experiment configuration file.) If compiler is specified in the call to +this script, its value is used to set COMPILER in the configuration files. +If it is not specified, COMPILER is set to \"intel\" in the configuration +files. Note that it is not possible to specify a different value for +COMPILER for each test via this argument; all tests will use the same +value for COMPILER (either the value specified in the call to this script +or the default value of \"intel\"). build_mod_fn: -Specify the build module files (see ufs-srweather-app/modulefiles) to -use for the workflow. (e.g. build_cheyenne_gnu). If a -\"gnu\" compiler is specified, it must also be specified with -the \"compiler\" option. +Optional argument used to explicitly set the experiment variable +BUILD_MOD_FN in the experiment configuration files of all the WE2E tests +the user wants to run (e.g. \"build_cheyenne_gnu\"). If the string +\"gnu\" appears in this file name, the \"compiler\" option to this +function must also be specified with the value \"gnu\". Usage Examples: @@ -483,7 +495,7 @@ done < "${user_spec_tests_fp}" # avail_WE2E_test_subdirs[7]="dir1" # avail_WE2E_test_subdirs[8]="dir2" # avail_WE2E_test_subdirs[9]="dir3" -# +# #----------------------------------------------------------------------- # print_info_msg " From 0978a4de4a2a99c0e0084f944803750de0884b1c Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 21 May 2022 01:17:09 -0600 Subject: [PATCH 21/26] Add the boolean flag "generate_csv_file" as an input argument to the script run_WE2E_tests.sh in order to allow users to prevent creation of a CSV file containing WE2E test information (since this can take a while). Default value of this argument is "TRUE", so users have to explicitly set it to "FALSE" on the command line to prevent generation of the CSV file. --- tests/WE2E/run_WE2E_tests.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/WE2E/run_WE2E_tests.sh b/tests/WE2E/run_WE2E_tests.sh index 7d3d983fa..ee0527dab 100755 --- a/tests/WE2E/run_WE2E_tests.sh +++ b/tests/WE2E/run_WE2E_tests.sh @@ -90,6 +90,7 @@ Usage: [use_cron_to_relaunch=\"...\"] \\ [cron_relaunch_intvl_mnts=\"...\"] \\ [verbose=\"...\"] \\ + [generate_csv_file=\"...\"] \\ [machine_file=\"...\"] \\ [stmp=\"...\"] \\ [ptmp=\"...\"] \\ @@ -182,6 +183,11 @@ files. Note that it is not possible to specify a different value for VERBOSE for each test via this argument; either all tests will have VERBOSE set to \"TRUE\" or all will have it set to \"FALSE\". +generate_csv_file: +Optional argument that specifies whether or not to generate a CSV file +containing summary information about all the tests available in the WE2E +testing system. Default value is \"TRUE\". + machine_file: Optional argument specifying the full path to a machine configuration file. If not set, a supported platform machine file may be used. @@ -332,6 +338,7 @@ valid_args=( \ "use_cron_to_relaunch" \ "cron_relaunch_intvl_mnts" \ "verbose" \ + "generate_csv_file" \ "machine_file" \ "stmp" \ "ptmp" \ @@ -503,6 +510,7 @@ Getting information about all available WE2E tests..." get_WE2Etest_names_subdirs_descs \ WE2Edir="${WE2Edir}" \ + generate_csv_file="${generate_csv_file}" \ outvarname_test_configs_basedir="avail_WE2E_test_configs_basedir" \ outvarname_test_names="avail_WE2E_test_names" \ outvarname_test_subdirs="avail_WE2E_test_subdirs" \ From e88ea11cdf373b9951cfe9583dfa56f299364255 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Sat, 21 May 2022 01:22:16 -0600 Subject: [PATCH 22/26] Use the same method as other variables to set the experiment variable EXEC_SUBDIR via the input argument exec_subdir. --- tests/WE2E/run_WE2E_tests.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/WE2E/run_WE2E_tests.sh b/tests/WE2E/run_WE2E_tests.sh index ee0527dab..b2c8c537c 100755 --- a/tests/WE2E/run_WE2E_tests.sh +++ b/tests/WE2E/run_WE2E_tests.sh @@ -779,6 +779,7 @@ Please correct and rerun." BUILD_MOD_FN=${build_mod_fn:-"build_${machine}_${COMPILER}"} EXPT_BASEDIR="${expt_basedir}" EXPT_SUBDIR="${test_name}" + EXEC_SUBDIR="${exec_subdir}" USE_CRON_TO_RELAUNCH=${use_cron_to_relaunch:-"TRUE"} CRON_RELAUNCH_INTVL_MNTS=${cron_relaunch_intvl_mnts:-"02"} VERBOSE=${verbose:-"TRUE"} @@ -803,9 +804,9 @@ ACCOUNT=\"${ACCOUNT}\" COMPILER=\"${COMPILER}\" BUILD_MOD_FN=\"${BUILD_MOD_FN}\"" - if [ -n "${exec_subdir}" ]; then + if [ -n "${EXEC_SUBDIR}" ]; then expt_config_str=${expt_config_str}" -EXEC_SUBDIR=\"${exec_subdir}\"" +EXEC_SUBDIR=\"${EXEC_SUBDIR}\"" fi if [ -n "${EXPT_BASEDIR}" ]; then From 4d1deedbab720ed35e9644ec5b361c70789abc38 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 23 May 2022 10:37:19 -0600 Subject: [PATCH 23/26] For boolean experiment variables, remove the corresponding "valid_vals_..." variables from valid_param_vals.sh since they can now all be replaced with valid_vals_BOOLEAN. In setup.sh, add validity checks for skipped boolean variables and place other checks into related groups. --- ush/setup.sh | 137 +++++++++++++++++++++++----------------- ush/valid_param_vals.sh | 29 --------- 2 files changed, 80 insertions(+), 86 deletions(-) diff --git a/ush/setup.sh b/ush/setup.sh index fa608515d..eb2ae44f0 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -137,17 +137,20 @@ fi # Make sure that user-defined variables are set to valid values # # Set binary switch variables to either "TRUE" or "FALSE" by calling -# boolify so we don't have to consider other valid values later on +# boolify so we don't have to consider other valid values later on. # #----------------------------------------------------------------------- # check_var_valid_value "RUN_ENVIR" "valid_vals_RUN_ENVIR" -check_var_valid_value "VERBOSE" "valid_vals_VERBOSE" +check_var_valid_value "VERBOSE" "valid_vals_BOOLEAN" VERBOSE=$(boolify "$VERBOSE") -check_var_valid_value "DEBUG" "valid_vals_DEBUG" +check_var_valid_value "DEBUG" "valid_vals_BOOLEAN" DEBUG=$(boolify "$DEBUG") + +check_var_valid_value "USE_CRON_TO_RELAUNCH" "valid_vals_BOOLEAN" +USE_CRON_TO_RELAUNCH=$(boolify "${USE_CRON_TO_RELAUNCH}") # #----------------------------------------------------------------------- # @@ -161,53 +164,78 @@ if [ "$DEBUG" = "TRUE" ]; then Setting VERBOSE to \"TRUE\" because DEBUG has been set to \"TRUE\"..." VERBOSE="TRUE" fi - -check_var_valid_value "USE_CRON_TO_RELAUNCH" "valid_vals_USE_CRON_TO_RELAUNCH" -USE_CRON_TO_RELAUNCH=$(boolify "${USE_CRON_TO_RELAUNCH}") - -check_var_valid_value "RUN_TASK_MAKE_GRID" "valid_vals_RUN_TASK_MAKE_GRID" +# +#----------------------------------------------------------------------- +# +# Check flags that turn on/off various workflow tasks. +# +#----------------------------------------------------------------------- +# +check_var_valid_value "RUN_TASK_MAKE_GRID" "valid_vals_BOOLEAN" RUN_TASK_MAKE_GRID=$(boolify "${RUN_TASK_MAKE_GRID}") -check_var_valid_value "RUN_TASK_MAKE_OROG" "valid_vals_RUN_TASK_MAKE_OROG" +check_var_valid_value "RUN_TASK_MAKE_OROG" "valid_vals_BOOLEAN" RUN_TASK_MAKE_OROG=$(boolify "${RUN_TASK_MAKE_OROG}") -check_var_valid_value \ - "RUN_TASK_MAKE_SFC_CLIMO" "valid_vals_RUN_TASK_MAKE_SFC_CLIMO" +check_var_valid_value "RUN_TASK_MAKE_SFC_CLIMO" "valid_vals_BOOLEAN" RUN_TASK_MAKE_SFC_CLIMO=$(boolify "${RUN_TASK_MAKE_SFC_CLIMO}") -check_var_valid_value \ - "RUN_TASK_RUN_POST" "valid_vals_RUN_TASK_RUN_POST" +check_var_valid_value "RUN_TASK_GET_EXTRN_ICS" "valid_vals_BOOLEAN" +RUN_TASK_GET_EXTRN_ICS=$(boolify "${RUN_TASK_GET_EXTRN_ICS}") + +check_var_valid_value "RUN_TASK_GET_EXTRN_LBCS" "valid_vals_BOOLEAN" +RUN_TASK_GET_EXTRN_LBCS=$(boolify "${RUN_TASK_GET_EXTRN_LBCS}") + +check_var_valid_value "RUN_TASK_RUN_FCST" "valid_vals_BOOLEAN" +RUN_TASK_RUN_FCST=$(boolify "${RUN_TASK_RUN_FCST}") + +check_var_valid_value "RUN_TASK_RUN_POST" "valid_vals_BOOLEAN" RUN_TASK_RUN_POST=$(boolify "${RUN_TASK_RUN_POST}") -check_var_valid_value "RUN_TASK_VX_GRIDSTAT" "valid_vals_RUN_TASK_VX_GRIDSTAT" +check_var_valid_value "RUN_TASK_GET_OBS_CCPA" "valid_vals_BOOLEAN" +RUN_TASK_GET_OBS_CCPA=$(boolify "${RUN_TASK_GET_OBS_CCPA}") + +check_var_valid_value "RUN_TASK_GET_OBS_MRMS" "valid_vals_BOOLEAN" +RUN_TASK_GET_OBS_MRMS=$(boolify "${RUN_TASK_GET_OBS_MRMS}") + +check_var_valid_value "RUN_TASK_GET_OBS_NDAS" "valid_vals_BOOLEAN" +RUN_TASK_GET_OBS_NDAS=$(boolify "${RUN_TASK_GET_OBS_NDAS}") + +check_var_valid_value "RUN_TASK_VX_GRIDSTAT" "valid_vals_BOOLEAN" RUN_TASK_VX_GRIDSTAT=$(boolify "${RUN_TASK_VX_GRIDSTAT}") -check_var_valid_value "RUN_TASK_VX_POINTSTAT" "valid_vals_RUN_TASK_VX_POINTSTAT" +check_var_valid_value "RUN_TASK_VX_POINTSTAT" "valid_vals_BOOLEAN" RUN_TASK_VX_POINTSTAT=$(boolify "${RUN_TASK_VX_POINTSTAT}") -check_var_valid_value "RUN_TASK_VX_ENSGRID" "valid_vals_RUN_TASK_VX_ENSGRID" +check_var_valid_value "RUN_TASK_VX_ENSGRID" "valid_vals_BOOLEAN" RUN_TASK_VX_ENSGRID=$(boolify "${RUN_TASK_VX_ENSGRID}") -check_var_valid_value "RUN_TASK_VX_ENSPOINT" "valid_vals_RUN_TASK_VX_ENSPOINT" +check_var_valid_value "RUN_TASK_VX_ENSPOINT" "valid_vals_BOOLEAN" RUN_TASK_VX_ENSPOINT=$(boolify "${RUN_TASK_VX_ENSPOINT}") - -check_var_valid_value "USE_FVCOM" "valid_vals_USE_FVCOM" -USE_FVCOM=$(boolify "${USE_FVCOM}") - -check_var_valid_value "DO_SHUM" "valid_vals_DO_SHUM" +# +#----------------------------------------------------------------------- +# +# Check stochastic physcs flags. +# +#----------------------------------------------------------------------- +# +check_var_valid_value "DO_SHUM" "valid_vals_BOOLEAN" DO_SHUM=$(boolify "${DO_SHUM}") -check_var_valid_value "DO_SPPT" "valid_vals_DO_SPPT" +check_var_valid_value "DO_SPPT" "valid_vals_BOOLEAN" DO_SPPT=$(boolify "${DO_SPPT}") -check_var_valid_value "DO_SKEB" "valid_vals_DO_SKEB" +check_var_valid_value "DO_SKEB" "valid_vals_BOOLEAN" DO_SKEB=$(boolify "${DO_SKEB}") -check_var_valid_value "DO_SPP" "valid_vals_DO_SPP" +check_var_valid_value "DO_SPP" "valid_vals_BOOLEAN" DO_SPP=$(boolify "${DO_SPP}") -check_var_valid_value "DO_LSM_SPP" "valid_vals_DO_LSM_SPP" +check_var_valid_value "DO_LSM_SPP" "valid_vals_BOOLEAN" DO_LSM_SPP=$(boolify "${DO_LSM_SPP}") + +check_var_valid_value "USE_ZMTNBLCK" "valid_vals_BOOLEAN" +USE_ZMTNBLCK=$(boolify "${USE_ZMTNBLCK}") # #----------------------------------------------------------------------- # @@ -311,11 +339,6 @@ fi # #----------------------------------------------------------------------- # -check_var_valid_value "SUB_HOURLY_POST" "valid_vals_SUB_HOURLY_POST" -SUB_HOURLY_POST=$(boolify "${SUB_HOURLY_POST}") -# -#----------------------------------------------------------------------- -# # Make sure that DOT_OR_USCORE is set to a valid value. # #----------------------------------------------------------------------- @@ -331,8 +354,9 @@ check_var_valid_value "DOT_OR_USCORE" "valid_vals_DOT_OR_USCORE" # #----------------------------------------------------------------------- # -check_var_valid_value "USE_FVCOM" "valid_vals_USE_FVCOM" +check_var_valid_value "USE_FVCOM" "valid_vals_BOOLEAN" USE_FVCOM=$(boolify "${USE_FVCOM}") + check_var_valid_value "FVCOM_WCSTART" "valid_vals_FVCOM_WCSTART" FVCOM_WCSTART=$(echo_lowercase $FVCOM_WCSTART) # @@ -462,7 +486,6 @@ The base directory in which the UPP source code should be located Please clone the external repository containing the code in this directory, build the executable, and then rerun the workflow." fi - # # Define some other useful paths # @@ -478,7 +501,6 @@ TEMPLATE_DIR="$USHDIR/templates" VX_CONFIG_DIR="$TEMPLATE_DIR/parm" METPLUS_CONF="$TEMPLATE_DIR/parm/metplus" MET_CONFIG="$TEMPLATE_DIR/parm/met" - # #----------------------------------------------------------------------- # @@ -519,8 +541,6 @@ One or more fix file directories have not been specified for this machine: DOMAIN_PREGEN_BASEDIR = \"${DOMAIN_PREGEN_BASEDIR:-\"\"} You can specify the missing location(s) in ${machine_file}" fi - - # #----------------------------------------------------------------------- # @@ -644,11 +664,7 @@ check_var_valid_value \ # #----------------------------------------------------------------------- # -check_var_valid_value "USE_MERRA_CLIMO" "valid_vals_USE_MERRA_CLIMO" -# -# Set USE_MERRA_CLIMO to either "TRUE" or "FALSE" so we don't -# have to consider other valid values later on. -# +check_var_valid_value "USE_MERRA_CLIMO" "valid_vals_BOOLEAN" USE_MERRA_CLIMO=$(boolify "${USE_MERRA_CLIMO}") # Force to "TRUE" in case of FV3_GFS_v15_thompson_mynn_lam3km: if [ "${CCPP_PHYS_SUITE}" = "FV3_GFS_v15_thompson_mynn_lam3km" ]; then @@ -824,6 +840,9 @@ fi # #----------------------------------------------------------------------- # +check_var_valid_value "USE_CUSTOM_POST_CONFIG_FILE" "valid_vals_BOOLEAN" +USE_CUSTOM_POST_CONFIG_FILE=$(boolify "${USE_CUSTOM_POST_CONFIG_FILE}") + if [ ${USE_CUSTOM_POST_CONFIG_FILE} = "TRUE" ]; then if [ ! -f "${CUSTOM_POST_CONFIG_FP}" ]; then print_err_msg_exit " @@ -835,12 +854,16 @@ fi # #----------------------------------------------------------------------- # -# If using external CRTM fix files to allow post-processing of synthetic -# satellite products from the UPP, then make sure the fix file directory -# exists. +# Ensure that USE_CRTM is set to a valid value. Then, if it is set to +# "TRUE" (i.e. if using external CRTM fix files to allow post-processing +# of synthetic satellite products from the UPP, make sure that the fix +# file directory exists. # #----------------------------------------------------------------------- # +check_var_valid_value "USE_CRTM" "valid_vals_BOOLEAN" +USE_CRTM=$(boolify "${USE_CRTM}") + if [ ${USE_CRTM} = "TRUE" ]; then if [ ! -d "${CRTM_DIR}" ]; then print_err_msg_exit " @@ -1041,6 +1064,9 @@ fi # #----------------------------------------------------------------------- # +check_var_valid_value "SUB_HOURLY_POST" "valid_vals_BOOLEAN" +SUB_HOURLY_POST=$(boolify "${SUB_HOURLY_POST}") + if [ "${SUB_HOURLY_POST}" = "TRUE" ]; then # # Check that DT_SUBHOURLY_POST_MNTS is a string consisting of one or two @@ -1410,11 +1436,6 @@ FIELD_TABLE_FP="${EXPTDIR}/${FIELD_TABLE_FN}" FV3_NML_FN="${FV3_NML_BASE_SUITE_FN%.*}" FV3_NML_FP="${EXPTDIR}/${FV3_NML_FN}" NEMS_CONFIG_FP="${EXPTDIR}/${NEMS_CONFIG_FN}" - - -check_var_valid_value "USE_USER_STAGED_EXTRN_FILES" "valid_vals_USE_USER_STAGED_EXTRN_FILES" -USE_USER_STAGED_EXTRN_FILES=$(boolify "${USE_USER_STAGED_EXTRN_FILES}") - # #----------------------------------------------------------------------- # @@ -1424,6 +1445,9 @@ USE_USER_STAGED_EXTRN_FILES=$(boolify "${USE_USER_STAGED_EXTRN_FILES}") # #----------------------------------------------------------------------- # +check_var_valid_value "USE_USER_STAGED_EXTRN_FILES" "valid_vals_BOOLEAN" +USE_USER_STAGED_EXTRN_FILES=$(boolify "${USE_USER_STAGED_EXTRN_FILES}") + if [ "${USE_USER_STAGED_EXTRN_FILES}" = "TRUE" ]; then # Check for the base directory up to the first templated field. @@ -1442,6 +1466,9 @@ external model files for generating LBCs should be located does not exist: fi fi + +check_var_valid_value "NOMADS" "valid_vals_BOOLEAN" +NOMADS=$(boolify "${NOMADS}") # #----------------------------------------------------------------------- # @@ -1452,7 +1479,7 @@ fi # #----------------------------------------------------------------------- # -check_var_valid_value "DO_ENSEMBLE" "valid_vals_DO_ENSEMBLE" +check_var_valid_value "DO_ENSEMBLE" "valid_vals_BOOLEAN" DO_ENSEMBLE=$(boolify "${DO_ENSEMBLE}") NDIGITS_ENSMEM_NAMES="0" @@ -2049,11 +2076,7 @@ fi # #----------------------------------------------------------------------- # -check_var_valid_value "WRITE_DOPOST" "valid_vals_WRITE_DOPOST" -# -# Set WRITE_DOPOST to either "TRUE" or "FALSE" so we don't have to consider -# other valid values later on. -# +check_var_valid_value "WRITE_DOPOST" "valid_vals_BOOLEAN" WRITE_DOPOST=$(boolify "${WRITE_DOPOST}") if [ "$WRITE_DOPOST" = "TRUE" ] ; then @@ -2068,10 +2091,10 @@ SUB_HOURLY_POST is NOT available with Inline Post yet." fi fi -check_var_valid_value "QUILTING" "valid_vals_QUILTING" +check_var_valid_value "QUILTING" "valid_vals_BOOLEAN" QUILTING=$(boolify "$QUILTING") -check_var_valid_value "PRINT_ESMF" "valid_vals_PRINT_ESMF" +check_var_valid_value "PRINT_ESMF" "valid_vals_BOOLEAN" PRINT_ESMF=$(boolify "${PRINT_ESMF}") # diff --git a/ush/valid_param_vals.sh b/ush/valid_param_vals.sh index e7870e5cd..c3b0fe8f9 100644 --- a/ush/valid_param_vals.sh +++ b/ush/valid_param_vals.sh @@ -6,8 +6,6 @@ # Define valid values for various global experiment/workflow variables. # valid_vals_RUN_ENVIR=("nco" "community") -valid_vals_VERBOSE=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_DEBUG=( ${valid_vals_BOOLEAN[@]} ) valid_vals_MACHINE=("WCOSS_DELL_P3" "HERA" "ORION" "JET" "ODIN" "CHEYENNE" "STAMPEDE" "LINUX" "MACOS" "NOAACLOUD" "SINGULARITY" "GAEA") valid_vals_SCHED=("slurm" "pbspro" "lsf" "lsfcray" "none") valid_vals_FCST_MODEL=("ufs-weather-model" "fv3gfs_aqm") @@ -50,40 +48,13 @@ valid_vals_CCPP_PHYS_SUITE=( \ valid_vals_GFDLgrid_RES=("48" "96" "192" "384" "768" "1152" "3072") valid_vals_EXTRN_MDL_NAME_ICS=("GSMGFS" "FV3GFS" "RAP" "HRRR" "NAM") valid_vals_EXTRN_MDL_NAME_LBCS=("GSMGFS" "FV3GFS" "RAP" "HRRR" "NAM") -valid_vals_USE_USER_STAGED_EXTRN_FILES=( ${valid_vals_BOOLEAN[@]} ) valid_vals_FV3GFS_FILE_FMT_ICS=("nemsio" "grib2" "netcdf") valid_vals_FV3GFS_FILE_FMT_LBCS=("nemsio" "grib2" "netcdf") valid_vals_GRID_GEN_METHOD=("GFDLgrid" "ESGgrid") valid_vals_PREEXISTING_DIR_METHOD=("delete" "rename" "quit") valid_vals_GTYPE=("regional") valid_vals_WRTCMP_output_grid=("rotated_latlon" "lambert_conformal" "regional_latlon") -valid_vals_RUN_TASK_MAKE_GRID=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_MAKE_OROG=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_MAKE_SFC_CLIMO=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_RUN_POST=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_WRITE_DOPOST=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_VX_GRIDSTAT=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_VX_POINTSTAT=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_VX_ENSGRID=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_RUN_TASK_VX_ENSPOINT=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_QUILTING=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_PRINT_ESMF=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_USE_CRON_TO_RELAUNCH=( ${valid_vals_BOOLEAN[@]} ) valid_vals_DOT_OR_USCORE=("." "_") -valid_vals_NOMADS=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_NOMADS_file_type=("GRIB2" "grib2" "NEMSIO" "nemsio") -valid_vals_DO_ENSEMBLE=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_USE_CUSTOM_POST_CONFIG_FILE=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_USE_CRTM=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_DO_SHUM=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_DO_SPPT=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_DO_SPP=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_DO_LSM_SPP=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_DO_SKEB=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_USE_ZMTNBLCK=( ${valid_vals_BOOLEAN[@]} ) -valid_vals_USE_FVCOM=( ${valid_vals_BOOLEAN[@]} ) valid_vals_FVCOM_WCSTART=("warm" "WARM" "cold" "COLD") valid_vals_COMPILER=("intel" "gnu") -valid_vals_SUB_HOURLY_POST=( ${valid_vals_BOOLEAN[@]} ) valid_vals_DT_SUBHOURLY_POST_MNTS=("1" "01" "2" "02" "3" "03" "4" "04" "5" "05" "6" "06" "10" "12" "15" "20" "30") -valid_vals_USE_MERRA_CLIMO=( ${valid_vals_BOOLEAN[@]} ) From 0f1e896af6a757624962ba55ab8c4c5b32b43b9d Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 23 May 2022 16:37:11 -0600 Subject: [PATCH 24/26] Bug fix in the way __wrtcmp_write_tasks_per_group__ is set. --- ush/set_predef_grid_params.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/ush/set_predef_grid_params.sh b/ush/set_predef_grid_params.sh index 9c9800381..71c3d12a7 100644 --- a/ush/set_predef_grid_params.sh +++ b/ush/set_predef_grid_params.sh @@ -355,7 +355,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -401,7 +401,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -447,7 +447,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -494,7 +494,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -540,7 +540,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -588,7 +588,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -638,7 +638,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -663,7 +663,7 @@ function set_predef_grid_params() { # using the NCL code and work. # if [ "$quilting" = "TRUE" ]; then # __wrtcmp_write_groups__="1" -# __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) +# __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) # __wrtcmp_output_grid__="rotated_latlon" # __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" # __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -759,7 +759,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -813,7 +813,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="lambert_conformal" __wrtcmp_cen_lon__="${__esggrid_lon_ctr__}" __wrtcmp_cen_lat__="${__esggrid_lat_ctr__}" @@ -870,7 +870,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="rotated_latlon" __wrtcmp_cen_lon__="${__gfdlgrid_lon_t6_ctr__}" __wrtcmp_cen_lat__="${__gfdlgrid_lat_t6_ctr__}" @@ -925,7 +925,7 @@ function set_predef_grid_params() { if [ "$quilting" = "TRUE" ]; then __wrtcmp_write_groups__="1" - __wrtcmp_write_tasks_per_group__=$(( 1*layout_y )) + __wrtcmp_write_tasks_per_group__=$(( 1*__layout_y__ )) __wrtcmp_output_grid__="rotated_latlon" __wrtcmp_cen_lon__="${__gfdlgrid_lon_t6_ctr__}" __wrtcmp_cen_lat__="${__gfdlgrid_lat_t6_ctr__}" From 4152dfb2f626c09371899d4586abbb54c70311b8 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Mon, 23 May 2022 18:29:17 -0600 Subject: [PATCH 25/26] Remove obsolete argument. --- ush/setup.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/ush/setup.sh b/ush/setup.sh index eb2ae44f0..e15dad5c2 100755 --- a/ush/setup.sh +++ b/ush/setup.sh @@ -1900,7 +1900,6 @@ if [ "${GRID_GEN_METHOD}" = "GFDLgrid" ]; then iend_of_t7_on_t6g="${GFDLgrid_IEND_OF_RGNL_DOM_ON_T6G}" \ jstart_of_t7_on_t6g="${GFDLgrid_JSTART_OF_RGNL_DOM_ON_T6G}" \ jend_of_t7_on_t6g="${GFDLgrid_JEND_OF_RGNL_DOM_ON_T6G}" \ - run_envir="${RUN_ENVIR}" \ verbose="${VERBOSE}" \ outvarname_lon_of_t7_ctr="LON_CTR" \ outvarname_lat_of_t7_ctr="LAT_CTR" \ From 14679b4c7b3827add43aaa07717259b528337572 Mon Sep 17 00:00:00 2001 From: gerard ketefian Date: Wed, 25 May 2022 17:01:56 -0600 Subject: [PATCH 26/26] Edits to comments. --- .../WE2E/get_WE2Etest_names_subdirs_descs.sh | 26 ++++++++++++------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh index 41d516f31..57262e926 100755 --- a/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh +++ b/tests/WE2E/get_WE2Etest_names_subdirs_descs.sh @@ -1720,10 +1720,9 @@ Please correct and rerun." # located in (the latter in parentheses). # # Column 2: -# The alternate test names (if any) followed by their subdirectories -# (in parentheses). Each alternate test name and subdirectory pair is -# followed by a newline, but all lines will appear in a single cell of -# the spreadsheet. +# Any alternate test names followed by their category subdirectories (in +# parentheses). Each alternate test name and subdirectory pair is followed +# by a newline, but all lines will appear in a single cell of the spreadsheet. # # Column 3: # The test description. @@ -1734,11 +1733,20 @@ Please correct and rerun." # # Column 5: # The number of times the forecast model will be run by the test. This -# has been calculated above using the quantities that go in Columns 6, -# 7, .... -# -# Columns 6...: -# The values of the experiment variables specified in vars_to_extract. +# is calculated using quantities such as the number of cycle dates (i.e. +# forecast model start dates) and the number of of ensemble members (which +# is greater than 1 if running ensemble forecasts and 1 otherwise). The +# latter are in turn obtained directly or indirectly from the quantities +# in Columns 6, 7, .... +# +# Columns 6, 7, ...: +# The values of the experiment variables specified in vars_to_extract, +# plus DT_ATMOS (included right after FCST_LEN_HRS). Note that DT_ATMOS +# cannot be included in vars_to_extract because it is usually not in the +# WE2E test configuration file where this script looks for these variables +# (because most of the tests use predefined grids, and for those cases, +# DT_ATMOS is defined in the same file/script where the other grid +# parameters are defined). # row_content="\ \"${prim_test_name_subdir}\" ${csv_delimiter} \