From 2fea56fbf6783460135611e82907d1c3bf3acc7d Mon Sep 17 00:00:00 2001 From: Calebsakhtar Date: Wed, 7 Jan 2026 18:58:36 +0100 Subject: [PATCH 1/3] Fix units mismatch when calculating water mass --- Code.v05-00/src/Core/LAGRIDPlumeModel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp b/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp index bcb0db4e..e5e6f06a 100644 --- a/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp +++ b/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp @@ -325,8 +325,8 @@ void LAGRIDPlumeModel::initH2O() { auto areas = VectorUtils::cellAreas(xEdges_, yEdges_); const double icemass = iceAerosol_.TotalIceMass_sum(areas); - double mass_WV = WV_exhaust_ - icemass; - double E_H2O = mass_WV / (MW_H2O * 1e3) * Na; + double mass_WV = WV_exhaust_ / 1e3 - icemass; // WV_exhaust converted from [g/m] -> [kg/m] + double E_H2O = mass_WV / (MW_H2O) * Na; // Spread the emitted water evenly over the cells that contain ice crystals auto localPlumeEmission = [&](std::size_t j, std::size_t i) -> double { From 4ceeaf948e80f3a1a3c0d6ff5f89882609c61232 Mon Sep 17 00:00:00 2001 From: Calebsakhtar Date: Thu, 8 Jan 2026 00:50:32 +0100 Subject: [PATCH 2/3] Add a print statement with the water difference --- Code.v05-00/src/Core/LAGRIDPlumeModel.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp b/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp index e5e6f06a..c85595b7 100644 --- a/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp +++ b/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp @@ -327,6 +327,7 @@ void LAGRIDPlumeModel::initH2O() { double mass_WV = WV_exhaust_ / 1e3 - icemass; // WV_exhaust converted from [g/m] -> [kg/m] double E_H2O = mass_WV / (MW_H2O) * Na; + std::cout << "Emitted water - ice water: " << mass_WV << " [kg/m]" << std::endl; // Spread the emitted water evenly over the cells that contain ice crystals auto localPlumeEmission = [&](std::size_t j, std::size_t i) -> double { From d0fa9c85293ce96d386b8ddbf6b6ec6248ee6b5f Mon Sep 17 00:00:00 2001 From: Calebsakhtar Date: Sat, 24 Jan 2026 01:36:07 +0000 Subject: [PATCH 3/3] Remove the debugging print statement --- Code.v05-00/src/Core/LAGRIDPlumeModel.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp b/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp index c85595b7..e5e6f06a 100644 --- a/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp +++ b/Code.v05-00/src/Core/LAGRIDPlumeModel.cpp @@ -327,7 +327,6 @@ void LAGRIDPlumeModel::initH2O() { double mass_WV = WV_exhaust_ / 1e3 - icemass; // WV_exhaust converted from [g/m] -> [kg/m] double E_H2O = mass_WV / (MW_H2O) * Na; - std::cout << "Emitted water - ice water: " << mass_WV << " [kg/m]" << std::endl; // Spread the emitted water evenly over the cells that contain ice crystals auto localPlumeEmission = [&](std::size_t j, std::size_t i) -> double {