- Timestamp:
- 09/10/20 13:51:02 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/dev_ym/XIOS_COUPLING/src/filter/source_filter.cpp
r1918 r1930 40 40 packet->data = defaultValue; 41 41 grid->uncompressField(data, packet->data); 42 43 // Convert missing values to NaN 44 if (hasMissingValue) // probably to removed later 45 { 46 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 47 const size_t nbData = packet->data.numElements(); 48 for (size_t idx = 0; idx < nbData; ++idx) 49 { 50 if (defaultValue == packet->data(idx)) 51 packet->data(idx) = nanValue; 52 } 53 } 42 54 } 43 55 else 44 56 { 45 if (mask) grid->maskField(data, packet->data); 46 else grid->inputField(data, packet->data); 47 } 48 // Convert missing values to NaN 49 if (hasMissingValue) 50 { 51 const double nanValue = std::numeric_limits<double>::quiet_NaN(); 52 const size_t nbData = packet->data.numElements(); 53 for (size_t idx = 0; idx < nbData; ++idx) 57 if (mask) grid->maskField(data, packet->data); // => ie coming from model 58 //else grid->inputField(data, packet->data); 59 else 54 60 { 55 if (defaultValue == packet->data(idx)) 56 packet->data(idx) = nanValue; 61 packet->data.resize(data.numElements()) ; // temporary solution, create own source filter for data coming from client 62 CArray<double,1> tmp( (double*)data.dataFirst(),shape(data.numElements()),duplicateData) ; 63 packet->data.reference(tmp) ; // nothing to do if coming from client to server => workflow view 57 64 } 58 65 }
Note: See TracChangeset
for help on using the changeset viewer.