[ncl-talk] area_hi2lores

Dennis Shea shea at ucar.edu
Wed Mar 18 13:51:49 MDT 2015


[1] area_hi2lores is deprecated. It was originally developed for 30S-30N
hi-res precipitation. It should not be used for high latitudes.

     It would be best to use the ESMF. The first 4 examples illustrate how
to interpolate from a hi-res to a low-res grid.
     For a smoothly varying variable like temperature, any of the
interpolation methods is adequate. However, I would suggest
     the conservative method.

    https://www.ncl.ucar.edu/Applications/ESMF.shtml

[2] Why don't you just generate your own ?
     You can change the 'LON' to whatever you want.

LON    = fspan(-180,179.75,1440)
LON!0 = "LON"
LON at units  = "degrees_east"
LON&LON   = LON

printVarSummary(LON)
---
Variable: LON
Type: float
Total Size: 5760 bytes
            1440 values
Number of Dimensions: 1
Dimensions and sizes:    [LON | 1440]
Coordinates:
            LON: [-180..179.75]
Number Of Attributes: 1
  units :    degrees_east
---

Good luck

On Wed, Mar 18, 2015 at 11:50 AM, Agnes Lim Huei Ni <alim at ssec.wisc.edu>
wrote:

> 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
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150318/d3909fff/attachment.html 


More information about the ncl-talk mailing list