Skip to content

Commit

Permalink
tool yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
Ash-Manoj committed Aug 6, 2024
1 parent f449d11 commit 4eb67a3
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 15 deletions.
14 changes: 4 additions & 10 deletions src/hillslope_method.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#--------------------------------------------------------------------------------------
# Hillslope wizzard developed by Ralf Loritz (2015)
# Version 0.0000134 :P
# Version 0.1
# Delination of 2D catenas from hillslopes. The hillslope, dist2river, elev2river and accumulation maps
# where extracte using Whitebox GIS in combination Grass GIS. The idea behind this code is based on a approach from
# Francke et al. 2006 (Automated catena-based discretization of landscapes for the derivation of hydrological modelling units)
Expand All @@ -16,7 +16,7 @@ library('rgdal')

#--------------------------------------------------------------------------------------
# Own packages
source("plot.R")
source("plot_old.R")

#--------------------------------------------------------------------------------------
# Start hillslope method
Expand Down Expand Up @@ -202,13 +202,7 @@ hillslope_tool <- function(hillslope_nr, li_spatial, plot_2d_catena=FALSE, plot_
'hillslope_nr'=hillslope_nr
)
cat(' ____________
< Hillslope fini!>
------------
\\ ^__^
\\ (oo)\\_______
(..)\ )\\/\\
||----w |
|| || ')
< Hillslope finished successfully!! ')


} else {li_hill <- list('final_hill' = data.frame('east'=x, 'north'=y,
Expand All @@ -222,7 +216,7 @@ hillslope_tool <- function(hillslope_nr, li_spatial, plot_2d_catena=FALSE, plot_
'hillslope_nr'=hillslope_nr
)

print('Hillslope to small or to short!')
print('Hillslope too small or too short!')
}
return(li_hill)
}
Expand Down
36 changes: 31 additions & 5 deletions src/tool.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,39 @@ tools:
Hillslope wizard developed by Ralf Loritz (2015)
Delination of 2D catenas from hillslopes. The idea behind this code is based on a approach from Francke et al. 2006 (Automated
catena-based discretization of landscapes for the derivation of hydrological modelling
units) and Cochrane and Flanagan (2003).
The idea behind this approach is to select every unique distance and their corrosponding
units) and Cochrane and Flanagan (2003). The idea behind this approach is to select every unique distance and their corrosponding
elevation from a river inside a hillslope. If more than one raster cell have the same
distance the elevation is calculated by a weighted mean using the flow accumulation. The
hillslope width can be estimated by the frequency of the appearance of a single distance.
hillslope width can be estimated by the frequency of the appearance of a single distance.
In this present version, we assume a fixed horizontal and varying vertical grid spacing for the hillslope element as in Manoj J et al (2024). This would be revised in the
upcoming versions.
parameters:

hillslope_id:
type: integer
description: Integer ID of the hillsope from hillslope.tif for calculating the geometry. If entire basin is to be used for the representative hillslope, give -1.
default: -1
no_flow_area:
type: float
description: Percentage of no flow area with almost no slope within the area of interest.
default: 0.30
min_cells:
type: integer
description: Minimum number of cells within a hillslope
default: 10
hill_type:
type: enum
description: |
Hillslope type. (1) constant thickness (default), (2) cake-shape, (3) variable thickness with spline approximation of lower boundary.
Refer CATFLOW manual for more details.
values:
- constant
- cake
- variable
default: constant
depth:
type: float
description: thickness of soil profile
default: 2.1
data:
flow_accumulation:
example: /in/flow_accumulation.tif
Expand All @@ -22,7 +48,7 @@ tools:
example: /in/hillslope.tif
extension:
-tiff
description: .tif file for the entire basin as one hillslope.
description: .tif file for hillslopes.
elev2river:
example: /in/elevation.tif
extension:
Expand Down

0 comments on commit 4eb67a3

Please sign in to comment.