Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 23-04-2014, 11:11   #346
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: New Grib Presentation

[QUOTE=rgleason;1524847
It would be nice to have some more configuration fields available in grib_pi request, but this is very manageable now.[/QUOTE]

Rick
Merging files is a request long ago in Flyspray.
I will not do that, not because it's not my willing, but simply because I do not feel myself able to do it. This is more complex that it seems.
So I would be very happy if somebody could.

Nevertheless, may be I can improve the request if you describe what is expected?
Jean Pierre
__________________

__________________
Ptizef is offline   Reply With Quote
Old 23-04-2014, 14:19   #347
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

Jean Pierre [Ptizef],

Thanks for your response.
1. Hopefully someone else will be able to advise about joining gribs, it has been a "Tracker" hope of mine for awhile. I am going to try to find out more info about this.
2. Thank you for asking about improving the grib requests.
3. This idea for selection area, is not completely thought out, but here it is...

Currently the request area for gribs is defined by the screen area, which limits requests to the screen aspect and scale settings. I would like an option to preset and locate the selection area. To be able to define aspect ratio and reduce grib file sizes for purpose of receiving over SSB it would be useful to be able to:
1. User define a box size, eg: 4.5 degrees x 6.5 degrees, or 7.5 degrees x 3.5 degrees, etc.
2. Then move the cursor (showing user defined box size centered on cursor) and click to locate the box on the chart. That is it.(This would allow the user to request gribs independent of boat location, or if they wish, approximately centered on boats current location, or slightlly ahead by moving the box and clicking appropriately in desired location.)

I might have some other suggestions but this one would be good to implement if possible I think.



__________________

__________________
rgleason is online now   Reply With Quote
Old 23-04-2014, 19:45   #348
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

Merge small Gribs sent via SSB into one larger Grib

Make query@saildocs.com requests as follows:
====================================
14kb GFS:42N,36N,070W,078W|0.5,0.5|6,9..18,24..48,60..1 44|WIND|4.5,079
7kb GFS:42N,36N,070W,078W|0.5,0.5|6,9..18,24..48,60..1 44|PRESS|45,079
6kb GFS:42N,36N,070W,078W|0.5,0.5|6,9..18,24..48,60..1 44|CAPE|4.5,079
20kb GFS:42N,36N,070W,078W|0.5,0.5|6,9..18,24..48,60..1 44|HTSGW,WVPER,WVDIR|4.5,079

Then merge into one file
===================
copy grib1.grb /B + grib2.grb merged.grb

copy WIND.grb /B + PRESS.grb Wind-Press.grb

copy WIND.grb /B + PRESS.grb + CAPE.grb Wind-Press-Cape.grb

copy WIND.grb /B + PRESS.grb + CAPE.grb + WAVES.grb Wind-Press-Cape-Waves.grb

Note: Use from Start Menu "Run", Enter "Cmd", Hit enter. Then CD [grib path]. Enter.
Then just copy and paste the last copy command, provided all the files are in the directory.
A batch file (*.bat) could automate further, provided the files are named the same each time.
Make a text file 'Merge.bat' and put the last copy command above in it.
Save it to the Grib directory and click on it when your are ready. You can also make a link on you desktop to click on.

The Merged or Concatenated File is attached as Wind-Press-Cape-Waves.grb - Is this working properly? The checks now seem to work exclusively, is that intended by the plugin, or is there some delimiter between the concatenated files?

===
By the way, remove the ".doc" or ".txt"!!!
Attached Files
File Type: doc WIND.grb.doc (13.5 KB, 18 views)
File Type: doc PRESS.grb.doc (6.2 KB, 20 views)
File Type: doc CAPE.grb.doc (5.1 KB, 16 views)
File Type: doc WAVES.grb.doc (19.2 KB, 11 views)
File Type: doc Wind-Press-Cape-Waves.grb.doc (44.0 KB, 26 views)
File Type: txt Merge.bat.txt (77 Bytes, 30 views)
__________________
rgleason is online now   Reply With Quote
Old 23-04-2014, 19:54   #349
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

While looking into merging GRIBS these links/info was found and should be noted.

Reading GRIB Files
http://www.cpc.ncep.noaa.gov/products/wesley/reading_grib.html

Wgrib (works only with GRIB-1 original files) Limited tool.
Climate Prediction Center - wgrib2: grib2 utility

Wgrib2 (GRIB-2 files, does not operate on GRIB-1, many more tools & features)
Climate Prediction Center - wgrib home page
An easy way to see the contents of a grib2 files is to run wgrib2 on it. Wgrib2 is freely available for
Windows, linux and Unix machines. Emphasis on simple structure and transmission so compression is a high priority.
So in our example, the original GFS forecast was 58 MB. By selecting a few fields and restricting the domain, our
hypothetical file is now svelte 25 KB. (Think boat.)

Grib2 vs Grib1
GRIB-2 has arrived and has begun replacing the the older standard GRIB (GRIB-1). Since GRIB-2 can reduce the file size by upto 80% (NAM, JPEG2000 compression), converting to the new standard may be faster than some expected.

Introduction to GRIB2 using the GFS forecasts 2/2013 Wesley Ebisuzaki
http://www.ftp.cpc.ncep.noaa.gov/wd5...ntro_grib2.pdf

NCEP codes for decoding and encoding data in GRIB2 format
NCO/PRODUCTION MANAGEMENT BRANCH

======

Concatenating grib files with/without junk bytes
Binary Files - GradsWiki

Grib2ctl
Climate Prediction Center - grib2ctl home page

Where i can find and download wgrib v1.8.0.12 ?
Climate Prediction Center - wgrib home page
Where i can find and download wgrib v1.8.0.12 ?
You need a C compiler to build wgrid.

Where can I find GRADS
GrADS Software

----
Gribmap
GrADS Utilities: gribmap
=======

Attached doc file as a more complete listing of what else was found, somewhat disorganized.
Attached Files
File Type: doc Concatenate-Grib-Files.doc (5.3 KB, 24 views)
__________________
rgleason is online now   Reply With Quote
Old 26-04-2014, 17:42   #350
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

Another test of grib format, requesting from query@saildocs.com:
Quote:
gfs:40N,60N,0W,20W|0.5,0.5|0,3,...,36,48,...,192|
or
gfs:40N,60N,0W,20W|0.5,0.5|0,3..36,48..192|
Results in the identical grib files.
Provided that from the grib request:
Quote:
(36-3)/(3-0) = 33/3 hr increment = 11 <--- whole integer
(192-48)/(48-36) = 144/12 hr increment = 12 <---whole integer
Note that if you have a request without whole integers
the change in increment will be ignored and your grib will likely be bigger with more frames.

The difference between the files is:
Quote:
[Integer1](comma)[Integer2](period)(period)[integer3]
OR
[Integer1](comma)[Integer2](period)(comma)(comma)(comma)(period)[integer3]
Math for interval and full sequence:

Quote:
(Integer3 - Integer2) / (Integer2 - Integer1) = whole number or integer.
__________________
rgleason is online now   Reply With Quote
Old 26-04-2014, 18:08   #351
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

It would be a nice feature to be able to output a 2 or 3 tiered time range request like this with a 3hr interval, then 6hr, finishing with 12hr such that each segment results in a proper request with whole numbers or integers as detailed above.

Quote:
GFS:42N,38N,070W,076W|0.5,0.5|6,9..18,24..72,84..1 68|WIND|4.5,079
__________________
rgleason is online now   Reply With Quote
Old 06-05-2014, 13:13   #352
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

There is a Grib problem. Weather_routing no longer works, and Sean says it is a problem with Grib_pi. It must be a recent problem, say within the last 2 months. Something may have changed in the way Grib_pi handles the header or the data that has affected Weather_routing. When we try to run Weather_routing on a very simple grib file, the weather_routing_pi shows "Grib Failure"

Can you help us figure out what the problem is please?
See Weather Routing

and

Weather Routing

We need some help on this. WHAT HAS CHANGED IN GRIB_PI?
See this thread.
__________________
rgleason is online now   Reply With Quote
Old 06-05-2014, 17:13   #353
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

There are problems due to the current grib when trying to run Weather_routing.
Please see Weather Routing

It is due to the additional data types above the basic 4 in version 3.3.1419
__________________
rgleason is online now   Reply With Quote
Old 06-05-2014, 17:58   #354
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,810
Re: New Grib Presentation

Code:
diff --git a/plugins/grib_pi/src/GribUIDialog.cpp b/plugins/grib_pi/src/GribUIDialog.cpp
index ffe8e0c..b7d5227 100644
--- a/plugins/grib_pi/src/GribUIDialog.cpp
+++ b/plugins/grib_pi/src/GribUIDialog.cpp
@@ -1030,7 +1030,7 @@ GribTimelineRecordSet* GRIBUIDialog::GetTimeLineRecordSet(wxDateTime time)
     if(i == 0)
         im1 = 0;
 
-    if(!m_InterpolateMode) im1 = i;
 
     wxDateTime mintime = MinTime();
     double minute2 = (curtime - mintime).GetMinutes();
m_InterpolateMode is already tested before all cases of calling this function (except from the weather routing plugin) so the test here should be removed. Obviously we need to be able to interpolate between gribs for weather routing despite what user settings might be.
__________________
boat_alexandra is offline   Reply With Quote
Old 07-05-2014, 07:29   #355
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: New Grib Presentation

Quote:
Originally Posted by boat_alexandra View Post
[/code]m_InterpolateMode is already tested before all cases of calling this function (except from the weather routing plugin) so the test here should be removed.
Sean
No, It's not always the case.
But what is the problem ? You need to call this function from another plugin and be sure to interpolate ? right ?
So I propose to pass the test through a parameter with true as default
making this transparent for both plugins
Jean Pierre
__________________
Ptizef is offline   Reply With Quote
Old 07-05-2014, 20:11   #356
Registered User
 
boat_alexandra's Avatar

Join Date: Aug 2009
Location: chesapeake bay
Boat: bristol 27
Posts: 2,810
Re: New Grib Presentation

Quote:
Originally Posted by Ptizef View Post
Sean
No, It's not always the case.
But what is the problem ? You need to call this function from another plugin and be sure to interpolate ? right ?
So I propose to pass the test through a parameter with true as default
making this transparent for both plugins
Jean Pierre
Actually it is not so obvious but is the case.
Code:
GribTable.cpp:114:        m_pTimeset = m_pGDialog->GetTimeLineRecordSet(time);
In this case, interpolation is irrelevant because the time given falls exactly on a record boundary
Code:
GribUIDialog.cpp:928:    SetGribTimelineRecordSet(GetTimeLineRecordSet(time));
In this case, the time given (from TimelineTime()) falls on a record boundary if interpolate mode is off.
Code:
GribUIDialog.cpp:928:    SetGribTimelineRecordSet(GetTimeLineRecordSet(time));
In this case, interpolate mode is explicitly set to true 2 lines above
Code:
grib_pi.cpp:445:        GribTimelineRecordSet *set = m_pGribDialog ? m_pGribDialog->GetTimeLineRecordSet(time) : NULL;
This is the case were the weather routing plugin calls, and needs interpolate mode always.
__________________
boat_alexandra is offline   Reply With Quote
Old 08-05-2014, 03:28   #357
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

Is there a way to know whether a user is calling grib_pi or another plugin, like weather_routing specifically? If so, it would not be too hard to make the right setting for interpolation with an if then statement.

Or possibly just remove the test at the line Sean suggests.
Sent from my GT-N5110 using Cruisers Sailing Forum mobile app
__________________
rgleason is online now   Reply With Quote
Old 10-05-2014, 05:44   #358
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: New Grib Presentation

OK Sean's right, we can remove the test
I add the patch today to a pull request
Jean Pierre
__________________
Ptizef is offline   Reply With Quote
Old 10-05-2014, 08:48   #359
Registered User

Join Date: Sep 2009
Location: Angers - France
Boat: Beneteau First 29 Ptizef
Posts: 743
Re: New Grib Presentation

Unfortunatly !
It creates a regression for "moving gribs" and when there is a change in the resolution (for example in more than 8 days saildocs's files who can have 0.5x0.5 then 2.5x2.5)
These files don't accept interpolation even on the record boundary
Sean : Could this patch be accepted by Weather routing ?

@@ -1030,6 +1030,8 @@ GribTimelineRecordSet* GRIBUIDialog::GetTimeLineRecordSet(wxDateTime time)
if(i == 0)
im1 = 0;

+ if(curtime == time) im1 = i;
+
wxDateTime mintime = MinTime();
double minute2 = (curtime - mintime).GetMinutes();
curtime = rsa->Item(im1).m_Reference_Time;


thanks
Jean Pierre
__________________
Ptizef is offline   Reply With Quote
Old 10-05-2014, 11:02   #360
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: New Grib Presentation

Ptizef wrote:
Quote:
Unfortunatly !
It creates a regression for "moving gribs" and when there is a change in the resolution (for example in more than 8 days saildocs's files who can have 0.5x0.5 then 2.5x2.5)
These files don't accept interpolation even on the record boundary
I hope you and Sean can figure out how to keep moving gribs and the changes in resolution, because that is useful for keeping file size down over SSB.
__________________

__________________
rgleason is online now   Reply With Quote
Reply

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
Pilot Grib Files - Similar to Pilot Charts rgleason OpenCPN 22 05-05-2015 04:15
Route Planning with GRIB - Work in Progress PjotrC OpenCPN 208 27-08-2012 01:31
grib weather plugin not visible geo38 OpenCPN 6 02-08-2012 16:45
GRIB Weather Mark Ward OpenCPN 26 12-02-2012 22:33
GRIB Icon bzs OpenCPN 16 04-09-2011 07:43



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 06:20.


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.