Skip to content

Commit 81de6e2

Browse files
committed
extend stdname_max_len for constituent standard names
1 parent fb0e870 commit 81de6e2

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/data/write_init_files.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,9 @@ 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+
max_slen = max(max_slen, max(len(x) for x in registry_constituents))
393+
391394
outfile.write(f"integer, public, parameter :: std_name_len = {max_slen}", 1)
392395

393396
outfile.blank_line()

0 commit comments

Comments
 (0)