py3dep.utils

Utilities for Py3DEP.

Module Contents

py3dep.utils.deg2mpm(slope)

Convert slope from degrees to meter/meter.

Parameters

slope (xarray.DataArray) – Slope in degrees.

Returns

xarray.DataArray – Slope in meter/meter. The name is set to slope and the units attribute is set to m/m.

py3dep.utils.fill_depressions(dem_da)

Fill depressions and adjust flat areas in a DEM using RichDEM.

Parameters

dem (xarray.DataArray or numpy.ndarray) – Digital Elevation Model.

Returns

xarray.DataArray – Conditioned DEM after applying depression filling and flat area resolution operations.