Skip to content

Commit

Permalink
Merge pull request #677 from CliMA/kd_js_gb/rm_norm
Browse files Browse the repository at this point in the history
conv checker
  • Loading branch information
kmdeck authored Jun 26, 2024
2 parents 44e201a + e7c009a commit 4bc5337
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 18 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ main
--------
Improve Performance of soil canopy model
- PR [#666]
- PR [#677] Remove norm condition
Add base global soil canopy run to benchmark and experiments
- PR [#591] adds benchmark run
- PR [#669] adds topmodel runoff
Expand Down
3 changes: 1 addition & 2 deletions docs/tutorials/standalone/Soil/layered_soil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

using Plots
import ClimaUtilities.SpaceVaryingInputs: SpaceVaryingInput
import NCDatasets
import SciMLBase
import ClimaTimeSteppers as CTS
using ClimaCore
Expand Down Expand Up @@ -117,7 +116,7 @@ conv_checker = CTS.ConvergenceChecker(norm_condition = convergence_cond)
ode_algo = CTS.IMEXAlgorithm(
stepper,
CTS.NewtonsMethod(
max_iters = 50,
max_iters = 10,
update_j = CTS.UpdateEvery(CTS.NewNewtonIteration),
convergence_checker = conv_checker,
),
Expand Down
6 changes: 1 addition & 5 deletions experiments/benchmarks/land.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
# Simulation duration: 6 hours
# Timestep: 180 s
# Timestepper: ARS343
# Maximum iterations: 1
# Convergence criterion: 1e-8
# Fixed number of iterations: 1
# Jacobian update: Every Newton iteration
# Precipitation data update: every timestep
import SciMLBase
Expand Down Expand Up @@ -622,14 +621,11 @@ function setup_and_solve_problem(; greet = false)

# Define timestepper and ODE algorithm
stepper = CTS.ARS343()
norm_condition = CTS.MaximumError(FT(1e-8))
conv_checker = CTS.ConvergenceChecker(; norm_condition = norm_condition)
ode_algo = CTS.IMEXAlgorithm(
stepper,
CTS.NewtonsMethod(
max_iters = 1,
update_j = CTS.UpdateEvery(CTS.NewTimeStep),
convergence_checker = conv_checker,
),
)

Expand Down
6 changes: 1 addition & 5 deletions experiments/benchmarks/richards.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
# Simulation duration: 7 days
# Timestep: 1800 s (30 min)
# Timestepper: ARS111
# Maximum iterations: 2
# Convergence criterion: 1e-8
# Fixed number of iterations: 2
# Jacobian update: Every Newton iteration
# Precipitation data update: every timestep

Expand Down Expand Up @@ -303,14 +302,11 @@ function setup_and_solve_problem(; greet = false)

# Define timestepper and ODE algorithm
stepper = CTS.ARS111()
norm_condition = CTS.MaximumError(FT(1e-8))
conv_checker = CTS.ConvergenceChecker(; norm_condition = norm_condition)
ode_algo = CTS.IMEXAlgorithm(
stepper,
CTS.NewtonsMethod(
max_iters = 2,
update_j = CTS.UpdateEvery(CTS.NewNewtonIteration),
convergence_checker = conv_checker,
),
)

Expand Down
3 changes: 0 additions & 3 deletions experiments/integrated/global/global_soil_canopy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,11 @@ imp_tendency! = ClimaLand.make_imp_tendency(land);
tendency_jacobian! = ClimaLand.make_tendency_jacobian(land);
set_initial_cache!(p, Y, t0)
stepper = CTS.ARS343()
norm_condition = CTS.MaximumError(FT(1e-8))
conv_checker = CTS.ConvergenceChecker(; norm_condition = norm_condition)
ode_algo = CTS.IMEXAlgorithm(
stepper,
CTS.NewtonsMethod(
max_iters = 1,
update_j = CTS.UpdateEvery(CTS.NewTimeStep),
convergence_checker = conv_checker,
),
)

Expand Down
3 changes: 0 additions & 3 deletions experiments/standalone/Soil/richards_runoff.jl
Original file line number Diff line number Diff line change
Expand Up @@ -220,14 +220,11 @@ tendency_jacobian! = ClimaLand.make_tendency_jacobian(model);

set_initial_cache!(p, Y, t0)
stepper = CTS.ARS111()
norm_condition = CTS.MaximumError(FT(1e-8))
conv_checker = CTS.ConvergenceChecker(; norm_condition = norm_condition)
ode_algo = CTS.IMEXAlgorithm(
stepper,
CTS.NewtonsMethod(
max_iters = 2,
update_j = CTS.UpdateEvery(CTS.NewNewtonIteration),
convergence_checker = conv_checker,
),
)

Expand Down

0 comments on commit 4bc5337

Please sign in to comment.