Skip to content

Commit

Permalink
fix (for real) input_data_list generation for when multiple stream_da…
Browse files Browse the repository at this point in the history
…tafiles entries are present for a stream_entry
  • Loading branch information
alperaltuntas committed Oct 25, 2024
1 parent 573df5d commit faa59db
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cime_config/stream_cdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ def create_stream_xml(
elif node_name == "stream_datafiles":
# Get the resolved stream data files
stream_vars[node_name] = ""
stream_datafiles_list = [] # to join stream_datafiles if multiple entries are present
stream_datafiles = ""
for child in self.get_children(root=node):
if (
Expand All @@ -263,11 +264,10 @@ def create_stream_xml(
+ "\n"
)
else:
_stream_datafiles = child.xml_element.text
_stream_datafiles = self._resolve_values(
case, _stream_datafiles
stream_datafiles = child.xml_element.text
stream_datafiles = self._resolve_values(
case, stream_datafiles
)
stream_datafiles += '\n' + _stream_datafiles
# endif neon
if (
"first_year" in child.xml_element.attrib
Expand Down Expand Up @@ -307,6 +307,8 @@ def create_stream_xml(
stream_datafiles.split("\n"), "file"
)
# endif
stream_datafiles_list.append(stream_datafiles)
stream_datafiles = "\n".join(stream_datafiles_list)
elif node_name in xml_scalar_names:
attributes["model_grid"] = case.get_value("GRID")
attributes["compset"] = case.get_value("COMPSET")
Expand Down

0 comments on commit faa59db

Please sign in to comment.