Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 29-05-2020, 15:39   #1
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
grb file details

Hi all,

I routinely download huge grib files from the dutch meteo office and convert these to much smaller files containing just the variables that are of interest to me.

This works fine for wind, air temp and air pressure; the info is recognized by opencpn grib plugin and displayed as expected.

However, I am having trouble to figure out what the requirements are in order for opencpn to recognize information on e.g. wind gusts and rainfall. The information is in the huge files, but I cannot get opencpn grib plugin to recognize these variables.

Can someone point out where I can find detailed information on the grb file requirements in order to have opencpn grib plugin recognize the info?

any help appreciated!

regards knoek van soest
knoekvansoest is offline   Reply With Quote
Old 29-05-2020, 23:14   #2
Registered User
 
Auspicious's Avatar

Join Date: Jun 2003
Location: Chesapeake Bay
Boat: HR 40
Posts: 3,651
Send a message via Skype™ to Auspicious
Re: grb file details

https://lmgtfy.com/?q=opencpn+grib

First response is the OpenCPN documentation for overlaying grib information.
__________________
sail fast and eat well, dave
AuspiciousWorks
Beware cut and paste sailors
Auspicious is offline   Reply With Quote
Old 30-05-2020, 00:09   #3
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
Re: grb file details

Ok so maybe my question was not clear ... I have a grb file provided by the dutch meteo office. I have confirmed personally that this file contains info on wind gusts, precipitation, cloud cover. But these variables are not shown in the grib plugin. Not sure why. At this point, I suspect that this is because the field codes (parameter numbers etc) in the grb files do not match what opencpn grib plugin expects. I am aware of the standard documentation, but in that I have not found detailed information on the parameters that opencpn grib plugin expects in the grb files. Once I know this it is straightforward (using a small python prog) to transform the data in the source grb file to a target grb file that opencpn grib plugin will understand. Thus I am looking for low level details on the structure of the grb files that opencpn grib plugin expects.
knoekvansoest is offline   Reply With Quote
Old 30-05-2020, 00:16   #4
Registered User

Join Date: May 2012
Posts: 1,197
Re: grb file details

knoekvansoest...

Two files here may help:

https://github.com/OpenCPN/OpenCPN/t...ns/grib_pi/src

The files are:
GribV1Record.cpp
GribV2Record.cpp

This will tell you the parameters used by OpenCPN.

Mike
Rasbats is offline   Reply With Quote
Old 30-05-2020, 04:51   #5
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
Re: grb file details

Quote:
Originally Posted by Rasbats View Post
knoekvansoest...

Two files here may help:

https://github.com/OpenCPN/OpenCPN/t...ns/grib_pi/src

The files are:
GribV1Record.cpp
GribV2Record.cpp

This will tell you the parameters used by OpenCPN.

Mike
Excellent! I am sure that will enable me to sort this out. Thanks Mike!
knoekvansoest is offline   Reply With Quote
Old 31-05-2020, 11:39   #6
Registered User

Join Date: Jun 2015
Posts: 379
Re: grb file details

Quote:
Originally Posted by knoekvansoest View Post
Excellent! I am sure that will enable me to sort this out. Thanks Mike!
Is a sample available? At least with center number?

For gust it's likely an issue with the level 0, 2m or 10m.

For cloud and rain there's big if else or a switch on center number.
If dutch center is not in, it's unlikely defaults are going to work.

Wind, pressure an temp are more standard an work out of the box most of the time.
did-g is offline   Reply With Quote
Old 31-05-2020, 14:02   #7
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
Re: grb file details

Quote:
Originally Posted by did-g View Post
Is a sample available? At least with center number?

For gust it's likely an issue with the level 0, 2m or 10m.

For cloud and rain there's big if else or a switch on center number.
If dutch center is not in, it's unlikely defaults are going to work.

Wind, pressure an temp are more standard an work out of the box most of the time.
Dutch meteo office (KNMI) is indeed one of the options in a big if else in the c code. Didn't have time yet to look into this in detail, but my idea at this point is to tweak the grb file that I can download from the meteo office (which I tweak anyways to reduce size) to make it digestible to the existing c code for the grib plugin.

The obvious alternative would be to update the c code of the grib plugin in a future release, to make it suitable to deal with current KNMI files ...

knoek van soest
knoekvansoest is offline   Reply With Quote
Old 09-07-2020, 14:14   #8
Registered User

Join Date: Sep 2017
Location: Hoorn NL
Boat: 30 ft Pion
Posts: 13
Re: grb file details

Update:

this was more involved than I (as a complete newbie on the details of gribfiles, accessed through pygrib) anticipated, but in the end I have figured out (per parameter) which grib keys had to be changed in the KNMI grib messages in order to make opencpn grib plugin accept them. I achieved this by comparing key/value pairs with a grib file from another source that was loaded ok in opencpn. I now have access to wind, wind gusts, pressure, rainfall, cloud cover and air temp, which is what I intended!

Happy sailing and thanks for your help,
Knoek
knoekvansoest is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Convert "*.route" Route File into ".*wpt" File To Be Used in Maxsea V.10 doiroda Navigation 7 12-03-2020 06:00
Predictwind´s .pwr files to .grb files? andreas.mehlin Navigation 0 16-02-2017 07:03
Large .grb file that won't open in O... sailorF54 OpenCPN 3 28-05-2016 06:41
WIND AND STREAM .GRB FILES IN OCPN sinbad7 OpenCPN 0 07-07-2014 15:07
3.0.0 : make package : bad file right after installing the deb file manuprenlair OpenCPN 1 12-06-2012 04:17

Advertise Here


All times are GMT -7. The time now is 22:50.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.