-
Notifications
You must be signed in to change notification settings - Fork 19
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
Set thermo state iteration params #785
Conversation
4c0ea7b
to
196643e
Compare
are we ready? :) |
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.
LGTM if it passes tests. (And if it passes, can we make the tolerance even smaller, e.g., 2 K?)
It's not passing / working with some experiments. The following break:
There are some behavioral changes in other examples, but those are non-blocking |
What does "break" mean here? (There may be small changes in those, of course. We do not have exact solutions for them.) |
We error in saturation adjustment, so the solution at the end of the iteration is larger than 3 K. Here's one example:
Our options seem to be:
That said, I suspect fixing #795 will give us a bigger performance gain than reducing the number of iterations alone. Are we sure that now is the best time to make this performance/accuracy trade-off? My recommendation would be to make these changes after things are a bit more stable--especially if twiddling this parameter impacts stability (which, IIRC, it did back when experimenting with this in TC, cc @yairchn) |
Try to see if
The best time to make this change was a year ago; second best time is now. At high resolution, all will be waiting for the point with the slowest convergence... |
A slightly bigger issue, which may affect accuracy, is that there's a term missing in the derivative of the saturation specific humidity. I'll add it sometime soon. |
196643e
to
8dbc4fc
Compare
And one more point: The way this is usually done (and what we really should be doing) is to use the temperature at the previous time step as the initial condition for the iterations. I mentioned this a few times, and it got into the purity of code design. But is there any serious reason why we cannot pass in an initial guess for the iterations as an input argument, and use the previous time step temperature as that initial guess. I guarantee with that we'll be fine with 1 iteration. |
We have an issue for it, I think it's just not been prioritized |
Would be good to do. Given how much time we've spent discussing convergence issues, it'll probably pay quickly to get it done. |
This has gone a little stale. Do we still want those changes? @szy21 @charleskawczynski |
I think we want it but it just didn't work :( |
We want |
No, we are not doing this. I can look into it when I have some more time, unless someone else wants to. |
I can take this on. Since I have unearthed the Thermodynamics PRs |
haha, thanks! |
Superseded by #1648 |
This PR changes our thermodynamic state iteration parameters to use