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

fix issues with streams #118

Merged
Merged
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
9 changes: 5 additions & 4 deletions cime_config/stream_cdeps.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,11 @@ def create_stream_xml(self, stream_names, case, streams_xml_file, data_list_file
varmod_args = [x.strip() for x in varmod.split("=") if x]
expect(len(varmod_args) == 2,
"input stream mod can only be of the form streamname:var=value(s)")
# do not allow multiple entries for varmod_args
# allow multiple entries for varmod_args, most recent wins
varname,varval = varmod_args
expect (varname not in stream_mod_dict[stream],
"varname {} is already in stream mod dictionary".format(varname))
if varname in stream_mod_dict[stream]:
logger.warning("varname {} is already in stream mod dictionary".format(varname))

if varname == "datavars" or varname == "datafiles":
if varname == "datavars":
varvals = ["<var>{}</var>".format(x.strip()) for x in varval.split(",") if x]
Expand Down Expand Up @@ -231,7 +232,7 @@ def create_stream_xml(self, stream_names, case, streams_xml_file, data_list_file
# append to stream xml file
stream_file_text = _stream_file_template.format(**stream_vars)
with open(streams_xml_file, 'a', encoding='utf-8') as stream_file:
stream_file.write(stream_file_text)
stream_file.write(case.get_resolved_value(stream_file_text))

# append to input_data_list
if stream_vars['stream_meshfile']:
Expand Down
4 changes: 2 additions & 2 deletions datm/cime_config/stream_definition_datm.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3524,8 +3524,8 @@
<mapalgo>bilinear</mapalgo>
</stream_mapalgo>
<stream_vectors>null</stream_vectors>
<stream_year_align>2015</stream_year_align>
<stream_year_first>2015</stream_year_first>
<stream_year_align>2014</stream_year_align>
<stream_year_first>2014</stream_year_first>
<stream_year_last>2101</stream_year_last>
<stream_offset>0</stream_offset>
<stream_tintalgo>
Expand Down