Seamanship & NavigationForum devoted to seamanship and navigation topics, including paper and electronic charting tools.
Topic Review (Newest First)
01-12-2014 02:26 AM
Help reading Grib1 Data (win32)
I'm trying to read Grib1 wind data downloaded from Grib.us. What I've looked at so far comes through as a simple long/lat grid with 16bit values and a float reference offset.
Only problem is I'm getting the wrong values. They bear some resemblance to the original data with wind patterns recognizable but it looks like I've got the powers or the references wrong I just don't understand how. Final results have the wrong magnitudes / directions.
I didn't intend on writing a decoder but didn't find code / libs I could easily include in a win32 program. So here I am.
Basic decoding of the binary data section is below - any hints or tips or pointers towards someone who can help appreciated!