[ncl-talk] HOW TO READ TRMM 3B42 data?

Dennis Shea shea at ucar.edu
Fri Jul 10 07:49:16 MDT 2015


non-NCL response:
   I assume you have a reason for using  3B42RT (real-time) files rather
than the 3B42 (research quality) files.
   If you go to  http://mirador.gsfc.nasa.gov/ and enter the keyword
 3B42  you can download the 3B42 data as netCDF.

---
NCL

NCL's direct access functions can be used to access records of differernt
lengths. However, it requires the user to do some book keeping.
Attached is a script that loops over multiple 3B42RT binary files and
creates corresponding netCDF files.

If you don't want the netCDF files, remove the 'Create netCDF' section.

Good luck


On Thu, Jul 9, 2015 at 6:31 PM, 闯关东 <125536017 at qq.com> wrote:

> Dear Sir,
>
> I am reading the TRMM 3B42RT data with ncl, the data is writen in a direct
> format with only one record. But in this record, there are a header, 3
> short integer and 1 byte arrays.
>
> I am trying to read it with fbindirread, but the data is not OK.
>
> The fortran code to read the file is as following:
>
>             READ ( iunit, REC=1, ERR=100, IOSTAT=iostat ) head (1:2880),
>      +          ( ( i2p (i, j), i = 1, LN ), j = 1, LT ),
>      +          ( ( i2e (i, j), i = 1, LN ), j = 1, LT ),
>      +          ( ( np1 (i, j), i = 1, LN ), j = 1, LT ),
>      +          ( ( i2u (i, j), i = 1, LN ), j = 1, LT )
>
> The NCL code i want to read the file is as followed,
>
> head = fbindirread("3B42RT.2013071318.7.bin",0,(/2880/),"Character")
> trmm1 = fbindirread("3B42RT.2013071318.7.bin",1,(/480,1440/),"short")
> trmm2 = fbindirread("3B42RT.2013071318.7.bin",2,(/480,1440/),"short")
> trmm3 = fbindirread("3B42RT.2013071318.7.bin",3,(/480,1440/),"byte")
> trmm4 = fbindirread("3B42RT.2013071318.7.bin",4,(/480,1440/),"short")
>
> If i set the parameter "rec_num" 0,1,2,3,4 all to 0, the results is also
> wrong.
>
> How to read this file? Attached are the fortran code and a sample data.
>
> I am waiting for your quick reply. Thanks a lot.
>
> --
> yours,
> Best regards,
>
> Yuchun
>
> _______________________________________________
> 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/20150710/ef19cbf8/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 3B42RT.bin2nc.ncl
Type: application/octet-stream
Size: 9799 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150710/ef19cbf8/attachment.obj 


More information about the ncl-talk mailing list