Skip to content

Commit 9274957

Browse files
committed
Update user guide notebooks to use tutorial datasets
1 parent a79db96 commit 9274957

16 files changed

Lines changed: 347 additions & 3606 deletions

docs/api.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,19 @@ Top Level Functions
2323
open_mfdataset
2424
concat
2525

26+
Tutorial
27+
--------
28+
29+
.. autosummary::
30+
:toctree: generated/
31+
32+
tutorial.available_datasets
33+
tutorial.describe_dataset
34+
tutorial.file_path
35+
tutorial.file_paths
36+
tutorial.open_grid
37+
tutorial.open_dataset
38+
tutorial.open_mfdataset
2639

2740
Grid
2841
----

docs/getting-started/quick-overview.ipynb

Lines changed: 71 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,7 @@
44
"cell_type": "markdown",
55
"id": "3a5d7fe9539f9d6b",
66
"metadata": {
7-
"collapsed": false,
8-
"jupyter": {
9-
"outputs_hidden": false
10-
}
7+
"collapsed": false
118
},
129
"source": [
1310
"# UXarray in 10 Lines\n",
@@ -19,7 +16,13 @@
1916
"cell_type": "code",
2017
"execution_count": null,
2118
"id": "5c8b24263cf6d8f2",
22-
"metadata": {},
19+
"metadata": {
20+
"ExecuteTime": {
21+
"end_time": "2024-06-10T17:54:24.207362Z",
22+
"start_time": "2024-06-10T17:54:22.251913Z"
23+
},
24+
"collapsed": false
25+
},
2326
"outputs": [],
2427
"source": [
2528
"import uxarray as ux"
@@ -29,10 +32,11 @@
2932
"cell_type": "markdown",
3033
"id": "acae54e37e7d407bbb7b55eff062a284",
3134
"metadata": {
32-
"collapsed": false,
33-
"jupyter": {
34-
"outputs_hidden": false
35-
}
35+
"ExecuteTime": {
36+
"end_time": "2024-06-10T17:54:24.210505Z",
37+
"start_time": "2024-06-10T17:54:24.208206Z"
38+
},
39+
"collapsed": false
3640
},
3741
"source": [
3842
"## Opening a Dataset"
@@ -42,7 +46,9 @@
4246
"cell_type": "code",
4347
"execution_count": null,
4448
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
45-
"metadata": {},
49+
"metadata": {
50+
"collapsed": false
51+
},
4652
"outputs": [],
4753
"source": [
4854
"uxds = ux.tutorial.open_dataset(\"outCSne30-vortex\")"
@@ -52,7 +58,13 @@
5258
"cell_type": "code",
5359
"execution_count": null,
5460
"id": "8dd0d8092fe74a7c96281538738b07e2",
55-
"metadata": {},
61+
"metadata": {
62+
"ExecuteTime": {
63+
"end_time": "2024-06-10T17:54:24.291261Z",
64+
"start_time": "2024-06-10T17:54:24.211278Z"
65+
},
66+
"collapsed": false
67+
},
5668
"outputs": [],
5769
"source": [
5870
"uxds"
@@ -62,10 +74,11 @@
6274
"cell_type": "markdown",
6375
"id": "72eea5119410473aa328ad9291626812",
6476
"metadata": {
65-
"collapsed": false,
66-
"jupyter": {
67-
"outputs_hidden": false
68-
}
77+
"ExecuteTime": {
78+
"end_time": "2024-06-10T17:54:24.298044Z",
79+
"start_time": "2024-06-10T17:54:24.294307Z"
80+
},
81+
"collapsed": false
6982
},
7083
"source": [
7184
"## Accessing Grid Information"
@@ -75,7 +88,9 @@
7588
"cell_type": "code",
7689
"execution_count": null,
7790
"id": "8edb47106e1a46a883d545849b8ab81b",
78-
"metadata": {},
91+
"metadata": {
92+
"collapsed": false
93+
},
7994
"outputs": [],
8095
"source": [
8196
"uxds.uxgrid"
@@ -85,7 +100,13 @@
85100
"cell_type": "code",
86101
"execution_count": null,
87102
"id": "10185d26023b46108eb7d9f57d49d2b3",
88-
"metadata": {},
103+
"metadata": {
104+
"ExecuteTime": {
105+
"end_time": "2024-06-10T17:54:24.303068Z",
106+
"start_time": "2024-06-10T17:54:24.299607Z"
107+
},
108+
"collapsed": false
109+
},
89110
"outputs": [],
90111
"source": [
91112
"uxds.uxgrid.node_lon"
@@ -95,10 +116,11 @@
95116
"cell_type": "markdown",
96117
"id": "8763a12b2bbd4a93a75aff182afb95dc",
97118
"metadata": {
98-
"collapsed": false,
99-
"jupyter": {
100-
"outputs_hidden": false
101-
}
119+
"ExecuteTime": {
120+
"end_time": "2024-06-10T17:54:24.306724Z",
121+
"start_time": "2024-06-10T17:54:24.303386Z"
122+
},
123+
"collapsed": false
102124
},
103125
"source": [
104126
"## Accessing Data Variables"
@@ -108,7 +130,9 @@
108130
"cell_type": "code",
109131
"execution_count": null,
110132
"id": "7623eae2785240b9bd12b16a66d81610",
111-
"metadata": {},
133+
"metadata": {
134+
"collapsed": false
135+
},
112136
"outputs": [],
113137
"source": [
114138
"uxds[\"psi\"]"
@@ -118,10 +142,11 @@
118142
"cell_type": "markdown",
119143
"id": "7cdc8c89c7104fffa095e18ddfef8986",
120144
"metadata": {
121-
"collapsed": false,
122-
"jupyter": {
123-
"outputs_hidden": false
124-
}
145+
"ExecuteTime": {
146+
"end_time": "2024-06-10T17:54:24.311014Z",
147+
"start_time": "2024-06-10T17:54:24.308663Z"
148+
},
149+
"collapsed": false
125150
},
126151
"source": [
127152
"## Analysis"
@@ -131,7 +156,9 @@
131156
"cell_type": "code",
132157
"execution_count": null,
133158
"id": "b118ea5561624da68c537baed56e602f",
134-
"metadata": {},
159+
"metadata": {
160+
"collapsed": false
161+
},
135162
"outputs": [],
136163
"source": [
137164
"uxds[\"psi\"].mean()"
@@ -141,10 +168,11 @@
141168
"cell_type": "markdown",
142169
"id": "938c804e27f84196a10c8828c723f798",
143170
"metadata": {
144-
"collapsed": false,
145-
"jupyter": {
146-
"outputs_hidden": false
147-
}
171+
"ExecuteTime": {
172+
"end_time": "2024-06-10T17:54:24.324376Z",
173+
"start_time": "2024-06-10T17:54:24.311556Z"
174+
},
175+
"collapsed": false
148176
},
149177
"source": [
150178
"## Visualization"
@@ -154,7 +182,9 @@
154182
"cell_type": "code",
155183
"execution_count": null,
156184
"id": "504fb2a444614c0babb325280ed9130a",
157-
"metadata": {},
185+
"metadata": {
186+
"collapsed": false
187+
},
158188
"outputs": [],
159189
"source": [
160190
"uxds[\"psi\"].plot()"
@@ -164,16 +194,22 @@
164194
"cell_type": "code",
165195
"execution_count": null,
166196
"id": "c0ddcd97-a79a-4fa0-b152-181009ce22a0",
167-
"metadata": {},
197+
"metadata": {
198+
"ExecuteTime": {
199+
"end_time": "2024-06-10T17:54:26.579531Z",
200+
"start_time": "2024-06-10T17:54:24.315359Z"
201+
},
202+
"collapsed": false
203+
},
168204
"outputs": [],
169205
"source": []
170206
}
171207
],
172208
"metadata": {
173209
"kernelspec": {
174-
"display_name": "Python (uxarray_build)",
210+
"display_name": "Python 3",
175211
"language": "python",
176-
"name": "uxarray_build"
212+
"name": "python3"
177213
},
178214
"language_info": {
179215
"codemirror_mode": {

docs/user-guide/area_calc.ipynb

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"cell_type": "markdown",
5151
"metadata": {},
5252
"source": [
53-
"We will be using the `outCSne30.ug` grid file, which is encoded in the UGRID convention."
53+
"We will be using the `outCSne30.ug` grid file, which is encoded in the UGRID convention. In the user guide, this file is loaded through `ux.tutorial.open_grid(\"outCSne30\")` for convenience, and its underlying path can be resolved with `ux.tutorial.file_path(\"outCSne30\", \"grid\")`."
5454
]
5555
},
5656
{
@@ -64,11 +64,7 @@
6464
},
6565
"outputs": [],
6666
"source": [
67-
"base_path = \"../../test/meshfiles/\"\n",
68-
"grid_path = base_path + \"/ugrid/outCSne30/outCSne30.ug\"\n",
69-
"\n",
70-
"ugrid = ux.open_grid(grid_path)\n",
71-
"ugrid"
67+
"ugrid = ux.tutorial.open_grid(\"outCSne30\")"
7268
]
7369
},
7470
{
@@ -766,7 +762,7 @@
766762
],
767763
"metadata": {
768764
"kernelspec": {
769-
"display_name": "Python 3 (ipykernel)",
765+
"display_name": "Python 3",
770766
"language": "python",
771767
"name": "python3"
772768
},
@@ -780,7 +776,7 @@
780776
"name": "python",
781777
"nbconvert_exporter": "python",
782778
"pygments_lexer": "ipython3",
783-
"version": "3.12.6"
779+
"version": "3.14.4"
784780
}
785781
},
786782
"nbformat": 4,

docs/user-guide/azimuthal-average.ipynb

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@
4949
"metadata": {},
5050
"outputs": [],
5151
"source": [
52-
"uxds = ux.open_dataset(\n",
53-
" \"../../test/meshfiles/ugrid/outCSne30/outCSne30.ug\",\n",
54-
" \"../../test/meshfiles/ugrid/outCSne30/outCSne30_vortex.nc\",\n",
55-
")"
52+
"uxds = ux.tutorial.open_dataset(\"outCSne30-vortex\")"
5653
]
5754
},
5855
{
@@ -202,10 +199,7 @@
202199
"outputs": [],
203200
"source": [
204201
"clon, clat = 114.54, -17.66\n",
205-
"tcds = ux.open_dataset(\n",
206-
" \"../../test/meshfiles/ugrid/ne120_TCsubset/ne120_TCsubset.ug\",\n",
207-
" \"../../test/meshfiles/ugrid/ne120_TCsubset/ne120_TCsubset.nc\",\n",
208-
").squeeze()"
202+
"tcds = ux.tutorial.open_dataset(\"ne120-tcsubset\").squeeze()"
209203
]
210204
},
211205
{
@@ -296,7 +290,7 @@
296290
],
297291
"metadata": {
298292
"kernelspec": {
299-
"display_name": "Python 3 (ipykernel)",
293+
"display_name": "Python 3",
300294
"language": "python",
301295
"name": "python3"
302296
},
@@ -310,7 +304,7 @@
310304
"name": "python",
311305
"nbconvert_exporter": "python",
312306
"pygments_lexer": "ipython3",
313-
"version": "3.14.3"
307+
"version": "3.14.4"
314308
}
315309
},
316310
"nbformat": 4,

docs/user-guide/cross-sections.ipynb

Lines changed: 26 additions & 3428 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)