diff --git a/notebooks/01-intro/02-data-structures.ipynb b/notebooks/01-intro/02-data-structures.ipynb index 16fe91be..d378c0b1 100644 --- a/notebooks/01-intro/02-data-structures.ipynb +++ b/notebooks/01-intro/02-data-structures.ipynb @@ -146,11 +146,11 @@ "source": [ "## `UxDataset` & `UxDataArray` Data Structures\n", "\n", - "UXarray inherits from Xarray's two core data structures `Dataset` & `DataArary` to provide a grid-informed implementation through the `UxDataset` & `UxDataArray` data structures. \n", + "UXarray inherits from Xarray's two core data structures `Dataset` & `DataArray` to provide a grid-informed implementation through the `UxDataset` & `UxDataArray` data structures. \n", "\n", "The major difference between them is that UXarray's implementation is paired with a `Grid` object, accessed through the `.uxgrid` property.\n", "\n", - "UXarray also provides a overloaded `ux.open_dataset` method, which takes in both a Grid and Data file path to construct a `UxDataset`\n" + "UXarray also provides an overloaded `ux.open_dataset` method, which takes in both a Grid and Data file path to construct a `UxDataset`\n" ] }, { diff --git a/notebooks/01-intro/03-data-mapping.ipynb b/notebooks/01-intro/03-data-mapping.ipynb index 38661ff0..905e3ec0 100644 --- a/notebooks/01-intro/03-data-mapping.ipynb +++ b/notebooks/01-intro/03-data-mapping.ipynb @@ -10,28 +10,41 @@ }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "When attempting to visualize a data variable that resides on an unstructured grid, it's important to identify what element it is mapped to, since that will dictate what visualization to choose.\n", "\n", - "This notebook provides a quick over of how data is commonly mapped to unstructured grid elements." - ], - "metadata": { - "collapsed": false - } + "This notebook provides a quick overview of how data is commonly mapped to unstructured grid elements." + ] }, { "cell_type": "code", "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "outputs": [], "source": [ "import uxarray as ux" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "is_executing": true, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "## Sample Mesh\n", "\n", @@ -40,27 +53,32 @@ "Below is a basic example of an Unstructured Grid, containing 13 Nodes, 15 Edges, and 3 Faces.\n", "\n", "![Sample Mesh](../images/sample/sample_mesh.png)" - ], - "metadata": { - "collapsed": false, - "is_executing": true - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "## Face-Centered Data\n", "\n", "Face-Centered data is mapped to the area that each face covers. \n", "\n", "![Faces](../images/sample/faces.png)\n" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "## Node-Centered Data\n", "\n", @@ -68,49 +86,61 @@ "\n", "\n", "![Faces](../images/sample/nodes.png)" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "## Edge-Centered Data\n", "\n", "Edge-Centered data is assigned to the edge that connects each pair of modes.\n", "\n", "![Edges](../images/sample/edges.jpg)" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "## Identifying Data Mappings with UXarray\n", "\n", "We can identify what element a data variable is mapped to by looking at the final dimensions of a `UxDataArray` or `UxDataset`" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "outputs": [], "source": [ "file_dir = \"../../meshfiles/\"" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "outputs": [], "source": [ "grid_filename_mpas = file_dir + \"oQU480.grid.nc\"\n", @@ -118,23 +148,29 @@ "uxds_mpas = ux.open_dataset(grid_filename_mpas, data_filename_mpas)\n", "\n", "uxds_mpas[\"bottomDepth\"].dims" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "The variable ``bottomDepth`` has a dimension of ``n_face``, which means that it is mapped to faces." - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "code", "execution_count": null, + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "outputs": [], "source": [ "grid_filename_geoflow = file_dir + \"geoflow.grid.nc\"\n", @@ -142,19 +178,19 @@ "uxds_geoflow = ux.open_dataset(grid_filename_geoflow, data_filename_geoflow)\n", "\n", "uxds_geoflow[\"v1\"].dims" - ], - "metadata": { - "collapsed": false - } + ] }, { "cell_type": "markdown", + "metadata": { + "collapsed": false, + "jupyter": { + "outputs_hidden": false + } + }, "source": [ "The variable ``v1`` has a final dimension of ``n_node``, which means that it is mapped to the corner nodes of each face. However, it also has additional dimensions, ``time`` and ``meshLayers``. These additional dimensions describe the dimensionality of the data outside the unstructured grid, representing the temporal and vertical dimensions." - ], - "metadata": { - "collapsed": false - } + ] } ], "metadata": { @@ -173,7 +209,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.10.11" + "version": "3.11.6" }, "nbdime-conflicts": { "local_diff": [