Skip to content

Commit

Permalink
use same vg_m value for Bonan comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
juliasloan25 committed Oct 31, 2024
1 parent f6da5da commit 86e1ed1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
4 changes: 3 additions & 1 deletion experiments/standalone/Soil/richards_comparison.jl
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ end
S_s = FT(1e-3) #inverse meters
vg_n = FT(3.96)
vg_α = FT(2.7) # inverse meters
hcm = vanGenuchten{FT}(; α = vg_α, n = vg_n)
vg_m = FT(1)
S_c = ν + 1
hcm = vanGenuchten(vg_α, vg_n, vg_m, S_c)
θ_r = FT(0.075)
zmax = FT(0)
zmin = FT(-1.5)
Expand Down
19 changes: 9 additions & 10 deletions src/standalone/Soil/retention_models.jl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
export AbstractSoilHydrologyClosure, vanGenuchten, BrooksCorey

"""
AbstractSoilHydrologyClosure{FT <: AbstractFloat}
AbstractSoilHydrologyClosure{FT <: AbstractFloat}
The abstract type of soil hydrology closure, of which
vanGenuchten{FT} and BrooksCorey{FT} are the two supported
vanGenuchten{FT} and BrooksCorey{FT} are the two supported
concrete types.
To add a new parameterization, methods are required for:
Expand All @@ -20,7 +20,7 @@ Base.broadcastable(x::AbstractSoilHydrologyClosure) = tuple(x)
"""
vanGenuchten{FT} <: AbstractSoilHydrologyClosure{FT}
The van Genuchten soil hydrology closure, chosen when the
The van Genuchten soil hydrology closure, chosen when the
hydraulic conductivity and matric potential are modeled
using the van Genuchten parameterization (van Genuchten 1980;
see also Table 8.2 of G. Bonan 2019).
Expand All @@ -36,18 +36,17 @@ struct vanGenuchten{FT} <: AbstractSoilHydrologyClosure{FT}
m::FT
"A derived parameter: the critical saturation at which capillary flow no longer replenishes the surface"
S_c::FT
function vanGenuchten{FT}(; α::FT, n::FT) where {FT}
m = 1 - 1 / n
S_c = (1 + ((n - 1) / n)^(1 - 2 * n))^(-m)
return new{FT}(α, n, m, S_c)
end

end
function vanGenuchten{FT}(; α::FT, n::FT) where {FT}
m = 1 - 1 / n
S_c = (1 + ((n - 1) / n)^(1 - 2 * n))^(-m)
return vanGenuchten{FT}(α, n, m, S_c)
end

"""
BrooksCorey{FT} <: AbstractSoilHydrologyClosure{FT}
The Brooks and Corey soil hydrology closure, chosen when the
The Brooks and Corey soil hydrology closure, chosen when the
hydraulic conductivity and matric potential are modeled
using the Brooks and Corey parameterization (Brooks and Corey,
1964, 1966; see also Table 8.2 of G. Bonan 2019).
Expand Down

0 comments on commit 86e1ed1

Please sign in to comment.