diff --git a/.gitignore b/.gitignore index b6e4761..e3f7344 100644 --- a/.gitignore +++ b/.gitignore @@ -127,3 +127,14 @@ dmypy.json # Pyre type checker .pyre/ + +# presentation material +data/step-?.png +data/my-project.pkl +data/output.png +data/fmt.yml +data/topo_icon_edge_r3b7_13km.nc +data/tmp.png +fmt.yml +my-project.pkl +.ipynb_checkpoints diff --git a/README.md b/README.md index 7bcd992..fa562d4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,109 @@ -# psyplot-DKRZ-TechTalk-20201117 -Presentation materials for the TechTalk about psyplot at the [German Climate Computing Center (DKRZ)][DKRZ], November 17th, 2020 +# Visualizing unstructured grids from scripts and GUI with psyplot -Content will be available soon. If you want to be notified, login to Github and select _Releases only_ from the _Watch_ dropdown in the upper right corner. +Presentation materials for the [TechTalk about psyplot][techtalk] by +Philipp S. Sommer at the [German Climate Computing Center (DKRZ)][DKRZ], +November 17th, 2020 +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Chilipp/psyplot-DKRZ-TechTalk-20201117/main?filepath=psyplot-framework-presentation.ipynb) +## Abstract + +psyplot (https://psyplot.github.io) is a data visualization framework that integrates rich computational and mathematical software packages (such as xarray and matplotlib) into a flexible framework for visualization. It differs from most of the visual analytic softwares such that it focuses on extensibility in order to flexibly tackle the different types of analysis questions that arise in pioneering research. The design of the high-level API of the framework enables a simple and standardized usage from the command-line, python scripts or jupyter notebooks. A modular plugin framework enables a flexible development of the framework that can potentially go into many different directions. The additional enhancement with a flexible GUI makes it the only visualization framework that can be handled from the convenient command-line, as well as via point-click handling. It also allows to build further desktop applications on top of the existing framework. + +In this TechTalk, I will show the main functionalities of psyplot, with a special focus on the visualization of unstructured grids (such as ICON), and the usage of psyplot on the HPC facilities of the DKRZ (mistral, jupyterhub, remote desktop, etc.). My demonstration will cover in particular + +- the psyplot framework +- how to use psyplot in python scripts (and jupyter notebooks) +- a guide to the psyplot GUI +- the new ncview-like interface build upon psyplot +- how to reuse plot configurations and generate respective templates + + +## About this presentation + +### Static version + +This presentation is a jupyter notebook presented with [RISE][rise]. You can +access the raw notebook at +[psyplot-framework-presentation.ipynb](psyplot-framework-presentation.ipynb). + +### interactive version on mybinder.org + +Alternatively, run it interactively on mybinder.org by clicking here: +[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/Chilipp/psyplot-DKRZ-TechTalk-20201117/main?filepath=psyplot-framework-presentation.ipynb) + +You will automatically start in presentation mode, but you can cancel this with +Alt-R to see the standard jupyter notebook layout. + +### interactive version on mistral + +You can also run this presentation notebook on mistral. To run it, please +proceed with the following commands from the terminal when connected to the DKRZ +supercomputing facilities via SSH: + +```bash +git clone https://github.com/Chilipp/psyplot-DKRZ-TechTalk-20201117.git +module load python3 +. `dirname $(which conda)`/../etc/profile.d/conda.sh +conda activate /work/gg0302/g260169/psyplot-examples/conda-env/ + +python -m ipykernel install --user --name psyplot-presi --display-name "IPython kernel for psyplot" +jupyter nbextension enable splitcell/splitcell +``` + +Then head over to https://jupyterhub.dkrz.de, login and click on _Preset_. +Click _start from preset profiles_ and enter your DKRZ project account. + +Start it and, as soon as you see the notebook server (it will start in your `$HOME`) navigate to cloned repository and open the `psyplot-framework-presentation.ipynb` + +### Local installation using repo2docker + +In case you have docker installed on your local computer, you can simply use [repo2docker](https://repo2docker.readthedocs.io/en/latest/) to start this notebook. + +Just type + +``` +repo2docker -P https://github.com/Chilipp/psyplot-DKRZ-TechTalk-20201117.git +``` + +and open the link that is shown to you at the end of the build process. + +### Local installation manually + +Clone the repository: + +```bash +git clone https://github.com/Chilipp/psyplot-DKRZ-TechTalk-20201117 +cd psyplot-DKRZ-TechTalk-20201117 +``` + +Create a new conda environment via + +```bash +conda env create -f binder/environment.yml +conda activate psyplot-presi +``` + +activate the splitcell jupyter extension + +```bash +jupyter nbextension enable splitcell/splitcell +``` + +export some environment variables that are necessary for pyvista + +```bash +export PYVISTA_OFF_SCREEN=true +export PYVISTA_USE_IPYVTK=true +export PYVISTA_PLOT_THEME=document +``` + + +start the notebook server via + +```bash +jupyter notebook +``` + +[techtalk]: https://www.dkrz.de/up/news-and-events/tech-talks/tech-talk-visualizing-unstructured-grids-from-scripts-and-gui-with-psyplot [DKRZ]: https://www.dkrz.de/ diff --git a/binder/apt.txt b/binder/apt.txt new file mode 100644 index 0000000..922b99b --- /dev/null +++ b/binder/apt.txt @@ -0,0 +1,16 @@ +libgl1-mesa-glx +libgl1-mesa-dev +mesa-utils + +xvfb + +dbus-x11 +xfce4 +xfce4-panel +xfce4-session +xfce4-settings +xorg +xubuntu-icon-theme +libxss1 +libpci3 +libasound2 diff --git a/binder/environment.yml b/binder/environment.yml new file mode 100644 index 0000000..d326640 --- /dev/null +++ b/binder/environment.yml @@ -0,0 +1,24 @@ +name: psyplot-presi +channels: + - conda-forge +dependencies: + - python=3.8 + - jupyter_contrib_nbextensions + - psy-view + - jupyter + - rise + - matplotlib>=3.3 + - cartopy>=0.18 + - ipython>=7.14 + - dask + - pip + # Required for jupyter-desktop-server + - websockify + - pip: + - jupyter-desktop-server + - git+git://github.com/pyvista/pyvista@master + - pyvistaqt + - ipyvtk-simple>=0.1.2 + - itkwidgets>=0.25.2 + - pyct + - git+https://github.com/Chilipp/psy-vtk.git@master diff --git a/binder/postBuild b/binder/postBuild new file mode 100755 index 0000000..6c4100d --- /dev/null +++ b/binder/postBuild @@ -0,0 +1,75 @@ +#!/bin/bash + +set -euo pipefail + +jupyter nbextension enable splitcell/splitcell + +mkdir -p $HOME/Desktop + +cp -r data/*.nc $HOME/Desktop + +cat > $HOME/Desktop/Psy-View.desktop << EOF +[Desktop Entry] +Version=1.0 +Type=Application +Name=Psy-View +Exec=$(which psy-view) %f +Icon=$HOME/binder/psy-view.svg +Path=$HOME/Desktop +MimeType=application/x-netcdf; +EOF + +cat > $HOME/Desktop/Psyplot.desktop << EOF +[Desktop Entry] +Version=1.0 +Type=Application +Name=Psyplot +Exec=$(which psyplot) %f +Icon=$HOME/binder/psyplot.svg +Path=$HOME/Desktop +MimeType=application/x-netcdf; +EOF + +chmod u+x $HOME/Desktop/Psyplot.desktop $HOME/Desktop/Psy-View.desktop + +# associate default applications +mkdir -p $HOME/.local/share/applications/ +ln -s $HOME/Desktop/Psyplot.desktop $HOME/.local/share/applications/ +ln -s $HOME/Desktop/Psy-View.desktop $HOME/.local/share/applications/ + +cat > $HOME/.config/mimeapps.list << EOF +[Default Applications] +application/x-netcdf=Psy-View.Desktop + +[Added Associations] +application/x-netcdf=Psy-View.desktop;application/x-netcdf=Psyplot.desktop; +EOF + +# create a demo preset +mkdir -p $HOME/.config/psyplot/presets +cat > $HOME/.config/psyplot/presets/EUR-temperature.yml << EOF +clabel: '%(long_name)s %(units)s' +cmap: YlOrRd +datagrid: k- +lonlatbox: Europe +lsm: + coast: + - 0.0 + - 0.0 + - 0.0 + - 1.0 + land: + - 0.6666666666666666 + - 0.3333333333333333 + - 0.0 + - 1.0 + ocean: + - 0.592156862745098 + - 0.7137254901960784 + - 0.8823529411764706 + - 1.0 + res: 50m +title: '%(long_name)s over Europe' +xgrid: false +ygrid: false +EOF diff --git a/binder/psy-view.svg b/binder/psy-view.svg new file mode 100644 index 0000000..23540d1 --- /dev/null +++ b/binder/psy-view.svg @@ -0,0 +1,5709 @@ + + + + diff --git a/binder/psyplot.svg b/binder/psyplot.svg new file mode 100644 index 0000000..23540d1 --- /dev/null +++ b/binder/psyplot.svg @@ -0,0 +1,5709 @@ + + + + diff --git a/binder/start b/binder/start new file mode 100644 index 0000000..bad66a0 --- /dev/null +++ b/binder/start @@ -0,0 +1,12 @@ +#!/bin/bash +export DISPLAY=:99.0 + +export PYVISTA_OFF_SCREEN=true +export PYVISTA_USE_IPYVTK=true +export PYVISTA_PLOT_THEME=document + +which Xvfb +Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & +sleep 3 + +exec "$@" diff --git a/data/curvilinear.nc b/data/curvilinear.nc new file mode 100644 index 0000000..6835ac4 Binary files /dev/null and b/data/curvilinear.nc differ diff --git a/data/demo.nc b/data/demo.nc new file mode 100644 index 0000000..e6b9dbf Binary files /dev/null and b/data/demo.nc differ diff --git a/data/icon-edge.nc b/data/icon-edge.nc new file mode 100644 index 0000000..ad9404e Binary files /dev/null and b/data/icon-edge.nc differ diff --git a/data/icon.nc b/data/icon.nc new file mode 100644 index 0000000..22fd591 Binary files /dev/null and b/data/icon.nc differ diff --git a/data/icon_grid_demo.nc b/data/icon_grid_demo.nc new file mode 100644 index 0000000..82826d8 Binary files /dev/null and b/data/icon_grid_demo.nc differ diff --git a/data/rectilinear.nc b/data/rectilinear.nc new file mode 100644 index 0000000..4dae99f Binary files /dev/null and b/data/rectilinear.nc differ diff --git a/data/screencast.mp4 b/data/screencast.mp4 new file mode 100644 index 0000000..2539f98 Binary files /dev/null and b/data/screencast.mp4 differ diff --git a/data/ugrid.nc b/data/ugrid.nc new file mode 100644 index 0000000..379b043 Binary files /dev/null and b/data/ugrid.nc differ diff --git a/data/ugrid_demo.nc b/data/ugrid_demo.nc new file mode 100644 index 0000000..19526ca Binary files /dev/null and b/data/ugrid_demo.nc differ diff --git a/img/HCDC_final_RGB-small.jpg b/img/HCDC_final_RGB-small.jpg new file mode 100755 index 0000000..1595f94 Binary files /dev/null and b/img/HCDC_final_RGB-small.jpg differ diff --git a/img/logo_hzg_rgb_deutsch.jpeg b/img/logo_hzg_rgb_deutsch.jpeg new file mode 100644 index 0000000..6961de1 Binary files /dev/null and b/img/logo_hzg_rgb_deutsch.jpeg differ diff --git a/matplotlibrc b/matplotlibrc new file mode 100644 index 0000000..9f48c37 --- /dev/null +++ b/matplotlibrc @@ -0,0 +1,4 @@ +figure.subplot.bottom : 0.02 +figure.subplot.left : 0.02 +figure.subplot.right : 0.998 +figure.subplot.top : 0.9 diff --git a/psyplot-framework-presentation.css b/psyplot-framework-presentation.css new file mode 100644 index 0000000..49a2100 --- /dev/null +++ b/psyplot-framework-presentation.css @@ -0,0 +1,88 @@ +/* this is for styling the overlay + * when using header / footer and backimage + * + * see metadata in notebook + */ + + +#rise-footer { + margin: 10px; + right: 10%; +} + +#rise-footer img { + height: 6em; + margin-left: 10em; + margin-right: 10em; +} + +.xr-text-repr-fallback { + display: none !important; +} + +li.xr-var-item { + display: flex; +} + +dl > dt { + clear: left; +} + +dl > dd { + padding-left: 10px; +} + +#slide-2-0 > div.fragment > div.cell { + color: #004085; + background-color: #cce5ff; + border-color: #b8daff; + padding: .75rem 1.25rem; + margin: 1rem; + width: 45% !important; + border: 1px solid transparent; + border-radius: .25rem; +} + +#slide-3-3 > div.fragment > div.cell { + color: #004085; + background-color: #cce5ff; + border-color: #b8daff; + padding: .75rem 1.25rem; + margin: 1rem; + width: 45% !important; + border: 1px solid transparent; + border-radius: .25rem; +} + +#slide-5-3 .code_cell { + flex-direction: row !important; +} + +#slide-5-3 .code_cell .input { + width: 50% +} + +#slide-5-3 .code_cell .output_wrapper { + width: 50% +} + +#slide-5-3 .code_cell .output_wrapper .prompt { + min-width: 2ex; +} + +section .past { + top: 0 !important; +} + +section .present { + top: 0 !important; +} + +section .future { + top: 0 !important; +} + +.section-heading { + padding-top: 25% !important; + text-align: center !important; +} diff --git a/psyplot-framework-presentation.ipynb b/psyplot-framework-presentation.ipynb new file mode 100644 index 0000000..09af3d9 --- /dev/null +++ b/psyplot-framework-presentation.ipynb @@ -0,0 +1,6628 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": { + "slideshow": { + "slide_type": "slide" + } + }, + "source": [ + "#
ncview | \n", + "ArcGIS | \n", + "
---|---|
\n", + " \n", + " | \n", + "\n", + " \n", + " | \n", + "
Panoply | \n", + "Paraview | \n", + "
\n", + " \n", + " | \n", + "\n", + " \n", + " | \n", + "
<xarray.Dataset>\n", + "Dimensions: (edge: 480, lev: 4, ncells: 5120, no: 4, time: 5, vertices: 3)\n", + "Coordinates:\n", + " * time (time) datetime64[ns] 1979-01-31T18:00:00 ... 1979-05-31T18:00:00\n", + " clon (ncells) float64 0.6283 0.5623 0.6283 ... 0.1454 0.2085 0.2409\n", + " clon_bnds (ncells, vertices) float64 0.6283 0.5671 0.6896 ... 0.2828 0.1899\n", + " clat (ncells) float64 0.9184 0.9399 0.8735 ... -0.7121 -0.7751 -0.7038\n", + " clat_bnds (ncells, vertices) float64 0.9626 0.8954 ... -0.6741 -0.6842\n", + " elon (edge) float32 0.62831855 0.7726171 ... 0.4633198 0.28466487\n", + " elon_bnds (edge, no) float32 0.3907125 0.62831855 ... 0.23760602 0.4087774\n", + " elat (edge) float32 0.82323533 0.9612527 ... -0.64091414 -0.6700468\n", + " elat_bnds (edge, no) float32 0.8090137 0.7376585 ... -0.8090137 -0.6886866\n", + " * lev (lev) float64 1e+05 8.5e+04 5e+04 2e+04\n", + "Dimensions without coordinates: edge, ncells, no, vertices\n", + "Data variables:\n", + " t2m (time, lev, ncells) float32 ...\n", + " u (time, lev, ncells) float32 ...\n", + " v (time, lev, ncells) float32 ...\n", + " t2m_edge (time, lev, edge) float32 274.5163 265.119 ... 212.07281\n", + "Attributes:\n", + " CDI: Climate Data Interface version 1.9.1 (http://mpimet...\n", + " Conventions: CF-1.4\n", + " history: Thu Aug 30 21:54:23 2018: cdo delname,t2m_2d,u_2d,v...\n", + " number_of_grid_used: 42\n", + " uuidOfHGrid: bf575ad8-daa6-11e7-a4a9-93d511f821b4\n", + " title: Temperature and Wind demo-File for python nc2map mo...\n", + " CDO: Climate Data Operators version 1.9.1 (http://mpimet...
array(['1979-01-31T18:00:00.000000000', '1979-02-28T18:00:00.000000000',\n", + " '1979-03-31T18:00:00.000000000', '1979-04-30T18:00:00.000000000',\n", + " '1979-05-31T18:00:00.000000000'], dtype='datetime64[ns]')
array([0.628319, 0.56232 , 0.628319, ..., 0.145394, 0.208489, 0.240892])
array([[0.628319, 0.56708 , 0.689557],\n", + " [0.628319, 0.493144, 0.56708 ],\n", + " [0.56708 , 0.628319, 0.689557],\n", + " ...,\n", + " [0.189865, 0.09534 , 0.153694],\n", + " [0.153694, 0.221842, 0.254556],\n", + " [0.254556, 0.282783, 0.189865]])
array([ 0.918438, 0.93988 , 0.873502, ..., -0.712083, -0.775101, -0.703754])
array([[ 0.962634, 0.895414, 0.895414],\n", + " [ 0.962634, 0.958974, 0.895414],\n", + " [ 0.895414, 0.828942, 0.895414],\n", + " ...,\n", + " [-0.684167, -0.69024 , -0.755691],\n", + " [-0.755691, -0.818119, -0.746385],\n", + " [-0.746385, -0.674147, -0.684167]])
array([0.628319, 0.772617, 0.48402 , ..., 0.439607, 0.46332 , 0.284665],\n", + " dtype=float32)
array([[0.390712, 0.628319, 0.865925, 0.628319],\n", + " [0.865925, 0.916263, 0.628319, 0.628319],\n", + " [0.628319, 0.340375, 0.390712, 0.628319],\n", + " ...,\n", + " [0.237606, 0.474153, 0.628319, 0.408777],\n", + " [0.628319, 0.507303, 0.32231 , 0.408777],\n", + " [0.32231 , 0.172796, 0.237606, 0.408777]], dtype=float32)
array([ 0.823235, 0.961253, 0.961253, ..., -0.784315, -0.640914, -0.670047],\n", + " dtype=float32)
array([[ 0.809014, 0.737659, 0.809014, 0.918438],\n", + " [ 0.809014, 0.99046 , 1.107149, 0.918438],\n", + " [ 1.107149, 0.99046 , 0.809014, 0.918438],\n", + " ...,\n", + " [-0.809014, -0.87296 , -0.740435, -0.688687],\n", + " [-0.740435, -0.59862 , -0.530217, -0.688687],\n", + " [-0.530217, -0.646124, -0.809014, -0.688687]], dtype=float32)
array([100000., 85000., 50000., 20000.])
[102400 values with dtype=float32]
[102400 values with dtype=float32]
[102400 values with dtype=float32]
array([[[274.5163 , 265.119 , ..., 291.9149 , 288.2498 ],\n", + " [270.46762, 266.63223, ..., 282.89493, 282.00223],\n", + " [244.83356, 242.69525, ..., 260.3778 , 260.48557],\n", + " [209.21762, 207.17609, ..., 215.489 , 214.97461]],\n", + "\n", + " [[272.55933, 262.37762, ..., 292.706 , 288.63037],\n", + " [269.4127 , 266.30594, ..., 284.68732, 283.35864],\n", + " [244.64893, 242.95432, ..., 261.4645 , 261.05505],\n", + " [210.9006 , 207.15517, ..., 217.75064, 216.81592]],\n", + "\n", + " ...,\n", + "\n", + " [[284.74823, 281.02734, ..., 291.39838, 288.17786],\n", + " [275.50882, 272.82202, ..., 283.3769 , 280.30423],\n", + " [249.03569, 247.1012 , ..., 257.36084, 256.7007 ],\n", + " [216.14055, 215.19736, ..., 214.65991, 214.55966]],\n", + "\n", + " [[291.52057, 288.4705 , ..., 289.40714, 286.88263],\n", + " [282.07162, 278.47403, ..., 281.0133 , 279.44626],\n", + " [254.9832 , 252.2095 , ..., 255.94588, 255.45946],\n", + " [215.88835, 216.44156, ..., 212.36052, 212.07281]]], dtype=float32)
ds.t2m.plot()
ds.t2m.psy.plot.mapplot()
plt.pcolormesh(ds.lon, ds.lat, ds.t2m)
<xarray.Dataset>\n", + "Dimensions: (lat: 96, lon: 192)\n", + "Coordinates:\n", + " * lon (lon) float64 0.0 1.875 3.75 5.625 7.5 ... 352.5 354.4 356.2 358.1\n", + " * lat (lat) float64 88.57 86.72 84.86 83.0 ... -83.0 -84.86 -86.72 -88.57\n", + "Data variables:\n", + " t2m (lat, lon) float32 251.41689 251.454 ... 260.81335 260.83093
array([ 0. , 1.875, 3.75 , 5.625, 7.5 , 9.375, 11.25 , 13.125,\n", + " 15. , 16.875, 18.75 , 20.625, 22.5 , 24.375, 26.25 , 28.125,\n", + " 30. , 31.875, 33.75 , 35.625, 37.5 , 39.375, 41.25 , 43.125,\n", + " 45. , 46.875, 48.75 , 50.625, 52.5 , 54.375, 56.25 , 58.125,\n", + " 60. , 61.875, 63.75 , 65.625, 67.5 , 69.375, 71.25 , 73.125,\n", + " 75. , 76.875, 78.75 , 80.625, 82.5 , 84.375, 86.25 , 88.125,\n", + " 90. , 91.875, 93.75 , 95.625, 97.5 , 99.375, 101.25 , 103.125,\n", + " 105. , 106.875, 108.75 , 110.625, 112.5 , 114.375, 116.25 , 118.125,\n", + " 120. , 121.875, 123.75 , 125.625, 127.5 , 129.375, 131.25 , 133.125,\n", + " 135. , 136.875, 138.75 , 140.625, 142.5 , 144.375, 146.25 , 148.125,\n", + " 150. , 151.875, 153.75 , 155.625, 157.5 , 159.375, 161.25 , 163.125,\n", + " 165. , 166.875, 168.75 , 170.625, 172.5 , 174.375, 176.25 , 178.125,\n", + " 180. , 181.875, 183.75 , 185.625, 187.5 , 189.375, 191.25 , 193.125,\n", + " 195. , 196.875, 198.75 , 200.625, 202.5 , 204.375, 206.25 , 208.125,\n", + " 210. , 211.875, 213.75 , 215.625, 217.5 , 219.375, 221.25 , 223.125,\n", + " 225. , 226.875, 228.75 , 230.625, 232.5 , 234.375, 236.25 , 238.125,\n", + " 240. , 241.875, 243.75 , 245.625, 247.5 , 249.375, 251.25 , 253.125,\n", + " 255. , 256.875, 258.75 , 260.625, 262.5 , 264.375, 266.25 , 268.125,\n", + " 270. , 271.875, 273.75 , 275.625, 277.5 , 279.375, 281.25 , 283.125,\n", + " 285. , 286.875, 288.75 , 290.625, 292.5 , 294.375, 296.25 , 298.125,\n", + " 300. , 301.875, 303.75 , 305.625, 307.5 , 309.375, 311.25 , 313.125,\n", + " 315. , 316.875, 318.75 , 320.625, 322.5 , 324.375, 326.25 , 328.125,\n", + " 330. , 331.875, 333.75 , 335.625, 337.5 , 339.375, 341.25 , 343.125,\n", + " 345. , 346.875, 348.75 , 350.625, 352.5 , 354.375, 356.25 , 358.125])
array([ 88.572169, 86.722531, 84.86197 , 82.998942, 81.134977, 79.270559,\n", + " 77.405888, 75.541061, 73.676132, 71.811132, 69.946081, 68.080991,\n", + " 66.215872, 64.35073 , 62.485571, 60.620396, 58.755209, 56.890013,\n", + " 55.024808, 53.159595, 51.294377, 49.429154, 47.563926, 45.698694,\n", + " 43.833459, 41.96822 , 40.102979, 38.237736, 36.372491, 34.507243,\n", + " 32.641994, 30.776744, 28.911492, 27.046239, 25.180986, 23.315731,\n", + " 21.450475, 19.585219, 17.719962, 15.854704, 13.989446, 12.124187,\n", + " 10.258928, 8.393669, 6.528409, 4.66315 , 2.79789 , 0.93263 ,\n", + " -0.93263 , -2.79789 , -4.66315 , -6.528409, -8.393669, -10.258928,\n", + " -12.124187, -13.989446, -15.854704, -17.719962, -19.585219, -21.450475,\n", + " -23.315731, -25.180986, -27.046239, -28.911492, -30.776744, -32.641994,\n", + " -34.507243, -36.372491, -38.237736, -40.102979, -41.96822 , -43.833459,\n", + " -45.698694, -47.563926, -49.429154, -51.294377, -53.159595, -55.024808,\n", + " -56.890013, -58.755209, -60.620396, -62.485571, -64.35073 , -66.215872,\n", + " -68.080991, -69.946081, -71.811132, -73.676132, -75.541061, -77.405888,\n", + " -79.270559, -81.134977, -82.998942, -84.86197 , -86.722531, -88.572169])
array([[251.41689, 251.454 , 251.48915, ..., 251.29774, 251.33876, 251.37978],\n", + " [254.16493, 254.33095, 254.50087, ..., 253.54774, 253.76845, 253.96376],\n", + " [255.86024, 256.3114 , 256.72742, ..., 254.40712, 254.90517, 255.42665],\n", + " ...,\n", + " [263.70984, 263.6454 , 263.58875, ..., 263.96375, 263.86804, 263.78406],\n", + " [262.4989 , 262.48718, 262.47742, ..., 262.5536 , 262.5321 , 262.51453],\n", + " [260.8485 , 260.8661 , 260.88367, ..., 260.79578, 260.81335, 260.83093]],\n", + " dtype=float32)
<xarray.Dataset>\n", + "Dimensions: (i: 256, j: 220, vertices: 4)\n", + "Coordinates:\n", + " lon (j, i) float32 312.7453 312.30536 311.8754 ... 132.536 133.77249\n", + " lon_bnds (j, i, vertices) float32 ...\n", + " lat (j, i) float32 76.35551 76.298134 76.237434 ... -77.3949 -77.53924\n", + " lat_bnds (j, i, vertices) float32 ...\n", + "Dimensions without coordinates: i, j, vertices\n", + "Data variables:\n", + " t2m (j, i) float32 nan nan nan nan nan nan ... nan nan nan nan nan nan\n", + "Attributes:\n", + " CDI: Climate Data Interface version 1.9.8 (https://mpimet.mpg.de...\n", + " Conventions: CF-1.6\n", + " history: Sun Nov 15 13:44:16 2020: cdo ifthen tmp.nc -remapcon,tmp.n...\n", + " CDO: Climate Data Operators version 1.9.8 (https://mpimet.mpg.de...
array([[312.7453 , 312.30536, 311.8754 , ..., 313.19467, 312.7453 , 312.30536],\n", + " [312.5059 , 312.05258, 311.6097 , ..., 312.9692 , 312.5059 , 312.05258],\n", + " [312.2567 , 311.78952, 311.33325, ..., 312.7344 , 312.2567 , 311.78952],\n", + " ...,\n", + " [133.83946, 135.09995, 136.3721 , ..., 132.59016, 133.83946, 135.09995],\n", + " [133.19337, 134.44212, 135.70247, ..., 131.95584, 133.19337, 134.44212],\n", + " [132.536 , 133.77249, 135.0206 , ..., 131.31061, 132.536 , 133.77249]],\n", + " dtype=float32)
[225280 values with dtype=float32]
array([[ 76.35551 , 76.298134, 76.237434, ..., 76.40949 , 76.35551 ,\n", + " 76.298134],\n", + " [ 76.46096 , 76.40168 , 76.33902 , ..., 76.51673 , 76.46096 ,\n", + " 76.40168 ],\n", + " [ 76.568855, 76.507576, 76.44282 , ..., 76.626465, 76.568855,\n", + " 76.507576],\n", + " ...,\n", + " [-76.837296, -76.98275 , -77.1292 , ..., -76.69287 , -76.837296,\n", + " -76.98275 ],\n", + " [-77.12041 , -77.26531 , -77.41124 , ..., -76.97653 , -77.12041 ,\n", + " -77.26531 ],\n", + " [-77.3949 , -77.53924 , -77.68464 , ..., -77.251656, -77.3949 ,\n", + " -77.53924 ]], dtype=float32)
[225280 values with dtype=float32]
array([[nan, nan, nan, ..., nan, nan, nan],\n", + " [nan, nan, nan, ..., nan, nan, nan],\n", + " [nan, nan, nan, ..., nan, nan, nan],\n", + " ...,\n", + " [nan, nan, nan, ..., nan, nan, nan],\n", + " [nan, nan, nan, ..., nan, nan, nan],\n", + " [nan, nan, nan, ..., nan, nan, nan]], dtype=float32)
triangular | \n", + "edge grid | \n", + "
---|
<xarray.Dataset>\n", + "Dimensions: (ncells: 5120, vertices: 3)\n", + "Coordinates:\n", + " clon_bnds (ncells, vertices) float64 0.6283 0.5671 0.6896 ... 0.2828 0.1899\n", + " clat_bnds (ncells, vertices) float64 0.9626 0.8954 ... -0.6741 -0.6842\n", + " clon (ncells) float64 0.6283 0.5623 0.6283 ... 0.1454 0.2085 0.2409\n", + " clat (ncells) float64 0.9184 0.9399 0.8735 ... -0.7121 -0.7751 -0.7038\n", + "Dimensions without coordinates: ncells, vertices\n", + "Data variables:\n", + " t2m (ncells) float32 268.0231 267.82184 ... 281.40765 285.71848
array([[0.628319, 0.56708 , 0.689557],\n", + " [0.628319, 0.493144, 0.56708 ],\n", + " [0.56708 , 0.628319, 0.689557],\n", + " ...,\n", + " [0.189865, 0.09534 , 0.153694],\n", + " [0.153694, 0.221842, 0.254556],\n", + " [0.254556, 0.282783, 0.189865]])
array([[ 0.962634, 0.895414, 0.895414],\n", + " [ 0.962634, 0.958974, 0.895414],\n", + " [ 0.895414, 0.828942, 0.895414],\n", + " ...,\n", + " [-0.684167, -0.69024 , -0.755691],\n", + " [-0.755691, -0.818119, -0.746385],\n", + " [-0.746385, -0.674147, -0.684167]])
array([0.628319, 0.56232 , 0.628319, ..., 0.145394, 0.208489, 0.240892])
array([ 0.918438, 0.93988 , 0.873502, ..., -0.712083, -0.775101, -0.703754])
array([268.0231 , 267.82184, 270.76376, ..., 284.9598 , 281.40765, 285.71848],\n", + " dtype=float32)
<xarray.Dataset>\n", + "Dimensions: (edge: 480, no: 4)\n", + "Coordinates:\n", + " elon_bnds (edge, no) float32 0.3907125 0.62831855 ... 0.23760602 0.4087774\n", + " elat_bnds (edge, no) float32 0.8090137 0.7376585 ... -0.8090137 -0.6886866\n", + " elon (edge) float32 0.62831855 0.7726171 ... 0.4633198 0.28466487\n", + " elat (edge) float32 0.82323533 0.9612527 ... -0.64091414 -0.6700468\n", + "Dimensions without coordinates: edge, no\n", + "Data variables:\n", + " t2m_edge (edge) float32 274.5163 265.119 268.82065 ... 291.9149 288.2498
array([[0.390712, 0.628319, 0.865925, 0.628319],\n", + " [0.865925, 0.916263, 0.628319, 0.628319],\n", + " [0.628319, 0.340375, 0.390712, 0.628319],\n", + " ...,\n", + " [0.237606, 0.474153, 0.628319, 0.408777],\n", + " [0.628319, 0.507303, 0.32231 , 0.408777],\n", + " [0.32231 , 0.172796, 0.237606, 0.408777]], dtype=float32)
array([[ 0.809014, 0.737659, 0.809014, 0.918438],\n", + " [ 0.809014, 0.99046 , 1.107149, 0.918438],\n", + " [ 1.107149, 0.99046 , 0.809014, 0.918438],\n", + " ...,\n", + " [-0.809014, -0.87296 , -0.740435, -0.688687],\n", + " [-0.740435, -0.59862 , -0.530217, -0.688687],\n", + " [-0.530217, -0.646124, -0.809014, -0.688687]], dtype=float32)
array([0.628319, 0.772617, 0.48402 , ..., 0.439607, 0.46332 , 0.284665],\n", + " dtype=float32)
array([ 0.823235, 0.961253, 0.961253, ..., -0.784315, -0.640914, -0.670047],\n", + " dtype=float32)
array([274.5163 , 265.119 , 268.82065, ..., 282.3471 , 291.9149 , 288.2498 ],\n", + " dtype=float32)
<xarray.Dataset>\n", + "Dimensions: (Three: 3, nMesh2_face: 113885, nMesh2_node: 57222)\n", + "Coordinates:\n", + " Mesh2 int32 -2147483647\n", + " Mesh2_node_x (nMesh2_node) float32 121.0 142.0 131.5 ... 131.5 136.75\n", + " Mesh2_node_y (nMesh2_node) float32 -59.2 -59.2 ... -41.2625 -44.85\n", + " Mesh2_face_nodes (nMesh2_face, Three) int32 ...\n", + "Dimensions without coordinates: Three, nMesh2_face, nMesh2_node\n", + "Data variables:\n", + " sea_surface_height (nMesh2_face) int16 ...
array(-2147483647, dtype=int32)
array([121. , 142. , 131.5 , ..., 131.5 , 131.5 , 136.75], dtype=float32)
array([-59.2 , -59.2 , -52.025 , ..., -44.85 , -41.2625, -44.85 ],\n", + " dtype=float32)
[341655 values with dtype=int32]
[113885 values with dtype=int16]
<xarray.Dataset>\n", + "Dimensions: (ncells: 5120, vertices: 3)\n", + "Coordinates:\n", + " clon (ncells) float64 0.6283 0.5623 0.6283 ... 0.1454 0.2085 0.2409\n", + " clat (ncells) float64 0.9184 0.9399 0.8735 ... -0.7121 -0.7751 -0.7038\n", + "Dimensions without coordinates: ncells, vertices\n", + "Data variables:\n", + " t2m (ncells) float32 268.0231 267.82184 ... 281.40765 285.71848\n", + " clon_bnds (ncells, vertices) float64 0.6283 0.5671 0.6896 ... 0.2828 0.1899\n", + " clat_bnds (ncells, vertices) float64 0.9626 0.8954 ... -0.6741 -0.6842
array([0.628319, 0.56232 , 0.628319, ..., 0.145394, 0.208489, 0.240892])
array([ 0.918438, 0.93988 , 0.873502, ..., -0.712083, -0.775101, -0.703754])
array([268.0231 , 267.82184, 270.76376, ..., 284.9598 , 281.40765, 285.71848],\n", + " dtype=float32)
array([[0.628319, 0.56708 , 0.689557],\n", + " [0.628319, 0.493144, 0.56708 ],\n", + " [0.56708 , 0.628319, 0.689557],\n", + " ...,\n", + " [0.189865, 0.09534 , 0.153694],\n", + " [0.153694, 0.221842, 0.254556],\n", + " [0.254556, 0.282783, 0.189865]])
array([[ 0.962634, 0.895414, 0.895414],\n", + " [ 0.962634, 0.958974, 0.895414],\n", + " [ 0.895414, 0.828942, 0.895414],\n", + " ...,\n", + " [-0.684167, -0.69024 , -0.755691],\n", + " [-0.755691, -0.818119, -0.746385],\n", + " [-0.746385, -0.674147, -0.684167]])
<xarray.Dataset>\n", + "Dimensions: (ncells: 5120, vertices: 3)\n", + "Coordinates:\n", + " clon_bnds (ncells, vertices) float64 0.6283 0.5671 0.6896 ... 0.2828 0.1899\n", + " clat_bnds (ncells, vertices) float64 0.9626 0.8954 ... -0.6741 -0.6842\n", + " clon (ncells) float64 0.6283 0.5623 0.6283 ... 0.1454 0.2085 0.2409\n", + " clat (ncells) float64 0.9184 0.9399 0.8735 ... -0.7121 -0.7751 -0.7038\n", + "Dimensions without coordinates: ncells, vertices\n", + "Data variables:\n", + " t2m (ncells) float32 268.0231 267.82184 ... 281.40765 285.71848
array([[0.628319, 0.56708 , 0.689557],\n", + " [0.628319, 0.493144, 0.56708 ],\n", + " [0.56708 , 0.628319, 0.689557],\n", + " ...,\n", + " [0.189865, 0.09534 , 0.153694],\n", + " [0.153694, 0.221842, 0.254556],\n", + " [0.254556, 0.282783, 0.189865]])
array([[ 0.962634, 0.895414, 0.895414],\n", + " [ 0.962634, 0.958974, 0.895414],\n", + " [ 0.895414, 0.828942, 0.895414],\n", + " ...,\n", + " [-0.684167, -0.69024 , -0.755691],\n", + " [-0.755691, -0.818119, -0.746385],\n", + " [-0.746385, -0.674147, -0.684167]])
array([0.628319, 0.56232 , 0.628319, ..., 0.145394, 0.208489, 0.240892])
array([ 0.918438, 0.93988 , 0.873502, ..., -0.712083, -0.775101, -0.703754])
array([268.0231 , 267.82184, 270.76376, ..., 284.9598 , 281.40765, 285.71848],\n", + " dtype=float32)
<xarray.Dataset>\n", + "Dimensions: (edge: 4423680, no: 4)\n", + "Coordinates:\n", + " elon (edge) float64 ...\n", + " elon_bnds (edge, no) float64 ...\n", + " elat (edge) float64 ...\n", + " elat_bnds (edge, no) float64 ...\n", + "Dimensions without coordinates: edge, no\n", + "Data variables:\n", + " topo (edge) float32 ...\n", + "Attributes:\n", + " CDI: Climate Data Interface version 1.9.4 (http://mpimet...\n", + " Conventions: CF-1.6\n", + " history: Fri May 25 10:45:29 2018: cdo -C -f nc topo,icon_ed...\n", + " number_of_grid_used: 26\n", + " grid_file_uri: http://icon-downloads.mpimet.mpg.de/grids/public/ic...\n", + " uuidOfHGrid: a27b8de6-18c4-11e4-820a-b5b098c6a5c0\n", + " CDO: Climate Data Operators version 1.9.4 (http://mpimet...
[4423680 values with dtype=float64]
[17694720 values with dtype=float64]
[4423680 values with dtype=float64]
[17694720 values with dtype=float64]
[4423680 values with dtype=float32]
DKRZ Tech Talk: Visualizing unstructured grids from scripts and GUI with psyplot – November 17th, 2020 – Philipp S. Sommer |