polaris.ocean.vertical.elevation.parse_vertical_reduction
- polaris.ocean.vertical.elevation.parse_vertical_reduction(spec)[source]
Parse one entry of the
elevationsor theelevation_rangesconfig optionBoth options describe a way of reducing the
nVertLevelsdimension, so both are parsed here and the result says which way it is.- Parameters:
spec (str) – One of
'top','bottom','k<index>'with a zero-based index, an elevation in m (positive up, so negative within the ocean), or an elevation range written<top_elevation>:<bottom_elevation>- Returns:
reduction (VerticalReduction) – The parsed reduction
- Raises:
ValueError – If
specis none of those