Ignore:
Timestamp:
10/19/15 17:41:35 (9 years ago)
Author:
mhnguyen
Message:

Processing pole of rectangular grid with latitude = 90

+) Use average value of all points with latitude 90 (-90)

Test
+) On Curie
+) test_remap pass

File:
1 edited

Legend:

Unmodified
Added
Removed
  • XIOS/trunk/src/node/domain.cpp

    r734 r743  
    375375   } 
    376376 
    377    void CDomain::fillInRectilinearBoundLonLat(CArray<double,2>& boundsLon, CArray<double,2>& boundsLat) 
     377   void CDomain::fillInRectilinearBoundLonLat(CArray<double,2>& boundsLon, CArray<double,2>& boundsLat, 
     378                                              bool isNorthPole, bool isSouthPole) 
    378379   { 
    379380     int i,j,k; 
     
    397398         boundsLon(2,k) = boundsLon(3,k) = ((ibegin + i + 1) != ni_glo) ? (ibegin + i +1) * lonStep + bounds_lon_start 
    398399                                                                        : bounds_lon_end; 
    399  
     400       } 
     401 
     402     double bounds_lat_start_pole = bounds_lat_start; 
     403     double bounds_lat_end_pole   = bounds_lat_end; 
     404     if (isNorthPole) bounds_lat_start_pole = lat_start; 
     405     if (isSouthPole) bounds_lat_end_pole   = lat_end; 
     406 
     407     for(j=0;j<nj;++j) 
     408       for(i=0;i<ni;++i) 
     409       { 
     410         k=j*ni+i; 
    400411         boundsLat(1,k) = boundsLat(2,k) = (0 != (jbegin + j)) ? (jbegin + j) * latStep + bounds_lat_start 
    401                                                                : bounds_lat_start; 
     412                                                               : bounds_lat_start_pole; 
    402413         boundsLat(0,k) = boundsLat(3,k) = ((jbegin + j +1) != nj_glo) ? (jbegin + j +1) * latStep + bounds_lat_start 
    403                                                                : bounds_lat_end; 
     414                                                               : bounds_lat_end_pole; 
    404415       } 
    405416   } 
Note: See TracChangeset for help on using the changeset viewer.