Ignore:
Timestamp:
09/12/17 09:45:29 (7 years ago)
Author:
ymipsl
Message:

backport of rev1260 in trunk.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/transformation/Functions/max_reduction.cpp

    r1154 r1261  
    3131                                   CArray<double,1>& dataOut, 
    3232                                   std::vector<bool>& flagInitial, 
    33                                    bool ignoreMissingValue) 
     33                                   bool ignoreMissingValue, bool firstPass) 
    3434{  
    3535  if (ignoreMissingValue) 
    3636  { 
    3737    int nbLocalIndex = localIndex.size(); 
    38     int currentlocalIndex = 0;     
     38    int currentlocalIndex = 0; 
     39    if (firstPass) dataOut=std::numeric_limits<double>::quiet_NaN();     
    3940    for (int idx = 0; idx < nbLocalIndex; ++idx) 
    4041    { 
     
    5152          dataOut(currentlocalIndex) = std::max(*(dataInput + idx), dataOut(currentlocalIndex)); 
    5253        } 
    53       } 
    54       else 
    55       { 
    56         if (flagInitial[currentlocalIndex])  
    57           dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5854      } 
    5955    } 
Note: See TracChangeset for help on using the changeset viewer.