Ignore:
Timestamp:
10/24/17 11:03:29 (4 years ago)
Author:
ymipsl
Message:

Fix conflict between for domain mask_1d and mask_2d when inheritance is done after transformation. Now class attribute "domainMask" is fill either by mask_1d or mask_2d and will be used instead of mask_1d in code.
This is a temporary fix which will solve later by reconstructing a cleanear grid graph.

YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/transformation/domain_algorithm_expand.cpp

    r1300 r1311  
    168168  int njSrc = domainSource->nj, jbegin = domainSource->jbegin; 
    169169  int dataDimSrc = domainSource->data_dim; 
    170   CArray<bool,1>& mask_1d_src = domainSource->mask_1d; 
     170  CArray<bool,1>& mask_1d_src = domainSource->domainMask; 
    171171  CArray<int,1>& i_index_src = domainSource->i_index; 
    172172  CArray<int,1>& j_index_src = domainSource->j_index; 
     
    231231  domainDestination->global_zoom_nj.setValue(domainSource->global_zoom_nj+2); 
    232232 
    233   CArray<bool,1>& mask_1d_dst = domainDestination->mask_1d; 
     233  CArray<bool,1>& mask_1d_dst = domainDestination->domainMask; 
    234234  CArray<int,1>& i_index_dst  = domainDestination->i_index; 
    235235  CArray<int,1>& j_index_dst  = domainDestination->j_index;   
     
    453453     domainDestination->latvalue_1d = (lat_dst); 
    454454  } 
     455   domainDestination->mask_1d.resize(domainDestination->domainMask.numElements()) ; 
     456   domainDestination->mask_1d=domainDestination->domainMask ; 
    455457   domainDestination->computeLocalMask() ; 
    456458} 
     
    485487  // Now extend domain destination 
    486488  int niGlob = domainSource->ni_glo; 
    487   CArray<bool,1>& mask_1d_src = domainSource->mask_1d; 
     489  CArray<bool,1>& mask_1d_src = domainSource->domainMask; 
    488490  CArray<int,1>& i_index_src = domainSource->i_index; 
    489491  CArray<double,1>& lon_src = domainSource->lonvalue_1d; 
     
    508510  } 
    509511 
    510   CArray<bool,1>& mask_1d_dst = domainDestination->mask_1d; 
     512  CArray<bool,1>& mask_1d_dst = domainDestination->domainMask; 
    511513  CArray<int,1>& i_index_dst = domainDestination->i_index; 
    512514  CArray<int,1>& j_index_dst = domainDestination->j_index; 
     
    665667  // Update ni 
    666668  domainDestination->ni.setValue(newNbLocalDst); 
     669  domainDestination->mask_1d.resize(domainDestination->domainMask.numElements()) ; 
     670  domainDestination->mask_1d=domainDestination->domainMask ; 
    667671  domainDestination->computeLocalMask() ; 
    668672} 
Note: See TracChangeset for help on using the changeset viewer.