mpas_tools.mesh.cull.map_culled_to_base

mpas_tools.mesh.cull.map_culled_to_base(ds_base, ds_culled, workers=-1)[source]

Create maps from cells, edges and vertices on a culled mesh to the same elements on a base mesh. All elements in the culled mesh must be in the base mesh.

Parameters:
  • ds_base (xarray.Dataset) – The horizontal MPAS mesh before culling

  • ds_culled (xarray.Dataset) – The culled horizonal MPAS mesh

  • workers (int, optional) – The number of threads to use to query base mesh elements. The default is all available threads (workers=-1)

Returns:

ds_map_culled_to_base (xarray.Dataset) – A dataset with mapCulledToBaseCell, mapCulledToBaseEdge and mapCulledToBaseVertex, each of which contains the base mesh index corresponding to the same element from the culled mesh.