CliMA / ClimaLand.jl

Clima's Land Model
Apache License 2.0
32 stars 8 forks source link

initial full soil imp solver #651

Closed juliasloan25 closed 2 weeks ago

juliasloan25 commented 2 weeks ago

Purpose

Adds a simple implicit tendency for the EnergyHydrology model, which only treats the liquid water content implicitly (using the functions already defined for RichardsModel)

closes #538

Requirements for a model with implicit and explicit prognostic variables

Changes in src

Next steps (separate PRs)

Content

Check run output

docs

experiments (visually inspected)


kmdeck commented 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.

juliasloan25 commented 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.

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?

kmdeck commented 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.

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?

juliasloan25 commented 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.

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?

kmdeck commented 2 weeks ago

Yeah, good point. Want to meet at 1pm?

sure!