Skip to content

Commit

Permalink
Rework keyframing to work without downloads
Browse files Browse the repository at this point in the history
  • Loading branch information
ifranda committed Jun 5, 2024
1 parent 6aa3e77 commit f9bba23
Show file tree
Hide file tree
Showing 3 changed files with 211 additions and 70 deletions.
150 changes: 127 additions & 23 deletions notebooks/keyframing_example.ipynb

Large diffs are not rendered by default.

91 changes: 57 additions & 34 deletions notebooks/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
{
"cell_type": "code",
"execution_count": 53,
"execution_count": 87,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -76,7 +76,7 @@
},
{
"cell_type": "code",
"execution_count": 54,
"execution_count": 88,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -99,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 55,
"execution_count": 89,
"metadata": {},
"outputs": [
{
Expand All @@ -108,7 +108,7 @@
"['vdc', 'wrf', 'cf', 'mpas', 'bov', 'ugrid']"
]
},
"execution_count": 55,
"execution_count": 89,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -126,21 +126,9 @@
},
{
"cell_type": "code",
"execution_count": 56,
"execution_count": 90,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
" % Total % Received % Xferd Average Speed Time Time Time Current\n",
" Dload Upload Total Spent Left Speed\n",
"100 96.9M 0 96.9M 0 0 27.4M 0 --:--:-- 0:00:03 --:--:-- 27.4M\n",
"Archive: Katrina.zip\n",
" inflating: ./data/wrfout_d02_2005-08-29_02.nc \n"
]
}
],
"outputs": [],
"source": [
"!if [ ! -f \"./data/wrfout_d02_2005-08-29_02.nc\" ]; then \\\n",
" curl -o Katrina.zip \"https://data.rda.ucar.edu/ds897.7/Katrina.zip\"; \\\n",
Expand All @@ -159,7 +147,7 @@
},
{
"cell_type": "code",
"execution_count": 57,
"execution_count": 91,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -175,7 +163,7 @@
},
{
"cell_type": "code",
"execution_count": 58,
"execution_count": 92,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -232,7 +220,7 @@
},
{
"cell_type": "code",
"execution_count": 59,
"execution_count": 93,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -249,7 +237,7 @@
},
{
"cell_type": "code",
"execution_count": 60,
"execution_count": 94,
"metadata": {},
"outputs": [
{
Expand All @@ -258,7 +246,7 @@
"0"
]
},
"execution_count": 60,
"execution_count": 94,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -277,7 +265,7 @@
},
{
"cell_type": "code",
"execution_count": 61,
"execution_count": 95,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -311,7 +299,7 @@
},
{
"cell_type": "code",
"execution_count": 62,
"execution_count": 96,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -328,7 +316,7 @@
},
{
"cell_type": "code",
"execution_count": 63,
"execution_count": 97,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -352,7 +340,7 @@
},
{
"cell_type": "code",
"execution_count": 64,
"execution_count": 98,
"metadata": {},
"outputs": [
{
Expand Down Expand Up @@ -390,7 +378,7 @@
},
{
"cell_type": "code",
"execution_count": 65,
"execution_count": 99,
"metadata": {},
"outputs": [
{
Expand All @@ -415,6 +403,41 @@
"ses.Show()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can also generate an interactive visual using Vapor's jupyter widget. This allows you to move the camera around as if you were using the Vapor application. \n",
"*Note: This widget requires an active kernel to operate. To try it out, run this notebook on your local machine.*"
]
},
{
"cell_type": "code",
"execution_count": 100,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "a2315dd804684c88912f0df7c265a1e0",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"VaporVisualizerWidget(imageData='/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aH…"
]
},
"execution_count": 100,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"from jupyter_vapor_widget import *\n",
"viz = VaporVisualizerWidget(ses)\n",
"viz"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand All @@ -431,7 +454,7 @@
},
{
"cell_type": "code",
"execution_count": 66,
"execution_count": 101,
"metadata": {},
"outputs": [
{
Expand All @@ -440,7 +463,7 @@
"0"
]
},
"execution_count": 66,
"execution_count": 101,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -458,7 +481,7 @@
},
{
"cell_type": "code",
"execution_count": 67,
"execution_count": 102,
"metadata": {},
"outputs": [
{
Expand All @@ -467,7 +490,7 @@
"0"
]
},
"execution_count": 67,
"execution_count": 102,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -485,7 +508,7 @@
},
{
"cell_type": "code",
"execution_count": 68,
"execution_count": 103,
"metadata": {},
"outputs": [
{
Expand All @@ -501,7 +524,7 @@
"0"
]
},
"execution_count": 68,
"execution_count": 103,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Loading

0 comments on commit f9bba23

Please sign in to comment.