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!

Grid Class#

grid.Grid(dataset, **kwargs)

Grid Methods#

grid.Grid.calculate_total_face_area([...])

Function to calculate the total surface area of all the faces in a mesh.

grid.Grid.compute_face_areas([...])

Face areas calculation function for grid class, calculates area of all faces in the grid.

grid.Grid.encode_as(grid_type)

Encodes the grid as a new xarray.Dataset per grid format supplied in the grid_type argument.

grid.Grid.integrate(var_ds[, ...])

Integrates over all the faces of the given mesh.

Helper Functions#

helpers.calculate_face_area(x, y, z[, ...])

Calculate area of a face on sphere.

helpers.calculate_spherical_triangle_jacobian(...)

Calculate Jacobian of a spherical triangle.

helpers.calculate_spherical_triangle_jacobian_barycentric(...)

Calculate Jacobian of a spherical triangle.

helpers.get_all_face_area_from_coords(x, y, ...)

Given coords, connectivity and other area calculation params, this routine loop over all faces and return an numpy array with areas of each face.

helpers.get_gauss_quadratureDG(nCount)

Gauss Quadrature Points for integration.

helpers.get_tri_quadratureDG(nOrder)

Triangular Quadrature Points for integration.

helpers.grid_center_lat_lon(ds)

Using scrip file variables grid_corner_lat and grid_corner_lon, calculates the grid_center_lat and grid_center_lon.

helpers.parse_grid_type(dataset)

Checks input and contents to determine grid type.