Navigation

    Windy Community

    • Register
    • Login
    • Search
    • Unread
    • Categories
    • Groups
    • Go to windy.com

    Interpolate at higher elevations

    Windy Plugins
    3
    5
    137
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • O
      Owlet last edited by

      Is it possible to return the windspeed at higher elevations? Interpolate seems to only return wind speed at ground level.

      Gkikas LGPZ 1 Reply Last reply Reply Quote 0
      • Gkikas LGPZ
        Gkikas LGPZ Moderator @Owlet last edited by

        @Owlet
        When in "wind layer", move the height slider to the desired elevation.

        e.g. wind at 3000m in Zugspitze (The Alps, Germany-Austria border)
        3fa922af-2c05-469d-b303-953986b283ea-εικόνα.png

        1 Reply Last reply Reply Quote 1
        • O
          Owlet last edited by Owlet

          Is it possible to do this programmatically - I set.store('layer', '100m') and then run interpolate({lat,lon}), but when I check the result it returns ground level. Code is below...

          store.set('level', '100m');
          
          interpolator(interpolatorFun => {
          	for (const site of json_file.features) {
          		let wind;
          		let lat = site.geometry.coordinates[1];
          		let lon = site.geometry.coordinates[0];
          		const data = interpolatorFun({lat,lon}, 1);
          		wind = data && utils.wind2obj(data);
          		const marker = L.circleMarker([lat, lon], wellStyle()).addTo(map);
          		let tooltip = '<div>' + wind.wind.toFixed(1) + ' m/s <br />' + '</div>';
          		marker.bindPopup(tooltip);
          	}
          })
          

          ![output](e48edc4f-df38-4d52-9b03-382d3b67b9b8-image.png

          rittels 1 Reply Last reply Reply Quote 0
          • rittels
            rittels Code contributor @Owlet | Premium last edited by

            @Owlet

            Wait until data loaded before calling the interpolator:

            store.set(.......

            broadcast.on("redrawFinished", params=>{interpolator(interpfun=>{......

            O 1 Reply Last reply Reply Quote 1
            • O
              Owlet @rittels last edited by

              @rittels thanks - works perfectly!

              1 Reply Last reply Reply Quote 0
              • First post
                Last post
              Windyty, S.E. - all rights reserved. Powered by excellent NodeBB
              NodeBB & contributors, OSM & contributors, HERE maps
              Terms and Conditions     Privacy Policy