mpas_tools.mesh.mask.compute_mpas_transect_masks

mpas_tools.mesh.mask.compute_mpas_transect_masks(dsMesh, fcMask, earthRadius, maskTypes=('cell', 'edge', 'vertex'), logger=None, pool=None, chunkSize=1000, showProgress=False, subdivisionResolution=10000.0, addEdgeSign=False)[source]

Create transect masks (lines) on an MPAS mesh.

Parameters:
  • dsMesh (xarray.Dataset) – MPAS mesh dataset.

  • fcMask (geometric_features.FeatureCollection) – Feature collection containing transects (LineString or MultiLineString).

  • earthRadius (float) – Earth radius in meters.

  • maskTypes (tuple of {'cell', 'edge', 'vertex'}, optional) – Which types of masks to create.

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

  • pool (multiprocessing.Pool, optional) – Pool for parallel computation.

  • chunkSize (int, optional) – Number of points to process per chunk.

  • showProgress (bool, optional) – Show a progress bar.

  • subdivisionResolution (float, optional) – Subdivide coarse transects for efficiency (meters).

  • addEdgeSign (bool, optional) – Whether to add edge sign variable (extra computation).

Returns:

dsMasks (xarray.Dataset) – Dataset containing transect masks and transect names.