Changeset 1241
- Timestamp:
- 08/10/17 18:13:06 (7 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/src/filter/source_filter.cpp
r1210 r1241 7 7 namespace xios 8 8 { 9 CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid, 9 CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid, bool compression, 10 10 const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/, 11 11 bool hasMissingValue /*= false*/, … … 13 13 : COutputPin(gc, manualTrigger) 14 14 , grid(grid) 15 , compression(compression) 15 16 , offset(offset) 16 17 , hasMissingValue(hasMissingValue), defaultValue(defaultValue) … … 32 33 33 34 packet->data.resize(grid->storeIndex_client.numElements()); 34 grid->inputField(data, packet->data); 35 35 if (compression) grid->inputField(data, packet->data) ; 36 else 37 { 38 // just make a flat copy 39 CArray<double,1> dataTmp(data.copy().dataFirst(),shape(data.numElements())) ; 40 packet->data.reference(dataTmp) ; 41 } 36 42 // Convert missing values to NaN 37 43 if (hasMissingValue) -
XIOS/dev/XIOS_DEV_CMIP6/src/filter/source_filter.hpp
r1201 r1241 27 27 */ 28 28 CSourceFilter(CGarbageCollector& gc, CGrid* grid, 29 bool compression=true, 29 30 const CDuration offset = NoneDu, bool manualTrigger = false, 30 31 bool hasMissingValue = false, … … 64 65 const bool hasMissingValue; 65 66 const double defaultValue; 67 const bool compression ; //!< indicate if the data need to be compressed : on client size : true, on server side : false 66 68 }; // class CSourceFilter 67 69 } // namespace xios -
XIOS/dev/XIOS_DEV_CMIP6/src/node/field.cpp
r1240 r1241 950 950 { 951 951 if (!instantDataFilter) 952 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid ));952 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid,false)); 953 953 954 954 // If the field data is to be read by the client or/and written to a file … … 965 965 { 966 966 if (!instantDataFilter) 967 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid ));967 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, false)); 968 968 969 969 // If the field data is to be read by the client or/and written to a file … … 1009 1009 // Check if the data is to be read from a file 1010 1010 else if (file && !file->mode.isEmpty() && file->mode == CFile::mode_attr::read) 1011 instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, 1011 instantDataFilter = serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, 1012 1012 freq_offset.isEmpty() ? NoneDu : freq_offset, 1013 1013 true, … … 1016 1016 { 1017 1017 if (check_if_active.isEmpty()) check_if_active = false; 1018 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, NoneDu, false,1018 instantDataFilter = clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, NoneDu, false, 1019 1019 detectMissingValues, defaultValue)); 1020 1020 } … … 1092 1092 { 1093 1093 if (!serverSourceFilter) 1094 serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, 1094 serverSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, 1095 1095 freq_offset.isEmpty() ? NoneDu : freq_offset, 1096 1096 true, … … 1110 1110 { 1111 1111 if (check_if_active.isEmpty()) check_if_active = false; 1112 clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, NoneDu, false,1112 clientSourceFilter = boost::shared_ptr<CSourceFilter>(new CSourceFilter(gc, grid, true, NoneDu, false, 1113 1113 detectMissingValues, defaultValue)); 1114 1114 }
Note: See TracChangeset
for help on using the changeset viewer.