xarray-spatial icon indicating copy to clipboard operation
xarray-spatial copied to clipboard

Add Degrees -> Zonal and meridional flow

Open brendancol opened this issue 5 years ago • 1 comments

I want to be able to create the input dataset necessary for the ipyleaflet velocity layer.

Here is an example of what we want to get to:

from ipyleaflet import Map, TileLayer, basemaps
from ipyleaflet.velocity import Velocity
import xarray as xr
import os

if not os.path.exists('wind-global.nc'):
  url = 'https://github.com/benbovy/xvelmap/raw/master/notebooks/wind-global.nc'
  import requests
  r = requests.get(url)
  wind_data = r.content
  with open('wind-global.nc', 'wb') as f:
      f.write(wind_data)

center = [0, 0]
zoom = 1
m = Map(center=center, zoom=zoom, interpolation='nearest', basemap=basemaps.CartoDB.DarkMatter)

ds = xr.open_dataset('wind-global.nc')
display_options = {
    'velocityType': 'Global Wind',
    'displayPosition': 'bottomleft',
    'displayEmptyString': 'No wind data'
}
Screen Shot 2020-07-09 at 12 35 10 PM

brendancol avatar Jul 09 '20 17:07 brendancol

@brendancol, will this issue be worked on?

giancastro avatar May 05 '21 14:05 giancastro