Changeset 1286
- Timestamp:
- 10/02/17 10:50:43 (6 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/filter/temporal_filter.cpp
r1124 r1286 14 14 , isOnceOperation(functor->timeType() == func::CFunctor::once) 15 15 , isInstantOperation(functor->timeType() == func::CFunctor::instant) 16 // If we can optimize the sampling when dealing with an instant functor we do it 17 , samplingFreq((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq : samplingFreq) 18 , samplingOffset((isInstantOperation && samplingFreq == TimeStep && samplingOffset == NoneDu) ? opFreq - initDate.getRelCalendar().getTimeStep() : samplingOffset) 16 , samplingFreq(samplingFreq) 17 , samplingOffset(samplingOffset) 19 18 , opFreq(opFreq) 20 19 , nextSamplingDate(initDate + this->samplingOffset + initDate.getRelCalendar().getTimeStep()) -
XIOS/trunk/src/node/field.cpp
r1186 r1286 1446 1446 1447 1447 /*! 1448 * Check on freq_off and freq_op attributes. 1449 */ 1450 void CField::checkAttributes(void) 1451 { 1452 if (freq_op.isEmpty()) 1453 { 1454 if (!freq_offset.isEmpty()) 1455 ERROR("CField::checkAttributes(void)", 1456 << "[ id = " << this->getId() << " , context = '" << CObjectFactory::GetCurrentContextId() << " ] " 1457 << "Attribute freq_offset cannot be defined if attribute freq_op is not defined. " 1458 << "Please define freq_op.") 1459 else 1460 { 1461 if (operation.getValue()=="instant") 1462 { 1463 freq_op.setValue(file->output_freq.getValue()); 1464 freq_offset.setValue(file->output_freq.getValue()-TimeStep); 1465 } 1466 else 1467 { 1468 freq_op.setValue(TimeStep); 1469 freq_offset.setValue(freq_op.getValue()-TimeStep); 1470 } 1471 } 1472 } 1473 else 1474 { 1475 if (freq_offset.isEmpty()) 1476 freq_offset.setValue(freq_op.getValue()-TimeStep); 1477 } 1478 } 1479 1480 /*! 1448 1481 * Returns string arithmetic expression associated to the field. 1449 1482 * \return if content is defined return content string, otherwise, if "expr" attribute is defined, return expr string. -
XIOS/trunk/src/node/field.hpp
r1119 r1286 176 176 void sendAddAllVariables(); 177 177 178 /// Vérifications /// 179 void checkAttributes(void); 178 180 179 181 const std::vector<StdString>& getRefDomainAxisIds(); -
XIOS/trunk/src/node/file.cpp
r1195 r1286 1098 1098 CField* field = this->enabledFields[i]; 1099 1099 this->sendAddField(field->getId()); 1100 field->checkAttributes(); 1100 1101 field->sendAllAttributesToServer(); 1101 1102 field->sendAddAllVariables();
Note: See TracChangeset
for help on using the changeset viewer.