Changeset 1387


Ignore:
Timestamp:
12/20/17 14:20:08 (4 years ago)
Author:
oabramkina
Message:

Fixing a bug in case of output_freq defined in months to avoid adding a month to the last day of a month.

Location:
XIOS
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp

    r1386 r1387  
    222222    CArray<double,1> recv_data_tmp(recvDataSrv.numElements());     
    223223    const CDate& currDate = context->getCalendar()->getCurrentDate(); 
    224     const CDate opeDate   = last_operation_srv +freq_op + freq_operation_srv - freq_op; 
     224    const CDate opeDate   = (last_operation_srv + context->getCalendar()->getTimeStep()) +freq_op + freq_operation_srv - freq_op - context->getCalendar()->getTimeStep(); 
    225225 
    226226    if (opeDate <= currDate) 
     
    249249 
    250250    const CDate& currDate = context->getCalendar()->getCurrentDate(); 
    251     const CDate opeDate      = last_operation_srv +freq_op + freq_operation_srv - freq_op; 
    252     const CDate writeDate    = last_Write_srv    + freq_write_srv; 
     251    const CDate opeDate = (last_operation_srv + context->getCalendar()->getTimeStep()) + freq_op + freq_operation_srv - freq_op - context->getCalendar()->getTimeStep(); 
     252    const CDate writeDate = last_Write_srv + freq_write_srv; 
    253253 
    254254    if (opeDate <= currDate) 
  • XIOS/trunk/src/node/field.cpp

    r1358 r1387  
    218218    CContext* context = CContext::getCurrent(); 
    219219    const CDate& currDate = context->getCalendar()->getCurrentDate(); 
    220     const CDate opeDate      = last_operation_srv +freq_op + freq_operation_srv - freq_op; 
     220    const CDate opeDate      = (last_operation_srv + context->getCalendar()->getTimeStep()) +freq_op + freq_operation_srv - freq_op - context->getCalendar()->getTimeStep(); 
    221221    const CDate writeDate    = last_Write_srv     + freq_write_srv; 
    222222 
Note: See TracChangeset for help on using the changeset viewer.