[ncl-talk] Error creating binary file
Andrew Kren - NOAA Affiliate
andrew.kren at noaa.gov
Fri Feb 23 14:03:58 MST 2018
Dear ncl-talk,
I wrote a program to convert grib data to binary format, as needed for a
fortran program to track cyclones. I write slp, u at 500, and v at 500 to
binary using fbindirwrite. I ran the fortran program, which gave erroneous
wind values. So, I checked my binary program again and printed out the wind
for a few points and they were erroneous. Is this because the wind is
negative at times in direction? Here are some wind values I get when
putting into binary:
(0) -3.98
(1) -3.98
(2) -3.98
(3) -3.99
(4) -3.95
(5) -3.96
(6) -3.96
(7) -3.96
(8) -3.96
(9) -3.96
(10) -3.95
And here is what I get when I read the binary file back in after created:
(0) 102011.4
(1) 102011.4
(2) 102011.4
(3) 102011.4
(4) 102011.4
(5) 102011.4
(6) 102011.4
(7) 102011.4
(8) 102011.4
(9) 102011.4
(10) 102011.4
Am I missing something. I also attached my code. Any help is much
appreciated!
Thanks,
--
Andrew Kren
Assistant Scientist
CIMAS & NOAA/AOML
325 Broadway, Boulder, CO 80305
(303) 497-5418
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180223/be44232b/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: create_binary.ncl
Type: application/octet-stream
Size: 3361 bytes
Desc: not available
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180223/be44232b/attachment.obj>
More information about the ncl-talk
mailing list