Skip to content

Conversation

@Calebsakhtar
Copy link
Contributor

@Calebsakhtar Calebsakhtar commented Jan 7, 2026

The problem

(Copy/pasted from Issue #87):
When calculating the ice mass uptake from the environment in

const double icemass = iceAerosol_.TotalIceMass_sum(areas);
double mass_WV = WV_exhaust_ - icemass;
double E_H2O = mass_WV / (MW_H2O * 1e3) * Na;

WV_exhaust_ is in g but it is combined with icemass which is in kg and then divided by 1e3 (which assumes grams).

This leads to WV_exhaust_ being effectively 1e3 higher than the icemass, guaranteeing that water is added to (not subtracted from) the environment.

Effectively, the bugfix from PR #59 , which attempted to solve the issue of water being double-counted (see Issue #39) resulted in tiny changes to the contrail properties because the bugged equations reduce to the ones prior to the bugfix.

The fix

This PR solves the units mismatch by dividing WV_exhaust_ by 1e3 instead of the whole expression, solving the units mismatch. The other uses of WV_exhaust_ have been checked and verified to be correct.

Effects on initialisation

For cases in which APCEMM controls the early plume, the bugfix barely makes a difference to initialisation conditions:
nocustom_distribution

For cases in which I hijacked the early plume, the bugfix works as intended:
custom distribution

See Issue #88 for more details.

(For interest only) Effect on time evolution (hijacked early plume only)

effectoftimeevolv

As it can be seen, the ice number decreases sooner in the time evolution, leading to a reduction in the peak ice mass.

Outcomes

The units bug has been fixed, but a new issue has been identified with the vortex formulation. See Issue #88 for more details.

@Calebsakhtar Calebsakhtar marked this pull request as ready for review January 8, 2026 11:59
@Calebsakhtar
Copy link
Contributor Author

@sdeastham This PR is ready for review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant