nichollsh / AGNI

A 1D radiative-convective model for the atmospheres of hot terrestrial planets.
https://nichollsh.github.io/AGNI/
1 stars 1 forks source link

Handle missing gases without rescaling pressures #31

Closed nichollsh closed 2 months ago

nichollsh commented 2 months ago

Currently, the gases included in the model need to be supported both by SOCRATES and the spectral file provided. For the mixing ratios to sum to unity, this requires neglecting unsupported gases and renormalising the VMRs.

As a result, requesting unsupported gases effectively enhances the partial pressures of all other gases. This is not physical, since it acts to increase their absorption without physical justification.

It would be better to handle missing gases by treating them as "transparent absorbers". That is, include them in all calculations but set their opacity to zero. This would allow the VMRs to sum to unity without dropping any gases, and would not introduce extra opacity.

This is related to Issue #16.

nichollsh commented 2 months ago

After speaking to James Manners...

The mixing ratios do not need to sum to unity. It's okay if they sum to only a small number. For example, with Earth-like runs the nitrogen can be entirely neglected. This makes things much easier, and we won't need to bother rescaling mixing ratios (other than checking that they sum to $\le 1$).

Regarding unsupported gases, we can easily add these into the code by editing a couple of files. See this changeset.