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)

The Uxarray Grid object class that describes an unstructured grid.

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.integrate(var_key[, ...])

Integrates over all the faces of the given mesh.

grid.Grid.write(outfile, grid_type)

Writes mesh file as per extension supplied in the outfile string.

Reading Data#

uxarray.open_dataset(grid_file, *args, **kw)

Creates a UXarray Grid object, given a single grid file with or without grid data file(s) with corresponding data.

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(filepath, **kw)

Checks input and contents to determine grid type.