How are VR files .wnd structured ?
Post by iconPost by Reves_de_gosse | 2023-07-01 | 09:12:45

Hi Cvetan
VR sends weather files from NOAA to our PCs as .wnd files.
for example : https://static.virtualregatta.com/winds/live/20230701/00/006.wnd
But I can't read them.
Could you tell us what their structure is, and how to read them ?
Thanks

commenticon 7 Comments
Post by iconPost by zezo | 2023-07-02 | 18:53:43
8-bit signed integer U/V values

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 zezo | 2023-07-02 | 19:43:16
And then to TWD/TWS

function uv2d(u, v) {
var d = Math.atan2(u,v) * 180/Math.PI + 180;
if (d < 0)
d += 360;
else if (d >= 360)
d -= 360;
return d;
}

function uv2s(u,v) {
return Math.sqrt(u*u + v*v);
}

Post by iconPost by Reves_de_gosse | 2023-07-04 | 13:24:05
Thanks, I will try it.

Post by iconPost by plux | 2023-08-16 | 15:23:22
Hello
Thank's for your great works.
files wnd are binary encoded howto decode them ?
Tks
Post by iconPost by Hardtack | 2023-08-20 | 17:15:45
The files contain U and V wind components as single bytes - equaling to two bytes per data point.
Cvetan actually provided the function to decode the values above, along with functions to convert U and V to wind speed and direction.

Your task is to figure out the order in which the bytes are stored. Obviously it's a serialized 3D matrix (lat, lon, component), but you have to find the order in which the columns are written, as well as the order of values in a columns. I'd expect U and V first by latitude, then by longitude, north to south and west to east. In pseudo code:


for lat from 90 downto -90
for lon from 0 to 359
wind[lat,lon].u = read(file)
wind[lat,lon].v = read(file)
end
end


Post by iconPost by plux | 2023-08-22 | 12:34:26
nice, tks fo explanation
Post by iconPost by Reves_de_gosse | 2023-10-01 | 08:16:07
En fait, aujourd'hui, lorsque VR utilise une prédiction météo en 1°, ils utilisent les fichiers .wnd comme décrit plus haut.
Mais en 0.25, ils utilisent des fichiers .grb, qui sont des Gribs standards.

In fact, today, when VR uses a weather forecast in 1°, they use the .wnd files as described above.
But in 0.25°, they use the .grb files, which are standard Gribs.

border
Topics list
Posts
border
1
border
border
5
border
border
Copyright 2009 by ZEZO.ORG. All Rights Reserved.