hydromt_sfincs.workflows.normalize_hsg_codes#

hydromt_sfincs.workflows.normalize_hsg_codes(da_hsg: DataArray, mode: str = 'drained') → DataArray[source]#

Normalize single- and dual-HSG classes to the requested convention.

In drained mode, dual classes 5-8 map to drained classes 1-4. Other finite values not represented by the mapping become NaN. "native" leaves class values unchanged.

Parameters:
  • da_hsg (xr.DataArray) – Raster of hydrologic soil group classes.

  • mode ({"drained", "native"}, optional) – Normalization convention, by default "drained".

Returns:

HSG raster normalized to the requested convention.

Return type:

xr.DataArray