Changeset 1405
- Timestamp:
- 01/22/18 17:40:41 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src/node
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp
r1387 r1405 1073 1073 else if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read) 1074 1074 { 1075 check Attributes();1075 checkTimeAttributes(); 1076 1076 instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, freq_offset, true, 1077 1077 detectMissingValues, defaultValue)); … … 1160 1160 if (!serverSourceFilter) 1161 1161 { 1162 check Attributes();1162 checkTimeAttributes(); 1163 1163 serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, freq_offset, true, 1164 1164 detectMissingValues, defaultValue)); … … 1208 1208 << "An operation must be defined for field \"" << getId() << "\"."); 1209 1209 1210 check Attributes();1210 checkTimeAttributes(&outFreq); 1211 1211 1212 1212 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); … … 1247 1247 << "An operation must be defined for field \"" << getId() << "\"."); 1248 1248 1249 check Attributes();1249 checkTimeAttributes(&outFreq); 1250 1250 1251 1251 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value == true); … … 1649 1649 * Check on freq_off and freq_op attributes. 1650 1650 */ 1651 void CField::checkAttributes(void) 1652 { 1653 bool isFieldRead = file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read; 1651 void CField::checkTimeAttributes(CDuration* freqOp) 1652 { 1653 bool isFieldRead = file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read; 1654 bool isFieldWrite = file && ( file->mode.isEmpty() || file->mode == CFile::mode_attr::write); 1654 1655 if (isFieldRead && operation.getValue() != "instant") 1655 ERROR("void CField::check Attributes(void)",1656 ERROR("void CField::checkTimeAttributes(void)", 1656 1657 << "Unsupported operation for field '" << getFieldOutputName() << "'." << std::endl 1657 1658 << "Currently only \"instant\" is supported for fields read from file.") … … 1660 1661 { 1661 1662 if (operation.getValue() == "instant") 1662 freq_op.setValue(file->output_freq.getValue()); 1663 { 1664 if (isFieldRead || isFieldWrite) freq_op.setValue(file->output_freq.getValue()); 1665 else freq_op=*freqOp ; 1666 } 1663 1667 else 1664 1668 freq_op.setValue(TimeStep); -
XIOS/dev/XIOS_DEV_CMIP6/src/node/field.hpp
r1358 r1405 137 137 138 138 /// Vérifications /// 139 void check Attributes(void);139 void checkTimeAttributes(CDuration* freqOp=NULL); 140 140 141 141 void buildFilterGraph(CGarbageCollector& gc, bool enableOutput); -
XIOS/dev/XIOS_DEV_CMIP6/src/node/file.cpp
r1358 r1405 1167 1167 CField* field = this->enabledFields[i]; 1168 1168 this->sendAddField(field->getId(), client); 1169 field->check Attributes();1169 field->checkTimeAttributes(); 1170 1170 field->sendAllAttributesToServer(client); 1171 1171 field->sendAddAllVariables(client);
Note: See TracChangeset
for help on using the changeset viewer.