Wow @johnckealy your plugin is monster. Found the bug and fixed. Will be deployed next week. Will create some data loader so plugins will have access to our backend API

Great to hear, thanks @ivo! Sorry if the code is a little rough -- I'm a meteorologist learning programming, rather than the other way around... But would relish seeing it deployed with current data! :)

Now is fixed and your plugin is working. As I suggest now I should have make soma data loader

@ivo - Brilliant! I'm chuffed to see it working on the site :) Let me know if you need any help understanding the code. You just need to load the variables Tascent, Pascent, Tdascent, U, and V with spot data at each level. The comments should hopefully explain this.

@ivo Windy appears to use pressure levels from ECMWF, with temperature, humidity, and wind at each of these levels already available on the site. So what needs to be done on your backend is to have a function that takes a lat/lon picker point as input, finds the nearest grid point on the model, and then finds the data at each of these pressure levels. You might be able to adapt this from my closest_latlon() function in plugin.html. The variable Pascent (the ascent data for P) will always be:

Though I see you also use "surface" and "100m" instead of 1000hPa, so by all means use that if you also have temperature and relative humidity at those levels.

Then Tascent is the temperature (shortname is "T" in the ECMWF docs), U is the U-velocity (shortname "U"), V is the V-velocity (shortname "V").

One thing I'm now realising is that I used an equation to convert the humidity into the dewpoint while generating the sample data, so you'll need to add this into plugin.html. To get Tdascent (the dewpoint temperature ascent), relative humidity (shortname is "R" at ECMWF, and the Windy is named "Humidity") must be converted to dew point using this formula:

@rittels Sure, though I'd say nearest neighbour is plenty for now! Vertically there is some interpolation going on in the js, and horizontally, ECMWF's 9km is loads of detail :) Would definitely be a nice addition for later.

Hi John
Nearest neighbor is indeed plenty!!
However, you can use the W.interpolator to read data at the different levels. It is slow and cumbersome, but somewhat cute.
I gave it a go myself: windy-plugin-readlevels.

Do not worry I will make dataLoader, so far I am finishing one big thing on Windy

@ivo great to see the plugin loader is ready for model data. I'll look into updating the skewt plugin when I get a chance (bit busy at the moment though).

There was a bug in my plugin that showed the error "TypeError: Plugin.instance is not a function" and you fixed this. Can you remember what the bug was? I'll need to patch in the fix to my original version.