VR weather format
Post by iconPost by banfry | 2020-11-01 | 17:25:51

I am looking for the .wnd file format.
Looks like dx dy bytes on 181 * 360 degree.
But does not really match the App reading.

commenticon 7 Comments
Post by iconPost by zezo | 2020-11-01 | 18:44:13
It's 1 degree GRIB, 1-byte signed square root of the original U and V components, normalized to some value. Something like this:

function vr_speed(d) {
if (d > 127) {
d = 256 - d;
return -(d*d)*(3600.0/230400.0);
return (d*d)*(3600.0/230400.0);

Post by iconPost by banfry | 2020-11-03 | 22:04:25
I guess the temporal extrapolation is linear. But what about the geographic interpolation ?
Bilinear ? Bicubic, Lagrange ?

Post by iconPost by zezo | 2020-11-03 | 22:09:45
Temporal is linear. With the quirk that during the weather update its linear once between old and new data for the past point in time, and then linear between that and the next point in time. But that's only on the client. Server is something different.

Spatial is complicated. Bilinear UV with compensation. Take a look at this file to get an idea http://zezo.org/mauricienne/iwind.js

Post by iconPost by banfry | 2020-11-03 | 22:33:24
tks I'll try it.
Post by iconPost by banfry | 2020-11-10 | 13:16:05
it works fine except there a constant ~1 knt speed under estimation.
Any clue ?
Post by iconPost by zezo | 2020-11-10 | 14:06:00
There is a little rounding on the other side of the transfer, but it's not that much.

Conversion from grib UV to VR signed int looks like this:

my $d = shift;
my $sign = ($d < 0)?-1:1;
return $sign * round(sqrt(abs($d*230.4)));

I've been generating bit-exact copy of the wnd file this way.

The interpolation is linear (as in not dependent on units used - works fine on m/s or knots)
Post by iconPost by Tigrou26 | 2022-04-15 | 05:41:16
Did you succeed to decode the file .wnd ? What is the key to decode them ?

Topics list
Copyright 2009 by ZEZO.ORG. All Rights Reserved.