1 #ifndef ERF_SHOC_TRANSPORT_STRUCT_H_
2 #define ERF_SHOC_TRANSPORT_STRUCT_H_
4 #include <AMReX_ParmParse.H>
55 std::transform(value.begin(), value.end(), value.begin(),
56 [] (
unsigned char c) { return static_cast<char>(std::tolower(c)); });
63 std::string& error_message)
66 if (value ==
"state_update") {
70 if (value ==
"host_diffusion") {
72 "erf.shoc.transport_mode = host_diffusion has been removed for native SHOC. Use erf.shoc.transport_mode = state_update.";
75 if (value ==
"tendencies") {
77 "erf.shoc.transport_mode = tendencies has been removed for native SHOC. Use erf.shoc.transport_mode = state_update. Native SHOC now applies its coupled column increment before the dycore to avoid splitting theta and momentum from moisture.";
81 error_message =
"erf.shoc.transport_mode must be 'state_update'";
88 std::string& error_message)
91 if (value ==
"none") {
95 if (value ==
"state_update") {
99 if (value ==
"host_diffusion") {
101 "erf.shoc.momentum_transport = host_diffusion has been removed for native SHOC. Use 'state_update' to retain SHOC momentum transport, or 'none' to disable SHOC momentum transport.";
105 error_message =
"erf.shoc.momentum_transport must be 'none' or 'state_update'";
121 amrex::ParmParse
pp(
"erf.shoc");
123 std::string transport_mode_string;
124 if (
pp.query(
"transport_mode", transport_mode_string)) {
125 std::string error_message;
129 amrex::Abort(error_message.c_str());
133 std::string momentum_transport_string;
134 if (
pp.query(
"momentum_transport", momentum_transport_string)) {
135 std::string error_message;
139 amrex::Abort(error_message.c_str());
bool parse_shoc_momentum_transport_string(std::string value, ShocMomentumTransport &mode, std::string &error_message)
Definition: ERF_ShocTransportStruct.H:86
bool parse_shoc_transport_mode_string(std::string value, ShocTransportMode &mode, std::string &error_message)
Definition: ERF_ShocTransportStruct.H:61
const char * shoc_transport_mode_name(ShocTransportMode mode)
Definition: ERF_ShocTransportStruct.H:22
ShocMomentumTransport
Definition: ERF_ShocTransportStruct.H:16
bool shoc_disables_momentum_transport(ShocMomentumTransport mode)
Definition: ERF_ShocTransportStruct.H:47
bool shoc_uses_momentum_state_update(ShocMomentumTransport mode)
Definition: ERF_ShocTransportStruct.H:41
std::string shoc_to_lower(std::string value)
Definition: ERF_ShocTransportStruct.H:53
const char * shoc_momentum_transport_name(ShocMomentumTransport mode)
Definition: ERF_ShocTransportStruct.H:31
void read_shoc_transport_modes(ShocTransportMode &transport_mode, ShocMomentumTransport &momentum_transport)
Read the native SHOC transport modes from the erf.shoc input namespace.
Definition: ERF_ShocTransportStruct.H:118
ShocTransportMode
Definition: ERF_ShocTransportStruct.H:11