File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 2323#include " include/ModelMetadata.hpp"
2424#include " include/ParallelNetcdfFile.hpp"
2525#include " include/Xios.hpp"
26+ #include " include/gridNames.hpp"
2627
2728#include < boost/algorithm/string.hpp>
2829#include < boost/date_time/posix_time/posix_time.hpp>
@@ -944,11 +945,13 @@ void Xios::createField(const std::string fieldId)
944945 throw std::runtime_error (" Xios: Failed to create field '" + fieldId + " '" );
945946 }
946947
947- // Restarts are read "once", everything else is written "instant"ly (no averaging)
948+ // Set the operation type
948949 std::string operation;
949- if (configGetInputRestartFieldNames ().count (fieldId) > 0 ) {
950+ if (configGetInputRestartFieldNames ().count (fieldId) > 0 || fieldId == maskName) {
951+ // Restarts are read "once" and the mask is fixed so only written once
950952 operation = " once" ;
951953 } else {
954+ // Otherwise, read/write all timesteps without post-processing
952955 operation = " instant" ;
953956 }
954957 if (cxios_is_defined_field_operation (field)) {
You can’t perform that action at this time.
0 commit comments