Description
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:
- Add variables to
MPAS_Stream_type
inmpas_io_streams_types.inc
, for example
logical :: writeCFCompliantTime = .false.
real :: Time_bnds(2)
- In
xml_stream_parser.c
, read in the flagTimeInFile
and pass information through subroutinestream_mgr_create_stream_c
, say withiTimeInFile
. - In
mpas_stream_manager.F
, subroutinestream_mgr_create_stream_c
, set thewriteCFCompliantTime
logical for that stream. - In
mpas_io_streams.F
, subroutineMPAS_writeStream
, ifwriteCFCompliantTime
is true, write additional variables to file, likeTime_bnds
.