Skip to content

Commit

Permalink
docs(examples): Update esgf example - add markup cells, update config
Browse files Browse the repository at this point in the history
  • Loading branch information
johnkit committed Nov 21, 2024
1 parent 0965b0b commit c33fde6
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 5 deletions.
53 changes: 50 additions & 3 deletions examples/example_config_esgf.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,59 @@
{
"data_origin": {
"source": "esgf",
"id": "CMIP6.PAMIP.MOHC.HadGEM3-GC31-MM.pdSST-futAntSIC.r102i1p1f2.day.sfcWind.gn.v20210311|eagle.alcf.anl.gov"
"id": "CMIP6.PAMIP.MOHC.HadGEM3-GC31-MM.pdSST-futAntSIC.r102i1p1f2.day.sfcWind.gn.v20210311|eagle.alcf.anl.gov",
"order": "C"
},
"dataset_config": {
"arrays": ["sfcWind"]
"x": "lon",
"y": "lat",
"z": null,
"t": "time",
"slices": {
"time": 355,
"lon": [
0,
432,
1
],
"lat": [
0,
324,
1
]
},
"t_index": 1,
"arrays": [
"sfcWind"
]
},
"preview": {
"color_by": "sfcWind"
"view_3d": true,
"color_by": "sfcWind",
"color_preset": "Cool to Warm",
"color_min": 0.19989013671875,
"color_max": 21.98614501953125,
"scale_x": 1,
"scale_y": 1,
"scale_z": 1
},
"camera": {
"position": [
179.9999898225069,
7.62939453125e-06,
775.6354152568821
],
"view_up": [
0.0,
1.0,
0.0
],
"focal_point": [
179.9999898225069,
7.62939453125e-06,
0.0
],
"parallel_projection": 0,
"parallel_scale": 200.74921752448336
}
}
44 changes: 42 additions & 2 deletions examples/jupyter/import_config_esgf.ipynb
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "3c5ed231-0166-4181-ad69-630f32eb9af5",
"metadata": {},
"source": [
"# Example: Climate model data (ESGF host)\n",
"\n",
"This dataset contains a model of near-surface wind speec computed on a daily basis for a 14 month\n",
"period from April 2000 through May 2001. It is taken from the Coupled Model Intercomparison Project Phase 6\n",
"(CMIP6) and is hosted by the Earth System Grid Federation (ESGF).\n",
"\n",
"To setup your environment:\n",
"\n",
"```\n",
"> pip install pan3d[viewer,esgf]\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
Expand Down Expand Up @@ -37,7 +55,9 @@
"id": "84d23d39-2fad-4495-8701-b8fe69170639",
"metadata": {},
"source": [
"## Load dataset"
"## Load dataset - and please be patient!\n",
"\n",
"When you run the next code cell, it will load one time step and build the coordinates and data for that time step. Download times have been observed to take over 10 seconds, so after running the next code cell, check the kernel state in the status bar at the bottom of the notebook and wait for it to go from \"Busy\" to \"Idle\"."
]
},
{
Expand All @@ -56,7 +76,9 @@
"id": "4a15f7d2-faea-4aba-b4bc-653ac39e155f",
"metadata": {},
"source": [
"## Show UI"
"## Start the Viewer\n",
"\n",
"Run the next cell to open the pan3d viewer. In the \"Xarray Viewer\" panel, you can open the \"Rendering\" subpanel and update the time slider to load and view different days in the 14 month range. (To move 1 day at a time, click on the slider then use the left and right arrow keys.)"
]
},
{
Expand All @@ -68,6 +90,24 @@
"source": [
"viewer.ui"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "42f73ae2-6f68-4cd0-942e-72d0a390223d",
"metadata": {},
"outputs": [],
"source": [
"viewer.source._input"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "a7c7d279-ef3b-4689-8400-e016378c3177",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down

0 comments on commit c33fde6

Please sign in to comment.