Namelist groups with the same group name will fail NLCOMP
- 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
Assessment
This issue has not been assessed yet.