Ignore:
Timestamp:
06/06/17 10:53:33 (7 years ago)
Author:
mhnguyen
Message:

Correcting a bug: activating detect_missing_value on field source doesn't work correctly

+) If all source data corresponding to a destination data are NaN, this destination data
will turn to be NaN even its default value is zero

Test
+) On Curie
+) Work

File:
1 edited

Legend:

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

    r1076 r1154  
    3636  { 
    3737    int nbLocalIndex = localIndex.size(); 
    38     int currentlocalIndex = 0; 
    39  
    40     dataOut=std::numeric_limits<double>::quiet_NaN(); 
     38    int currentlocalIndex = 0;     
    4139   
    4240    for (int idx = 0; idx < nbLocalIndex; ++idx) 
     
    5452          dataOut(currentlocalIndex) += *(dataInput + idx); 
    5553        } 
     54      } 
     55      else 
     56      { 
     57        if (flagInitial[currentlocalIndex])  
     58          dataOut(currentlocalIndex) = std::numeric_limits<double>::quiet_NaN(); 
    5659      } 
    5760    }     
Note: See TracChangeset for help on using the changeset viewer.