Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix oops in order of arguments #1933

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Exec/MoistRegTests/Bubble/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions Exec/MoistRegTests/SquallLine_2D/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
10 changes: 5 additions & 5 deletions Exec/MoistRegTests/SuperCell_3D/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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);
Expand Down
Loading