Changeset 436 for XIOS/trunk/src/node
- Timestamp:
- 06/06/13 17:31:28 (11 years ago)
- Location:
- XIOS/trunk/src/node
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/field.cpp
r421 r436 362 362 StdString id = this->getBaseFieldReference()->getId(); 363 363 CContext* context = CContext::getCurrent(); 364 365 if (operation.isEmpty() || freq_op.isEmpty() || this->file->output_freq.isEmpty()) 364 365 if (freq_op.isEmpty()) freq_op=string("1ts") ; 366 367 if (operation.isEmpty() || this->file->output_freq.isEmpty()) 366 368 { 367 369 ERROR("CField::solveOperation(void)", … … 411 413 const CDuration toffset = this->freq_operation - freq_offset_ - context->getCalendar()->getTimeStep(); 412 414 *this->last_operation = *this->last_operation - toffset; 413 415 416 if (operation.get()=="once") isOnceOperation=true ; 417 else isOnceOperation=false; 418 isFirstOperation=true; 419 420 cout<<"Operation : "<<operation<<" isOnce "<<isOnceOperation<<endl; 414 421 #define DECLARE_FUNCTOR(MType, mtype) \ 415 422 if (operation.getValue().compare(#mtype) == 0) \ … … 427 434 << "The operation is not defined !"); 428 435 } 436 437 429 438 } 430 439 -
XIOS/trunk/src/node/field.hpp
r369 r436 149 149 CArray<double, 1> data; 150 150 map<int, CArray<double,1>* > data_srv ; 151 bool isOnceOperation ; 152 bool isFirstOperation ; 151 153 152 154 }; // class CField -
XIOS/trunk/src/node/field_impl.hpp
r369 r436 28 28 const CDate & currDate = context->getCalendar()->getCurrentDate(); 29 29 const CDate opeDate = *last_operation + freq_operation; 30 const CDate writeDate = *last_Write + freq_write; 30 const CDate writeDate = *last_Write + freq_write; 31 bool doOperation, doWrite; 32 31 33 32 34 33 35 info(50) << "CField::updateData " << currDate << " : send data to " << this->getBaseFieldId() << std::endl; 34 36 info(50) << "Next operation " << opeDate<<std::endl; 35 36 if (opeDate <= currDate) 37 38 doOperation = (opeDate <= currDate) ; 39 if (isOnceOperation) 40 if (isFirstOperation) doOperation=true ; 41 else doOperation=false ; 42 43 if (doOperation) 37 44 { 38 45 if (this->data.numElements() != this->grid->storeIndex_client.numElements()) … … 49 56 } 50 57 51 if (writeDate < (currDate + freq_operation)) 58 59 doWrite = (writeDate < (currDate + freq_operation)) ; 60 if (isOnceOperation) 61 { 62 if(isFirstOperation) 63 { 64 doWrite=true ; 65 isFirstOperation=false ; 66 } 67 else doWrite=false ; 68 } 69 70 if (doWrite) 52 71 { 53 72 this->foperation->final();
Note: See TracChangeset
for help on using the changeset viewer.