You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The script setup.sh contains the following if-statement (currently at line 1989) that is supposed to turn off the VX_GRIDSTAT_TN task if the experiment is being run in NCO mode (RUN_ENVIR set to "nco"):
if [ "${RUN_TASK_VX_GRIDSTAT}" = "TRUE" ] || \
[ "${RUN_TASK_VX_GRIDSTAT}" = "FALSE" ]; then
msg="
When RUN_ENVIR is set to \"nco\", it is assumed that the verification
will not be run.
RUN_TASK_VX_GRIDSTAT = \"${RUN_TASK_VX_GRIDSTAT}\"
Resetting RUN_TASK_VX_GRIDSTAT to \"FALSE\"
Reset value is:"
RUN_TASK_VX_GRIDSTAT="FALSE"
msg="$msg""
RUN_TASK_VX_GRIDSTAT = \"${RUN_TASK_VX_GRIDSTAT}\"
"
print_info_msg "$msg"
fi
However, it is clear that the test of this if-statement will always be satisfied because RUN_TASK_VX_GRIDSTAT is always set to either "TRUE" or "FALSE". As a result, the message to alert the user that RUN_TASK_VX_GRIDSTAT is being reset to "FALSE" will be printed even if RUN_TASK_VX_GRIDSTAT was already set to "FALSE".
The fix is to simply change the test of the if-statement to the following:
if [ "${RUN_TASK_VX_GRIDSTAT}" = "TRUE" ]; then
...
fi
Note that there are two analogous if-statements for the VX_POINTSTAT_TN and VX_ENSGRID_TN tasks that contain the same bug and need to be fixed in the same way.
Steps to Reproduce
Run an experiment in NCO mode (i.e. RUN_ENVIR set to "nco") with RUN_TASK_VX_GRIDSTAT set to "FALSE". The experiment will still print out a message saying that RUN_TASK_VX_GRIDSTAT is being reset to "FALSE". Same can be done with the VX_POINTSTAT_TN and VX_ENSGRID_TN tasks.
The text was updated successfully, but these errors were encountered:
@michelleharrold I just noticed what I think is a bug while working on another PR. Can you take a look at this issue and see if I understood the code correctly (and that there really is a bug)? Thanks.
Description
The script
setup.sh
contains the following if-statement (currently at line 1989) that is supposed to turn off theVX_GRIDSTAT_TN
task if the experiment is being run in NCO mode (RUN_ENVIR
set to "nco"):However, it is clear that the test of this if-statement will always be satisfied because
RUN_TASK_VX_GRIDSTAT
is always set to either "TRUE" or "FALSE". As a result, the message to alert the user thatRUN_TASK_VX_GRIDSTAT
is being reset to "FALSE" will be printed even ifRUN_TASK_VX_GRIDSTAT
was already set to "FALSE".The fix is to simply change the test of the if-statement to the following:
Note that there are two analogous if-statements for the
VX_POINTSTAT_TN
andVX_ENSGRID_TN
tasks that contain the same bug and need to be fixed in the same way.Steps to Reproduce
Run an experiment in NCO mode (i.e.
RUN_ENVIR
set to "nco") withRUN_TASK_VX_GRIDSTAT
set to "FALSE". The experiment will still print out a message saying thatRUN_TASK_VX_GRIDSTAT
is being reset to "FALSE". Same can be done with theVX_POINTSTAT_TN
andVX_ENSGRID_TN
tasks.The text was updated successfully, but these errors were encountered: