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/axis.cpp

    r1416 r1421  
    1616namespace xios { 
    1717 
    18    /// ////////////////////// Définitions ////////////////////// /// 
     18   /// ////////////////////// Definitions ////////////////////// /// 
    1919 
    2020   CAxis::CAxis(void) 
     
    284284      } 
    285285 
     286      // Remove this check because it doen't make sense in case of a hole or overlapping axes 
    286287      if (!this->value.isEmpty()) 
    287288      { 
    288         StdSize true_size = value.numElements(); 
    289         if (this->n.getValue() != true_size) 
    290           ERROR("CAxis::checkAttributes(void)", 
    291                 << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
    292                 << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 
     289//        StdSize true_size = value.numElements(); 
     290//        if (this->n.getValue() != true_size) 
     291//          ERROR("CAxis::checkAttributes(void)", 
     292//                << "[ id = '" << getId() << "' , context = '" << CObjectFactory::GetCurrentContextId() << "' ] " 
     293//                << "The axis is wrongly defined, attribute 'value' has a different size (" << true_size << ") than the one defined by the \'size\' attribute (" << n.getValue() << ")."); 
    293294        this->hasValue = true; 
    294295      } 
    295296 
    296       this->checkData(); 
    297       this->checkZoom(); 
    298       this->checkMask(); 
    299297      this->checkBounds(); 
    300       this->checkLabel(); 
     298 
     299      CContext* context=CContext::getCurrent(); 
     300      if (context->hasClient) 
     301      { 
     302        this->checkData(); 
     303        this->checkZoom(); 
     304        this->checkMask(); 
     305        this->checkLabel(); 
     306      } 
    301307   } 
    302308 
     
    457463     if (this->areClientAttributesChecked_) return; 
    458464 
    459      this->checkAttributes(); 
     465     CContext* context=CContext::getCurrent(); 
     466     if (context->hasClient && !context->hasServer) this->checkAttributes(); 
    460467 
    461468     this->areClientAttributesChecked_ = true; 
     
    697704      } 
    698705 
    699       localIndexToWriteOnServer.resize(nbWritten); 
     706      localIndexToWriteOnServer.resize(writtenGlobalIndex.numElements()); 
     707//      localIndexToWriteOnServer.resize(nbWritten); 
    700708 
    701709      nbWritten = 0; 
Note: See TracChangeset for help on using the changeset viewer.