Friday, February 19, 2021

GRIB School

This document is an index to the several articles and videos Starpath has available on the subject of GRIB files and their use in marine weather analysis and routing.  You can skim through this to go directly to individual topics.

What is a GRIB File?

Use of numerical weather model forecasts by individual mariners is an ubiquitous component of modern marine weather. Almost any navigation program these days connected to a wireless source on land or at sea can press a button to generate the latest wind, waves, and currents forecast across the chart with forecasts extending out a week or more.

The data come to us in a digitized format called GRIB, standing for gridded binary. It is a vector product, meaning it is all numbers and symbols, but when rendered in an appropriate software program ("GRIB viewer app") it can appear as a graphic map of the isobars, wind vectors, rain distribution, and other parameters, laid out on a Lat-Lon grid. 

The GRIB standard was developed by the World Meteorological Organization (WMO) specifically as a way to transfer weather data in an efficient, standardized manner amongst meteorologists and mariners. The grid is a Lat-Lon lattice of points, with digital values (binary data) presented only at those specific points. The distance between points on the grid is the resolution of the file. This can vary from as large as 1º (60 nmi)  intervals to as small as 1.3 km (0.7 nmi), which is about the finest step size available outside of the laboratory.

A GRIB weather map at 0.5º resolution over a 10º x 10º area including wind and pressure will be about 50 kb in size. File size increases very roughly proportional to the number of parameters, but increases as the square of the resolution and area covered. 

Several apps let the viewer request the latest grib forecast from a specific model from within the app, and these generally estimate the file size as you define what you wish to request.

Terminology: We often hear or say something like, "Have you downloaded the Grib?," or "What does the Grib tell us," and so on. Usually this is not ambiguous, but we should keep in mind that "Grib" is not a thing; it is a format.  It is like saying "What does the PDF tell us? The term Grib alone does not tell us at all what we are looking at. This could be a wind forecast from the GFS model or a wave forecast from the WW3 model. Use of the word Grib in such discussions requires a very clear understanding of the context.

The following links contain information related to use of GRIB files

Background on GRIB files: Numerical weather models and computed parameters

Includes topics below plus a comparison with other forms of marine weather data. 

Traditional Weather Products

Numerical Weather Prediction

Values of GRIB Formatted Forecasts

Grib2 Weather Parameters

Categories of Digital Forecasts in GRIB Format

Basic Properties of Selected Models

Sources of Model Data in GRIB Format


Applications of Weather Data in GRIB Format 

Each topic has a short discussion along with video illustrations.

1. Global model weather forecasts for ocean navigation

2. Global ocean model forecasts of wind waves and swells

3. Ocean model for currents and water temperature

4. Regional model forecasts for inland and coastal sailing

5. Overlay model forecast winds on weather map and cloud photo images

6. Probabilistic forecasts from ensemble forecasts and model blends

7. View sea ice coverage from RTOFS in LuckGrib

8. Compute optimal sailing route 

9. View ASCAT scatterometer near-live satellite wind measurements


Introduction to using GRIB files with XyGrib

A few basic tips with a video example.

Introduction to using GRIB files with qtVlm

We have a couple videos on this, but the article is not done yet.

Optimum Weather Routing with qtVlm

A short discussion with video example

Optimum Weather Routing with OpenCPN

A short discussion with video example

Playlists of Related Videos on Use of GRIB Data








Tuesday, February 16, 2021

Optimum Weather Routing with qtVlm

This note on qtVlm routing is part of our sequence of articles on the Applications of Weather Data in Grib Format. We have similar demos of routing with other applications.

qtVlm is a free, donation-supported navigation and weather software program for both Mac and PC computers, as well as mobile devices.  It is an internationally popular product with versions in multiple languages. It is the leading program worldwide for virtual tracking and taking part in ocean races presented online.  It is a versatile navigation program as well as weather resource. See also notes in the Starpath Glossary.

We cover charting aspects elsewhere; we have a video on using grib files in qtVlm; here we just look at the app for routing computations, which is of course tied to its display of grib formatted numerical weather and ocean predictions.  The program includes extensive functionality, which means there are numerous nested menus, some of which are interrelated. In short, there is a learning curve, as is with any such versatile program. So we start by just focusing on what we need to create a basic route, and then we will come back to the numerous ways it offers to fine tune and optimize the results further.

We will list the steps here and then add a video demo of the process.

Step 1. When you download and install the app, be sure to load the "maps," which in this case will be the high-res base maps. 

Step 2. The default display shows a daylight terminator which is very handy when underway or when planning a voyage, but for training and practice if you find it distracting it can be toggled off at menu View/Show-Hide/Night Zones.  

Step 3. Load a Grib forecast (review earlier notes on gribs) that will cover the range of the route you want to compute, and long enough to let the vessel finish with its known polar data.  In this example, we want to do summertime ocean routing using archived wind data from July, 201o that we have stored on the computer. Thus the steps are: menu Grib/Grib Slot 1/open and navigate to the file to load it into slot 1.

Doing these historic runs, you will get a warning that the grib data is old, and consequently it will not show on the screen. Click the clock icon in the middle of the menu bar and set the grib time to match the first forecast loaded. Using live data this will not likely arise, as the newest live data is some 4 or 5 hr old at best.

The second from the right magnifier icon (with a square inside) will center the view on the active grib data.

If you do not see the grib data, but you do see elevation and rivers on the land, then you have an overlay turned on that could be hiding the wind data. Click the menu chart icon "O" (online charts)  to toggle this on and off.

Step 4. Load the polar diagram you wish to use. It can accept files in the .pol format or the .csv format, with the separators being semicolons. See related polar format discussion.  To load the polar use menu Boat/Boat Settings.  Note we are not using menu Boat/Polars. That will be used to study the polar once it is loaded.  Once in Boat/Boat Settings, add a name and or model of your boat then open the Polars tab below it.  Navigate to your polar and import it. We can leave the other settings in default choices.

Step 5. Check the polar. Menu Boat/Polars/Wind polar analysis. Check all TWS (true wind speeds) to see if it looks as expected. Then go back to just one wind, and notice that you can click on the curve to read the data. We are not getting into this now, but if you want to change anything in the polar you can do it in Menu Boat/Polars/Wind polar editor. 

Step 6. Set start and end points. At the desired start point, right click within the grib area and make a mark. Give it a name and click OK. We can leave all defaults as is.  Do the same with the destination point.

Step 7.  Right click anywhere on the chart and chose Create a routing.

Give the route a name 
Unclick routing from boat
Confirm that start and finish are the points you want. The heading says "Finish and start points," but you want to have start first (top) and finish second (below it).

Turn on Keep Starting Date and type in the initial time of the grib forecast installed (default is month, day, year). Later we can use other start times. Select the month, type it in and just keep typing. 

Rest leave default and click OK, and you should see the isochrones being computed from the start point headed to the finish point. Convert to Route at the bottom should be set.  (If anything is not right, then when done just say OK, then Cancel, and from menu Routings select delete routing, and do it again.)

Step 8. Optimize the routing. When done, it presents the ETA, duration, and computation time. Click OK. Then we get the opportunity to convert this routing to a route.  The former is the result of an optimization using isochrones, the latter is a sequence of waypoints (POI). Unless we feel we need to study the solution in more depth, then the logical next step is create the route. 

We have the choice of Optimum or Maximum conversion. The process removes excess isochrone solution points along the route, for example, if three points are on a straight line, then you can remove the middle one. Optimum does that level of simplification. Maximum does more by readdressing the route decision between each POI left in the Optimum pass. Leaving the proposed setting of Maximum is best, but it might take a few more passes up and down the route to converge on the best.  Click OK and watch it optimize.

Once this is done, maybe with the offer to do more, then the routing will be moved from the routings list (menu Routings) to the routes list (menu Routes) and we can then look at details.

Step 9. In menu Routes/Edit Route  select your route. Logbook shows the conditions at each POI along the route. Histogram is an interesting way to look a plot of various parameters along the route. Statistics summarizes a few parameters of the whole route.   To export the route as GPX file, use menu Routes/Export route.

Below is a video sample of an optimum route computation.

Routing example with no special conditions [17m:33s].

qtVlm has many options and restrictions that can be placed on the computation. Like most other apps, you can define boundaries to block the route from certain areas or passes, but unlike other apps (except Expedition), qtVlm can route around a course of marks, or through specific gateways, which adds a layer of versatility to the solution.  This is accomplished by optimizing along a pathway.  In qtVlm, a pathway is a series of waypoints, what might be called a route in other programs. Routings, routes, and pathways have distinctions in qtVlm. 


Users Manual:

Forum details:

Many videos in YouTube in French.