Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[develop]: Remove shell workflow. #764

Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
a295284
Bug fix with FIELD_TABLE_FN
danielabdi-noaa May 10, 2022
fd67251
Modify crontab management, use config_defaults.sh.
danielabdi-noaa May 10, 2022
6021cf3
Add status badge.
danielabdi-noaa May 16, 2022
5a2db4f
Update cheyenne crontab management.
danielabdi-noaa May 19, 2022
db96de1
source lmod-setup
danielabdi-noaa May 19, 2022
a63f913
Add main to set_predef_grid
danielabdi-noaa May 21, 2022
62ca154
Bug fix in predef_grid
danielabdi-noaa May 25, 2022
9d597c3
Don't import dead params.
danielabdi-noaa May 25, 2022
b992652
Fix bug in resetting VERBOSE
danielabdi-noaa May 26, 2022
2c1b2a4
Minor fix in INI config.
danielabdi-noaa May 27, 2022
1fd8557
Construct var_defns components from dictionary.
danielabdi-noaa May 26, 2022
e05e206
Allow also lower case variables to be exported.
danielabdi-noaa May 30, 2022
7d29801
Updates to python workflow due to PR #776
danielabdi-noaa May 24, 2022
47fe6eb
Use python versions of link_fix and set_FV3_sfc in job script.
danielabdi-noaa May 7, 2022
2d1790c
Use python versions of create_diag/model.
danielabdi-noaa Jun 2, 2022
b838969
Some fixes addressing Christina's suggestions.
danielabdi-noaa Jun 15, 2022
8b07fc3
Delete shell workflow
danielabdi-noaa Jun 2, 2022
b8d6c9c
Append pid to temp files.
danielabdi-noaa Jun 8, 2022
c9f04f7
Update scripts to work with the latest hashes of UFS_UTILS and UPP (#…
chan-hoo Jun 9, 2022
5f1d916
Remove -S option from link_fix call.
danielabdi-noaa Jun 16, 2022
9f88f60
Fixes due to merge
danielabdi-noaa Jun 27, 2022
9b30afd
Cosmoetic changes.
danielabdi-noaa Jul 18, 2022
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: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[![Python unittests](https://github.com/ufs-community/regional_workflow/actions/workflows/python_unittests.yaml/badge.svg)](https://github.com/ufs-community/regional_workflow/actions/workflows/python_unittests.yaml)

# Regional Workflow

**The regional workflow in this repository can no longer be run in a stand-alone configuration. To clone the end-to-end system, build the code, and run the workflow, see:**
Expand Down
12 changes: 6 additions & 6 deletions scripts/exregional_make_grid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#-----------------------------------------------------------------------
#
. $USHDIR/make_grid_mosaic_file.sh
. $USHDIR/link_fix.sh
. $USHDIR/set_FV3nml_sfc_climo_filenames.sh
#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -589,9 +587,9 @@ halo failed."
#
#-----------------------------------------------------------------------
#
link_fix \
verbose="$VERBOSE" \
file_group="grid" || \
python3 $USHDIR/link_fix.py \
--path-to-defns $EXPTDIR/var_defns.sh \
--file-group "grid" || \
danielabdi-noaa marked this conversation as resolved.
Show resolved Hide resolved
print_err_msg_exit "\
Call to function to create symlinks to the various grid and mosaic files
failed."
Expand All @@ -607,7 +605,9 @@ failed."
#
#-----------------------------------------------------------------------
#
set_FV3nml_sfc_climo_filenames || print_err_msg_exit "\
python3 $USHDIR/set_FV3nml_sfc_climo_filenames.py \
--path-to-defns $EXPTDIR/var_defns.sh \
|| print_err_msg_exit "\
Call to function to set surface climatology file names in the FV3 namelist
file failed."
#
Expand Down
14 changes: 3 additions & 11 deletions scripts/exregional_make_orog.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
#
#-----------------------------------------------------------------------
#
# Source other necessary files.
#
#-----------------------------------------------------------------------
#
. $USHDIR/link_fix.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
Expand Down Expand Up @@ -581,9 +573,9 @@ cd_vrfy -
#
#-----------------------------------------------------------------------
#
link_fix \
verbose="$VERBOSE" \
file_group="orog" || \
python3 $USHDIR/link_fix.py \
--path-to-defns $EXPTDIR/var_defns.sh \
--file-group "orog" || \
print_err_msg_exit "\
Call to function to create links to orography files failed."
#
Expand Down
14 changes: 3 additions & 11 deletions scripts/exregional_make_sfc_climo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,6 @@
#
#-----------------------------------------------------------------------
#
# Source other necessary files.
#
#-----------------------------------------------------------------------
#
. $USHDIR/link_fix.sh
#
#-----------------------------------------------------------------------
#
# Save current shell options (in a global array). Then set new options
# for this script/function.
#
Expand Down Expand Up @@ -241,9 +233,9 @@ esac
#
#-----------------------------------------------------------------------
#
link_fix \
verbose="$VERBOSE" \
file_group="sfc_climo" || \
python3 $USHDIR/link_fix.py \
--path-to-defns $EXPTDIR/var_defns.sh \
--file-group "sfc_climo" || \
print_err_msg_exit "\
Call to function to create links to surface climatology files failed."
#
Expand Down
32 changes: 13 additions & 19 deletions scripts/exregional_run_fcst.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,6 @@
#
. ${GLOBAL_VAR_DEFNS_FP}
. $USHDIR/source_util_funcs.sh
. $USHDIR/set_FV3nml_ens_stoch_seeds.sh
#
#-----------------------------------------------------------------------
#
# Source other necessary files.
#
#-----------------------------------------------------------------------
#
. $USHDIR/create_model_configure_file.sh
. $USHDIR/create_diag_table_file.sh
#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -446,7 +436,9 @@ fi

if [ "${DO_ENSEMBLE}" = TRUE ] && ([ "${DO_SPP}" = TRUE ] || [ "${DO_SPPT}" = TRUE ] || [ "${DO_SHUM}" = TRUE ] \
[ "${DO_SKEB}" = TRUE ] || [ "${DO_LSM_SPP}" = TRUE ]); then
set_FV3nml_ens_stoch_seeds cdate="$cdate" || print_err_msg_exit "\
python3 $USHDIR/set_FV3nml_ens_stoch_seeds.py \
--path-to-defns ${GLOBAL_VAR_DEFNS_FP} \
--cdate "$cdate" || print_err_msg_exit "\
Call to function to create the ensemble-based namelist for the current
cycle's (cdate) run directory (run_dir) failed:
cdate = \"${cdate}\"
Expand All @@ -464,12 +456,13 @@ fi
#
#-----------------------------------------------------------------------
#
create_model_configure_file \
cdate="$cdate" \
run_dir="${run_dir}" \
sub_hourly_post="${SUB_HOURLY_POST}" \
dt_subhourly_post_mnts="${DT_SUBHOURLY_POST_MNTS}" \
dt_atmos="${DT_ATMOS}" || print_err_msg_exit "\
python3 $USHDIR/create_model_configure_file.py \
--path-to-defns $EXPTDIR/var_defns.sh \
--cdate "$cdate" \
--run-dir "${run_dir}" \
--sub-hourly-post "${SUB_HOURLY_POST}" \
--dt-subhourly-post-mnts "${DT_SUBHOURLY_POST_MNTS}" \
--dt-atmos "${DT_ATMOS}" || 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}\"
Expand All @@ -482,8 +475,9 @@ cycle's (cdate) run directory (run_dir) failed:
#
#-----------------------------------------------------------------------
#
create_diag_table_file \
run_dir="${run_dir}" || print_err_msg_exit "\
python3 $USHDIR/create_diag_table_file.py \
--path-to-defns $EXPTDIR/var_defns.sh \
--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}\""
Expand Down
152 changes: 12 additions & 140 deletions tests/WE2E/get_WE2Etest_names_subdirs_descs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -438,9 +438,6 @@ 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
#
#-----------------------------------------------------------------------
#
Expand Down Expand Up @@ -1220,70 +1217,16 @@ ${test_desc}${stripped_line} "
# 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_num_cells="gfdlgrid_num_cells" \
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="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
# 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_num_cells="${GFDLgrid_NUM_CELLS}"
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
dta="${DT_ATMOS}"
params=$(\
PREDEF_GRID_NAME="${PREDEF_GRID_NAME}" \
QUILTING="FALSE" \
RADIUS_EARTH=${RADIUS_EARTH} \
DEGS_PER_RADIAN=${DEGS_PER_RADIAN} \
NH4=${NH4} \
$ushdir/calculate_cost.py -c "${test_configs_basedir}/$subdir/${config_fn}")

read dta nxny dta_r nxny_r <<< "${params}"

fi
#
# 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
Expand All @@ -1292,49 +1235,9 @@ ${test_desc}${stripped_line} "
#
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.
#
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_num_cells}" \
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 ))
num_grid_pts=$nxny
#
# Calculate the number of time steps for the test. Note that FCST_LEN_HRS
# is in units of hours while dta is in units of seconds. Also, the factor
Expand All @@ -1348,30 +1251,6 @@ ${test_desc}${stripped_line} "
#
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_num_cells \
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 \
dta \
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.
Expand All @@ -1397,16 +1276,9 @@ ${test_desc}${stripped_line} "
#
#-----------------------------------------------------------------------
#
set_predef_grid_params \
predef_grid_name="RRFS_CONUS_25km" \
quilting="FALSE" \
outvarname_esggrid_nx="nx" \
outvarname_esggrid_ny="ny" \
outvarname_dt_atmos="dta"

num_grid_pts=$(( nx*ny ))
num_grid_pts=$nxny_r
fcst_len_hrs="6"
num_time_steps=$(( (fcst_len_hrs*3600 + dta - 1)/dta ))
num_time_steps=$(( (fcst_len_hrs*3600 + dta_r - 1)/dta_r ))
abs_cost_ref=$(( num_grid_pts*num_time_steps ))

for (( i=0; i<=$((num_prim_tests-1)); i++ )); do
Expand Down
2 changes: 1 addition & 1 deletion tests/WE2E/run_WE2E_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1281,7 +1281,7 @@ exist or is not a directory:
#
#-----------------------------------------------------------------------
#
$ushdir/generate_FV3LAM_wflow.sh || \
$ushdir/generate_FV3LAM_wflow.py || \
print_err_msg_exit "\
Could not generate an experiment for the test specified by test_name:
test_name = \"${test_name}\""
Expand Down
1 change: 1 addition & 0 deletions tests/WE2E/setup_WE2E_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ exec_subdir='bin_intel/bin'
env_path="${SRW_APP_DIR}/modulefiles"
env_file="wflow_${machine}"
echo "-- Load environment =>" $env_file
source ${SRW_APP_DIR}/etc/lmod-setup.sh ${machine}
module use ${env_path}
module load ${env_file}
conda activate regional_workflow
Expand Down
Loading