hydromt_sfincs.workflows.cn_to_s#
- hydromt_sfincs.workflows.cn_to_s(da_cn, da_mask=None, nodata=nan, output_unit='inch', fill_cn=100.0)[source]#
Convert curve numbers to potential maximum soil moisture retention S.
Missing curve numbers are treated as
fill_cn(by default 100, so S = 0), and curve numbers are floored at 1. Thus, a raw CN of 0 passed directly to this function is treated as CN 1 and gives S = 990 inches. Retention is rounded to 0.001 inches before optional conversion to metres.- Parameters:
da_cn (
xr.DataArray) – Curve-number raster.da_mask (
xr.DataArray, optional) – Boolean or binary mask; cells outside the mask are set tonodata.nodata (
float, optional) – Output nodata value, by default np.nan.output_unit (
{"inch", "m"}, optional) – Output unit for S, by default"inch".fill_cn (
floatorNone, optional) – Curve number used for missing input, by default 100 (S = 0). None keeps missing input missing, e.g. to skip it in a later area average.
- Returns:
Potential maximum soil moisture retention S in the requested unit.
- Return type:
xr.DataArray