Ignore:
Timestamp:
02/08/18 15:40:25 (6 years ago)
Author:
oabramkina
Message:

Bugfix in case of a hole defined on an axis.

File:
1 edited

Legend:

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

    r1401 r1421  
    1919namespace xios { 
    2020 
    21    /// ////////////////////// Déclarations ////////////////////// /// 
     21   /// ////////////////////// Dᅵᅵclarations ////////////////////// /// 
    2222 
    2323   class CGridGroup; 
     
    9191         StdSize  getDataSize(void) const; 
    9292 
    93          /// Entrées-sorties de champs  
     93         /// Entrᅵᅵes-sorties de champs 
    9494         template <int n> 
    9595         void inputField(const CArray<double,n>& field, CArray<double,1>& stored) const; 
     
    421421     int dim = domainMasks.size() * 2 + axisMasks.size(); 
    422422     std::vector<CDomain*> domainP = this->getDomains(); 
     423     std::vector<CAxis*> axisP = this->getAxis(); 
    423424 
    424425     std::vector<int> idxLoop(dim,0), indexMap(numElement), eachDimSize(dim); 
     
    434435      } 
    435436      else if (1 == axisDomainOrder(i)) { 
    436         eachDimSize[indexMap[i]] = axisMasks[idxAxis]->numElements(); 
     437//        eachDimSize[indexMap[i]] = axisMasks[idxAxis]->numElements(); 
     438        eachDimSize[indexMap[i]] = axisP[idxAxis]->n; 
    437439        ++idx; ++idxAxis; 
    438440      } 
     
    486488        else if (1 == axisDomainOrder(i)) 
    487489        { 
    488           maskValue = maskValue && (*axisMasks[idxAxis])(idxLoop[indexMap[i]]); 
     490          int idxTmp = idxLoop[indexMap[i]]; 
     491          if (idxTmp < (*axisMasks[idxDomain]).numElements()) 
     492            maskValue = maskValue && (*axisMasks[idxAxis])(idxTmp); 
     493          else 
     494            maskValue = false; 
     495 
    489496          ++idxAxis; 
    490497        } 
Note: See TracChangeset for help on using the changeset viewer.