Skip to content

Commit

Permalink
Bugfix for write_init_files (#353)
Browse files Browse the repository at this point in the history
Tag name (required for release branches):
Originator(s): peverwhee

Description (include the issue title, and the keyword ['closes',
'fixes', 'resolves'] followed by the issue number):

extend stdname_max_len for constituent standard names

Describe any changes made to build system:

Describe any changes made to the namelist: n/a

List any changes to the defaults for the input datasets (e.g. boundary
datasets): n/a

List all files eliminated and why: n/a

List all files added and what they do: n/a

List all existing files that have been modified, and describe the
changes:
(Helpful git command: `git diff --name-status
development...<your_branch_name>`)

M src/data/write_init_files.py
- include constituent standard names when determining maximum standard
name length

M atmospheric_physics submodule
- did not update .gitmodules file, but submodule itself was out of sync

If there are new failures (compared to the
`test/existing-test-failures.txt` file),
have them OK'd by the gatekeeper, note them here, and add them to the
file.
If there are baseline differences, include the test and the reason for
the
diff. What is the nature of the change? Roundoff?

derecho/intel/aux_sima: all PASS

derecho/gnu/aux_sima: all PASS

If this changes climate describe any run(s) done to evaluate the new
climate in enough detail that it(they) could be reproduced:

CAM-SIMA date used for the baseline comparison tests if different than
latest:
  • Loading branch information
peverwhee authored Jan 29, 2025
1 parent fb0e870 commit ca692f3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/data/write_init_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,11 @@ def write_ic_params(outfile, host_vars, ic_names, registry_constituents):
else:
max_slen = 0
# end if
# Extend max_slen if any constituent names are longer
if registry_constituents:
max_slen = max(max_slen, max(len(x) for x in registry_constituents))
# end if

outfile.write(f"integer, public, parameter :: std_name_len = {max_slen}", 1)

outfile.blank_line()
Expand Down

0 comments on commit ca692f3

Please sign in to comment.