Ignore:
Timestamp:
05/05/17 08:58:33 (7 years ago)
Author:
rlacroix
Message:

Add the ability to check if an output field is active at the current timestep.

The "xios_field_is_active" function can now take an optional logical argument that can be used to enable this new behavior.

File:
1 edited

Legend:

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

    r1018 r1119  
    518518   //---------------------------------------------------------------- 
    519519 
    520    bool CField::isActive(void) const 
    521    { 
    522       return (instantDataFilter != NULL); 
     520   bool CField::isActive(bool atCurrentTimestep /*= false*/) const 
     521   { 
     522      if (atCurrentTimestep && clientSourceFilter) 
     523        return clientSourceFilter->isDataExpected(CContext::getCurrent()->getCalendar()->getCurrentDate()); 
     524      else 
     525        return (instantDataFilter != NULL); 
    523526   } 
    524527 
Note: See TracChangeset for help on using the changeset viewer.