Changeset 1252


Ignore:
Timestamp:
09/05/17 17:35:04 (3 years ago)
Author:
oabramkina
Message:

Correction of previous commit.

File:
1 edited

Legend:

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

    r1251 r1252  
    8282    if (detectMissingValues) 
    8383    { 
    84       CArray<double, 1> dataArray = data[0]->data.copy(); 
    85  
    86       const size_t nbData = dataArray.numElements(); 
    87       for (size_t idx = 0; idx < nbData; ++idx) 
    88       { 
    89         if (NumTraits<double>::isnan(dataArray(idx))) 
    90           dataArray(idx) = missingValue; 
    91       } 
     84      const size_t nbData = data[0]->data.numElements(); 
    9285 
    9386      packet = CDataPacketPtr(new CDataPacket); 
     
    9588      packet->timestamp = data[0]->timestamp; 
    9689      packet->status = data[0]->status; 
    97       packet->data.resize(dataArray.numElements()); 
    98       packet->data = dataArray; 
     90      packet->data.resize(nbData); 
     91      packet->data = data[0]->data; 
     92 
     93      for (size_t idx = 0; idx < nbData; ++idx) 
     94      { 
     95        if (NumTraits<double>::isnan(packet->data(idx))) 
     96          packet->data(idx) = missingValue; 
     97      } 
     98 
    9999    } 
    100100 
Note: See TracChangeset for help on using the changeset viewer.