Ignore:
Timestamp:
01/08/18 16:46:46 (4 years ago)
Author:
oabramkina
Message:

Taking into account a possibility of having a hole on the client side (NEMO-like grid).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/XIOS_DEV_CMIP6/src/node/grid.hpp

    r1353 r1390  
    475475        if (2 == axisDomainOrder(i)) 
    476476        { 
    477           maskValue = maskValue && (*domainMasks[idxDomain])(idxLoop[indexMap[i]] + idxLoop[indexMap[i]+1] * eachDimSize[indexMap[i]]); 
     477          int idxTmp = idxLoop[indexMap[i]] + idxLoop[indexMap[i]+1] * eachDimSize[indexMap[i]]; 
     478          if (idxTmp < (*domainMasks[idxDomain]).numElements()) 
     479            maskValue = maskValue && (*domainMasks[idxDomain])(idxTmp); 
     480          else 
     481            maskValue = false; 
    478482          ++idxDomain; 
    479483        } 
Note: See TracChangeset for help on using the changeset viewer.