Changeset 1937 for XIOS/trunk/src/transformation
- Timestamp:
- 09/22/20 11:49:32 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp
r1856 r1937 128 128 CArray<double,2> boundsLonSrc(nVertexSrc,localDomainSrcSize); 129 129 CArray<double,2> boundsLatSrc(nVertexSrc,localDomainSrcSize); 130 CArray<double,1> areaSrc; 130 131 131 132 if (domainSrc_->hasPole) srcPole[2] = 1; … … 178 179 domainSrc_->fillInRectilinearBoundLonLat(lon_g,lat_g, boundsLonSrc, boundsLatSrc); 179 180 } 180 181 182 if (domainSrc_->hasArea) 183 { 184 areaSrc.resize(niSrc*njSrc); 185 for (int j = 0; j < njSrc; ++j) 186 for (int i = 0; i < niSrc; ++i) 187 { 188 int k = j * niSrc + i; 189 areaSrc(k) = domainSrc_->area(i,j); 190 } 191 } 192 181 193 std::map<int,std::vector<std::pair<int,double> > > interpMapValueNorthPole; 182 194 std::map<int,std::vector<std::pair<int,double> > > interpMapValueSouthPole; … … 188 200 CArray<double,2> boundsLonDest(nVertexDest,localDomainDestSize); 189 201 CArray<double,2> boundsLatDest(nVertexDest,localDomainDestSize); 202 CArray<double,1> areaDest; 190 203 191 204 if (domainDest_->hasPole) dstPole[2] = 1; … … 269 282 domainDest_->fillInRectilinearBoundLonLat(lon_g,lat_g, boundsLonDest, boundsLatDest); 270 283 } 271 284 285 if (domainDest_->hasArea) 286 { 287 areaDest.resize(niDest*njDest); 288 for (int j = 0; j < njDest; ++j) 289 for (int i = 0; i < niDest; ++i) 290 { 291 int k = j * niDest + i; 292 areaDest(k) = domainDest_->area(i,j); 293 } 294 } 295 272 296 273 297 … … 329 353 boundsLatSrcUnmasked(n,nSrcLocalUnmasked) = boundsLatSrc(n,idx) ; 330 354 } 331 if (hasSrcArea) areaSrcUnmasked(nSrcLocalUnmasked) = domainSrc_->areavalue(idx)*srcAreaFactor ;355 if (hasSrcArea) areaSrcUnmasked(nSrcLocalUnmasked) = areaSrc(idx)*srcAreaFactor ; 332 356 globalSrcUnmasked[nSrcLocalUnmasked]=globalSrc[idx] ; 333 357 ++nSrcLocalUnmasked ; … … 358 382 boundsLatDestUnmasked(n,nDstLocalUnmasked) = boundsLatDest(n,idx) ; 359 383 } 360 if (hasDstArea) areaDstUnmasked(nDstLocalUnmasked) = domainDest_->areavalue(idx)*dstAreaFactor ;384 if (hasDstArea) areaDstUnmasked(nDstLocalUnmasked) = areaDest(idx)*dstAreaFactor ; 361 385 globalDstUnmasked[nDstLocalUnmasked]=globalDst[idx] ; 362 386 ++nDstLocalUnmasked ;
Note: See TracChangeset
for help on using the changeset viewer.