polaris.mesh.spherical.unified.effective_ocean.widen_passages
- polaris.mesh.spherical.unified.effective_ocean.widen_passages(passages, lat, lon, resolution, width_km, factor, high_lat_factor=None, latitude_threshold=43.0)[source]
Dilate rasterized passage lines to a swath proportional to the local ocean background cell width.
- Parameters:
passages (numpy.ndarray) – A boolean mask of rasterized passage lines, with dimensions
(lat, lon)lat (numpy.ndarray) – The latitude coordinate in degrees
lon (numpy.ndarray) – The longitude coordinate in degrees
resolution (float) – The grid resolution in degrees
width_km (numpy.ndarray) – The local ocean background cell width in km on the same grid
factor (float) – The swath width in units of the local background cell width (the dilation radius is half the swath width)
high_lat_factor (float, optional) – The swath width factor poleward of
latitude_thresholdlatitude_threshold (float, optional) – The latitude in degrees poleward of which
high_lat_factorapplies
- Returns:
widened (numpy.ndarray) – The widened passage mask