Right now I have the current problem. I often desire to solve photochemistry on a P-T grid. But the gridding is in altitude. So I have to do hacky things to solve this (work but hacky).
Another idea is to instead solve photochemistry on a $\sigma$ grid:
$$\sigma = P/P_\mathrm{surf}$$
This might solve all problems. The surface pressure is still allowed to increase. The gridding would always go from 1 to some pressure factor smaller than P_surf. While this works, it does introduce a off-band terms in the jacobian if $P_\mathrm{surf}$ changes by a lot (not super common). I think these off band terms are no big deal, probably.
Right now I have the current problem. I often desire to solve photochemistry on a P-T grid. But the gridding is in altitude. So I have to do hacky things to solve this (work but hacky).
Another idea is to instead solve photochemistry on a$\sigma$ grid:
This might solve all problems. The surface pressure is still allowed to increase. The gridding would always go from 1 to some pressure factor smaller than P_surf. While this works, it does introduce a off-band terms in the jacobian if$P_\mathrm{surf}$ changes by a lot (not super common). I think these off band terms are no big deal, probably.