Skip to content

Commit 346646b

Browse files
committed
first commit
0 parents  commit 346646b

File tree

4 files changed

+178
-0
lines changed

4 files changed

+178
-0
lines changed

README.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# HRRR_Dashboard
2+
Explore the High-Resolution Rapid Refresh weather forecast using [Holoviz](holoviz.org) (hvplot and panel)
3+
4+
### Launch in JupyterLab:
5+
6+
[![badge](https://img.shields.io/static/v1.svg?logo=Jupyter&label=Pangeo+Binder&message=AWS+us-west-2&color=green)](https://aws-uswest2-binder.pangeo.io/v2/gh/reproducible-notebooks/HRRR_Dashboard/binder?urlpath=git-pull?repo=https://github.com/reproducible-notebooks/HRRR_Dashboard%26amp%3Bbranch=master%26amp%3Burlpath=lab/tree/HRRR_Dashboard/HRRR_Dashboard.ipynb%3Fautodecode)
7+
8+
### Launch Web App:
9+
10+
[![badge](https://img.shields.io/static/v1.svg?logo=Jupyter&label=Binder&message=Panel+app&color=green)](https://mybinder.org/v2/gh/reproducible-notebooks/HRRR_Dashboard.git/HEAD?urlpath=panel/HRRR_Dashboard)

bathy_explorer.ipynb

+147
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,147 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# Visualize ETOPO1 topography data"
8+
]
9+
},
10+
{
11+
"cell_type": "code",
12+
"execution_count": null,
13+
"metadata": {},
14+
"outputs": [],
15+
"source": [
16+
"import xarray as xr\n",
17+
"import hvplot.xarray\n",
18+
"import geoviews as gv"
19+
]
20+
},
21+
{
22+
"cell_type": "markdown",
23+
"metadata": {},
24+
"source": [
25+
"### Open ETOPO1 data via OPeNDAP"
26+
]
27+
},
28+
{
29+
"cell_type": "code",
30+
"execution_count": null,
31+
"metadata": {},
32+
"outputs": [],
33+
"source": [
34+
"ds = xr.open_dataset('http://geoport.usgs.esipfed.org/thredds/dodsC/bathy/etopo1_bed_g2')"
35+
]
36+
},
37+
{
38+
"cell_type": "markdown",
39+
"metadata": {},
40+
"source": [
41+
"Extract the lon/lat range we want"
42+
]
43+
},
44+
{
45+
"cell_type": "code",
46+
"execution_count": null,
47+
"metadata": {},
48+
"outputs": [],
49+
"source": [
50+
"na = ds.topo.sel(lon=slice(-130,-50),lat=slice(15,50)) # North America"
51+
]
52+
},
53+
{
54+
"cell_type": "markdown",
55+
"metadata": {},
56+
"source": [
57+
"Set land and water deeper that 1000m to NaN"
58+
]
59+
},
60+
{
61+
"cell_type": "code",
62+
"execution_count": null,
63+
"metadata": {},
64+
"outputs": [],
65+
"source": [
66+
"na = na.where(na<0)\n",
67+
"na = na.where(na>-1000)"
68+
]
69+
},
70+
{
71+
"cell_type": "markdown",
72+
"metadata": {},
73+
"source": [
74+
"### Visualize with [Holoviz](holoviz.org) tools"
75+
]
76+
},
77+
{
78+
"cell_type": "markdown",
79+
"metadata": {},
80+
"source": [
81+
"Create color-shaded quadmesh "
82+
]
83+
},
84+
{
85+
"cell_type": "code",
86+
"execution_count": null,
87+
"metadata": {},
88+
"outputs": [],
89+
"source": [
90+
"bathy_grid = na.hvplot.quadmesh(x='lon', y='lat', rasterize=True, geo=True, cmap='viridis')"
91+
]
92+
},
93+
{
94+
"cell_type": "markdown",
95+
"metadata": {},
96+
"source": [
97+
"Create black contour lines"
98+
]
99+
},
100+
{
101+
"cell_type": "code",
102+
"execution_count": null,
103+
"metadata": {},
104+
"outputs": [],
105+
"source": [
106+
"contours = na.hvplot.contour(x='lon', y='lat', levels=[-600, -100], cmap=['#000000'], geo=True)"
107+
]
108+
},
109+
{
110+
"cell_type": "markdown",
111+
"metadata": {},
112+
"source": [
113+
"Overlay color-shaded mesh, contours and ESRI basemap "
114+
]
115+
},
116+
{
117+
"cell_type": "code",
118+
"execution_count": null,
119+
"metadata": {},
120+
"outputs": [],
121+
"source": [
122+
"(bathy_grid * contours) * gv.tile_sources.ESRI "
123+
]
124+
}
125+
],
126+
"metadata": {
127+
"kernelspec": {
128+
"display_name": "Python 3",
129+
"language": "python",
130+
"name": "python3"
131+
},
132+
"language_info": {
133+
"codemirror_mode": {
134+
"name": "ipython",
135+
"version": 3
136+
},
137+
"file_extension": ".py",
138+
"mimetype": "text/x-python",
139+
"name": "python",
140+
"nbconvert_exporter": "python",
141+
"pygments_lexer": "ipython3",
142+
"version": "3.7.8"
143+
}
144+
},
145+
"nbformat": 4,
146+
"nbformat_minor": 4
147+
}

environment.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
channels:
2+
- conda-forge
3+
dependencies:
4+
- cartopy
5+
- fsspec
6+
- hvplot
7+
- holoviews
8+
- panel
9+
- datashader
10+
- geoviews
11+
- xarray
12+
- zarr
13+
- netcdf4
14+
- intake
15+
- intake-xarray
16+
- metpy
17+
- requests
18+
- jupyter-panel-proxy
19+
- nbgitpuller

postBuild

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
jupyter serverextension enable --py nbgitpuller --sys-prefix
2+
jupyter labextension install @pyviz/jupyterlab_pyviz

0 commit comments

Comments
 (0)