|
17 | 17 | "label: page:viz\n", |
18 | 18 | "kernelspec:\n", |
19 | 19 | " name: python3\n", |
| 20 | + " display_name: Python 3\n", |
20 | 21 | "---" |
21 | 22 | ] |
22 | 23 | }, |
|
31 | 32 | "tags": [] |
32 | 33 | }, |
33 | 34 | "source": [ |
| 35 | + "```{note}\n", |
| 36 | + "This notebook is designed to run anywhere,\n", |
| 37 | + "and includes automatic dataset fetching[^data].\n", |
| 38 | + "\n", |
| 39 | + "The conda environment spec (`environment.yml`) in the GitHub repository can be used\n", |
| 40 | + "to create a local environment with the necessary packages.\n", |
| 41 | + "Or you can also [open in Binder](https://mybinder.org/v2/gh/NunezOcasioLab/mpas-tutorial/HEAD?urlpath=lab%2Ftree%2F03-viz.ipynb).\n", |
| 42 | + "```\n", |
| 43 | + "\n", |
| 44 | + "[^data]: small files by default\n", |
| 45 | + "\n", |
| 46 | + "# Intro\n", |
| 47 | + "\n", |
34 | 48 | "With unstructured-grid data, the grid/coordinate information is usually stored in a separate file from the model output fields. Considerably more information is needed to reconstruct the grid than in the case of a rectangular lat/lon grid, for example, which can be expressed with 1-D coordinate variables (e.g. ERA5).\n", |
35 | 49 | "\n", |
36 | 50 | "With MPAS-A, the necessary grid variables are available in multiple files:\n", |
|
51 | 65 | "```" |
52 | 66 | ] |
53 | 67 | }, |
| 68 | + { |
| 69 | + "cell_type": "markdown", |
| 70 | + "id": "2", |
| 71 | + "metadata": {}, |
| 72 | + "source": [ |
| 73 | + "# Data" |
| 74 | + ] |
| 75 | + }, |
54 | 76 | { |
55 | 77 | "cell_type": "code", |
56 | 78 | "execution_count": null, |
57 | | - "id": "2", |
| 79 | + "id": "3", |
58 | 80 | "metadata": { |
59 | 81 | "editable": true, |
60 | 82 | "slideshow": { |
|
88 | 110 | }, |
89 | 111 | { |
90 | 112 | "cell_type": "markdown", |
91 | | - "id": "3", |
| 113 | + "id": "4", |
92 | 114 | "metadata": { |
93 | 115 | "editable": true, |
94 | 116 | "slideshow": { |
|
105 | 127 | { |
106 | 128 | "cell_type": "code", |
107 | 129 | "execution_count": null, |
108 | | - "id": "4", |
| 130 | + "id": "5", |
109 | 131 | "metadata": { |
110 | 132 | "editable": true, |
111 | 133 | "slideshow": { |
|
146 | 168 | { |
147 | 169 | "cell_type": "code", |
148 | 170 | "execution_count": null, |
149 | | - "id": "5", |
| 171 | + "id": "6", |
150 | 172 | "metadata": { |
151 | 173 | "editable": true, |
152 | 174 | "slideshow": { |
|
172 | 194 | }, |
173 | 195 | { |
174 | 196 | "cell_type": "markdown", |
175 | | - "id": "6", |
| 197 | + "id": "7", |
176 | 198 | "metadata": { |
177 | 199 | "editable": true, |
178 | 200 | "slideshow": { |
|
189 | 211 | { |
190 | 212 | "cell_type": "code", |
191 | 213 | "execution_count": null, |
192 | | - "id": "7", |
| 214 | + "id": "8", |
193 | 215 | "metadata": {}, |
194 | 216 | "outputs": [], |
195 | 217 | "source": [ |
|
216 | 238 | { |
217 | 239 | "cell_type": "code", |
218 | 240 | "execution_count": null, |
219 | | - "id": "8", |
| 241 | + "id": "9", |
220 | 242 | "metadata": {}, |
221 | 243 | "outputs": [], |
222 | 244 | "source": [ |
|
243 | 265 | { |
244 | 266 | "cell_type": "code", |
245 | 267 | "execution_count": null, |
246 | | - "id": "9", |
| 268 | + "id": "10", |
247 | 269 | "metadata": {}, |
248 | 270 | "outputs": [], |
249 | 271 | "source": [ |
|
265 | 287 | { |
266 | 288 | "cell_type": "code", |
267 | 289 | "execution_count": null, |
268 | | - "id": "10", |
| 290 | + "id": "11", |
269 | 291 | "metadata": {}, |
270 | 292 | "outputs": [], |
271 | 293 | "source": [ |
|
294 | 316 | { |
295 | 317 | "cell_type": "code", |
296 | 318 | "execution_count": null, |
297 | | - "id": "11", |
| 319 | + "id": "12", |
298 | 320 | "metadata": {}, |
299 | 321 | "outputs": [], |
300 | 322 | "source": [ |
|
317 | 339 | }, |
318 | 340 | { |
319 | 341 | "cell_type": "markdown", |
320 | | - "id": "12", |
| 342 | + "id": "13", |
321 | 343 | "metadata": { |
322 | 344 | "editable": true, |
323 | 345 | "slideshow": { |
|
336 | 358 | { |
337 | 359 | "cell_type": "code", |
338 | 360 | "execution_count": null, |
339 | | - "id": "13", |
| 361 | + "id": "14", |
340 | 362 | "metadata": { |
341 | 363 | "editable": true, |
342 | 364 | "slideshow": { |
|
352 | 374 | }, |
353 | 375 | { |
354 | 376 | "cell_type": "markdown", |
355 | | - "id": "14", |
| 377 | + "id": "15", |
356 | 378 | "metadata": { |
357 | 379 | "editable": true, |
358 | 380 | "slideshow": { |
|
369 | 391 | { |
370 | 392 | "cell_type": "code", |
371 | 393 | "execution_count": null, |
372 | | - "id": "15", |
| 394 | + "id": "16", |
373 | 395 | "metadata": { |
374 | 396 | "editable": true, |
375 | 397 | "slideshow": { |
|
385 | 407 | { |
386 | 408 | "cell_type": "code", |
387 | 409 | "execution_count": null, |
388 | | - "id": "16", |
| 410 | + "id": "17", |
389 | 411 | "metadata": { |
390 | 412 | "editable": true, |
391 | 413 | "slideshow": { |
|
402 | 424 | { |
403 | 425 | "cell_type": "code", |
404 | 426 | "execution_count": null, |
405 | | - "id": "17", |
| 427 | + "id": "18", |
406 | 428 | "metadata": { |
407 | 429 | "editable": true, |
408 | 430 | "slideshow": { |
|
418 | 440 | { |
419 | 441 | "cell_type": "code", |
420 | 442 | "execution_count": null, |
421 | | - "id": "18", |
| 443 | + "id": "19", |
422 | 444 | "metadata": { |
423 | 445 | "editable": true, |
424 | 446 | "slideshow": { |
|
465 | 487 | }, |
466 | 488 | { |
467 | 489 | "cell_type": "markdown", |
468 | | - "id": "19", |
| 490 | + "id": "20", |
469 | 491 | "metadata": { |
470 | 492 | "editable": true, |
471 | 493 | "slideshow": { |
|
482 | 504 | { |
483 | 505 | "cell_type": "code", |
484 | 506 | "execution_count": null, |
485 | | - "id": "20", |
| 507 | + "id": "21", |
486 | 508 | "metadata": { |
487 | 509 | "editable": true, |
488 | 510 | "slideshow": { |
|
507 | 529 | { |
508 | 530 | "cell_type": "code", |
509 | 531 | "execution_count": null, |
510 | | - "id": "21", |
| 532 | + "id": "22", |
511 | 533 | "metadata": {}, |
512 | 534 | "outputs": [], |
513 | 535 | "source": [ |
|
537 | 559 | { |
538 | 560 | "cell_type": "code", |
539 | 561 | "execution_count": null, |
540 | | - "id": "22", |
| 562 | + "id": "23", |
541 | 563 | "metadata": { |
542 | 564 | "editable": true, |
543 | 565 | "slideshow": { |
|
572 | 594 | }, |
573 | 595 | { |
574 | 596 | "cell_type": "markdown", |
575 | | - "id": "23", |
| 597 | + "id": "24", |
576 | 598 | "metadata": { |
577 | 599 | "editable": true, |
578 | 600 | "slideshow": { |
|
591 | 613 | { |
592 | 614 | "cell_type": "code", |
593 | 615 | "execution_count": null, |
594 | | - "id": "24", |
| 616 | + "id": "25", |
595 | 617 | "metadata": { |
596 | 618 | "editable": true, |
597 | 619 | "slideshow": { |
|
634 | 656 | }, |
635 | 657 | { |
636 | 658 | "cell_type": "markdown", |
637 | | - "id": "25", |
| 659 | + "id": "26", |
638 | 660 | "metadata": {}, |
639 | 661 | "source": [ |
640 | 662 | "(sec:geovista)=\n", |
|
643 | 665 | "\n", |
644 | 666 | "Built on PyVista/VTK, [GeoVista](https://geovista.readthedocs.io/) provides GPU-accelerated interactive visualization of geospatial data and has [builtin support](https://geovista.readthedocs.io/en/v0.5.3/reference/generated/api/geovista/bridge/#geovista.bridge.Transform.from_unstructured) for unstructured meshes.\n", |
645 | 667 | "\n", |
646 | | - "It will still work if a GPU is not available/detected, but it may be much slower to first plot and to respond." |
| 668 | + "It will still work if a GPU is not available/detected, but it may be much slower to first plot and to respond.\n", |
| 669 | + "\n", |
| 670 | + "```{note}\n", |
| 671 | + "This doesn't currently work in NCAR JupyterHub or Binder [^ci].\n", |
| 672 | + "```\n", |
| 673 | + "\n", |
| 674 | + "[^ci]: Or when this site is built, for that matter, which is why it is currently guarded." |
647 | 675 | ] |
648 | 676 | }, |
649 | 677 | { |
650 | 678 | "cell_type": "code", |
651 | 679 | "execution_count": null, |
652 | | - "id": "26", |
| 680 | + "id": "27", |
653 | 681 | "metadata": {}, |
654 | 682 | "outputs": [], |
655 | 683 | "source": [ |
|
684 | 712 | }, |
685 | 713 | { |
686 | 714 | "cell_type": "markdown", |
687 | | - "id": "27", |
| 715 | + "id": "28", |
688 | 716 | "metadata": {}, |
689 | 717 | "source": [ |
690 | 718 | "\n", |
|
699 | 727 | { |
700 | 728 | "cell_type": "code", |
701 | 729 | "execution_count": null, |
702 | | - "id": "28", |
| 730 | + "id": "29", |
703 | 731 | "metadata": {}, |
704 | 732 | "outputs": [], |
705 | 733 | "source": [ |
|
726 | 754 | }, |
727 | 755 | { |
728 | 756 | "cell_type": "markdown", |
729 | | - "id": "29", |
| 757 | + "id": "30", |
730 | 758 | "metadata": {}, |
731 | 759 | "source": [ |
732 | 760 | "````{dropdown} Result\n", |
|
739 | 767 | }, |
740 | 768 | { |
741 | 769 | "cell_type": "markdown", |
742 | | - "id": "30", |
| 770 | + "id": "31", |
743 | 771 | "metadata": { |
744 | 772 | "editable": true, |
745 | 773 | "slideshow": { |
|
757 | 785 | { |
758 | 786 | "cell_type": "code", |
759 | 787 | "execution_count": null, |
760 | | - "id": "31", |
| 788 | + "id": "32", |
761 | 789 | "metadata": { |
762 | 790 | "editable": true, |
763 | 791 | "slideshow": { |
|
793 | 821 | }, |
794 | 822 | { |
795 | 823 | "cell_type": "markdown", |
796 | | - "id": "32", |
| 824 | + "id": "33", |
797 | 825 | "metadata": {}, |
798 | 826 | "source": [ |
799 | 827 | "````{dropdown} Static preview of the result\n", |
|
0 commit comments