Changeset 880
- Timestamp:
- 07/04/16 14:13:36 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp
r856 r880 234 234 235 235 236 CArray<bool,1> localMask(nSrcLocal) ; 237 localMask=false ; 238 size_t ndata=domainSrc_->data_i_index.numElements() ; 239 for (int idx=0; idx < ndata; ++idx) 240 { 241 size_t ind = domainSrc_->data_j_index(idx)*domainSrc_->ni+domainSrc_->data_i_index(idx) ; 242 localMask(ind)=domainSrc_->mask_1d(ind) ; 243 } 244 245 236 246 // supress masked data for the source 237 247 int nSrcLocalUnmasked = 0 ; 238 for (int idx=0 ; idx < nSrcLocal; idx++) if (domainSrc_-> mask_1d(idx)) ++nSrcLocalUnmasked ; 248 for (int idx=0 ; idx < nSrcLocal; idx++) if (localMask(idx)) ++nSrcLocalUnmasked ; 249 239 250 240 251 CArray<double,2> boundsLonSrcUnmasked(nVertexSrc,nSrcLocalUnmasked); … … 245 256 for (int idx=0 ; idx < nSrcLocal; idx++) 246 257 { 247 if ( domainSrc_-> mask_1d(idx))258 if (localMask(idx)) 248 259 { 249 260 for(int n=0;n<nVertexSrc;++n) … … 257 268 } 258 269 270 localMask.resize(nDstLocal) ; 271 localMask=false ; 272 ndata=domainDest_->data_i_index.numElements() ; 273 for (int idx=0; idx < ndata; ++idx) 274 { 275 size_t ind = domainDest_->data_j_index(idx)*domainDest_->ni+domainDest_->data_i_index(idx) ; 276 localMask(ind)=domainDest_->mask_1d(ind) ; 277 } 278 259 279 int nDstLocalUnmasked = 0 ; 260 for (int idx=0 ; idx < nDstLocal; idx++) if ( domainDest_-> mask_1d(idx)) ++nDstLocalUnmasked ;280 for (int idx=0 ; idx < nDstLocal; idx++) if (localMask(idx)) ++nDstLocalUnmasked ; 261 281 262 282 CArray<double,2> boundsLonDestUnmasked(nVertexDest,nDstLocalUnmasked); … … 267 287 for (int idx=0 ; idx < nDstLocal; idx++) 268 288 { 269 if ( domainDest_-> mask_1d(idx))289 if (localMask(idx)) 270 290 { 271 291 for(int n=0;n<nVertexDest;++n) … … 279 299 } 280 300 281 // mapper.setSourceMesh(boundsLonSrc.dataFirst(), boundsLatSrc.dataFirst(), nVertexSrc, nSrcLocal, &srcPole[0], globalSrc);282 301 mapper.setSourceMesh(boundsLonSrcUnmasked.dataFirst(), boundsLatSrcUnmasked.dataFirst(), nVertexSrc, nSrcLocalUnmasked, &srcPole[0], globalSrcUnmasked); 283 // mapper.setTargetMesh(boundsLonDest.dataFirst(), boundsLatDest.dataFirst(), nVertexDest, nDstLocal, &dstPole[0], globalDst);284 302 mapper.setTargetMesh(boundsLonDestUnmasked.dataFirst(), boundsLatDestUnmasked.dataFirst(), nVertexDest, nDstLocalUnmasked, &dstPole[0], globalDstUnmasked); 285 303
Note: See TracChangeset
for help on using the changeset viewer.