<jupyter_start><jupyter_text>download test data<jupyter_code># folder for all downloaded files
import os
if not os.path.exists("data"):
    os.makedirs("data")

# grid file for ICON-D2
from enstools.misc import download
grid_file = download("http://icon-downloads.mpimet.mpg.de/grids/public/edzw/icon_grid_0047_R19B07_L.nc", "data/icon_grid_0047_R19B07_L.nc")
# use opendata from DWD
from enstools.opendata import retrieve_nwp

# Example data on D2 grid: temperature in 500 hPa
file_t500 = retrieve_nwp(variable=["t", "fi", "u", "v"],
                         model="icon-d2",
                         grid_type="icosahedral",
                         level_type="pressure",
                         levels=[500],
                         init_time=0,
                         forecast_hour=[0],
                         dest="data",
                         merge_files=False)<jupyter_output><empty_output><jupyter_text>read test data<jupyter_code>from enstools.io import read
icon_d2 = read(file_t500, constant=grid_file)
icon_d2<jupyter_output><empty_output><jupyter_text>create an interactive plot using Bokeh<jupyter_code>from enstools.plot import interactive_contours, Backend
from bokeh.io import show, output_notebook
output_notebook()
fig1 = interactive_contours(icon_d2['t'][0,0,...], aspect=1.25)
show(fig1)
fig1 = interactive_contours(icon_d2['z'][0,0,...], filled=False, figure=fig1, line_width=4)
show(fig1)<jupyter_output><empty_output><jupyter_text>Create an interactive plot using Plotly<jupyter_code>fig2 = interactive_contours(icon_d2['t'][0,0,...], aspect=1.25, filled=False, backend=Backend.PLOTLY)
fig2<jupyter_output><empty_output><jupyter_text>Create a streamline plot with Bokeh<jupyter_code>from enstools.plot import interactive_streamlines, Backend, Stream
import xarray as xr
icon_d2['ff'] = xr.ufuncs.sqrt(icon_d2['u']**2 + icon_d2['v']**2)
fig3 = interactive_contours(icon_d2['ff'][0,0,...], aspect=1.25)
fig3 = interactive_streamlines(icon_d2['u'][0,0,...], icon_d2['v'][0,0,...], figure=fig3)
show(fig3)<jupyter_output><empty_output><jupyter_text>Create a streamline plot with Plotly<jupyter_code>fig4 = interactive_streamlines(icon_d2['u'][0,0,...], icon_d2['v'][0,0,...], aspect=1.25, backend=Backend.PLOTLY)
fig4<jupyter_output><empty_output><jupyter_text>Create a vector plot with Bokeh<jupyter_code>fig5 = interactive_streamlines(icon_d2['u'][0,0,...], icon_d2['v'][0,0,...], aspect=1.25, line_type=Stream.VECTOR, density=1, map_resolution="50m")
show(fig5)<jupyter_output><empty_output>