@@ -40,7 +40,7 @@ been defined and the relevant data arrays have been attached to Fields and
4040are available to access. At the end of a simulation, IOStreams must be
4141finalized using
4242``` c++
43- int Err = IOStream::finalize(ModelClock);
43+ IOStream::finalize (ModelClock);
4444```
4545so that any final writes can take place for the OnShutdown streams and to
4646deallocate all defined streams and arrays. If a stream needs to be removed
@@ -52,26 +52,29 @@ before that time, an erase function is provided:
5252For most output streams, we provide a writeAll interface that should be placed
5353at an appropriate time during the time step loop:
5454``` c++
55- int Err = IOStream::writeAll(ModelClock);
55+ IOStream::writeAll (ModelClock);
5656```
5757This function checks each write stream and writes the file if it is time, based
5858on a time manager alarm that is defined during initialization for each stream
5959based on the time frequency in the streams configuration. After writing the
6060file, the alarm is reset for the next write time. If a file must be written
6161outside of this routine, a single-stream write can take place using:
6262```c++
63- int Err = IOStream::write(StreamName, ModelClock);
63+ IOStream::write(StreamName, ModelClock);
6464```
6565
6666Reading files (eg for initialization, restart or forcing) does not often
6767take place all at once, so no readAll interface is provided. Instead, each
6868input stream is read using:
6969``` c++
70- int Err = IOStream::read(StreamName, ModelClock, ReqMetadata);
70+ Error Err = IOStream::read(StreamName, ModelClock, ReqMetadata);
7171```
72- where ReqMetadata is a variable of type Metadata (defined in Field but
72+ The returned error code typically means that a field in the stream could
73+ not be found in the input file - most other errors abort immediately. The
74+ calling routine is then responsible for deciding what action to take.
75+ The ReqMetadata argument is a variable of type Metadata (defined in Field but
7376essentially a `` std::map<std::string, std::any> `` for the name/value pair).
74- This variable should incude the names of global metadata that are desired
77+ This variable should include the names of global metadata that are desired
7578from the input file. For example, if a time string is needed to verify the
7679input file corresponds to a desired time, the required metadata can be
7780initialized with
0 commit comments