Skip to content

Commit

Permalink
update docstring slope (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
DirkEilander authored Dec 19, 2024
1 parent af9886d commit 13b96fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyflwdir/dem.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ def _adjust_elevation(elevtn):
def slope(elevtn, nodata=-9999.0, latlon=False, transform=gis_utils.IDENTITY):
"""Returns the local gradient
The slope is calculated on the basis of the dem in a 3 x 3 cell window, using 2nd order partial derivatives.
The slope [m/m] is given as the increase in height per distance in horizontal direction.
Parameters
----------
elevnt : 1D array of float
Expand All @@ -243,7 +246,7 @@ def slope(elevtn, nodata=-9999.0, latlon=False, transform=gis_utils.IDENTITY):
Returns
-------
1D array of float
slope
slope [m/m]
"""
xres, yres, north = transform[0], transform[4], transform[5]
slope = np.zeros(elevtn.shape, dtype=np.float32)
Expand Down

0 comments on commit 13b96fc

Please sign in to comment.