Sign in, say "hi", ... and be welcomed.

Blob Plot Wind Visualization Program

Postby Bob Kuczewski » Sat Dec 16, 2023 7:14 pm

It's been nearly a year since I finished my "Blob Plot" Wind Visualization program, and I think it's about time to share it.

The attached file ("BlobPlot.htm.zip") is a ZIP file containing a single HTML file ("BlobPlot.htm"). You should be able to download it, unzip it, and double-click on it to bring up your web browser (Firefox, Chromium, Explorer, etc).

Initially, the plot will be empty, but if you select a site (such as Dockweiler in this example), then it should go to https://forecast.weather.gov to get the latest forecast as an XML file (assuming that you have an Internet connection). The program then parses the XML (shown in the first large text block), produces text versions of direction and speed (shown in last two text blocks) and draws a "blob plot" that looks something like this:

Dockweiler_2023_12_16.png
Dockweiler_2023_12_16.png (69.39 KiB) Viewed 1126 times


The plot typically shows the forecast for the next 7 days represented as a series of "blobs". The blobs are drawn to made it easy to visualize the wind at launch. Bigger blobs are stronger winds, and centered blobs show winds blowing directly in at launch. Blobs to the right of center show winds that would be arriving from the right of launch, and blobs to the left of center show winds arriving from the left if launch. The blobs are also color coded with green as most favorable, yellow as less favorable, and red as least favorable (usually not safe to launch at all). The forecast for the current date and time is at the top of the plot, and the most distant forecast (typically a week away) is at the bottom of the plot. Each date is listed, and a few times are also listed.

Because these plots are oriented to the launch direction at each site, you generally want to look for large green blobs near the center of the plot. For example, it's easy to see from a glance of the Dockweiler plot (above) that 2023-12-17 will have a light westerly wind in the afternoon and that 2023-12-18 will have a nearly perfect westerly wind in the late afternoon. You can see at a glance that rest of the week will have mostly strong winds from the south and southeast which are not generally flyable at Dockweiler (shown in yellow and red).

You can also zoom in by increasing the dimensions of the plot using the width and height selectors. These default to a size of 400 x 400 pixels, but that can be changed. The plot below shows the first two forecast days (2023-12-17 and 2023-12-18) with a vertical size of 2000 pixels.

Dock_2023_12_16_2000pix.png
Dock_2023_12_16_2000pix.png (23 KiB) Viewed 1122 times


That's the same data as the previous plot, but now it's expanded so you can see the individual blobs corresponding to the value of the forecast for each hour in the plot.

In addition to changing the plot size, you can also change the "Facing" direction. The default direction is the "normal" launching direction, but some sites have alternate launches. You can enter any heading to see the "blob plot" facing in that direction. All that does is shift the blobs (left or right). Feel free to experiment with it to see the results of facing different directions (try 0, 45, 90, 135, 180, 225, 270, 315, and 360).

You can change the site location by selecting from the list of sites and clicking the "Load" button. You can also visit the Google map by clicking the "Map" button (shown below for Dockwiler), and you can visit the forecast site (https://forecast.weather.gov) by clicking the "Weather" button.

Dockweiler_2023_12_16_map.png
Dockweiler_2023_12_16_map.png (387.5 KiB) Viewed 1122 times

Dockweiler_2023_12_16_forecast.png
Dockweiler_2023_12_16_forecast.png (89.32 KiB) Viewed 1122 times


You can add other sites, but you'll currently have to edit the actual program. If you look at the program in an editor, you should find the site dictionary that looks something like this:

var site_dict = {
'Torrey': {'name':'Torrey', 'lat':32.890660, 'lon':-117.251772, 'faces':270,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.890660&textField2=-117.251772&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.890660&lon=-117.251772&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.890660,-117.251772,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Dockweiler': {'name':'Dockweiler', 'lat':33.920115, 'lon':-118.430178, 'faces':246,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=33.920115&textField2=-118.430178&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=33.920115&lon=-118.430178&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@33.920115,-118.430178,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Crestline': {'name':'Crestline', 'lat':34.236097, 'lon':-117.313265, 'faces':209,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=34.236097&textField2=-117.313265&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=34.236097&lon=-117.313265&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@34.236097,-117.313265,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Sylmar': {'name':'Sylmar', 'lat':34.333406, 'lon':-118.384389, 'faces':202,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=34.333406&textField2=-118.384389&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=34.333406&lon=-118.384389&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@34.333406,-118.384389,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Horse': {'name':'Horse', 'lat':32.774514, 'lon':-116.476846, 'faces':256,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.774514&textField2=-116.476846&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.774514&lon=-116.476846&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.774514,-116.476846,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Laguna': {'name':'Laguna', 'lat':32.938752, 'lon':-116.484360, 'faces':60,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.938752&textField2=-116.484360&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.938752&lon=-116.484360&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.938752,-116.484360,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Elsinore': {'name':'Elsinore', 'lat':33.629339, 'lon':-117.371037, 'faces':55,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=33.629339&textField2=-117.371037&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=33.629339&lon=-117.371037&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@33.629339,-117.371037,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Blossom': {'name':'Blossom', 'lat':32.874069, 'lon':-116.850217, 'faces':293,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.874069&textField2=-116.850217&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.874069&lon=-116.850217&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.874069,-116.850217,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Otay West': {'name':'Otay West', 'lat':32.573900, 'lon':-116.894152, 'faces':270,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.573900&textField2=-116.894152&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.573900&lon=-116.894152&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.573900,-116.894152,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Otay South': {'name':'Otay South', 'lat':32.573900, 'lon':-116.894152, 'faces':180,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.573900&textField2=-116.894152&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.573900&lon=-116.894152&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.573900,-116.894152,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Little Black': {'name':'Little Black', 'lat':32.987926, 'lon':-117.122285, 'faces':275,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=32.987926&textField2=-117.122285&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=32.987926&lon=-117.122285&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@32.987926,-117.122285,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Soboba': {'name':'Soboba', 'lat':33.825059, 'lon':-116.943961, 'faces':240,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=33.825059&textField2=-116.943961&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=33.825059&lon=-116.943961&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@33.825059,-116.943961,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},

'Funston': {'name':'Funston', 'lat':37.713868, 'lon':-122.503116, 'faces':260,
'wx':'https://forecast.weather.gov/MapClick.php?w3=sfcwind&w3u=1&AheadHour=0&Submit=Submit&FcstType=graphical&textField1=37.713868&textField2=-122.503116&site=all&unit=0&dd=&bw=',
'wxml':'https://forecast.weather.gov/MapClick.php?lat=37.713868&lon=-122.503116&FcstType=digitalDWML',
'map':'https://www.google.com/maps/@37.713868,-122.503116,688m/data=!3m1!1e3!5m1!1e4?hl=en&authuser=0'},
}


That's a standard Javascript dictionary, and the first 4 fields give the site name, site latitude, site longitude, and the direction that launch faces. It also gives links for viewing the actual forecast ("wx"), getting the XML from the forecast ("wxml"), and showing the map ("map"). You can add new sites, by simply duplicating one of those dictionary entries and changing the values. If you add new sites, please post them to this topic so everyone can benefit. I may make it easier to add new sites in the future, but this works for now.

Finally, I want to thank Eric for contributing to me posting this project. Eric has a great web site at:

      http://www.HangGlidingFlightSchool.com

I offered to add a few other flying club locations to Eric's database, and that reminded me that I had already looked up the locations for most of our San Diego day trip sites for the Blob Plot project. So I searched our forum for "blob plot" and found it here:

      https://ushawks.org/forum/viewtopic.php?f=44&t=2853&p=33140#p33140

I had intended to publish it back then (January of 2023), but I was still working on some details that I still haven't finished (never let the perfect be the enemy of the good). For example, this version shows the pretty ugly text boxes for the XML and the wind direction/speed that I used during debugging. I had intended to make them optional, but I never got around to it. Anyway, I hope you enjoy the program as it is, and please feel free to post any suggestions.

 
 
This file contains the actual Javascript program. It will need to be downloaded, "unzipped", and then opened with your web browser.
Attachments
BlobPlot.htm.zip
(4.67 KiB) Downloaded 25 times
Join a National Hang Gliding Organization: US Hawks at ushawks.org
View my rating at: US Hang Gliding Rating System
Every human at every point in history has an opportunity to choose courage over cowardice. Look around and you will find that opportunity in your own time.
Bob Kuczewski
User avatar
Contributor
Contributor
 
Posts: 8116
Joined: Fri Aug 13, 2010 2:40 pm
Location: San Diego, CA

Forum Statistics

Who is online

Users browsing this forum: Chris McKeon and 11 guests

Options

Return to Hang Gliding General

cron