-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add implicit tendency for canopy temperature #675
Conversation
150b23a
to
eadfba1
Compare
222a4c7
to
c7aaf40
Compare
c06b355
to
aa327e9
Compare
8323271
to
f754df6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes look good overall, but I have some concerns about the reliability of the tests. The current test results indicate that there are significant errors in the Jacobian approximation, but these errors might appear bigger than they actually are if there is a problem with the reference solutions. This issue can be dealt with in future PRs, though; the new infrastructure added here is fine to merge in.
|
||
# Set up timestepper | ||
timestepper = CTS.ARS343(); | ||
timestepper = CTS.ARS111(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you encounter some sort of issue with the ARS343
timestepper here (and in other experiments), or did you just switch to IMEX Euler for convenience?
ed80730
to
c638d87
Compare
96f433e
to
054a561
Compare
f81d4c6
to
5fe41f6
Compare
d93ff3e
to
28fce25
Compare
28fce25
to
d73fd6a
Compare
374a09e
to
18d44f5
Compare
737e138
to
2a953cb
Compare
Previously, all canopy variables were stepped explicitly. Now temperature is stepped implicitly in both standalone CanopyModel runs and integrated SoilCanopyModel runs. Changes include adding a jacobian and implicit tendency for the CanopyModel, and updating scripts to use ImEx steppers. We've also added scripts to test convergence behavior of the standalone and integrated cases, which are output as plots on buildkite. This change increases the stability of our global SoilCanopyModel runs, decreasing the number of NaNs we see, and allows us to take timesteps of 450s.
2a953cb
to
32312bd
Compare
Purpose
Add implicit tendency for canopy temperature
Address #696
Previously, all canopy variables were stepped explicitly. Now temperature
is stepped implicitly in both standalone CanopyModel runs and integrated
SoilCanopyModel runs. Changes include adding a jacobian and implicit
tendency for the CanopyModel, and updating scripts to use ImEx steppers.
We've also added scripts to test convergence behavior of the standalone
and integrated cases, which are output as plots on buildkite.
This change increases the stability of our global
SoilCanopyModel runs, decreasing the number of NaNs we see, and allows
us to take timesteps of 450s.
Notes
There are two things we dont understand about this change:
These two questions will be investigated in a later PR - see #782
Results
With an explicit stepper, RK4, a test script at the Ozark site with the canopy alone permits dt = 60 [ac_canopy = 1e3]. Time to solution = 114 seconds - see kd/canopy_explicit_tests branch. Using dt = 180 fails.
With an implicit stepper ARS111, updated jacobian every newton iteration, max_iters = 6, the same simulation can be run with dt=3600. Time to solution = 16 seconds. Using only a single iteration failed.
Accuracy as a function of timestep (ref solution = dt = 6, implicit solver)
Float 32:
Float64:
In the global long run, on this branch: kd/canopy_explicit_global_nans I just changed the value of ac_canopy but left everything else the same as #main - i.e. using an explicit solver. The resulting map is almost entirely NaN [ look at time 86400]
On the implicit branch (this PR), we have no NaNs after one day. [ look at time 86400]
To-do
Content