compass.ocean.tests.global_ocean.mesh.cull.cull_mesh¶
- compass.ocean.tests.global_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)[source]¶
First step of initializing the global ocean:
combining Natural Earth land coverage north of 60S with Antarctic ice coverage or grounded ice coverage from BedMachineAntarctica
combining transects defining critical passages (if
with_critical_passages=True
)combining points used to seed a flood fill of the global ocean.
create masks from land coverage
add land-locked cells to land coverage mask.
create masks from transects (if
with_critical_passages=True
)cull cells based on land coverage but with transects present
create flood-fill mask based on seeds
cull cells based on flood-fill mask
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=0logger (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)