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

Bug fix for calculation of number of time steps for each WE2E test #782

Merged
Merged
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
9 changes: 6 additions & 3 deletions tests/WE2E/get_WE2Etest_names_subdirs_descs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1337,9 +1337,12 @@ ${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 dta is in units of seconds.
# is in units of hours while dta is in units of seconds. Also, the factor
# dta - 1 in the numerator is to cause the division to round up to the
# nearest integer (adding the denominator minus one to the numerator will
# make this happen).
#
num_time_steps=$(( FCST_LEN_HRS*3600/dta + 1 ))
num_time_steps=$(( (FCST_LEN_HRS*3600 + dta - 1)/dta ))
#
# Calculate the absolute cost of the test.
#
Expand Down Expand Up @@ -1403,7 +1406,7 @@ ${test_desc}${stripped_line} "

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

for (( i=0; i<=$((num_prim_tests-1)); i++ )); do
Expand Down