mpas_tools.mesh.conversion.cull¶
- 
mpas_tools.mesh.conversion.cull(dsIn, dsMask=None, dsInverse=None, dsPreserve=None, graphInfoFileName=None, logger=None, dir=None)[source]¶
- Use - MpasCellCuller.xto cull cells from a mesh based on the- cullCellfield in the input file or DataSet and/or the provided masks.- cullCell, dsMask and dsInverse are merged together so that the final mask is the union of these 3. The preserve mask is then used to determine where cells should not be culled.- Parameters
- dsIn ( - xarray.Dataset) – A data set to cull, possibly with a- cullCellfield set to one where cells should be removed
- dsMask ( - xarray.Datasetor list, optional) – A data set (or data sets) with region masks that are 1 where cells should be culled
- dsInverse ( - xarray.Datasetor list, optional) – A data set (or data sets) with region masks that are 0 where cells should be culled
- dsPreserve ( - xarray.Datasetor list, optional) – A data set (or data sets) with region masks that are 1 where cells should not be culled
- graphInfoFileName (str, optional) – A file path (relative or absolute) where the graph file (typically - culled_graph.infoshould be written out. By default,- culled_graph.infois not saved.
- logger ( - logging.Logger, optional) – A logger for the output if not stdout
- dir (str, optional) – A directory in which a temporary directory will be added with files produced during cell culling and then deleted upon completion. 
 
- Returns
- dsOut ( - xarray.Dataset) – The culled mesh