Skip to content

Commit e97fd3c

Browse files
committed
Merge branch 'development' into develop/optional-mpas-features
2 parents 016db43 + ca692f3 commit e97fd3c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/data/write_init_files.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,11 @@ def write_ic_params(outfile, host_vars, ic_names, registry_constituents):
388388
else:
389389
max_slen = 0
390390
# end if
391+
# Extend max_slen if any constituent names are longer
392+
if registry_constituents:
393+
max_slen = max(max_slen, max(len(x) for x in registry_constituents))
394+
# end if
395+
391396
outfile.write(f"integer, public, parameter :: std_name_len = {max_slen}", 1)
392397

393398
outfile.blank_line()

0 commit comments

Comments
 (0)