mpas_tools.mesh.cull.write_map_culled_to_base

mpas_tools.mesh.cull.write_map_culled_to_base(base_mesh_filename, culled_mesh_filename, out_filename, workers=-1)[source]

Write out a file with 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:
  • base_mesh_filename (str) – A file with the horizontal MPAS mesh before culling

  • culled_mesh_filename (str) – A file with the culled horizonal MPAS mesh

  • out_filename (str) – A file to which the maps should be written. The dataset will include mapCulledToBaseCell, mapCulledToBaseEdge and mapCulledToBaseVertex, each of which contains the base mesh index corresponding to the same element from the culled mesh.

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