Skip to content

NetCDF global attributes appear to be written on every stream manager write #111

Open
@matthewhoffman

Description

@matthewhoffman

In a stream with clobber mode set to overwrite, I see evidence that netdf file global attributes are being written every time output is written. I would think they should only be written once on init, or perhaps not at given it's an existing file.

I discovered this accidentally by doing a run, adding a new namelist option to the code and recompiling, then doing a restart writing to the same file with clobber mode set to overwrite. I get a PIO error in subroutine MPAS_io_put_att_real0d in mpas_io.F here:
https://github.com/MPAS-Dev/MPAS-Model/blob/master/src/framework/mpas_io.F#L4383
where it tries to write the global attribute specifying the value of the new namelist option to the existing output file (which understandably does not work). This error occurs on every timestep when writing to the file occurs, not just once, demonstrating that the stream manager is attempting to write global attributes on every write of the stream.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions