polaris.tasks.mesh.spherical.feature_masks.compute_feature_masks
- polaris.tasks.mesh.spherical.feature_masks.compute_feature_masks(ds_mesh, fc_mask, feature_object_type, mask_types, logger, pool, chunk_size, show_progress, subdivision_threshold, subdivision_resolution, add_edge_sign)[source]
Compute masks for a region or transect feature collection.
- Parameters:
ds_mesh (xarray.Dataset) – A standard MPAS mesh dataset
fc_mask (geometric_features.FeatureCollection) – The mask features
feature_object_type ({'region', 'transect'}) – The common feature object type
mask_types (tuple of {'cell', 'edge', 'vertex'}) – The mask types to compute
logger (logging.Logger) – Logger for progress output
pool (multiprocessing.Pool) – Pool for parallel computation
chunk_size (int) – Number of points to process per chunk
show_progress (bool) – Whether to show progress bars
subdivision_threshold (float) – Region polygon subdivision threshold in degrees
subdivision_resolution (float or None) – Transect subdivision resolution in meters
add_edge_sign (bool) – Whether to add transect edge signs
- Returns:
ds_masks (xarray.Dataset) – The computed masks