User API#
This page shows already-implemented Uxarray user 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#
A xarray.Dataset
-like, multi-dimensional, in memory, array database.
Inherits from xarray.Dataset
and has its own unstructured grid-aware
dataset operators and attributes through the uxgrid
accessor.
Below is a list of features explicitly added to UxDataset to work on Unstructured Grids:
Class#
|
A |
IO#
|
Wraps |
|
Wraps |
Attributes#
|
|
Property to keep track of the source data sets used to instantiate this |
Methods#
|
Concise summary of Dataset variables and attributes including grid topology information stored in the |
|
Integrates over all the faces of the given mesh. |
UxDataArray#
N-dimensional xarray.DataArray
-like array. Inherits from xarray.DataArray
and has its own unstructured grid-aware array operators and attributes through
the uxgrid
accessor.
Below is a list of features explicitly added to UxDataset to work on Unstructured Grids:
Class#
|
N-dimensional |
IO#
|
Constructs a |
|
Constructs a |
Attributes#
Grid#
Unstructured grid topology definition to store stores grid topology dimensions, coordinates, variables and provides grid-specific functions.
Can be used standalone to explore an unstructured grid topology, or can be
seen as the property of uxarray.UxDataset
and uxarray.DataArray
to make
them unstructured grid-aware data sets and arrays.
Class#
|
Unstructured grid topology definition. |
IO#
|
Creates a |
|
Constructs a |
|
Constructs a |
|
Constructs an array of Shapely Polygons representing each face, with antimeridian polygons split according to the GeoJSON standards. |
Methods#
Function to calculate the total surface area of all the faces in a mesh. |
|
|
Face areas calculation function for grid class, calculates area of all faces in the grid. |
|
Encodes the grid as a new xarray.Dataset per grid format supplied in the grid_type argument. |
Returns a deep copy of this grid. |
Attributes#
UGRID Attribute |
|
Dictionary of parsed attributes from the source grid. |
|
UGRID Dimension |
|
UGRID Dimension |
|
UGRID Dimension |
|
UGRID Dimension |
|
Dimension |
|
Dimension Variable |
|
UGRID Coordinate Variable |
|
UGRID Coordinate Variable |
|
UGRID Coordinate Variable |
|
UGRID Coordinate Variable |
|
UGRID Connectivity Variable |
|
UGRID Connectivity Variable |
|
UGRID Connectivity Variable |
|
Index of each face that crosses the antimeridian. |
Helpers#
Face Area#
|
Calculate area of a face on sphere. |
Given coords, connectivity and other area calculation params, this routine loop over all faces and return an numpy array with areas of each face. |
|
Calculate Jacobian of a spherical triangle. |
|
|
Calculate Jacobian of a spherical triangle. |
|
Gauss Quadrature Points for integration. |
|
Triangular Quadrature Points for integration. |
Connectivity#
Closes ( |
Coordinates#
Helper function to Convert the node coordinate from 2D longitude/latitude to normalized 3D xyz. |
|
Calculate the latitude and longitude in radiance for a node represented in the [x, y, z] 3D Cartesian coordinates. |
|
Helper function to project an arbitrary node in 3D coordinates [x, y, z] on the unit sphere. |
Lines#
|
Determines whether the number q is between p and r. |
|
Check if a point lies on a given Great Circle Arc (GCA). |
Numba#
Allows Numba's JIT cache to be turned on. |
|
Allows Numba's JIT cache to be turned on off. |
|
Allows Numba's JIT application to be turned on. |
|
Allows Numba's JIT application to be turned off. |