Ignore:
Timestamp:
12/06/17 08:34:41 (6 years ago)
Author:
rlacroix
Message:

Support reentrant workflows and workflows with temporal integration for fields read from files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/field.cpp

    r1326 r1358  
    4040      , wasDataRequestedFromServer(false) 
    4141      , wasDataAlreadyReceivedFromServer(false) 
     42      , mustAutoTrigger(false) 
    4243      , isEOF(false) 
    4344   { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); } 
     
    5556      , wasDataRequestedFromServer(false) 
    5657      , wasDataAlreadyReceivedFromServer(false) 
     58      , mustAutoTrigger(false) 
    5759      , isEOF(false) 
    5860   { setVirtualVariableGroup(CVariableGroup::create(getId() + "_virtual_variable_group")); } 
     
    479481 
    480482    // Check if data previously requested has been received as expected 
    481     if (wasDataRequestedFromServer && (!isEOF || currentDate <= dateEOF)) 
     483    if (wasDataRequestedFromServer && !isEOF) 
    482484    { 
    483485      CTimer timer("CField::checkForLateDataFromServer"); 
     
    487489      { 
    488490        const CDate nextDataDue = wasDataAlreadyReceivedFromServer ? (lastDataReceivedFromServer + file->output_freq) : context->getCalendar()->getInitDate(); 
    489         isDataLate = nextDataDue < currentDate; 
     491        isDataLate = (nextDataDue <= currentDate); 
    490492 
    491493        if (isDataLate) 
     
    504506              << "Late data at timestep = " << currentDate); 
    505507    } 
     508  } 
     509 
     510  void CField::checkIfMustAutoTrigger(void) 
     511  { 
     512    mustAutoTrigger = serverSourceFilter ? serverSourceFilter->mustAutoTrigger() : false; 
     513  } 
     514 
     515  void CField::autoTriggerIfNeeded(void) 
     516  { 
     517    if (mustAutoTrigger) 
     518      serverSourceFilter->trigger(CContext::getCurrent()->getCalendar()->getCurrentDate()); 
    506519  } 
    507520 
Note: See TracChangeset for help on using the changeset viewer.