polaris.tasks.mesh.spherical.unified.sizing_field.sizing_field_dataset
- polaris.tasks.mesh.spherical.unified.sizing_field.sizing_field_dataset(ds_coastline, ds_river, resolution, mesh_name, ocean_background, land_background_km=240.0, enable_coastline_refinement=True, coastline_transition_land_km=0.0, enable_river_channel_refinement=True, river_channel_km=240.0)[source]
Build the unified sizing-field dataset from coastline and river products.
- Parameters:
ds_coastline (xarray.Dataset) – Coastline dataset with
ocean_mask,signed_distance,lat, andlonvariables on a shared lat-lon target gridds_river (xarray.Dataset) – River-network dataset with
river_channel_maskon the same lat-lon grid asds_coastlineresolution (float) – The latitude-longitude grid resolution in degrees; stored as a dataset attribute
mesh_name (str) – The name of the unified mesh; stored as a dataset attribute
ocean_background (array-like) – 2-D array of shape
(n_lat, n_lon)giving the target cell width in km for open-ocean cellsland_background_km (float, optional) – Target cell width in km for land cells that are not modified by any refinement control
enable_coastline_refinement (bool, optional) – Whether to apply the coastline-proximity refinement
coastline_transition_land_km (float, optional) – Width in km of the linear-transition zone on the land side of the coastline; 0 means apply the ocean background only at the coastline raster edge
enable_river_channel_refinement (bool, optional) – Whether to refine cells on the river-channel mask
river_channel_km (float, optional) – Target cell width in km on river-channel mask cells
- Returns:
ds_sizing (xarray.Dataset) – Dataset on the shared lat-lon grid containing
cellWidth(the final cell-width field in km) and diagnostic variables that record each intermediate sizing stage and the active control index