compass.ocean.mesh.cull.cull_mesh

compass.ocean.mesh.cull.cull_mesh(with_cavities=False, with_critical_passages=False, custom_critical_passages=None, custom_land_blockages=None, preserve_floodplain=False, logger=None, use_progress_bar=True, process_count=1, convert_to_cdf5=False, latitude_threshold=43.0, sweep_count=20)[source]

First step of initializing the global ocean:

  1. combining Natural Earth land coverage north of 60S with Antarctic ice coverage or grounded ice coverage from BedMachineAntarctica

  2. combining transects defining critical passages (if with_critical_passages=True)

  3. combining points used to seed a flood fill of the global ocean.

  4. create masks from land coverage

  5. add land-locked cells to land coverage mask.

  6. create masks from transects (if with_critical_passages=True)

  7. cull cells based on land coverage but with transects present

  8. create flood-fill mask based on seeds

  9. cull cells based on flood-fill mask

  10. create masks from transects on the final culled mesh (if with_critical_passages=True)

Parameters:
  • with_cavities (bool, optional) – Whether the mesh should include Antarctic ice-shelf cavities from BedMachine Antarctica

  • with_critical_passages (bool, optional) – Whether the mesh should open the standard critical passages and close land blockages from geometric_features

  • custom_critical_passages (str, optional) –

    The name of geojson file with critical passages to open. This file may

    be supplied in addition to or instead of the default passages (with_critical_passages=True)

  • custom_land_blockages (str, optional) – The name of a geojson file with critical land blockages to close. This file may be supplied in addition to or instead of the default blockages (with_critical_passages=True)

  • preserve_floodplain (bool, optional) – Whether to use the cellSeedMask field in the base mesh to preserve a floodplain at elevations above z=0

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

  • use_progress_bar (bool, optional) – Whether to display progress bars (problematic in logging to a file)

  • process_count (int, optional) – The number of cores to use to create masks (None to use all available cores)

  • convert_to_cdf5 (bool, optional) – Convert the culled mesh to PNetCDF CDF-5 format

  • latitude_threshold (float, optional) – Minimum latitude, in degrees, for masking land-locked cells

  • sweep_count (int, optional) – Maximum number of sweeps to search for land-locked cells