compass.landice.mesh.build_dst_scrip_hull
- compass.landice.mesh.build_dst_scrip_hull(dest_scrip, domain, buffer_m=50000.0, source_crs='EPSG:4326', mesh_crs=None, logger=None)[source]
Build a buffered concave boundary from the footprint of a destination SCRIP file and return it as a
matplotlib.path.Path.The boundary is constructed by rasterising the destination mesh points onto a coarse grid (10 km cell size), dilating by
buffer_m, and extracting the outer contour. This produces a tight, concave mask that follows the actual domain shape (including bays and fjords) while remaining computationally inexpensive (< 1 s for any realistic mesh).This is factored out of
compass.landice.mesh.add_grid_imask_from_dst_scrip_hull()so that the boundary can be computed once and reused across multiple source datasets that share the same destination mesh, avoiding redundant I/O and computation.- Parameters:
dest_scrip (str) – Destination SCRIP file
domain (str) – Projection domain. Recognised convenience keys: ‘greenland’, ‘gis-gimp’, ‘antarctica’, ‘ais-bedmap2’. Any other value requires mesh_crs to be supplied explicitly.
buffer_m (float, optional) – Outward buffer distance in meters (default 50 km)
source_crs (str, optional) – CRS of lon/lat variables in the SCRIP file (default ‘EPSG:4326’)
mesh_crs (str, optional) – Proj4/EPSG string for planar coordinates. Derived from domain if None.
logger (logging.Logger, optional) – Logger for status messages; falls back to print if None.
- Returns:
hull_path (matplotlib.path.Path) – Buffered concave boundary of the destination mesh footprint.