Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Processing data for leaflet-velocity #65

Closed
jmhatch opened this issue Mar 12, 2021 · 1 comment
Closed

Processing data for leaflet-velocity #65

jmhatch opened this issue Mar 12, 2021 · 1 comment

Comments

@jmhatch
Copy link

jmhatch commented Mar 12, 2021

This isn't a leaflet-velocity issue, but I thought I'd start here. I'm trying to add wind data to a leaflet map. I download the data using the following link,

https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_1p00.pl?file=gfs.t12z.pgrb2.1p00.f000&lev_10_m_above_ground=on&var_UGRD=on&var_VGRD=on&subregion=&leftlon=-72.74273&rightlon=-67.92787&toplat=43.64460&bottomlat=40.04384&dir=%2Fgfs.20210312%2F12

Then I convert the grib file to json using the weacast-grib2json program,

grib2json -d -n -o gfs.t06z.pgrb2.1p00.f000 gfs.t06z.pgrb2.1p00.f000.json

Basically following the guidance found here and here.

However, when I display the wind data on my leaflet map,

mine

it looks different than what is displayed on windy or earth.

windy_tv

Not sure what is going on, as the reference datetimes are the same, but it has to be a data issue.

Attached the json and index.html file as a MWE.

mwe_wind_data.zip

@estamos
Copy link

estamos commented Apr 21, 2021

First of all, in order see the exact Wind animation in your leaflet map as in Windy, Earth etc

  1. you should make sure you are using the same input.

This can be done by checking side to side the .json values that you are using with the ones that Windy or Earth uses.
It may be kinda tricky, as I know that Windy does not pass .json files but .png files to client.
Alternatively, you can open downloaded .grib files with Panoply and see if you are displaying the same forecast (if the forecast is for the same datetime). It will be easier to look datetimes in UTC.
You should check that your are downloading the same model from NOAA server with the same resolution.

  1. Note that slight differences may be still found since forecasting service providers may meta-process their data before visualization.

After ensuring you have the same .grib input and displaying the same .json data you should definitely

  1. check your angleConvention type.

Referring to leaflet-velocity's README

The angle convention option refers to the convention used to express the wind direction as an angle from north direction in the control. It can be any combination of bearing (angle toward which the flow goes) or meteo (angle from which the flow comes), and CW (angle value increases clock-wise) or CCW (angle value increases counter clock-wise). If not given defaults to bearingCCW.

@onaci onaci locked and limited conversation to collaborators Sep 6, 2021
@danwild danwild closed this as completed Sep 6, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants