Ignore:
Timestamp:
01/14/19 13:33:48 (5 years ago)
Author:
oabramkina
Message:

Merging dev to trunk. Major changes:

(1) Grid mask is applied in the source filter of clients: unmasked values are replaced by NaN. It is not reconstructed any more by servers.

(2) Domain/axis mask has been incorporated into data index, with only data index sent to servers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/filter/source_filter.cpp

    r1250 r1637  
    77namespace xios 
    88{ 
    9   CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid, bool compression,  
     9  CSourceFilter::CSourceFilter(CGarbageCollector& gc, CGrid* grid, 
     10                               bool compression /*= true*/, bool mask /*= false*/, 
    1011                               const CDuration offset /*= NoneDu*/, bool manualTrigger /*= false*/, 
    1112                               bool hasMissingValue /*= false*/, 
     
    1415    , grid(grid) 
    1516    , compression(compression) 
     17    , mask(mask) 
    1618    , offset(offset) 
    1719    , hasMissingValue(hasMissingValue), defaultValue(defaultValue) 
     
    4042    } 
    4143    else 
    42       grid->inputField(data, packet->data); 
    43  
    44      
    45      
    46     // if (compression) grid->inputField(data, packet->data) ; 
    47     // else 
    48     // { 
    49     //   // just make a flat copy 
    50     //   CArray<double, N> data_tmp(data.copy()) ; // supress const attribute 
    51     //   CArray<double,1> dataTmp2(data_tmp.dataFirst(),shape(data.numElements()),neverDeleteData) ; 
    52     //   packet->data = dataTmp2 ; 
    53     // } 
     44    { 
     45      if (mask) 
     46        grid->maskField(data, packet->data); 
     47      else 
     48        grid->inputField(data, packet->data); 
     49    } 
    5450    // Convert missing values to NaN 
    5551    if (hasMissingValue) 
Note: See TracChangeset for help on using the changeset viewer.