# NOT RUN {
## Load example data for test running DMMF model
data(Potato.Convex)
attach(Potato.Convex)
## Run DMMF function using Potato.Convex data
Result <- DMMF(DEM = s.map$DEM, R = d.var$R, RI = d.var$RI, ET = d.var$ET,
P_c = s.var$P_c, P_z = s.var$P_z, P_s = s.var$P_s,
theta_init = d.map$theta_init, theta_sat = s.var$theta_sat,
theta_fc = s.var$theta_fc,
SD = s.var$SD, K = s.var$K, P_I = s.var$P_I, n_s = s.map$n_s,
CC = d.var$CC, GC = s.var$GC, IMP = s.map$IMP, PH = d.var$PH,
D = s.var$D, NV = s.var$NV, d_a = s.var$d_a,
DK_c = s.var$DK_c, DK_z = s.var$DK_z, DK_s = s.var$DK_s,
DR_c = s.var$DR_c, DR_z = s.var$DR_z, DR_s = s.var$DR_s,
Breaking = d.var$Breaking, Init_point = d.var$Init_point,
R_Type = 0, slpMode = 2, ALL = TRUE)
## Check results
## 1-a. Total volume of runoff generated from each element
plot(Result$Q_out)
## 1-b. Total volume of runoff per unit surface area generated from each element
plot(Result$Q_out/Result$A)
## 2-a. Total mass of eroded soil from each element
plot(Result$SL_out)
## 2-a. Total mass of eroded soil per unit surface area from each element
plot(Result$SL_out/Result$A)
# }
Run the code above in your browser using DataLab