[ncl-talk] Reading 3G68 TRMM

Dennis Shea shea at ucar.edu
Sun Aug 16 07:35:34 MDT 2015


Please read:
  https://www.ncl.ucar.edu/Document/Functions/Built-in/onedtond.shtml

=================
You must look at your data.  There are different resolutions (0.25,
0.50, ..). A 0.5 light have

3G68 7.1 NONE NONE NASA/JAXA/NICT 2011-08-14T21:16UTC
360 720 -90 -180 0.5 20100901
-40 40 -180 180
Grid_First_Row=0 Grid_Center_Latitude=-89.75 Grid_First_Column=0
Grid_Center_Longitude=-179.75 Grid_Cell_Resolution=0.5 Duration=Day

So, in the function below,
   latStrt  = -89.75
   latLast = abs(latStrt)
   lonStrt = -179.75
   lonLast = abs(latStrt)
   nlat  = 360
   mlon = 729

=====


undef("3G68_txt2latlon")
function 3G68_txt2latlon(x[*], nlat[1]:integer, mlon[1]:integer \
                                       ,latStrt[1]:numeric, latLast[1]         \
                                       ,lonStrt[1]:numeric,lonLast[1]:numeric)
begin
    data = onedtooned(x, (/nlat,mlon/) )

    lat     = fspan(latStrt,latLast,nlat)
    lat!0  = "lat"
    lat at units = "degrees_north"
    lon    = fspan(lonStrt,latLast,mlon)
    lon!0 ="lon"
    lon at units = "degrees_east"

    data!0 = "lat"
    data!1 = "lon"
    data&lat = lat
    data&lon = lon
    data at long_name = "..."
    data at units = "..."

    return(data)
end



On Sun, Aug 16, 2015 at 12:15 AM, Ipsita Putatunda
<ipsita.putatunda at gmail.com> wrote:
> Dear all,
>    I need to get a two dimensional variable Var(lat,lon) from TRMM 3G68
> dataset which is in ascii form. I am able to read the data using asciiread,
> and then by using str_get_field function, but how to convert it into a 2
> dimensional variable whose coordinate will be lat and lon. Any help in this
> issue will be appreciated.
>
> Thanks in advance,
> Ipsita
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


More information about the ncl-talk mailing list