[ncl-talk] reading binary file

Dennis Shea shea at ucar.edu
Fri Jun 19 07:14:24 MDT 2015


The files you sent re two different sizes (bytes):

  20736000 Jun 19 06:55 viirs_dbdi_gridded_statis2013212.dat
    8294400 Jun 19 06:55 viirs_meandbdi_gridded_statis2015032.dat

Your read code:

       setfileoption("bin","readbyteorder","bigendian")
       var1 = 1e-9 *
tofloat(cbinread("./Feb/viirs_meandbdi_gridded_statis2015032.dat",(/5,720,1440/),"uint"))
       var2 = 1e-9 *
tofloat(cbinread("./Jul/viirs_dbdi_gridded_statis2013212.dat",(/5,720,1440/),"uint"))

indicates the two files should be the same sizes

      N = 5*720*1440*4    ; 4 bytes per integer

      N = 20736000

So something is wrong with the viirs_meandbdi_gridded_statis2015032.dat file




On Thu, Jun 18, 2015 at 2:28 PM, Debasish Hazra <debasish.hazra5 at gmail.com>
wrote:

> Hi,
>
>  I need some help reading binary files with ncl (version 6.3). I have
> attached the code and the resulting plot from the files. Print statement
> shows minimum and maximum value for the first file (1st feb, 2015) , but in
> the resulting figure field it is completely empty without showing any error
> message. Let me know how to resolve this.
>
>  Both files  (gridded_statis2013212.dat and gridded_statis2015032.dat) are
> uploaded in the ftp.
>
> Thanks and regards,
>  Debasish
>
> _______________________________________________
> 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/20150619/8b7e2b8c/attachment.html 


More information about the ncl-talk mailing list