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 23-06-2023, 07:31   #1
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 468
Tidal Gribs can't be read with 5.8.4?

Hello,


I have discovered that OpenCpn version 5.8.4 with Grib reader 4.1 cannot read tidal grib files that could be read by 5.8.2. It indicates "no valid GRIB file".


5.8.4 running on Windows 11 Pro, 5.8.2 running on Windows 10 Home.


An example failing file can be found at https://drive.google.com/file/d/13xv...usp=drive_link


If any more information is required please let me know.


Aedan
AedanC is offline   Reply With Quote
Old 24-06-2023, 04:15   #2
Registered User

Join Date: Jul 2015
Posts: 83
Re: Tidal Gribs can't be read with 5.8.4?

Aiden C,
I have same problem with IMI Irish Sea gribs for past few weeks using OPenCPN 5.6.2 on Win 10. The file download looks 1 bit short, i.e. 21,174 instead of 21,175.
Email sent just now to IMI.
Maelruan
Maelruan is offline   Reply With Quote
Old 24-06-2023, 05:40   #3
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 468
Re: Tidal Gribs can't be read with 5.8.4?

Quote:
Originally Posted by Maelruan View Post
Aiden C,
I have same problem with IMI Irish Sea gribs for past few weeks using OPenCPN 5.6.2 on Win 10. The file download looks 1 bit short, i.e. 21,174 instead of 21,175.
Email sent just now to IMI.
Maelruan

I downloaded the IMI grib for the West Coast yesterday (the one linked above), it opened fine with 5.8.2 but not 5.8.4. Please let us know what the IMI say.


I'll be out on the boat today and I'll try today's version.


Aedan
AedanC is offline   Reply With Quote
Old 25-06-2023, 00:35   #4
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 468
Re: Tidal Gribs can't be read with 5.8.4?

On further investigation it turns out that neither 5.8.2 or 5.8.4 will read the recent tidal gribs from the Marine Institute, but both will read older ones, so it looks like their format may have changed, I’ll take it up with them tomorrow.
AedanC is offline   Reply With Quote
Old 25-06-2023, 09:36   #5
Registered User

Join Date: Jun 2015
Posts: 379
Re: Tidal Gribs can't be read with 5.8.4?

Hi,


It looks like they are using a more recent table (updated 22 years ago) , sort of:
https://codes.ecmwf.int/grib/format/grib1/ctable/4/
https://www.nco.ncep.noaa.gov/pmb/do...88/table4.html

As far I can tell OpenCPN is using Zygrib one which doesn't decode 13 (15 mn) an 14 (30 mn)


Sort of because P1 is always 0, at least in your sample, so they define it but don't use it.


Code:
diff --git a/plugins/grib_pi/src/GribV1Record.cpp b/plugins/grib_pi/src/GribV1Record.cpp
index 9c2d92a8d..ffa97fd62 100644
--- a/plugins/grib_pi/src/GribV1Record.cpp
+++ b/plugins/grib_pi/src/GribV1Record.cpp
@@ -928,6 +928,7 @@ zuint GribV1Record::makeInt2(zuchar b, zuchar c) {
     return ((zuint)b<<8)+(zuint)c;
 }
 //----------------------------------------------
+// https://codes.ecmwf.int/grib/format/grib1/ctable/4/
 zuint GribV1Record::periodSeconds(zuchar unit,zuchar P1,zuchar P2,zuchar range) {
     zuint res, dur;
     switch (unit) {
@@ -943,6 +944,10 @@ zuint GribV1Record::periodSeconds(zuchar unit,zuchar P1,zuchar P2,zuchar range)
             res = 21600; break;
         case 12: //    12 hours
             res = 43200; break;
+        case 13: // 15 minutes
+            res = 900; break;
+        case 14: // 30 minutes
+            res = 1800; break;
         case 254: // Second
             res = 1; break;
         case 3: //     Month
did-g is offline   Reply With Quote
Old 27-06-2023, 10:26   #6
Registered User

Join Date: Jul 2015
Posts: 83
Re: Tidal Gribs can't be read with 5.8.4?

AedanC,
IMI say they will try to fix the problem. They have had some updates to their system & their GRIBS are readable on other packages, but now find OpenCPN will not read them. I've asked for details of those packages.
They know that older versions of OpenCPN could not read netcdf format GRIBS, but ask if latest versions could. I found a reference to that format in the manual for plugins, but quite an amount of programming seemed to be necessary to allow it to work.
Hopefully the Institute can sort it out soon - their GRIBS are the best for these waters!
Maelruan
Maelruan is offline   Reply With Quote
Old 27-06-2023, 10:49   #7
Registered User

Join Date: Jul 2015
Posts: 83
Re: Tidal Gribs can't be read with 5.8.4?

Further to my last post I've just checked QtVlm, and it is reading IMI GRIBS.
Maelruan is offline   Reply With Quote
Old 27-06-2023, 13:05   #8
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 468
Re: Tidal Gribs can't be read with 5.8.4?

I had emailed my contact but she is away until tomorrow, I’ll cancel my mail to her as you seem to have it under control. Thanks.
AedanC is offline   Reply With Quote
Old 29-06-2023, 02:39   #9
Registered User

Join Date: Jul 2015
Posts: 83
Re: Tidal Gribs can't be read with 5.8.4?

AedanC
We've got our GRIBS back!
Many thanks to the Marine Institute for their speedy response!
Maelruan
Maelruan is offline   Reply With Quote
Old 29-06-2023, 06:29   #10
Registered User

Join Date: Nov 2015
Location: Ireland
Posts: 468
Tidal Gribs can't be read with 5.8.4?

Maelruan,

That was a mighty fast response all right. I’ll give them a try later on today, I’m on the road at the moment.

Cheers,

Aedan
AedanC is offline   Reply With Quote
Reply

Tags
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
Tidal Currents Can Be Strong in Bays and Inlets and Rivers Steadman Uhlich General Sailing Forum 60 05-06-2018 14:24
Irish hourly tidal current gribs rgleason OpenCPN 3 18-05-2018 00:12
tidal stream gribs in Opencpn obelix362 OpenCPN 2 19-11-2014 09:30
gribs riddon OpenCPN 1 05-11-2013 06:40
Want to beta test ocean currents gribs? Eric. Navigation 5 29-01-2013 18:33

Advertise Here


All times are GMT -7. The time now is 23:29.


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.