Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_GET_EXTRN_MDL_FILES
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_GRID
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_ICS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_LBCS
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_OROG
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_MAKE_SFC_CLIMO
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
2 changes: 1 addition & 1 deletion jobs/JREGIONAL_RUN_FCST
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down
4 changes: 2 additions & 2 deletions jobs/JREGIONAL_RUN_POST
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -100,7 +100,7 @@ cd_vrfy "${fhr_dir}"
#
#-----------------------------------------------------------------------
#
fhr=$( printf "%s" "${fhr}" | sed -n -r -e "s/^([0-9]+)$/\1/p" )
fhr=$( printf "%s" "${fhr}" | $SED -n -r -e "s/^([0-9]+)$/\1/p" )
if [ -z "$fhr" ]; then
print_err_msg_exit "\
The forecast hour (fhr) must be a non-empty string consisting of only
Expand Down
6 changes: 6 additions & 0 deletions modulefiles/tasks/linux/make_grid.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
system "conda activate regional_workflow"
}
6 changes: 6 additions & 0 deletions modulefiles/tasks/linux/make_ics.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
system "conda activate regional_workflow"
}
6 changes: 6 additions & 0 deletions modulefiles/tasks/linux/make_lbcs.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
system "conda activate regional_workflow"
}
6 changes: 6 additions & 0 deletions modulefiles/tasks/linux/run_fcst.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#%Module
module use -a /contrib/miniconda3/modulefiles
module load miniconda3
if [module-info mode load] {
system "conda activate regional_workflow"
}
6 changes: 3 additions & 3 deletions scripts/exregional_get_extrn_mdl_files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -524,7 +524,7 @@ not happen."
# to the current directory. Then move the files.
#
rel_dir=$( printf "%s" "${extrn_mdl_arcvrel_dir}" | \
sed -r 's%^(\/|\.\/)([^/]*)(.*)%\2\3%' )
$SED -r 's%^(\/|\.\/)([^/]*)(.*)%\2\3%' )
mv_vrfy ${rel_dir}/* .
#
# Get the first subdirectory in rel_dir, i.e. the subdirectory before the
Expand All @@ -533,7 +533,7 @@ not happen."
# it.
#
subdir_to_remove=$( printf "%s" "${rel_dir}" | \
sed -r 's%^([^/]*)(.*)%\1%' )
$SED -r 's%^([^/]*)(.*)%\1%' )
rm_vrfy -rf ./${subdir_to_remove}
#
# If extrn_mdl_arcvrel_dir does not start with a "/" (and it is not
Expand Down
25 changes: 19 additions & 6 deletions scripts/exregional_make_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
. $USHDIR/link_fix.sh
. $USHDIR/set_FV3nml_sfc_climo_filenames.sh
. $USHDIR/set_FV3nml_stoch_params.sh
. $USHDIR/create_diag_table_files.sh
. $USHDIR/create_diag_table_file.sh
#
#-----------------------------------------------------------------------
#
Expand All @@ -39,7 +39,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -147,6 +147,14 @@ case $MACHINE in
ulimit -a
;;

"MACOS")
APRUN=time
;;

"LINUX")
APRUN=time
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
Expand Down Expand Up @@ -433,11 +441,19 @@ uniform cubed-sphere grid equivalent resolution returned with nonzero exit
code:
exec_fp = \"${exec_fp}\""

# Make sure 'ncdump' is available before we try to use it
if ! command -v ncdump &> /dev/null
then
print_err_msg_exit "\
The utility 'ncdump' was not found in the environment. Be sure to add the
netCDF 'bin/' directory to your PATH."
fi

# Make the following (reading of res_equiv) a function in another file
# so that it can be used both here and in the exregional_make_orog.sh
# script.
res_equiv=$( ncdump -h "${grid_fp}" | \
grep -o ":RES_equiv = [0-9]\+" | grep -o "[0-9]" ) || \
grep -o ":RES_equiv = [0-9]\+" | $SED 's/[^0-9]*//g' ) || \
print_err_msg_exit "\
Attempt to extract the equivalent global uniform cubed-sphere grid reso-
lution from the grid file (grid_fp) failed:
Expand Down Expand Up @@ -683,9 +699,6 @@ Call to function to set stochastic parameters in the FV3 namelist files
for the various ensemble members failed."
fi

create_diag_table_files || print_err_msg_exit "\
Call to function to create a diagnostics table file under each cycle
directory failed."
#
#-----------------------------------------------------------------------
#
Expand Down
17 changes: 16 additions & 1 deletion scripts/exregional_make_ics.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -116,6 +116,21 @@ case "$MACHINE" in
APRUN="ibrun"
;;

"MACOS")
APRUN=$RUN_CMD_UTILS
;;

"LINUX")
APRUN=$RUN_CMD_UTILS
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
MACHINE = \"$MACHINE\"
APRUN = \"$APRUN\""
;;

esac
#
#-----------------------------------------------------------------------
Expand Down
19 changes: 17 additions & 2 deletions scripts/exregional_make_lbcs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -116,6 +116,21 @@ case "$MACHINE" in
APRUN="ibrun"
;;

"MACOS")
APRUN=$RUN_CMD_UTILS
;;

"LINUX")
APRUN=$RUN_CMD_UTILS
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
MACHINE = \"$MACHINE\"
APRUN = \"$APRUN\""
;;

esac
#
#-----------------------------------------------------------------------
Expand Down Expand Up @@ -409,7 +424,7 @@ list file has not specified for this external LBC model (EXTRN_MDL_NAME_LBCS):
dd="${EXTRN_MDL_CDATE:6:2}"
hh="${EXTRN_MDL_CDATE:8:2}"

cdate_crnt_fhr=$( date --utc --date "${yyyymmdd} ${hh} UTC + ${fhr} hours" "+%Y%m%d%H" )
cdate_crnt_fhr=$( $DATE_UTIL --utc --date "${yyyymmdd} ${hh} UTC + ${fhr} hours" "+%Y%m%d%H" )
#
# Get the month, day, and hour corresponding to the current forecast time
# of the the external model.
Expand Down
10 changes: 9 additions & 1 deletion scripts/exregional_make_orog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -147,6 +147,14 @@ case $MACHINE in
export APRUN="time"
;;

"MACOS")
APRUN=time
;;

"LINUX")
APRUN=time
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
Expand Down
10 changes: 9 additions & 1 deletion scripts/exregional_make_sfc_climo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -170,6 +170,14 @@ case $MACHINE in
APRUN="ibrun -np ${nprocs}"
;;

"MACOS")
APRUN=$RUN_CMD_UTILS
;;

"LINUX")
APRUN=$RUN_CMD_UTILS
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
Expand Down
28 changes: 25 additions & 3 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#
. ${GLOBAL_VAR_DEFNS_FP}
. $USHDIR/source_util_funcs.sh
. $USHDIR/create_diag_table_file.sh
#
#-----------------------------------------------------------------------
#
Expand All @@ -35,7 +36,7 @@
#
#-----------------------------------------------------------------------
#
scrfunc_fp=$( readlink -f "${BASH_SOURCE[0]}" )
scrfunc_fp=$( $READLINK -f "${BASH_SOURCE[0]}" )
scrfunc_fn=$( basename "${scrfunc_fp}" )
scrfunc_dir=$( dirname "${scrfunc_fp}" )
#
Expand Down Expand Up @@ -144,6 +145,14 @@ case $MACHINE in
APRUN="ibrun -np ${PE_MEMBER01}"
;;

"MACOS")
APRUN=$RUN_CMD_FCST
;;

"LINUX")
APRUN=$RUN_CMD_FCST
;;

*)
print_err_msg_exit "\
Run command has not been specified for this machine:
Expand Down Expand Up @@ -360,9 +369,9 @@ for (( i=0; i<${num_symlinks}; i++ )); do

mapping="${CYCLEDIR_LINKS_TO_FIXam_FILES_MAPPING[$i]}"
symlink=$( printf "%s\n" "$mapping" | \
sed -n -r -e "s/${regex_search}/\1/p" )
$SED -n -r -e "s/${regex_search}/\1/p" )
target=$( printf "%s\n" "$mapping" | \
sed -n -r -e "s/${regex_search}/\2/p" )
$SED -n -r -e "s/${regex_search}/\2/p" )

symlink="${run_dir}/$symlink"
target="$FIXam/$target"
Expand Down Expand Up @@ -432,6 +441,19 @@ cycle's (cdate) run directory (run_dir) failed:
#
#-----------------------------------------------------------------------
#
# Call the function that creates the model configuration file within each
# cycle directory.
#
#-----------------------------------------------------------------------
#
create_diag_table_file \
run_dir="${run_dir}" || print_err_msg_exit "\
Call to function to create a diag table file for the current
cycle's (cdate) run directory (run_dir) failed:
run_dir = \"${run_dir}\""
#
#-----------------------------------------------------------------------
#
# If running ensemble 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
Expand Down
Loading