Closed juliasloan25 closed 2 weeks ago
for the freezing front test, maybe we can try a higher order IMEX stepper? E.g. ARS343
It may be that using explicit euler as the explicit stepper is not sufficient or requires a very small step, while when we were using RK4 we could use a bigger step.
for the freezing front test, maybe we can try a higher order IMEX stepper? E.g. ARS343
It may be that using explicit euler as the explicit stepper is not sufficient or requires a very small step, while when we were using RK4 we could use a bigger step.
Even using ARS343 with a timestep as small as 0.1s (was 60s when explicit), all prognostic variables are NaN at the second timestep. Maybe we do need to add more terms to our jacobian approximation?
for the freezing front test, maybe we can try a higher order IMEX stepper? E.g. ARS343 It may be that using explicit euler as the explicit stepper is not sufficient or requires a very small step, while when we were using RK4 we could use a bigger step.
Even using ARS343 with a timestep as small as 0.1s (was 60s when explicit), all prognostic variables are NaN at the second timestep. Maybe we do need to add more terms to our jacobian approximation?
Let's think about this a bit more. It seems odd that treating RHS terms all explicitly is OK, but moving one to be treated implicitly (which should only making things more stable) and leaving the others explicit causes errors. Do you want to meet this afternoon to try some debugging?
for the freezing front test, maybe we can try a higher order IMEX stepper? E.g. ARS343 It may be that using explicit euler as the explicit stepper is not sufficient or requires a very small step, while when we were using RK4 we could use a bigger step.
Even using ARS343 with a timestep as small as 0.1s (was 60s when explicit), all prognostic variables are NaN at the second timestep. Maybe we do need to add more terms to our jacobian approximation?
Let's think about this a bit more. It seems odd that treating RHS terms all explicitly is OK, but moving one to be treated implicitly (which should only making things more stable) and leaving the others explicit causes errors. Do you want to meet this afternoon to try some debugging?
Yeah, good point. Want to meet at 1pm?
Yeah, good point. Want to meet at 1pm?
sure!
Purpose
Adds a simple implicit tendency for the
EnergyHydrology
model, which only treats the liquid water content implicitly (using the functions already defined forRichardsModel
)closes #538
Requirements for a model with implicit and explicit prognostic variables
Changes in src
(@name(var), @name(var)) => block
in the Jacobian. The block should be the negative identity matrix for variables that are stepped explicitly, and a tridiagonal matrix for variables that are stepped implicitlydY.model .= 0
for implicitly-stepped variablesdY.model .= 0
for explicitly-stepped variablesChanges in driver
exp_tendency!
, createimp_tendency!
,tendency_jacobian!
, andjac_kwargs
CTS.ExplicitAlgorithm
toCTS.IMEXAlgorithm
, and add theNewtonsMethod
argumentSciMLBase.ODEFunction(imp_tendency!; jac_kwargs...)
toCTS.ClimaODEFunction
call)Next steps (separate PRs)
dT/dI
drhoe_int / dtheta_l
Content
src/Soil
imp_tendency
function forEnergyHydrology
EnergyHydrology
to use implicit tendency (docs, tests)SoilCanopyModel
ImplicitEquationJacobian
imp_tendency!
(replacedo_nothing_imp_tendency
? --> updatecompute_imp_tendency
(andexp_tendency
defaults to setdY .= 0
)make_jac_tendency
function forAbstractLandModel
- calling functions of component models, analogous to ALMupdate_aux
Check run output
docs
[x] soil/canopy tutorial
[x] coarse sand evaporation
[x] Gilat Loess evaporation
[x] freezing front
[x] energy hydrology
[x] sublimation
experiments (visually inspected)