Skip to content

Add variables to MPAS_Stream_type for CF-compliance #665

Open
@mark-petersen

Description

@mark-petersen

I would like to propose that we add variables to the MPAS_Stream_type so that the time can be CF-compliant. The specific problem is that a variable Time_bnds is required that defines the start and end time points of each measurement (see CF-compliant requirements), but we write multiple output files with different time bounds, so we can not just request a general Time_bnds variable in a stream that is specific to that stream.

My proposal is to add a new flag at the top of a stream:

<stream name="timeSeriesStatsMonthlyOutput"
        TimeInFile="standard" (default) or 
        TimeInFile="CFCompliant" 

where standard retains the current behavior, and the new option, CFCompliant, writes the time variables that we need, like Time_bnds and the variable Time. A core can then access a particular stream and set the values for these variables.

I think the framework alterations would be:

  1. Add variables to MPAS_Stream_type in mpas_io_streams_types.inc, for example
logical :: writeCFCompliantTime = .false.
real :: Time_bnds(2)
  1. In xml_stream_parser.c, read in the flag TimeInFile and pass information through subroutine stream_mgr_create_stream_c, say with iTimeInFile.
  2. In mpas_stream_manager.F, subroutine stream_mgr_create_stream_c, set the writeCFCompliantTime logical for that stream.
  3. In mpas_io_streams.F, subroutine MPAS_writeStream, if writeCFCompliantTime is true, write additional variables to file, like Time_bnds.

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions