mpas_tools.mesh.cull.cull_dataset(ds, ds_base_mesh, ds_culled_mesh, ds_map_culled_to_base=None, workers=-1, logger=None)[source]

Create a new dataset in which all fields from ds have been culled from the base mesh to the culled mesh. Fields present in ds_culled_mesh are copied over rather than culled from ds.

  • ds (xarray.Dataset) – An MPAS dataset to cull

  • ds_base_mesh (xarray.Dataset) – The horizontal MPAS mesh before culling

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

  • ds_map_culled_to_base (xarray.Dataset, optional) – An existing map from the base to the culled mesh created with write_map_culled_to_base() or map_culled_to_base(). The dataset will be created (but not returned or saved to disk) if it is not passed as an argument.

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

  • logger (logging.Logger, optional) – A logger for the output


ds_culled (xarray.Dataset) – An culled MPAS dataset