Changeset 808 for XIOS/trunk/src/node/domain.cpp
- Timestamp:
- 12/13/15 15:43:41 (8 years ago)
- File:
-
- 1 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 }
Note: See TracChangeset
for help on using the changeset viewer.