mpas_tools.mesh.cull.write_culled_dataset(in_filename, out_filename, base_mesh_filename, culled_mesh_filename, map_culled_to_base_filename=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.

  • in_filename (str) – A file containing an MPAS dataset to cull

  • output_filename (str) – A file to write the culled MPAS dataset to

  • 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

  • map_culled_to_base_filename (str, optional) – A file with 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