diff --git a/Exec/MoistRegTests/Bubble/ERF_prob.cpp b/Exec/MoistRegTests/Bubble/ERF_prob.cpp index 5edf0e671..a10728e7b 100644 --- a/Exec/MoistRegTests/Bubble/ERF_prob.cpp +++ b/Exec/MoistRegTests/Bubble/ERF_prob.cpp @@ -370,13 +370,13 @@ Problem::init_custom_pert( } theta_total = theta_back[k]*(delta_theta/300.0 + 1); - Real T = getTgivenPandTh(theta_total, p_back[k], (R_d/Cp_d)); + Real T = getTgivenPandTh(p_back[k], theta_total, (R_d/Cp_d)); rho = p_back[k]/(R_d*T*(1.0 + (R_v/R_d)*q_v_back[k])); RH = compute_relative_humidity(); Real q_v_hot = vapor_mixing_ratio(p_back[k], T, RH); // Compute background quantities - Real T_back = getTgivenPandTh(theta_back[k], p_back[k], (R_d/Cp_d)); + Real T_back = getTgivenPandTh(p_back[k], theta_back[k], (R_d/Cp_d)); Real rho_back = p_back[k]/(R_d*T_back*(1.0 + (R_v/R_d)*q_v_back[k])); // This version perturbs rho but not p diff --git a/Exec/MoistRegTests/SquallLine_2D/ERF_prob.cpp b/Exec/MoistRegTests/SquallLine_2D/ERF_prob.cpp index 01a96d0b2..3742a5f95 100644 --- a/Exec/MoistRegTests/SquallLine_2D/ERF_prob.cpp +++ b/Exec/MoistRegTests/SquallLine_2D/ERF_prob.cpp @@ -105,7 +105,7 @@ void Problem::compute_rho (const Real& z, const Real& pressure, Real& theta, Rea { theta = compute_theta(z); - T_b = getTgivenPandTh(theta, pressure, (R_d/Cp_d)); + T_b = getTgivenPandTh(pressure, theta, (R_d/Cp_d)); Real RH = compute_relative_humidity(z, parms.height, parms.z_tr, pressure, T_b); q_v = vapor_mixing_ratio(z, parms.height, pressure, T_b, RH); rho = getRhogivenTandPress(T_b, pressure, q_v); @@ -326,16 +326,16 @@ Problem::init_custom_pert ( theta_total = t[k] + delta_theta; - temperature = getTgivenPandTh(theta_total, p[k], (R_d/Cp_d)); - Real T_b = getTgivenPandTh(t[k] , p[k], (R_d/Cp_d)); + temperature = getTgivenPandTh(p[k], theta_total, (R_d/Cp_d)); + Real T_b = getTgivenPandTh(p[k], t[k] , (R_d/Cp_d)); RH = compute_relative_humidity(z, height, z_tr, p[k], T_b); Real q_v_hot = vapor_mixing_ratio(z, height, p[k], T_b, RH); rho = p[k]/(R_d*temperature*(1.0 + (R_v/R_d)*q_v_hot)); // Compute background quantities - Real temperature_back = getTgivenPandTh(t[k], p[k], (R_d/Cp_d)); - Real T_back = getTgivenPandTh(t[k], p[k], (R_d/Cp_d)); + Real temperature_back = getTgivenPandTh(p[k], t[k], (R_d/Cp_d)); + Real T_back = getTgivenPandTh(p[k], t[k], (R_d/Cp_d)); Real RH_back = compute_relative_humidity(z, height, z_tr, p[k], T_back); Real q_v_back = vapor_mixing_ratio(z, height, p[k], T_back, RH_back); diff --git a/Exec/MoistRegTests/SuperCell_3D/ERF_prob.cpp b/Exec/MoistRegTests/SuperCell_3D/ERF_prob.cpp index 2aaff6787..eed445839 100644 --- a/Exec/MoistRegTests/SuperCell_3D/ERF_prob.cpp +++ b/Exec/MoistRegTests/SuperCell_3D/ERF_prob.cpp @@ -114,7 +114,7 @@ void Problem::compute_rho (const Real& z, const Real& pressure, Real& theta, Rea { theta = compute_theta(z); - T_b = getTgivenPandTh(theta, pressure, (R_d/Cp_d)); + T_b = getTgivenPandTh(pressure, theta, (R_d/Cp_d)); Real RH = compute_relative_humidity(z, parms.height, parms.z_tr, pressure, T_b); q_v = vapor_mixing_ratio(z, parms.height, pressure, T_b, RH); @@ -335,15 +335,15 @@ Problem::init_custom_pert ( } theta_total = t[k] + delta_theta; - temperature = getTgivenPandTh(theta_total, p[k], (R_d/Cp_d)); - Real T_b = getTgivenPandTh(t[k] , p[k], (R_d/Cp_d)); + temperature = getTgivenPandTh(p[k], theta_total, (R_d/Cp_d)); + Real T_b = getTgivenPandTh(p[k], t[k] , (R_d/Cp_d)); RH = compute_relative_humidity(z, height, z_tr, p[k], T_b); Real q_v_hot = vapor_mixing_ratio(z, height, p[k], T_b, RH); rho = p[k]/(R_d*temperature*(1.0 + (R_v/R_d)*q_v_hot)); // Compute background quantities - Real temperature_back = getTgivenPandTh(t[k], p[k], (R_d/Cp_d)); - Real T_back = getTgivenPandTh(t[k], p[k], (R_d/Cp_d)); + Real temperature_back = getTgivenPandTh(p[k], t[k], (R_d/Cp_d)); + Real T_back = getTgivenPandTh(p[k], t[k], (R_d/Cp_d)); Real RH_back = compute_relative_humidity(z, height, z_tr, p[k], T_back); Real q_v_back = vapor_mixing_ratio(z, height, p[k], T_back, RH_back); Real rho_back = getRhogivenTandPress(temperature_back, p[k], q_v_back);