When working on my implementation plan for #201, claude pointed me to an issue with the coupling between evapotranspiration and the soil scheme.
|
compute_tendencies!(state, grid, soil.hydrology, soil, constants) |
does not have the evapotranspiration argument although it is an option in
|
function compute_tendencies!( |
MWE for the problem
using Terrarium
# Bare-ground column with Richards soil hydrology; no rainfall
function run_column(specific_humidity; nsteps = 60, Δt = 60.0)
grid = ColumnGrid(CPU(), Float64, UniformSpacing(Δz = 0.1, N = 10))
hydrology = SoilHydrology(Float64, RichardsEq())
soil = SoilEnergyWaterCarbon(Float64; hydrology)
model = LandModel(grid; soil, vegetation = nothing)
initializers = (temperature = 15.0, saturation_water_ice = 0.5)
integrator = initialize(model; initializers)
set!(integrator.state.specific_humidity, specific_humidity)
set!(integrator.state.rainfall, 0.0)
for _ in 1:nsteps
timestep!(integrator, Δt)
end
state = integrator.state
return (
evaporation_ground = state.evaporation_ground[1, 1, 1],
saturation_top = state.saturation_water_ice[1, 1, grid.Nz],
)
end
dry = run_column(1.0e-4) # strong evaporative demand
humid = run_column(1.0e-2) # weak (or negative) evaporative demand
@show dry.evaporation_ground humid.evaporation_ground
@show dry.saturation_top humid.saturation_top
# Expected: different top-layer saturation. Actual: identical, since ET is never applied to the soil.
@show dry.saturation_top == humid.saturation_top
When working on my implementation plan for #201, claude pointed me to an issue with the coupling between evapotranspiration and the soil scheme.
Terrarium.jl/src/processes/soil/soil_coupled.jl
Line 97 in 9f0d786
does not have the evapotranspiration argument although it is an option in
Terrarium.jl/src/processes/soil/hydrology/soil_hydrology_rre.jl
Line 89 in 9f0d786
MWE for the problem