[ncl-talk] reading binary files

Debasish Hazra debasish.hazra5 at gmail.com
Tue Dec 16 10:21:44 MST 2014


Thanks Dave again. It solved the problem.



On Mon, Dec 15, 2014 at 6:17 PM, David Brown <dbrown at ucar.edu> wrote:
>
> Hi Debasish,
>
> This file may contain similar information compared to the file you
> sent previously, but it is formatted quite differently and therefore
> you need to program the script to read it differently. There is
> nothing wrong with NCL 6.2.1's behavior with respect to this file. If
> you read the document that you sent along with your code it gives you
> the information you need to know: the file is "little-endian"; it has
> two fields, the first is float data with the missing values set to
> -9999.0, the second is an integer. Since you can only read data of a
> single type using NCL's binary input routines, you need to read the
> data twice; first as a float, and second as an integer. In the first
> case you should keep only the first half of the data and in the second
> only the second half.
>
> I am attaching a a modified version of your script that reads this
> data as specified above, along with a png file that shows both these
> fields plotted.
>  -dave
>
>
> On Fri, Dec 12, 2014 at 2:40 PM, Debasish Hazra
> <debasish.hazra5 at gmail.com> wrote:
> > Once again, strange problem encountered with reading binary in NCL
> (6.21). A
> > week back, David Brown (@ncl)  helped with a script that read a
> particular
> > binary  file. However, After modifying a little, I could read similar
> > dataset (npp_aot550_edr_gridded_0.25_20130727.high.bin) with NCL, but
> looks
> > like something is going wrong either with griddng or colorbar. Colorbar
> > should be between  0 to 1, but it seems to be over 3 at some unusual
> places.
> > Data has been uploaded in ftp and a trial script, data read help has been
> > attached.
> >
> >  Any help is appreciated.
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > 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/20141216/2cf93173/attachment.html 


More information about the ncl-talk mailing list