Ignore:
Timestamp:
01/30/14 15:55:42 (10 years ago)
Author:
ymipsl
Message:

Enhancement : using new field attribute "detect_missing_value=true" adn defining a default value, the temporal operator (average, minimum, maximum, accumulate ...) detect missing value in the field and don't take them into account to perform the operation.

YM

File:
1 edited

Legend:

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

    r466 r470  
    458458        else isOnceOperation=false; 
    459459        isFirstOperation=true; 
    460  
     460         
     461           
    461462#define DECLARE_FUNCTOR(MType, mtype)              \ 
    462463   if  (operation.getValue().compare(#mtype) == 0) \ 
    463464   {                                               \ 
    464       boost::shared_ptr<func::CFunctor>            \ 
    465             foperation_(new C##MType(this->data)); \ 
    466       this->foperation = foperation_;              \ 
     465      if (!detect_missing_value.isEmpty() && !default_value.isEmpty() && detect_missing_value==true) \ 
     466      { \ 
     467        boost::shared_ptr<func::CFunctor> foperation_(new C##MType(this->data,default_value)); \ 
     468        this->foperation = foperation_; \  
     469      } \ 
     470      else \ 
     471      { \ 
     472        boost::shared_ptr<func::CFunctor> foperation_(new C##MType(this->data)); \ 
     473        this->foperation = foperation_;  \ 
     474      } \ 
    467475      return;                                      \ 
    468476   } 
Note: See TracChangeset for help on using the changeset viewer.