Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
jaelynlitz committed Oct 6, 2023
1 parent a81290b commit a79d21e
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/mam4xx/mam4.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
#include <mam4xx/nucleate_ice.hpp>
#include <mam4xx/nucleation.hpp>
#include <mam4xx/rename.hpp>
#include <mam4xx/tropopause.hpp>
#include <mam4xx/water_uptake.hpp>
#include <mam4xx/wet_dep.hpp>
#include <mam4xx/tropopause.hpp>

namespace mam4 {

Expand Down
11 changes: 5 additions & 6 deletions src/mam4xx/tropopause.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ void get_dtdz(const Real pm, const Real pmk, const Real pmid1d_up,
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!*/
KOKKOS_INLINE_FUNCTION
void twmo(const ConstColumnView &temp1d, const ConstColumnView &pmid1d, const Real plimu,
const Real pliml, const Real gam, Real &trp) {
void twmo(const ConstColumnView &temp1d, const ConstColumnView &pmid1d,
const Real plimu, const Real pliml, const Real gam, Real &trp) {

// temp1d ! temperature in column [K]
// pmid1d ! midpoint pressure in column [Pa]
Expand Down Expand Up @@ -248,8 +248,8 @@ void tropopause_climate(lchnk,ncol,pmid,pint,temp,zm,zi, & ! in
#endif
KOKKOS_INLINE_FUNCTION
int tropopause_or_quit(const ConstColumnView &pmid, const ConstColumnView &pint,
const ConstColumnView &temperature, const ConstColumnView &zm,
const ConstColumnView &zi) {
const ConstColumnView &temperature,
const ConstColumnView &zm, const ConstColumnView &zi) {
// Find tropopause or quit the simulation if not found

// lchnk ! number of chunks
Expand Down Expand Up @@ -277,8 +277,7 @@ int tropopause_or_quit(const ConstColumnView &pmid, const ConstColumnView &pint,
return trop_level;
} // tropopause_or_quit


} // namespace tropopause
} // namespace tropopause
} // end namespace mam4

#endif
8 changes: 4 additions & 4 deletions src/validation/tropopause/get_dtdz.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ void get_dtdz(Ensemble *ensemble) {
const Real pmid1d_down = input.get_array("pmid1d_down")[0];
const Real temp1d_up = input.get_array("temp1d_up")[0];
const Real temp1d_down = input.get_array("temp1d_down")[0];
//const Real cnst_kap = input.get_array("cnst_kap")[0];
//const Real cnst_faktor = input.get_array("cnst_faktor")[0];
// const Real cnst_kap = input.get_array("cnst_kap")[0];
// const Real cnst_faktor = input.get_array("cnst_faktor")[0];

Real dtdz = 0;
Real tm = 0;

tropopause::get_dtdz(pm, pmk, pmid1d_up, pmid1d_down, temp1d_up, temp1d_down,
dtdz, tm);
tropopause::get_dtdz(pm, pmk, pmid1d_up, pmid1d_down, temp1d_up,
temp1d_down, dtdz, tm);

output.set("dtdz", dtdz);
output.set("tm", tm);
Expand Down
2 changes: 1 addition & 1 deletion src/validation/tropopause/tropopause_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ int main(int argc, char **argv) {
try {
if (func_name == "get_dtdz") {
get_dtdz(ensemble);
} else if(func_name == "twmo") {
} else if (func_name == "twmo") {
twmo(ensemble);
} else {
std::cerr << "Error: Function name '" << func_name
Expand Down
10 changes: 5 additions & 5 deletions src/validation/tropopause/twmo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ void twmo(Ensemble *ensemble) {
const Real pliml = input.get_array("pliml")[0];
const Real gam = input.get_array("gam")[0];
Real trp = input.get_array("trp")[0];
//const Real cnst_kap = input.get_array("cnst_kap")[0];
//const Real cnst_ka1 = input.get_array("cnst_ka1")[0];
//const Real cnst_faktor = input.get_array("cnst_faktor")[0];
// const Real cnst_kap = input.get_array("cnst_kap")[0];
// const Real cnst_ka1 = input.get_array("cnst_ka1")[0];
// const Real cnst_faktor = input.get_array("cnst_faktor")[0];

ColumnView pmid1d, temp1d;
auto pmid1d_host = View1DHost((Real *)pmid1d_in.data(), pver);
auto temp1d_host = View1DHost((Real *)temp1d_in.data(), pver);
auto pmid1d_host = View1DHost((Real *)pmid1d_in.data(), pver);
auto temp1d_host = View1DHost((Real *)temp1d_in.data(), pver);
pmid1d = haero::testing::create_column_view(pver);
temp1d = haero::testing::create_column_view(pver);
Kokkos::deep_copy(pmid1d, pmid1d_host);
Expand Down

0 comments on commit a79d21e

Please sign in to comment.