Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
f23ca89
Modify workflow to enable ensemble forecasts.
gsketefian Jun 25, 2020
1d91940
Merge branch 'develop' into feature/ensemble
gsketefian Jun 25, 2020
bb99232
Minor changes to code comments.
gsketefian Jun 25, 2020
c05ad2c
Apparently there is now a requirement in the FV3 code that consv_te b…
gsketefian Jun 26, 2020
27ee081
Bug fix in a diag_table that should already be in the develop branch.
gsketefian Jun 26, 2020
5646c0c
Bug fix -- Fix inconsistency in the way the ensemble member directori…
gsketefian Jun 29, 2020
aebc3c5
Add new WE2E test to test use of leading zeros in ensemble member names.
gsketefian Jun 29, 2020
a61e763
Merge branch 'develop' into feature/ensemble
gsketefian Jun 29, 2020
838a55c
Merge branch 'develop' into feature/ensemble
gsketefian Jun 30, 2020
97c5c8b
Change directory structure so that ensemble member directories are be…
gsketefian Jul 9, 2020
a87be29
Merge branch 'develop' into feature/ensemble
gsketefian Jul 10, 2020
a40ae66
Bug fixes. These bugs were introduced during the previous merge of t…
gsketefian Jul 10, 2020
b3c3996
To test the multiple-days and multiple-cycle-hours capabilities with …
gsketefian Jul 10, 2020
67243bc
Add WCOSS changes for the feature/ensemble branch
Jul 16, 2020
cc78af6
Minor changes to code comments.
gsketefian Jul 20, 2020
f945635
Merge remote-tracking branch 'origin/feature/ensemble' into feature/e…
gsketefian Jul 20, 2020
279c15f
Move creation of model_config file from the experiment generation ste…
gsketefian Jul 24, 2020
5d209f2
Merge branch 'develop' into bugfix/move_model_config
gsketefian Jul 24, 2020
1f6cfc3
Remove unneeded file.
gsketefian Jul 24, 2020
14facad
Order WE2E test names alphabetically.
gsketefian Jul 24, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions jobs/JREGIONAL_RUN_FCST
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ mkdir_vrfy -p ${run_dir}/RESTART
#-----------------------------------------------------------------------
#
$SCRIPTSDIR/exregional_run_fcst.sh \
cdate="${CDATE}" \
cycle_dir="${CYCLE_DIR}" \
ensmem_indx="${ENSMEM_INDX}" \
slash_ensmem_subdir="${SLASH_ENSMEM_SUBDIR}" || \
Expand Down
36 changes: 28 additions & 8 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
#
#-----------------------------------------------------------------------
#
# Source other necessary files.
#
#-----------------------------------------------------------------------
#
. $USHDIR/create_model_config_file.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
Expand Down Expand Up @@ -56,6 +64,7 @@ specified cycle.
#-----------------------------------------------------------------------
#
valid_args=( \
"cdate" \
"cycle_dir" \
"ensmem_indx" \
"slash_ensmem_subdir" \
Expand Down Expand Up @@ -409,24 +418,35 @@ if [ "${USE_CCPP}" = "TRUE" ]; then
fi

fi
#-----------------------------------------------------------------------
#
# Call the function that creates the model configuration file within each
# cycle directory.
#
#-----------------------------------------------------------------------
#
create_model_config_file \
cdate="$cdate" \
run_dir="${run_dir}" || print_err_msg_exit "\
Call to function to create a model configuration file for the current
cycle's (cdate) run directory (run_dir) failed:
cdate = \"${cdate}\"
run_dir = \"${run_dir}\""
#
#-----------------------------------------------------------------------
#
# If running enemble forecasts, create links to the cycle-specific
# diagnostic tables file and model configuration file in the cycle
# directory. Note that these links should not be made if not running
# ensemble forecasts because in that case, the cycle directory is the
# run directory (and we would be creating a symlink with the name of a
# file that already exists).
# If running enemble forecasts, create a link to the cycle-specific
# diagnostic tables file in the cycle directory. Note that this link
# should not be made if not running ensemble forecasts because in that
# case, the cycle directory is the run directory (and we would be creating
# a symlink with the name of a file that already exists).
#
#-----------------------------------------------------------------------
#
if [ "${DO_ENSEMBLE}" = "TRUE" ]; then
relative_or_null="--relative"
diag_table_fp="${cycle_dir}/${DIAG_TABLE_FN}"
ln_vrfy -sf ${relative_or_null} ${diag_table_fp} ${run_dir}
model_config_fp="${cycle_dir}/${MODEL_CONFIG_FN}"
ln_vrfy -sf ${relative_or_null} ${model_config_fp} ${run_dir}
fi
#
#-----------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion tests/baselines_list.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GSD_RAP13km
community_ensemble_2mems
community_ensemble_008mems
community_ensemble_2mems
nco_conus
nco_conus_c96
nco_ensemble
Expand Down
175 changes: 175 additions & 0 deletions ush/create_model_config_file.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
#
#-----------------------------------------------------------------------
#
# This file defines a function that creates a model configuration file
# for the specified cycle.
#
#-----------------------------------------------------------------------
#
function create_model_config_file() {
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
#-----------------------------------------------------------------------
#
{ save_shell_opts; set -u -x; } > /dev/null 2>&1
#
#-----------------------------------------------------------------------
#
# Get the full path to the file in which this script/function is located
# (scrfunc_fp), the name of that file (scrfunc_fn), and the directory in
# which the file is located (scrfunc_dir).
#
#-----------------------------------------------------------------------
#
local scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
local scrfunc_fn=$( basename "${scrfunc_fp}" )
local scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
#-----------------------------------------------------------------------
#
# Get the name of this function.
#
#-----------------------------------------------------------------------
#
local func_name="${FUNCNAME[0]}"
#
#-----------------------------------------------------------------------
#
# 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=(
cdate \
run_dir \
)
process_args valid_args "$@"
#
#-----------------------------------------------------------------------
#
# 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
#
#-----------------------------------------------------------------------
#
# Declare local variables.
#
#-----------------------------------------------------------------------
#
local i \
model_config_fp \
yyyy \
mm \
dd \
hh \
mm \
dot_quilting_dot \
dot_print_esmf_dot
#
#-----------------------------------------------------------------------
#
# Create a model configuration file within each cycle directory.
#
#-----------------------------------------------------------------------
#
print_info_msg "$VERBOSE" "
Creating a model configuration file (\"${MODEL_CONFIG_FN}\") within each
cycle directory..."
#
# Copy template of cycle-dependent model configure files from the templates
# directory to the current cycle directory.
#
model_config_fp="${run_dir}/${MODEL_CONFIG_FN}"
cp_vrfy "${MODEL_CONFIG_TMPL_FP}" "${model_config_fp}"
#
# Extract from cdate the starting year, month, day, and hour of the forecast.
#
yyyy=${cdate:0:4}
mm=${cdate:4:2}
dd=${cdate:6:2}
hh=${cdate:8:2}
#
# Set parameters in the model configure file.
#
dot_quilting_dot="."${QUILTING,,}"."
dot_print_esmf_dot="."${PRINT_ESMF,,}"."

set_file_param "${model_config_fp}" "PE_MEMBER01" "${PE_MEMBER01}"
set_file_param "${model_config_fp}" "dt_atmos" "${DT_ATMOS}"
set_file_param "${model_config_fp}" "start_year" "$yyyy"
set_file_param "${model_config_fp}" "start_month" "$mm"
set_file_param "${model_config_fp}" "start_day" "$dd"
set_file_param "${model_config_fp}" "start_hour" "$hh"
set_file_param "${model_config_fp}" "nhours_fcst" "${FCST_LEN_HRS}"
set_file_param "${model_config_fp}" "ncores_per_node" "${NCORES_PER_NODE}"
set_file_param "${model_config_fp}" "quilting" "${dot_quilting_dot}"
set_file_param "${model_config_fp}" "print_esmf" "${dot_print_esmf_dot}"
#
#-----------------------------------------------------------------------
#
# If the write component is to be used, then a set of parameters, including
# those that define the write component's output grid, need to be specified
# in the model configuration file (model_config_fp). This is done by
# appending a template file (in which some write-component parameters are
# set to actual values while others are set to placeholders) to model_config_fp
# and then replacing the placeholder values in the (new) model_config_fp
# file with actual values. The full path of this template file is specified
# in the workflow variable WRTCMP_PARAMS_TMPL_FP.
#
#-----------------------------------------------------------------------
#
if [ "$QUILTING" = "TRUE" ]; then

cat ${WRTCMP_PARAMS_TMPL_FP} >> ${model_config_fp}

set_file_param "${model_config_fp}" "write_groups" "${WRTCMP_write_groups}"
set_file_param "${model_config_fp}" "write_tasks_per_group" "${WRTCMP_write_tasks_per_group}"

set_file_param "${model_config_fp}" "output_grid" "\'${WRTCMP_output_grid}\'"
set_file_param "${model_config_fp}" "cen_lon" "${WRTCMP_cen_lon}"
set_file_param "${model_config_fp}" "cen_lat" "${WRTCMP_cen_lat}"
set_file_param "${model_config_fp}" "lon1" "${WRTCMP_lon_lwr_left}"
set_file_param "${model_config_fp}" "lat1" "${WRTCMP_lat_lwr_left}"

if [ "${WRTCMP_output_grid}" = "rotated_latlon" ]; then
set_file_param "${model_config_fp}" "lon2" "${WRTCMP_lon_upr_rght}"
set_file_param "${model_config_fp}" "lat2" "${WRTCMP_lat_upr_rght}"
set_file_param "${model_config_fp}" "dlon" "${WRTCMP_dlon}"
set_file_param "${model_config_fp}" "dlat" "${WRTCMP_dlat}"
elif [ "${WRTCMP_output_grid}" = "lambert_conformal" ]; then
set_file_param "${model_config_fp}" "stdlat1" "${WRTCMP_stdlat1}"
set_file_param "${model_config_fp}" "stdlat2" "${WRTCMP_stdlat2}"
set_file_param "${model_config_fp}" "nx" "${WRTCMP_nx}"
set_file_param "${model_config_fp}" "ny" "${WRTCMP_ny}"
set_file_param "${model_config_fp}" "dx" "${WRTCMP_dx}"
set_file_param "${model_config_fp}" "dy" "${WRTCMP_dy}"
elif [ "${WRTCMP_output_grid}" = "regional_latlon" ]; then
set_file_param "${model_config_fp}" "lon2" "${WRTCMP_lon_upr_rght}"
set_file_param "${model_config_fp}" "lat2" "${WRTCMP_lat_upr_rght}"
set_file_param "${model_config_fp}" "dlon" "${WRTCMP_dlon}"
set_file_param "${model_config_fp}" "dlat" "${WRTCMP_dlat}"
fi

fi
#
#-----------------------------------------------------------------------
#
# Restore the shell options saved at the beginning of this script/function.
#
#-----------------------------------------------------------------------
#
{ restore_shell_opts; } > /dev/null 2>&1

}

Loading