Ignore:
Timestamp:
06/02/23 15:18:25 (13 months ago)
Author:
ymipsl
Message:

Revert commit 2440 & 2442 that introduced bounds management for rectilinear grid, that make transformations unstable. A specific branch has been created to keep this modifications.
YM

Location:
XIOS2/trunk/src/transformation
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • XIOS2/trunk/src/transformation/domain_algorithm_extract.cpp

    r2442 r2511  
    135135    if (!domainSrc_->bounds_lon_2d.isEmpty()) 
    136136    { 
    137       domainDest_->bounds_lon_2d.resize(domainSrc_->bounds_lon_2d.shape()[0], niDest, njDest); 
    138       domainDest_->bounds_lon_2d.resize(domainSrc_->bounds_lon_2d.shape()[0], niDest, njDest); 
     137      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest); 
     138      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest); 
    139139    } 
    140140    else if (!domainSrc_->bounds_lon_1d.isEmpty()) 
    141141    { 
    142       domainDest_->bounds_lon_1d.resize(domainSrc_->bounds_lon_1d.shape()[0], niDest); 
    143       domainDest_->bounds_lon_1d.resize(domainSrc_->bounds_lon_1d.shape()[0], niDest); 
     142      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest); 
     143      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest); 
    144144    } 
    145145  } 
     
    177177        if (!domainSrc_->bounds_lon_2d.isEmpty()) 
    178178        { 
    179           for (int n = 0; n < domainSrc_->bounds_lon_2d.shape()[0]; ++n) 
     179          for (int n = 0; n < domainSrc_->nvertex; ++n) 
    180180          { 
    181181            domainDest_->bounds_lon_2d(n,iDest,jDest) = domainSrc_->bounds_lon_2d(n,iSrc,jSrc); 
     
    185185        else if (!domainSrc_->bounds_lon_1d.isEmpty()) 
    186186        { 
    187           for (int n = 0; n < domainSrc_->bounds_lon_1d.shape()[0]; ++n) 
     187          for (int n = 0; n < domainSrc_->nvertex; ++n) 
    188188          { 
    189189            domainDest_->bounds_lon_1d(n,iDest) = domainSrc_->bounds_lon_1d(n,iSrc); 
  • XIOS2/trunk/src/transformation/domain_algorithm_interpolate.cpp

    r2442 r2511  
    125125  int niSrc = domainSrc_->ni.getValue(), njSrc = domainSrc_->nj.getValue(); 
    126126  bool hasBoundSrc = domainSrc_->hasBounds; 
    127   if ((hasBoundSrc) && (!domainSrc_->nvertex.isEmpty())) nVertexSrc = domainSrc_->nvertex.getValue(); // default is constNVertex = 4 
     127  if (hasBoundSrc) nVertexSrc = domainSrc_->nvertex.getValue(); 
    128128  CArray<double,2> boundsLonSrc(nVertexSrc,localDomainSrcSize); 
    129129  CArray<double,2> boundsLatSrc(nVertexSrc,localDomainSrcSize); 
     
    197197  int niDest = domainDest_->ni.getValue(), njDest = domainDest_->nj.getValue(); 
    198198  bool hasBoundDest = domainDest_->hasBounds; 
    199   if ((hasBoundDest) && (!domainDest_->nvertex.isEmpty())) nVertexDest = domainDest_->nvertex.getValue(); // default is constNVertex = 4 
     199  if (hasBoundDest) nVertexDest = domainDest_->nvertex.getValue(); 
    200200  CArray<double,2> boundsLonDest(nVertexDest,localDomainDestSize); 
    201201  CArray<double,2> boundsLatDest(nVertexDest,localDomainDestSize); 
  • XIOS2/trunk/src/transformation/domain_algorithm_zoom.cpp

    r2442 r2511  
    55#include "grid_transformation_factory_impl.hpp" 
    66#include "attribute_template.hpp" 
    7 #include "type.hpp" 
    87 
    98namespace xios { 
     
    147146  if (domainSrc_->hasBounds) 
    148147  { 
    149     nvertex = ( domainSrc_->type==CDomain::type_attr::rectilinear || domainSrc_->type==CDomain::type_attr::curvilinear) ? 4 : domainSrc_->nvertex ; 
     148    nvertex = domainSrc_->nvertex; 
    150149    domainDest_->nvertex.setValue(nvertex); 
    151150    if (!domainSrc_->bounds_lon_1d.isEmpty()) 
Note: See TracChangeset for help on using the changeset viewer.