[ncl-talk] area_hi2lores

Agnes Lim Huei Ni alim at ssec.wisc.edu
Wed Mar 18 11:50:42 MDT 2015


Hi,

I wish to use area_hi2lores to regrid my high resolution data to 0.25 
degree.

Variable: reorder_int_nr_T
Type: float
Total Size: 1725834240 bytes
             431458560 values
Number of Dimensions: 3
Dimensions and sizes:    [lv_ISBL3 | 26] x [lat | 2881] x [lon | 5760]
Coordinates:
             lat: [ -90..  90]
             lon: [-180..179.9375]
Number Of Attributes: 2
   units :    K
   _FillValue :    1e+15

Variable: lon_pgbq
Type: float
Total Size: 5760 bytes
             1440 values
Number of Dimensions: 1
Dimensions and sizes:    [g0_lon_1 | 1440]
Coordinates:
             g0_lon_1: [ 0..359.75]
Number Of Attributes: 9
   long_name :    longitude
   GridType :    Cylindrical Equidistant Projection Grid
   units :    degrees_east
   Dj :    0.25
   Di :    0.25
   Lo2 :    359.75
   La2 :    -90
   Lo1 :     0
   La1 :    90

I can't use lonFlip to reorder lon_pgbq. So in this case i use the 
following.

         dim=dimsizes(lon_pgbq)
          do i=1, dim(0)-1
             if(lon_pgbq(i) .gt. 180.0) then
               lon+pgbq(i)=lon_pgbq(i)-360
             end if
          end do
          lon_pgbq_1=new((/dim(0)/), "float")
          lon_pgbq_1(0:718)=lon_pgbq(721:1439)
          lon_pgbq_1(719:1439)=lon_pgbq(0:720)
          delete(dim)

regrid_int_nr_T=area_hi2lores(lon,lat,reorder_int_nr_T,True,1,lon_pgbq_1,lat_pgbq,False

Variable: regrid_int_nr_T
Type: float
Total Size: 107976960 bytes
             26994240 values
Number of Dimensions: 3
Dimensions and sizes:    [lv_ISBL3 | 26] x [lat | 721] x [lon | 1440]
Coordinates:
             lat: [-90..90]
             lon: [-179.75..180]
Number Of Attributes: 1
   _FillValue :    1e+15


Is there a cleaner way to do it?

Thanks
Agnes


More information about the ncl-talk mailing list