Ignore:
Timestamp:
02/23/18 11:15:33 (6 years ago)
Author:
ymipsl
Message:

Bug fix : for temporal filter, to detect_missing value, default_value attribute must be defined in the incoming field. This is not requiere any more since default value is automatically fixed to NaN in the internal workflow.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/filter/temporal_filter.cpp

    r1406 r1440  
    55namespace xios 
    66{ 
    7   static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, double missingValue, CArray<double, 1>& tmpData); 
     7  static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, CArray<double, 1>& tmpData); 
    88 
    99  CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId, 
    1010                                   const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq, 
    11                                    bool ignoreMissingValue /*= false*/, double missingValue /*= 0.0*/) 
     11                                   bool ignoreMissingValue /*= false*/) 
    1212    : CFilter(gc, 1, this) 
    13     , functor(createFunctor(opId, ignoreMissingValue, missingValue, tmpData)) 
     13    , functor(createFunctor(opId, ignoreMissingValue, tmpData)) 
    1414    , isOnceOperation(functor->timeType() == func::CFunctor::once) 
    1515    , isInstantOperation(functor->timeType() == func::CFunctor::instant) 
     
    9595  } 
    9696 
    97   static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, double missingValue, CArray<double, 1>& tmpData) 
     97  static func::CFunctor* createFunctor(const std::string& opId, bool ignoreMissingValue, CArray<double, 1>& tmpData) 
    9898  { 
    9999    func::CFunctor* functor = NULL; 
    100100 
    101     double defaultValue = ignoreMissingValue ? std::numeric_limits<double>::quiet_NaN() : missingValue; 
     101    double defaultValue = std::numeric_limits<double>::quiet_NaN(); 
    102102 
    103103#define DECLARE_FUNCTOR(MType, mtype) \ 
Note: See TracChangeset for help on using the changeset viewer.