-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #227 from eagles-project/oscar/mo_usrrxt
Oscar/mo usrrxt
- Loading branch information
Showing
5 changed files
with
94 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// mam4xx: Copyright (c) 2022, | ||
// Battelle Memorial Institute and | ||
// National Technology & Engineering Solutions of Sandia, LLC (NTESS) | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
|
||
#include <mam4xx/mam4.hpp> | ||
|
||
#include <mam4xx/aero_config.hpp> | ||
#include <mam4xx/gas_chem.hpp> | ||
#include <skywalker.hpp> | ||
#include <validation.hpp> | ||
|
||
using namespace skywalker; | ||
using namespace mam4; | ||
using namespace gas_chemistry; | ||
|
||
void usrrxt(Ensemble *ensemble) { | ||
|
||
ensemble->process([=](const Input &input, Output &output) { | ||
const Real temperature = input.get_array("temp")[0]; | ||
const Real mtot = input.get_array("mtot")[0]; | ||
|
||
auto rxt = input.get_array("rxt"); | ||
const auto invariants = input.get_array("invariants"); | ||
const int usr_HO2_HO2_ndx = int(input.get_array("usr_HO2_HO2_ndx")[0]) - 1; | ||
const int usr_DMS_OH_ndx = int(input.get_array("usr_DMS_OH_ndx")[0]) - 1; | ||
const int usr_SO2_OH_ndx = int(input.get_array("usr_SO2_OH_ndx")[0]) - 1; | ||
const int inv_h2o_ndx = int(input.get_array("inv_h2o_ndx")[0]) - 1; | ||
|
||
usrrxt(rxt.data(), // inout | ||
temperature, invariants.data(), mtot, usr_HO2_HO2_ndx, | ||
usr_DMS_OH_ndx, usr_SO2_OH_ndx, inv_h2o_ndx); | ||
|
||
output.set("rxt", rxt); | ||
}); | ||
} |
Submodule mam_x_validation
updated
5 files
+31 −0 | gas_chem/mam_usrrxt_merged.py | |
+28 −0 | gas_chem/mam_usrrxt_ts_1416.py | |
+20 −0 | gas_chem/usrrxt_merged.yaml | |
+18 −0 | gas_chem/usrrxt_ts_1416.yaml | |
+3 −1 | scripts/compare_mam4xx_mam4.py |