in patmo_ode.f90
#IFPATMO_useAerosolformation
!aerosol formation
do i=13,34
if (va(i) <= n(i, patmo_idx_H2SO4) .AND. pa(i) >= n(i, patmo_idx_H2SO4)) then
dn(i, patmo_idx_H2SO4) = dn(i, patmo_idx_H2SO4) - (n(i, patmo_idx_H2SO4) - va(i))
dn(i, patmo_idx_SO4) = dn(i, patmo_idx_SO4) + (n(i, patmo_idx_H2SO4) - va(i))
end if
end do
#ENDIFPATMO
i = 13–34: Altitude layers between 13 km and 34 km (assuming 1 km layer resolution).
n(i, patmo_idx_H2SO4): Current number density (molecule cm⁻³) of gaseous H₂SO₄.
va(i): Critical vapor-phase H₂SO₄ density threshold (nucleation limit).
pa(i): Ambient H₂SO₄ partial pressure.
dn(i, patmo_idx_H2SO4): Rate of change (Δn/Δt) for gaseous H₂SO₄.
dn(i, patmo_idx_SO4): Rate of change (Δn/Δt) for condensed SO₄ aerosol.
The code checks whether the ambient partial pressure of H₂SO₄ exceeds the vapor-phase equilibrium value, which indicates supersaturation and thus triggers aerosol formation.
When the condition is satisfied, the excess H₂SO₄ is removed from the gas phase and added to the sulfate aerosol pool (SO4).