Ignore:
Timestamp:
06/06/13 17:31:28 (11 years ago)
Author:
ymipsl
Message:

bug fix :

  • freq_op is now by default of 1 timestep (1ts)
  • once operation is now working as required

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field_impl.hpp

    r369 r436  
    2828      const CDate & currDate = context->getCalendar()->getCurrentDate(); 
    2929      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          
    3133 
    3234    
    3335      info(50) << "CField::updateData " << currDate <<  " : send data to " << this->getBaseFieldId() << std::endl; 
    3436      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) 
    3744      { 
    3845         if (this->data.numElements() != this->grid->storeIndex_client.numElements()) 
     
    4956      } 
    5057       
    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) 
    5271      { 
    5372         this->foperation->final(); 
Note: See TracChangeset for help on using the changeset viewer.