Changeset 471 for XIOS/trunk


Ignore:
Timestamp:
01/30/14 15:56:39 (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

Location:
XIOS/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/functor.cpp

    r369 r471  
    99 
    1010      CFunctor::CFunctor(const StdString & id, CArray<double, 1>& doutput) 
    11          : SuperClass(id), doutput(doutput), nbcall(0) 
     11         : SuperClass(id), doutput(doutput), nbcall(0),hasMissingValue(false) 
    1212      { /* Ne rien faire de plus */  } 
     13  
     14      CFunctor::CFunctor(const StdString & id, CArray<double, 1>& doutput, double missingValue) 
     15         : SuperClass(id), doutput(doutput), nbcall(0),hasMissingValue(true),missingValue(missingValue) 
     16      {  
     17        /* Ne rien faire de plus */ 
     18      } 
    1319 
    1420      CFunctor::~CFunctor(void) 
     
    5258      void CFunctor::final(void)  
    5359      { 
    54          this->nbcall = 0; 
     60        this->nbcall = 0; 
    5561      }  
    5662 
  • XIOS/trunk/src/functor.hpp

    r449 r471  
    4343            CFunctor(void);                             // Not implemented. 
    4444            CFunctor(const StdString & id, CArray<double,1>& doutput); 
    45             CFunctor(const CFunctor & functor);         // Not implemented. 
     45            CFunctor(const StdString & id, CArray<double,1>& doutput, double missingValue); 
     46           CFunctor(const CFunctor & functor);         // Not implemented. 
    4647            CFunctor(const CFunctor * const functor);   // Not implemented. 
    4748         protected : 
     
    5051            /// Propriétés protégées ///    
    5152            int nbcall;             
     53            bool hasMissingValue ; 
     54            double missingValue ; 
     55            CArray<int,1> nbcalls ; 
    5256      }; // class CFunctor 
    5357   } // namespace func 
Note: See TracChangeset for help on using the changeset viewer.