Open tapios opened 2 years ago
@tapios, I think we spoke about this, the current implementation uses ΔT < tol
, not ΔT/T < 1e-4
, is this okay? If not, we can add this capability into RootSolvers.jl and update Thermodynamics-- it's not a difficult change, but I just wanted to clarify this point.
Also, can you confirm if we've updated the particular part of the docs in the first bullet point? I believe we've addressed them all in #112
@tapios, I think we spoke about this, the current implementation uses
ΔT < tol
, notΔT/T < 1e-4
, is this okay? If not, we can add this capability into RootSolvers.jl and update Thermodynamics-- it's not a difficult change, but I just wanted to clarify this point.
ΔT < tol
is ok if relative tolerance takes much work. But I'd prefer a relative tolerance (e.g., so that we have a relative tolerance on buoyancy, and can easily ran this in other planetary configurations.
Also, can you confirm if we've updated the particular part of the docs in the first bullet point? I believe we've addressed them all in #112
The docs (https://clima.github.io/Thermodynamics.jl/dev/Formulation/) do not seem to be updated yet. There were a number of changes in the LaTeX design doc (tracked) that need to be mirrored in the docs, e.g., formulation of saturation vapor pressure and derivatives of saturation specific humidity. (Downside of having two versions. We should abandon the LaTeX soon.)
Ah, we've already added RelativeSolutionTolerance
to RootSolvers, so we just need to update it here.
A few updates to Thermodynamics and the documentation:
∂q_vap_sat_∂T
)∂q_vap_sat_∂T
from #112 in saturation adjustment l. 1402. (This will change the gradient by about 5%; thus, it may lead to a minor improvement in convergence of saturation adjustment, but the changes should not be large.)saturation_vapor_pressure
function over a mix of liquid and ice in l. 914ΔT
from iteration to iteration to be small in relative terms, i.e.,ΔT/T < 1e-4
.ΔT/T < 1e-4
. Compare that with the current default initial state. (Expectation is that fewer iterations are needed with previous time step as initial state.)Some other minor fixes:
liquid_frac
andλ
consistently. E.g., replaceliquid_frac
in ll. 914 ff. and ll. 1314 ff. byλ
specific entropy
in l. 2846 and l. 2865 bypartial pressure