API reference

This page provides an auto-generated summary of the MPAS mesh-tools API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

MPAS mesh tools

make_planar_hex_mesh(nx, ny, dc, ...[, ...])

Builds an MPAS periodic, planar hexagonal mesh with the requested dimensions, optionally saving it to a file, and returns it as an xarray.Dataset.

translate(mesh[, xOffset, yOffset])

Translates the coordinate system of the planar MPAS mesh by an arbitrary shift in x and/or y

convert(dsIn[, graphInfoFileName, logger, dir])

Use MpasMeshConverter.x to convert an input mesh to a valid MPAS mesh that is fully compliant with the MPAS mesh specification.

cull(dsIn[, dsMask, dsInverse, dsPreserve, ...])

Use MpasCellCuller.x to cull cells from a mesh based on the cullCell field in the input file or DataSet and/or the provided masks.

mask(dsMesh[, fcMask, logger, dir, cores])

Use compute_mpas_region_masks to create a set of region masks either from mask feature collections

merge_grids([infile1, infile2, outfile, runner])

Merges two MPAS non-contiguous meshes together into a single file

split_grids([infile, outfile1, outfile2, ...])

Split two previously merged MPAS non-contiguous meshes together into separate files.

write_netcdf(ds, fileName[, fillValues, ...])

Write an xarray.Dataset to a file with NetCDF4 fill values and the given name of the string dimension.

Ocean Tools

add_critical_land_blockages(dsMask, dsBlockages)

Add the masks associated with one or more transects to the land mask

widen_transect_edge_masks(dsMask, dsMesh[, ...])

Alter critical passages at polar latitudes to be at least two cells wide, to avoid sea ice blockage