Re: regridding TRMM data to 0.5 degree grid

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Mon Jan 17 2011 - 17:30:49 MST

In a sense, either. However, TRMM data span approximately 50S to 50N.
The -49.875 thru +49.875 represent the centers of the 0.25 degree
grid boxes.

Hence, 58S to 58N will be filled with _FillValue.
Not sure where those values came from.

I'd probably use

latS = -49.75
latN = 49.75
nlat = 200
lat = fspan(latS,latN,nlat)

Same for longitude. Start at -179.75

On 1/17/11 4:46 PM, Erik Noble wrote:
> Hi. This is a follow-on to the question posed by B N here
> http://www.ncl.ucar.edu/Support/talk_archives/2009/1554.html
>
> If TRMM data is already on a grid 0.25 by 0.25 grid, where its
> coordinate variables are
> ( from example 7 at http://www.ncl.ucar.edu/Applications/HiResPrc.shtml)
>
> nlat = 400
> mlon = 1440
> lat = ispan(0,nlat-1,1)*0.25 - 49.875
> lon = ispan(0,mlon-1,1)*0.25 - 179.875
>
> lat@long_name = "latitude"
> lat@units = "degrees_north"
> lat!0 = "lat"
> lat&lat = lat
>
> lon@long_name = "longitude"
> lon@units = "degrees_east"
> lon!0 = "lon"
> lon&lon = lon
>
> which method ( A or B ) below would be better for re-gridding
> specifically the TRMM data to 0.5 by 0.5?
> Both?
> Any advice is greatly appreciated.
> Sincerely,
> Erik
>
> A)
> ;****************
> ; Regrid to 0.50 degree
> ;****************
> nlat = 200
> mlon = 720
>
> latGRID = ispan(0,nlat-1,1)*0.50 - 49.875
> latGRID!0 = "lat"
> latGRID@units = "degrees_north"
> latGRID&lat = latGRID
> NLAT = dimsizes(latGRID)
>
> lonGRID = ispan(0,mlon-1,1)*0.50 - 179.875
> lonGRID!0 = "lon"
> lonGRID@units = "degrees_east"
> lonGRID&lon = lonGRID
> MLON = dimsizes(lonGRID)
>
> var = rain
> ; var = lonFlip(var)
> rad = 4.*atan(1.0)/180.
> lat = var(0,:,0)
> clat_025 = cos(lat*rad)
> opt = True
> var_o = area_hi2lores_Wrap (var&lon,var&lat, var , True, 1, lonGRID,
> latGRID, False)
>
> or B)
>
> ;****************
> ; Regrid to 0.50 degree
> ;****************
> nlat = 233
> mlon = 720
> dlon = 0.5
>
> latGRID = fspan(-58,58,nlat)
> latGRID!0 = "lat"
> latGRID@units = "degrees_north"
> latGRID&lat = latGRID
> NLAT = dimsizes(latGRID)
>
> lonGRID = fspan(0,mlon-1,dlon)*dlon, mlon)
> lonGRID!0 = "lon"
> lonGRID@units = "degrees_east"
> lonGRID&lon = lonGRID
> MLON = dimsizes(lonGRID)
>
> var = rain
> ; var = lonFlip(var)
> rad = 4.*atan(1.0)/180.
> lat = var(0,:,0)
> clat_025 = cos(lat*rad)
> opt = True
> var_o = area_hi2lores_Wrap (var&lon,var&lat, var , True, 1, lonGRID,
> latGRID, False)
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Jan 17 17:30:57 2011

This archive was generated by hypermail 2.1.8 : Tue Jan 25 2011 - 14:22:15 MST