20 std::stringstream startStream;
21 startStream << meta.
time();
22 std::string timeFileName = m_filePrefix +
"." + startStream.str() +
".nc";
24 + std::to_string(protectedArrayNames.size() + sharedArrayNames.size()) +
" fields to "
25 + timeFileName +
"\n");
29 for (
const auto& entry : protectedArrayNames) {
31 if (macr) state.data[entry.first] = *macr;
33 for (
const auto& entry : sharedArrayNames) {
35 if (mar) state.data[entry.first] = *mar;
static void info(const std::string &message)
Logs a message at level::INFO, intended for informational messages that would not normally be shown.
A class that holds the array data for the model.
static const MARBackingStore & getSharedArray()
Returns a const reference to the store for SharedArray fields.
static const MARConstBackingStore & getProtectedArray()
Returns a const reference to the store for ProtectedArray fields.
void outputState(const ModelMetadata &meta) override
Outputs the passed ModelState.
static void fileFromState(const ModelState &state, const ModelMetadata &meta, const std::string &filePath, bool isRestart=false)
Takes a ModelState and a template file name to write the state out to a target file path.