Bugfix: Fix the Vortex Initialisation#74
Merged
sdeastham merged 8 commits intoMIT-LAE:mainfrom Aug 6, 2025
Merged
Conversation
Contributor
Author
|
@sdeastham The PR is now ready for review! Thanks for the help! |
Collaborator
AlphaBetaGammaChi
pushed a commit
to AlphaBetaGammaChi/HAPCEMM-Chem
that referenced
this pull request
Apr 11, 2026
* Ensure vortex uses met temp, rhw, and pressure * Remove an unused Aircraft constructor * Fix the Aircraft constructor declaration * Add the meteorology header to the aircraft head * Disable the aircraft test * Add debug print statements to the Aircraft constructor * Initialise the EI after the aircraft * Fix the vortex initialisation in Aircraft
AlphaBetaGammaChi
pushed a commit
to AlphaBetaGammaChi/HAPCEMM-Chem
that referenced
this pull request
Apr 11, 2026
* Ensure vortex uses met temp, rhw, and pressure * Remove an unused Aircraft constructor * Fix the Aircraft constructor declaration * Add the meteorology header to the aircraft head * Disable the aircraft test * Add debug print statements to the Aircraft constructor * Initialise the EI after the aircraft * Fix the vortex initialisation in Aircraft
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
BUG: Some constructors used data from the input.yaml instead of the actual meteorology.
Following a recent update, specifying the meteorology through the input.yaml file is not allowed. However, I identified a bug where some of the EPM (the Vortex and Aircraft classes) were initialized with data from the input.yaml file. I identified this oversight and reported it to @sdeastham.
This pull request consists of a slight refactor of the initialization of the EPM to fix this oversight. The most important changes include updating the
Aircraftclass to use a new constructor that takes aMeteorologyobject. The required values of temperature and humidity are now taken from the meteorology file instead of the input.yaml. This should help make the meteorology file the only source of truth.Refactoring Details
Aircraftclass constructor to require aMeteorologyobject andInputobjecs. An older constructor that was only used in the tests was removed. (Code.v05-00/include/Core/Aircraft.hpp,Code.v05-00/src/Core/Aircraft.cpp) [1] [2] [3] [4]Aircraftobject inLAGRIDPlumeModelto use the modified constructor, passing in theMeteorologyobject. (Code.v05-00/src/Core/LAGRIDPlumeModel.cpp) [1] [2]Aircraftthat relied on the old constructor interface. These tests are no longer compatible with the refactoredAircraftclass. (Code.v05-00/tests/test_aircraft.cpp)Results
(Two sets of simulations A, and B. The only thing that changes is the temp and RH in the input.yaml A = 217 K, 125% RHw; B = 180 K, 105% RHw. The real temperature and relative humidity with respect to water vapor in the meteorology is 223.15 K and 76.4 % RHw across A and B)
Table 1: EPM outputs for two simulations before and after the bugfix.
Table 2: Integral quantities for simulation family B
Figure 1: Evolution of integral quantities for simulation family B.
Discussion