Changeset 1440 for XIOS/dev/XIOS_DEV_CMIP6
- Timestamp:
- 02/23/18 11:15:33 (6 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/filter/temporal_filter.cpp
r1406 r1440 5 5 namespace xios 6 6 { 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); 8 8 9 9 CTemporalFilter::CTemporalFilter(CGarbageCollector& gc, const std::string& opId, 10 10 const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq, 11 bool ignoreMissingValue /*= false*/ , double missingValue /*= 0.0*/)11 bool ignoreMissingValue /*= false*/) 12 12 : CFilter(gc, 1, this) 13 , functor(createFunctor(opId, ignoreMissingValue, missingValue,tmpData))13 , functor(createFunctor(opId, ignoreMissingValue, tmpData)) 14 14 , isOnceOperation(functor->timeType() == func::CFunctor::once) 15 15 , isInstantOperation(functor->timeType() == func::CFunctor::instant) … … 95 95 } 96 96 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) 98 98 { 99 99 func::CFunctor* functor = NULL; 100 100 101 double defaultValue = ignoreMissingValue ? std::numeric_limits<double>::quiet_NaN() : missingValue;101 double defaultValue = std::numeric_limits<double>::quiet_NaN(); 102 102 103 103 #define DECLARE_FUNCTOR(MType, mtype) \ -
XIOS/dev/XIOS_DEV_CMIP6/src/filter/temporal_filter.hpp
r1358 r1440 26 26 * \param ignoreMissingValue true if and only if the missing value must be ignored 27 27 when doing the operation 28 * \param missingValue the missing value29 28 */ 30 29 CTemporalFilter(CGarbageCollector& gc, const std::string& opId, 31 30 const CDate& initDate, const CDuration samplingFreq, const CDuration samplingOffset, const CDuration opFreq, 32 bool ignoreMissingValue = false , double missingValue = 0.0);31 bool ignoreMissingValue = false); 33 32 34 33 /*! -
XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp
r1417 r1440 1217 1217 checkTimeAttributes(&outFreq); 1218 1218 1219 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty()&& detect_missing_value == true);1219 const bool detectMissingValues = (!detect_missing_value.isEmpty() && detect_missing_value == true); 1220 1220 boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 1221 1221 CContext::getCurrent()->getCalendar()->getInitDate(), 1222 freq_op, freq_offset, outFreq, 1223 detectMissingValues, detectMissingValues ? default_value : 0.0)); 1222 freq_op, freq_offset, outFreq, detectMissingValues)); 1224 1223 1225 1224 instantDataFilter->connectOutput(temporalFilter, 0); … … 1256 1255 checkTimeAttributes(&outFreq); 1257 1256 1258 const bool detectMissingValues = (!detect_missing_value.isEmpty() && !default_value.isEmpty() &&detect_missing_value == true);1257 const bool detectMissingValues = (!detect_missing_value.isEmpty() && detect_missing_value == true); 1259 1258 boost::shared_ptr<CTemporalFilter> temporalFilter(new CTemporalFilter(gc, operation, 1260 1259 CContext::getCurrent()->getCalendar()->getInitDate(), 1261 freq_op, freq_offset, outFreq, 1262 detectMissingValues, detectMissingValues ? default_value : 0.0)); 1260 freq_op, freq_offset, outFreq, detectMissingValues)); 1263 1261 1264 1262 selfReferenceFilter->connectOutput(temporalFilter, 0);
Note: See TracChangeset
for help on using the changeset viewer.