ESMCI / ESMCI/cime

Namelist groups with the same group name will fail NLCOMP

Open
#4,987 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
174
Forks
225
Avg merge
1d 16h
Merged PRs (30d)
14

Description

CIME's `compare_namelists.py` fails if there are multiple namelist groups with the same name:
```
&hist_file_config_nl
hist_volume = 'h1'
hist_inst_fields = 'T', 'Q'
hist_max_frames = 30
hist_output_frequency = '1*nsteps'
hist_precision = 'REAL32'
hist_file_type = 'history'
hist_filename_spec = '%c.cam.%u%f.%y-%m-%d-%s.nc'
hist_write_nstep0 = .true.
/

&hist_file_config_nl
hist_volume = 'h2'
hist_inst_fields = 'U', 'V'
hist_max_frames = 30
hist_output_frequency = '1*nsteps'
hist_precision = 'REAL32'
hist_file_type = 'history'
hist_filename_spec = '%c.cam.%u%f.%y-%m-%d-%s.nc'
hist_write_nstep0 = .true.
/
```

The error is
```
CIMEError: ERROR: In file 'atm_in', Duplicate namelist 'hist_file_config_nl'
```

The Fortran standard is not very clear on this, but it is not prohibited and it is inferred that the read pointer continues after the last group read, so the group name being a duplicate should not be an issue. It is just read in sequentially. A pull request will be submitted to handle this case.

Companion host model side issue: https://github.com/ESCOMP/CAM-SIMA/issues/430

Thanks!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.