Changeset 2322


Ignore:
Timestamp:
04/08/22 11:58:08 (2 years ago)
Author:
ymipsl
Message:

Some fix in domain_extract transformation for curvilinear grid.
YM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/dev/dev_ym/XIOS_COUPLING/src/transformation/domain_algorithm/domain_algorithm_extract.cpp

    r2270 r2322  
    141141  domainDest_->j_index.resize(niDest*njDest); 
    142142 
     143  if (!domainSrc_->nvertex.isEmpty()) domainDest_->nvertex = domainSrc_->nvertex ; 
     144 
    143145  // Resize lon/lat, bounds, area arrays to local domain dimensions 
    144146  if (!domainSrc_->lonvalue_1d.isEmpty()) 
     
    149151      domainDest_->latvalue_1d.resize(njDest); 
    150152    } 
    151     else if (domainDest_->type == CDomain::type_attr::unstructured) 
    152     { 
    153       domainDest_->lonvalue_1d.resize(niDest); 
    154       domainDest_->latvalue_1d.resize(niDest); 
     153    else  
     154    { 
     155      domainDest_->lonvalue_1d.resize(niDest*njDest); 
     156      domainDest_->latvalue_1d.resize(niDest*njDest); 
    155157    } 
    156158  } 
     
    165167    { 
    166168      domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest); 
    167       domainDest_->bounds_lon_2d.resize(domainDest_->nvertex, niDest, njDest); 
     169      domainDest_->bounds_lat_2d.resize(domainDest_->nvertex, niDest, njDest); 
    168170    } 
    169171    else if (!domainSrc_->bounds_lon_1d.isEmpty()) 
    170172    { 
    171173      domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest); 
    172       domainDest_->bounds_lon_1d.resize(domainDest_->nvertex, niDest); 
     174      domainDest_->bounds_lat_1d.resize(domainDest_->nvertex, niDest); 
    173175    } 
    174176  } 
     
    272274          domainDest_->latvalue_1d(jIdxDestLocal) = domainSrc_->latvalue_1d(jIdxSrcLocal); 
    273275        } 
    274         else if (domainDest_->type == CDomain::type_attr::unstructured) 
     276        else 
    275277        { 
    276278          domainDest_->lonvalue_1d(countDest) = domainSrc_->lonvalue_1d(countSrc); 
     
    280282      else if (!domainDest_->lonvalue_2d.isEmpty()) 
    281283      { 
    282         if (domainDest_->type == CDomain::type_attr::curvilinear) 
    283         { 
    284           domainDest_->lonvalue_2d(iIdxDestLocal, jIdxDestLocal) = domainSrc_->lonvalue_2d(iIdxSrcLocal,jIdxSrcLocal); 
    285           domainDest_->latvalue_2d(iIdxDestLocal, jIdxDestLocal) = domainSrc_->latvalue_2d(iIdxSrcLocal,jIdxSrcLocal); 
    286         } 
     284        domainDest_->lonvalue_2d(iIdxDestLocal, jIdxDestLocal) = domainSrc_->lonvalue_2d(iIdxSrcLocal,jIdxSrcLocal); 
     285        domainDest_->latvalue_2d(iIdxDestLocal, jIdxDestLocal) = domainSrc_->latvalue_2d(iIdxSrcLocal,jIdxSrcLocal); 
    287286      } 
    288287       
Note: See TracChangeset for help on using the changeset viewer.