CliMA / Thermodynamics.jl

A package containing a library of moist thermodynamic relations.
https://clima.github.io/Thermodynamics.jl/dev/
Apache License 2.0
61 stars 2 forks source link

Several Thermodynamics updates. #134

Open tapios opened 2 years ago

tapios commented 2 years ago

A few updates to Thermodynamics and the documentation:

Some other minor fixes:

charleskawczynski commented 1 year 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 commented 1 year 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.

Δ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.)

charleskawczynski commented 1 year ago

Ah, we've already added RelativeSolutionTolerance to RootSolvers, so we just need to update it here.