Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 27-01-2016, 08:01   #1
Registered User

Join Date: May 2012
Posts: 408
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:	151
Size:	120.0 KB
ID:	117740  
__________________

__________________
Rasbats is offline   Reply With Quote
Old 27-01-2016, 20:16   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,400
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 online now   Reply With Quote
Old 02-02-2016, 16:08   #3
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
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:	96
Size:	391.1 KB
ID:	118211  
__________________
Gilletarom is offline   Reply With Quote
Old 03-02-2016, 05:29   #4
Registered User

Join Date: May 2012
Posts: 408
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, 07:39   #5
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
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, 09:11   #6
Registered User

Join Date: May 2012
Posts: 408
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, 10:45   #7
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
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, 11:02   #8
Registered User

Join Date: May 2012
Posts: 408
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, 11:18   #9
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
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, 13:56   #10
Registered User

Join Date: May 2012
Posts: 408
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, 15:12   #11
Registered User
 
Gilletarom's Avatar

Join Date: Mar 2010
Location: France
Boat: 10.50 mètres
Posts: 2,295
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, 05:46   #12
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,400
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 online now   Reply With Quote
Old 04-02-2016, 06:02   #13
Registered User

Join Date: May 2012
Posts: 408
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, 10:42   #14
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,400
Re: oGrib2 Plugin using the ECMWF grib_api

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

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,400
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 online now   Reply With Quote
Reply

Tags
plug, rib

Thread Tools
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
OpenCPN PlugIn Development bdbcat OpenCPN 78 29-07-2017 03:15
Plugin: DashBoard SethDart OpenCPN 470 24-08-2016 21:34
Using the Chart Downloader plugin with a Portable install of 4.0 ac0rn OpenCPN 7 12-01-2016 15:32
Using the plugin download for BSB 4 charts on CPN capitano Navigation 0 15-07-2015 14:30
Writing Plugin for nv.digital Map Format ? Netsurfer OpenCPN 7 17-08-2010 17:09



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 11:49.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.