polaris.ocean.vertical.pstar_init.PStarInitStep.run_pstar_init
- PStarInitStep.run_pstar_init(ds_mesh: Dataset, geom_z_bot: DataArray, surface_pressure: DataArray | None = None, sea_surface_height: DataArray | None = None) Dataset[source]
Run the fixed-point iteration that determines BottomPressure (and therefore the p-star coordinate) such that the recovered geometric water-column thickness matches the target within a configurable fractional tolerance.
At convergence the returned dataset contains all p-star coordinate variables, converged tracer fields, specific volume, pressure, geometric height at layer midpoints and interfaces,
bottomDepthset to the actual converged geometric water-column thickness, andsshcomputed as the diagnostic geometric sea-surface height.- Parameters:
ds_mesh (xarray.Dataset) – Horizontal mesh dataset.
geom_z_bot (xarray.DataArray) – Target geometric height of the seafloor (negative, in metres) with dimension
nCells. Used both to anchorgeom_height_from_pseudo_heightand to set the target water-column thickness.surface_pressure (xarray.DataArray, optional) – Sea-surface pressure (Pa) with dimension
nCells. Defaults to zero for all cells.sea_surface_height (xarray.DataArray, optional) – Prescribed sea-surface height (m) with dimension
nCells. The target water-column thickness issea_surface_height - geom_z_bot; the iteration adjustsBottomPressureuntil this target is met, so the convergedsshequals this value. Defaults to-surface_pressure / (RhoSw * Gravity), i.e. the resting surface-pressure depression for a reference-density fluid.
- Returns:
xarray.Dataset – Dataset containing all base-class output variables with
long_nameandunitsattributes set.