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

Bugfix for variables in multiple groups #618

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
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
4 changes: 1 addition & 3 deletions scripts/suite_objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@ def add_vars(self, call_list, run_env, gen_unique=False):
"""Add new variables from another CallList (<call_list>)"""
for var in call_list.variable_list():
stdname = var.get_prop_value('standard_name')
if stdname not in self:
self.add_variable(var, run_env, gen_unique=gen_unique)
# end if
self.add_variable(var, run_env, gen_unique=gen_unique, adjust_intent=True, exists_ok=True)
# end for

def add_variable(self, newvar, run_env, exists_ok=False, gen_unique=False,
Expand Down
2 changes: 1 addition & 1 deletion test/capgen_test/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ input_vars_ddt="${input_vars_ddt},horizontal_loop_end"
input_vars_ddt="${input_vars_ddt},model_times,number_of_model_times"
input_vars_ddt="${input_vars_ddt},surface_air_pressure"
output_vars_ddt="ccpp_error_code,ccpp_error_message"
output_vars_ddt="${output_vars_ddt},model_times,number_of_model_times"
output_vars_ddt="${output_vars_ddt},model_times,number_of_model_times,surface_air_pressure"
required_vars_temp="ccpp_error_code,ccpp_error_message"
required_vars_temp="${required_vars_temp},coefficients_for_interpolation"
required_vars_temp="${required_vars_temp},configuration_variable"
Expand Down
3 changes: 2 additions & 1 deletion test/capgen_test/test_host.F90
Original file line number Diff line number Diff line change
Expand Up @@ -400,10 +400,11 @@ program test
'number_of_model_times ', &
'surface_air_pressure ' /)

character(len=cm), target :: test_outvars2(4) = (/ &
character(len=cm), target :: test_outvars2(5) = (/ &
'ccpp_error_code ', &
'ccpp_error_message ', &
'model_times ', &
'surface_air_pressure ', &
'number_of_model_times ' /)

character(len=cm), target :: test_reqvars2(5) = (/ &
Expand Down
2 changes: 1 addition & 1 deletion test/capgen_test/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def usage(errmsg=None):
"horizontal_loop_begin", "horizontal_loop_end",
"surface_air_pressure", "horizontal_dimension"]
_OUTPUT_VARS_DDT = ["ccpp_error_code", "ccpp_error_message", "model_times",
"number_of_model_times"]
"surface_air_pressure", "number_of_model_times"]
_REQUIRED_VARS_DDT = _INPUT_VARS_DDT + _OUTPUT_VARS_DDT
_PROT_VARS_TEMP = ["horizontal_loop_begin", "horizontal_loop_end",
"horizontal_dimension", "vertical_layer_dimension",
Expand Down
2 changes: 1 addition & 1 deletion test/ddthost_test/run_test
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ input_vars_ddt="${input_vars_ddt},horizontal_loop_end"
input_vars_ddt="${input_vars_ddt},model_times,number_of_model_times"
input_vars_ddt="${input_vars_ddt},surface_air_pressure"
output_vars_ddt="ccpp_error_code,ccpp_error_message"
output_vars_ddt="${output_vars_ddt},model_times,number_of_model_times"
output_vars_ddt="${output_vars_ddt},model_times,number_of_model_times,surface_air_pressure"
required_vars_temp="ccpp_error_code,ccpp_error_message"
required_vars_temp="${required_vars_temp},coefficients_for_interpolation"
required_vars_temp="${required_vars_temp},horizontal_dimension"
Expand Down
3 changes: 2 additions & 1 deletion test/ddthost_test/test_host.F90
Original file line number Diff line number Diff line change
Expand Up @@ -391,10 +391,11 @@ program test
'number_of_model_times ', &
'surface_air_pressure ' /)

character(len=cm), target :: test_outvars2(4) = (/ &
character(len=cm), target :: test_outvars2(5) = (/ &
'ccpp_error_code ', &
'ccpp_error_message ', &
'model_times ', &
'surface_air_pressure ', &
'number_of_model_times ' /)

character(len=cm), target :: test_reqvars2(5) = (/ &
Expand Down
2 changes: 1 addition & 1 deletion test/ddthost_test/test_reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"horizontal_loop_begin", "horizontal_loop_end",
"surface_air_pressure", "horizontal_dimension"]
_OUTPUT_VARS_DDT = ["ccpp_error_code", "ccpp_error_message", "model_times",
"number_of_model_times"]
"number_of_model_times", "surface_air_pressure"]
_REQUIRED_VARS_DDT = _INPUT_VARS_DDT + _OUTPUT_VARS_DDT
_PROT_VARS_TEMP = ["horizontal_loop_begin", "horizontal_loop_end",
"horizontal_dimension", "vertical_layer_dimension",
Expand Down
Loading