Cruisers Forum
 

Go Back   Cruisers & Sailing Forums > Seamanship, Navigation & Boat Handling > OpenCPN
Cruiser Wiki Click Here to Login
Register Vendors FAQ Community Calendar Today's Posts Log in

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 27-01-2016, 07:01   #1
Registered User

Join Date: May 2012
Posts: 1,223
oGrib2 Plugin using the ECMWF grib_api

First posting to avoid re-inventing the wheel.

If anyone has been working on decoding Grib2 for OpenCPN please can you add a post to this thread.

Initial work for oGrib2 has been aimed at decoding Grib2 files of tidal current data from the German BSH:

Strömungen

The Grib2 plugin from Pavel/Konni was used as a template (thanks again Pavel). A different approach was taken for accessing the data.

For reading the messages in the file the grib_api library from the ECMWF has been used:

https://software.ecmwf.int/wiki/display/GRIB/Home

The lib is open-source and very well documented. Tools can be built (grib_ls, grib_dump etc) for an initial look at the contents of the Grib file.

A lot of work will be needed to extend the plugin for met fields but I think using grib_api could have a lot of benefits. GRIB edition 1 and edition 2 are both accessed using the same key names/values approach.

Mike
Attached Thumbnails
Click image for larger version

Name:	ogrib2.png
Views:	239
Size:	120.0 KB
ID:	117740  
Rasbats is offline   Reply With Quote
Old 27-01-2016, 19:16   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: oGrib2 Plugin using the ECMWF grib_api

Cool! How nice.
Can Jean Pierre, Sean and others's work be used with it?
Thank you for moving Pavel's work forward!
Rick
rgleason is offline   Reply With Quote
Old 02-02-2016, 15:08   #3
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,007
Re: oGrib2 Plugin using the ECMWF grib_api

Hello rasbats,
Quote:
Originally Posted by Rasbats View Post
First posting to avoid re-inventing the wheel.
If anyone has been working on decoding Grib2 for OpenCPN please can you add a post to this thread.
...
Strömungen
..... GRIB edition 1 and edition 2 are both accessed using the same key names/values approach.
Mike
In any case,, I just downloaded one of these files Grib version 1 and the OCPN Grib plugin displays very well the these grib1 files.
Attached Thumbnails
Click image for larger version

Name:	2016-02-03-OpenCPN 4.1.1329_Grib.jpg
Views:	146
Size:	391.1 KB
ID:	118211  
Gilletarom is offline   Reply With Quote
Old 03-02-2016, 04:29   #4
Registered User

Join Date: May 2012
Posts: 1,223
Re: oGrib2 Plugin using the ECMWF grib_api

G,

Tidal current GRIBs (version 1) from Index of /MyOcean only display the first entry. I am unable to step through the time series in the GRIB. Only the current for the first time is shown. This is for OpencPN 4.1.1329 on both Linux and Windows 8.1.

I have added a task for this in Flyspray.

For the tidal current GRIBs from bsh: ftp://ftp.bsh.de/Stroemungsvorhersagen/ The bsh GRIB for the North Sea/Channel(to Start Point) is only available in GRIB2 format.

Météo-France GRIB files
are now available for free but only in GRIB2 format.

Mike
Rasbats is offline   Reply With Quote
Old 03-02-2016, 06:39   #5
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,007
Re: oGrib2 Plugin using the ECMWF grib_api

Hello Rasbats,

I do not understand your problem. I feel that the time slots can be displayed.

For cons, I found a strange bug with the file "Global". I've already alerted Jean Pierre about it. But he could not take the test because it is currently a bad internet access.

If you could try it and tell me if you see something strange with a "de-zooming" slipped up making the display from left to right and from right to left, for example by standing at 0 ° longitude or 180 ° longitude with your mouse. See also when your mouse go throught the axe of screen ...

Best regards. Gilletarom.
Gilletarom is offline   Reply With Quote
Old 03-02-2016, 08:11   #6
Registered User

Join Date: May 2012
Posts: 1,223
Re: oGrib2 Plugin using the ECMWF grib_api

Hello Gérard,

By file "Global" do you mean the world chart outline? Nothing strange seen with this. If not, could you explain the file causing the problems. Is it a GRIB?

I will post some screen shots of the problem with the GRIB plugin and GRIB1 tidal currents.

Best regards,
Mike
Rasbats is offline   Reply With Quote
Old 03-02-2016, 09:45   #7
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,007
Re: oGrib2 Plugin using the ECMWF grib_api

Hello Mike,
Quote:
Originally Posted by Rasbats View Post
Hello Gérard,
By file "Global" do you mean the world chart outline? Nothing strange seen with this. If not, could you explain the file causing the problems. Is it a GRIB?
I will post some screen shots of the problem with the GRIB plugin and GRIB1 tidal currents.Mike
Sorry, I thought you saw that there was a "global" grib file in index / MyOcean. Try it please.
Gilletarom is offline   Reply With Quote
Old 03-02-2016, 10:02   #8
Registered User

Join Date: May 2012
Posts: 1,223
Re: oGrib2 Plugin using the ECMWF grib_api

Found "Global"!!! You are correct. Panning across the 0 and 180 axes results in the arrows changing direction.

The drop-down for times is working for Global.

I was testing with Bretagne. Could you have a look at the drop-down for that file?

Mike
Rasbats is offline   Reply With Quote
Old 03-02-2016, 10:18   #9
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,007
Re: oGrib2 Plugin using the ECMWF grib_api

Mike,
Quote:
Originally Posted by Rasbats View Post
I was testing with Bretagne. Could you have a look at the drop-down for that file?
Mike
You are right. With Bretagne, only one time slot. But, perhaps, this is normal ? Perhaps the file is corrupted ? Wait and see.
Gilletarom is offline   Reply With Quote
Old 03-02-2016, 12:56   #10
Registered User

Join Date: May 2012
Posts: 1,223
Re: oGrib2 Plugin using the ECMWF grib_api

Maybe, but when I open the file with my prototype oGrib2 I see several messages. And I can step through those messages, i.e. showing different times.

(With the grib_api from ECMWF both GRIB1 and GRIB2 can be accessed)

Mike
Rasbats is offline   Reply With Quote
Old 03-02-2016, 14:12   #11
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 3,007
Re: oGrib2 Plugin using the ECMWF grib_api

Hello Mike,
Quote:
Originally Posted by Rasbats View Post
Maybe, but when I open the file with my prototype oGrib2 I see several messages. And I can step through those messages, i.e. showing different times.
(With the grib_api from ECMWF both GRIB1 and GRIB2 can be accessed)
Mike
Can you explain how to use the software that opens the grib grib 1 and 2?

Thank you beforehand. Gilletarom.
Gilletarom is offline   Reply With Quote
Old 04-02-2016, 04:46   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: oGrib2 Plugin using the ECMWF grib_api

I tried to compile github.com/rasbats/grib2_pi but I think I need the JasPer library or part of it.
Also is this standalone or with O?

Now I see it. It is with O
go to the plugin subdirectory in your tree
clone the plugin repository from githu
rgleason is offline   Reply With Quote
Old 04-02-2016, 05:02   #13
Registered User

Join Date: May 2012
Posts: 1,223
Re: oGrib2 Plugin using the ECMWF grib_api

Rick,

You are way ahead of me.

That git is the fork from Nohal. I have not added anything to it!

I had to compile my own Jasper and remove the one from git. Then link in the new Jasper project etc, etc.

Best wait a while.

Mike
Rasbats is offline   Reply With Quote
Old 04-02-2016, 09:42   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: oGrib2 Plugin using the ECMWF grib_api

Ok, I'll wait. Thanks
rgleason is offline   Reply With Quote
Old 06-02-2016, 04:51   #15
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,711
Images: 2
Re: oGrib2 Plugin using the ECMWF grib_api

Home Page ECMWF
Grib examples using C

Conversion from Grib1 to Grib2
Does not cover local extensions..

https://software.ecmwf.int/wiki/display/GRIB/GRIB+tools


What is Magics? looks interesting
https://software.ecmwf.int/wiki/display/MAGP/Magics
It uses the apache license
rgleason is offline   Reply With Quote
Reply

Tags
plug, rib


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
Plugin: DashBoard SethDart OpenCPN 646 01-07-2024 11:36
OpenCPN PlugIn Development bdbcat OpenCPN 161 04-09-2019 12:50
Using the Chart Downloader plugin with a Portable install of 4.0 ac0rn OpenCPN 7 12-01-2016 14:32
Using the plugin download for BSB 4 charts on CPN capitano Navigation 0 15-07-2015 13:30
Writing Plugin for nv.digital Map Format ? Netsurfer OpenCPN 7 17-08-2010 16:09

Advertise Here


All times are GMT -7. The time now is 07:26.


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.