Changeset 808
- Timestamp:
- 12/13/15 15:43:41 (8 years ago)
- Location:
- XIOS/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/src/node/domain.cpp
r795 r808 501 501 { 502 502 double latStepStart = latvalue_rectilinear_read_from_file(1)-latvalue_rectilinear_read_from_file(0); 503 bounds_lat_start.setValue(latvalue_rectilinear_read_from_file(0) - latStepStart/2); 503 if (isNorthPole) bounds_lat_start.setValue(latvalue_rectilinear_read_from_file(0) ); 504 else bounds_lat_start.setValue(latvalue_rectilinear_read_from_file(0)-latStepStart/2 ); 505 506 504 507 double latStepEnd = (latvalue_rectilinear_read_from_file(nj_glo-1)-latvalue_rectilinear_read_from_file(nj_glo-2)); 505 bounds_lat_end.setValue(latvalue_rectilinear_read_from_file(nj_glo-1) + latStepEnd/2); 506 double bounds_lat_start_pole = bounds_lat_start; 507 double bounds_lat_end_pole = bounds_lat_end; 508 if (isNorthPole) bounds_lat_start_pole = lat_start; 509 if (isSouthPole) bounds_lat_end_pole = lat_end; 510 508 if (isSouthPole) bounds_lat_end.setValue(latvalue_rectilinear_read_from_file(nj_glo-1)); 509 else bounds_lat_end.setValue(latvalue_rectilinear_read_from_file(nj_glo-1)+latStepEnd/2); 510 511 if (bounds_lat_start > 90.-1e-3) bounds_lat_start=90 ; 512 if (bounds_lat_start < -90.+1e-3) bounds_lat_start=-90 ; 513 if (bounds_lat_end > 90.-1e-3) bounds_lat_end=90 ; 514 if (bounds_lat_end < -90.+1e-3) bounds_lat_end=-90 ; 515 511 516 for(j=0;j<nj;++j) 512 517 for(i=0;i<ni;++i) 513 518 { 514 519 k=j*ni+i; 515 boundsLat(1,k) = boundsLat(2,k) = (0 == (jbegin + j)) ? bounds_lat_start _pole520 boundsLat(1,k) = boundsLat(2,k) = (0 == (jbegin + j)) ? bounds_lat_start 516 521 : (latvalue_rectilinear_read_from_file(jbegin + j)+latvalue_rectilinear_read_from_file(jbegin + j-1))/2; 517 boundsLat(0,k) = boundsLat(3,k) = ((jbegin + j +1) == nj_glo) ? bounds_lat_end _pole522 boundsLat(0,k) = boundsLat(3,k) = ((jbegin + j +1) == nj_glo) ? bounds_lat_end 518 523 : (latvalue_rectilinear_read_from_file(jbegin + j + 1)+latvalue_rectilinear_read_from_file(jbegin + j))/2; 519 524 } -
XIOS/trunk/src/transformation/domain_algorithm_interpolate.cpp
r775 r808 78 78 bool isNorthPole = false; 79 79 bool isSouthPole = false; 80 if (std::abs(poleValue - std::abs(domainSrc_->lat_start)) < NumTraits<double>::epsilon()) isNorthPole = true; 81 if (std::abs(poleValue - std::abs(domainSrc_->lat_end)) < NumTraits<double>::epsilon()) isSouthPole = true; 80 81 if (domainSrc_->latvalue_rectilinear_read_from_file.isEmpty()) 82 { 83 if (std::abs(poleValue - std::abs(domainSrc_->lat_start)) < NumTraits<double>::epsilon()) isNorthPole = true; 84 if (std::abs(poleValue - std::abs(domainSrc_->lat_end)) < NumTraits<double>::epsilon()) isSouthPole = true; 85 } 86 else 87 { 88 if (std::abs(poleValue - std::abs(domainSrc_->latvalue_rectilinear_read_from_file(0))) < NumTraits<double>::epsilon()) isNorthPole = true; 89 if (std::abs(poleValue - std::abs(domainSrc_->latvalue_rectilinear_read_from_file(domainSrc_->nj_glo-1))) < NumTraits<double>::epsilon()) isSouthPole = true; 90 } 82 91 83 92 nVertexSrc = constNVertex;
Note: See TracChangeset
for help on using the changeset viewer.