Ignore:
Timestamp:
08/30/17 15:33:51 (7 years ago)
Author:
mhnguyen
Message:

Various bug fixes on mask and zoom

+) Rearrange local index on the receiving side to be coherent global index
+) Include masking information in compress data (data_index) on the receiving side
+) Correct zoom to work in case there are several (not all) processes participating to write data

Test
+) On Curie
+) Simple test

File:
1 edited

Legend:

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

    r1242 r1249  
    3333 
    3434    packet->data.resize(grid->storeIndex_client.numElements()); 
    35     if (compression) grid->inputField(data, packet->data) ; 
    36     else 
    37     { 
    38       // just make a flat copy 
    39       CArray<double, N> data_tmp(data.copy()) ; // supress const attribute 
    40       CArray<double,1> dataTmp2(data_tmp.dataFirst(),shape(data.numElements()),neverDeleteData) ; 
    41       packet->data = dataTmp2 ; 
    42     } 
     35    grid->inputField(data, packet->data) ; 
     36    // if (compression) grid->inputField(data, packet->data) ; 
     37    // else 
     38    // { 
     39    //   // just make a flat copy 
     40    //   CArray<double, N> data_tmp(data.copy()) ; // supress const attribute 
     41    //   CArray<double,1> dataTmp2(data_tmp.dataFirst(),shape(data.numElements()),neverDeleteData) ; 
     42    //   packet->data = dataTmp2 ; 
     43    // } 
    4344    // Convert missing values to NaN 
    4445    if (hasMissingValue) 
     
    7273    packet->timestamp = date; 
    7374    packet->status = CDataPacket::NO_ERROR; 
    74  
    75     // if (data.size() != grid->storeIndex_toSrv.size()) 
     75     
    7676    if (data.size() != grid->storeIndex_fromSrv.size()) 
    7777      ERROR("CSourceFilter::streamDataFromServer(CDate date, const std::map<int, CArray<double, 1> >& data)", 
     
    8282    std::map<int, CArray<double, 1> >::const_iterator it, itEnd = data.end(); 
    8383    for (it = data.begin(); it != itEnd; it++) 
    84     { 
    85       // CArray<int,1>& index = grid->storeIndex_toSrv[it->first]; 
     84    {       
    8685      CArray<int,1>& index = grid->storeIndex_fromSrv[it->first]; 
    8786      for (int n = 0; n < index.numElements(); n++) 
Note: See TracChangeset for help on using the changeset viewer.