Skip to content

Namelist groups with the same group name will fail NLCOMP #4987

Description

@jimmielin

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: ESCOMP/CAM-SIMA#430

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions