{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Grid Index Ordering\n", "\n", "Cell indices in ICON global grids are ordered in a specific manner which simplifies a bunch of operations an which is interesting to know about. Here, we'll look at a few aspects of this particular ordering." ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "%matplotlib inline\n", "import matplotlib.pylab as plt\n", "import numpy as np\n", "import xarray as xr\n", "import cartopy.crs as ccrs\n", "import cartopy.feature as cfeature" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We'll start using a relatively coarse (R02B03) grid in order to make the plots less crowded and our live easier." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "
```<xarray.Dataset>\n",
"Dimensions:                         (cell: 5120, nv: 3, vertex: 2562, ne: 6, edge: 7680, no: 4, nc: 2, max_stored_decompositions: 4, two_grf: 2, cell_grf: 14, max_chdom: 1, edge_grf: 24, vert_grf: 13)\n",
"Coordinates:\n",
"    clon                            (cell) float64 1.274 1.34 ... 1.437 1.329\n",
"    clat                            (cell) float64 0.9184 0.9398 ... -0.8052\n",
"    vlon                            (vertex) float64 1.274 1.213 ... 1.274 1.325\n",
"    vlat                            (vertex) float64 0.9625 0.8955 ... -0.7609\n",
"    elon                            (edge) float64 1.306 1.242 ... 1.407 1.354\n",
"    elat                            (edge) float64 0.9292 0.9292 ... -0.7939\n",
"Dimensions without coordinates: cell, nv, vertex, ne, edge, no, nc, max_stored_decompositions, two_grf, cell_grf, max_chdom, edge_grf, vert_grf\n",
"Data variables: (12/91)\n",
"    clon_vertices                   (cell, nv) float64 1.274 1.213 ... 1.325\n",
"    clat_vertices                   (cell, nv) float64 0.9625 0.8955 ... -0.7609\n",
"    vlon_vertices                   (vertex, ne) float64 9.969e+36 ... 9.969e+36\n",
"    vlat_vertices                   (vertex, ne) float64 9.969e+36 ... 9.969e+36\n",
"    elon_vertices                   (edge, no) float64 1.335 1.34 ... 1.385\n",
"    elat_vertices                   (edge, no) float64 0.8955 0.9398 ... -0.8265\n",
"    ...                              ...\n",
"    edge_dual_normal_cartesian_x    (edge) float64 -0.2769 -0.6793 ... 0.6559\n",
"    edge_dual_normal_cartesian_y    (edge) float64 0.8043 -0.512 ... 0.4705\n",
"    edge_dual_normal_cartesian_z    (edge) float64 -0.5257 0.5257 ... 0.5902\n",
"    cell_circumcenter_cartesian_x   (cell) float64 0.1775 0.1351 ... 0.1662\n",
"    cell_circumcenter_cartesian_y   (cell) float64 0.5805 0.5743 ... 0.6727\n",
"    cell_circumcenter_cartesian_z   (cell) float64 0.7947 0.8074 ... -0.721\n",
"Attributes: (12/43)\n",
"    title:                    ICON grid description\n",
"    institution:              Max Planck Institute for Meteorology/Deutscher ...\n",
"    source:                   git@git.mpimet.mpg.de:GridGenerator.git\n",
"    revision:                 2cdf99bec403902989148ebb4bd38c218a64a1b3\n",
"    date:                     20190405 at 141502\n",
"    user_name:                Rene Redler (m300083)\n",
"    ...                       ...\n",
"    topography:               modified SRTM30\n",
"    symmetry:                 along equator\n",
"    subcentre:                1\n",
"    number_of_grid_used:      30\n",