[ncl-talk] Data conversion

Kevin Vermeesch kevin.c.vermeesch at nasa.gov
Thu Feb 4 11:49:01 MST 2016


The link below provides some details about the format of the 
uncompressed data file that should be helpful. You'll need this to read 
the file into any type of program/software. You need to understand the 
format before you can use the file.
http://www.cpc.ncep.noaa.gov/products/global_precip/html/README



On 2/4/2016 1:30 PM, Alan Brammer wrote:
> ok, wow. Don't send the same message 3 times, if the first answers 
> weren't complete at least expand and attempt something not just copy 
> paste the same lines again.
>
> as said before .Z means it's compressed. 
>  gunzip merg_2016020123_4km-pixel.Z  will uncompress it. Then you have 
> a binary file as a small amount of googling would have told you.
> The same search would have linked you to various messages on here and 
> various scripts where other people have included simple examples of 
> this file type (myself included). Here is an example of reading and 
> making a simple plot.  There are plenty of examples on how to write 
> netcdf on the NCL website so you should develop code from there.  Most 
> simple example at bottom of script below.
> https://www.ncl.ucar.edu/Applications/o-netcdf.shtml
>
> Read the documentation on the below functions and understand what is 
> occurring .
>
>
> begin
> file_name_read = "merg_2016020123_4km-pixel"
>
> ir_u = byte2flt( fbindirread (file_name_read ,0, 
> (/2,3298,9896/),"ubyte"))
>
>
> lon_g = fspan(0.0182,360,9896)
> lat_g = fspan(59.982,59.982-0.036383683*3298,3298)
> lon_g at units      = "degrees_east"
> lon_g at long_name  = "longitude"
> lon_g at short_name = "longitude"
> lon_g!0 = "lon"
> lon_g&lon = lon_g
>
> lat_g at units      = "degrees_north"
> lat_g at long_name  = "latitude"
> lat_g at short_name = "latitude"
> lat_g!0 = "lat"
> lat_g&lat = lat_g
>
>
> ir_u!0      = "time"
> ir_u!1      = "lat"
> ir_u!2      = "lon"
>
> ir_u&lat    = lat_g
> ir_u&lon    = lon_g
>
> ir_u at _FillValue= 255
>
>
> wks = gsn_open_wks("X11","")
> res = True
> res at cnFillOn = True
> res at cnFillMode = "RasterFill"
> res at cnLinesOn = False
> plot = gsn_csm_contour_map(wks, ir_u(0,:,:), res)
>
> ncout = addfile(file_name_read+".nc","c")
> ncout->ir_data = ir_u
>
> end
>
>
>
>
>
>> On 4 Feb 2016, at 13:04, Benjamin Alabi <alabibenjamin2 at gmail.com 
>> <mailto:alabibenjamin2 at gmail.com>> wrote:
>>
>> Thanks for your assistance sir. I've tried the cdo to get general 
>> information on the data, but it didn't work
>> I need help from someone that can guide me to convert this data 
>> format - 'merg_2012091000_4km-pixel.Z' to netcdf format.
>> I download Gobally-merged (60N-60S) pixel-resolution IR brightness 
>> temperature data (equivalent blackbody temps), merged from all 
>> available geostationary satellites (GOES-8/10, METEOSAT-7/5)
>> This is the link:
>> http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancillary&version=001&CGISESSID=25c6337b80163b3743e8bea85d015558 
>> <http://mirador.gsfc.nasa.gov/cgi-bin/mirador/presentNavigation.pl?tree=project&dataset=Global-merged%20IR%20Brightness%20Temperature%20Data&project=TRMM&dataGroup=Ancillary&version=001&CGISESSID=25c6337b80163b3743e8bea85d015558>.
>> I really want it to be in netcdf format.
>>
>> Regard
>>
>>
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at ucar.edu <mailto:ncl-talk at ucar.edu>
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20160204/d3f9d32a/attachment.html 


More information about the ncl-talk mailing list