Internal API#
This page shows already-implemented Uxarray internal API functions. You can also check the draft UXarray API documentation to see the tentative whole API and let us know if you have any feedback!
UxDataset#
The uxarray.UxDataset
class inherits from xarray.Dataset
. Below is a list of
features explicitly added to work on Unstructured Grids.
Class#
|
A |
Attributes#
Methods#
Override to make sure the result is an instance of |
|
|
Add an array to this dataset. |
|
Override to make the result a complete instance of |
Override to make the result an instance of |
|
|
Override to make the result an |
|
Override to make the result a complete instance of |
|
Override to make the result a complete instance of |
UxDataArray#
The uxarray.UxDataArray
class inherits from xarray.DataArray
. Below is a list of
features explicitly added to work on Unstructured Grids.
Class#
|
N-dimensional |
Attributes#
Methods#
|
Override to make the result a |
|
Override to make the result a complete instance of |
|
Override to make the result a complete instance of |
Grid#
Class#
|
Unstructured grid topology definition. |
Methods#
Populates a dictionary for storing uxarray's internal representation of xarray object. |
|
|
Loads a mesh dataset. |
|
Create a grid with faces constructed from vertices specified by the given argument. |
Attributes#
Coordinate Variable |
Operators#
|
Two grids are equal if they have matching grid topology variables, coordinates, and dims all of which are equal. |
|
Two grids are not equal if they have differing grid topology variables, coordinates, or dims. |
Helpers#
Connectivity#
Replaces all instances of the the current fill value ( |
|
Constructs |
|
Constructs the UGRID connectivity variable ( |
|
Constructs the UGRID connectivity variable ( |
Geometry#
Constructs the shell of each polygon derived from the closed off face nodes, which can be used to construct Shapely Polygons. |
|
Constructs |
|
Constructs |
|
Constructs and returns a |
Coordinates#
A helper function that populates the xyz attribute in UXarray.Grid._ds. |
|
Helper function that populates the longitude and latitude and store it into the Mesh2_node_x and Mesh2_node_y. |
Lines#
Calculate the angle between two 3D vectors u and v in radians. |
Grid Parsing and Encoding#
UGRID#
|
UGRID file reader. |
Encodes UGRID file . |
|
Check mesh topology and dimension. |
MPAS#
|
Function to read in a MPAS Grid dataset and encode either the Primal or Dual Mesh in the UGRID conventions. |
|
Encodes the MPAS Primal-Mesh in the UGRID conventions. |
|
Encodes the MPAS Dual-Mesh in the UGRID conventions. |
|
Helper to set MPAS global attributes. |
|
Replaces the padded values in verticesOnCell defined by nEdgesOnCell with a fill-value. |
|
Replaces all instances of a zero (invalid/missing MPAS value) with a fill value. |
Exodus#
|
Exodus file reader. |
|
Encodes an Exodus file. |
|
Helper function to get exodus element type from number of nodes. |
SCRIP#
|
If input dataset ( |
|
Function to reassign lat/lon variables to mesh2_node variables. |
|
Function to reassign UGRID formatted variables to SCRIP formatted variables. |
Shapefile#
|
Read shape file. |
Utils#
|
Checks input and contents to determine grid type. |