Ignore:
Timestamp:
03/16/17 15:04:53 (7 years ago)
Author:
mhnguyen
Message:

Correcting behavior of detecting_missing_value:

  • Missing value detection is activated only when detecting_missing_value = true

and a default_value is defined.

  • By default, undefined value by the computation of vertical (horizontal) interpolation will be NaN (not a number).

They are only converted to default_value if missing value detection is activated

Test

  • On Curie
  • Work
File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/generic_algorithm_transformation.cpp

    r1018 r1076  
    3030                                            CArray<double,1>& dataOut, 
    3131                                            std::vector<bool>& flagInitial, 
    32                                             const double& defaultValue) 
    33 { 
    34   int nbLocalIndex = localIndex.size();   
    35   bool hasMissingValue = NumTraits<double>::isnan(defaultValue);   
    36   if (hasMissingValue) 
     32                                            bool ignoreMissingValue) 
     33{ 
     34  int nbLocalIndex = localIndex.size();    
     35  double defaultValue = std::numeric_limits<double>::quiet_NaN(); 
     36  if (ignoreMissingValue) 
    3737  { 
    3838    for (int idx = 0; idx < nbLocalIndex; ++idx) 
Note: See TracChangeset for help on using the changeset viewer.