Skip to content

Commit

Permalink
Compiled with ABL in debug mode. Need to remove some unused params an…
Browse files Browse the repository at this point in the history
…d test.
  • Loading branch information
AMLattanzi committed Oct 23, 2024
1 parent 134cf1d commit 585db67
Show file tree
Hide file tree
Showing 45 changed files with 65 additions and 110 deletions.
10 changes: 0 additions & 10 deletions Exec/ABL/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,6 @@ Problem::init_custom_pert(
1e-12);
}
}
if (state_pert.nComp() > RhoQKE_comp) {
// PBL
state_pert(i, j, k, RhoQKE_comp) = r_hse(i,j,k) * 2.0 * parms_d.KE_0;
if (parms_d.KE_decay_height > 0) {
// scale initial SGS kinetic energy with height
state_pert(i, j, k, RhoQKE_comp) *= max(
std::pow(1 - min(z/parms_d.KE_decay_height,1.0), parms_d.KE_decay_order),
1e-12);
}
}

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_GABLS1_mynn25
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ erf.check_int = -1 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 300 # number of timesteps between plotfiles
erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta rhoQKE Kmv Khv
erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta rhoKE Kmv Khv


# SOLVER CHOICE
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL/inputs_GABLS1_ysu
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ erf.check_int = -1 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 300 # number of timesteps between plotfiles
erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta rhoQKE Kmv Khv Lpbl
erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta rhoKE Kmv Khv Lpbl


# SOLVER CHOICE
Expand Down
2 changes: 1 addition & 1 deletion Exec/ABL_input_sounding/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ProbParm : ProbParmDefaults {
amrex::Real rho_0 = 0.0;
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real U_0 = 0.0;
amrex::Real V_0 = 0.0;
Expand Down
6 changes: 3 additions & 3 deletions Exec/ABL_input_sounding/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
pp.query("rho_0", parms.rho_0);
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_0", parms.KE_0);

pp.query("U_0", parms.U_0);
pp.query("V_0", parms.V_0);
Expand Down Expand Up @@ -80,8 +80,8 @@ Problem::init_custom_pert(
// Set scalar = A_0*exp(-10r^2), where r is distance from center of domain
state_pert(i, j, k, RhoScalar_comp) = parms_d.A_0 * exp(-10.*r*r);

// Set an initial value for QKE
state_pert(i, j, k, RhoQKE_comp) = parms_d.QKE_0;
// Set an initial value for KE
state_pert(i, j, k, RhoKE_comp) = parms_d.KE_0;

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/AWAKEN/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ProbParm : ProbParmDefaults {
amrex::Real rho_0 = 0.0;
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real U_0 = 0.0;
amrex::Real V_0 = 0.0;
Expand Down
6 changes: 3 additions & 3 deletions Exec/AWAKEN/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
pp.query("rho_0", parms.rho_0);
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_0", parms.KE_0);

pp.query("U_0", parms.U_0);
pp.query("V_0", parms.V_0);
Expand Down Expand Up @@ -90,8 +90,8 @@ Problem::init_custom_pert(
// Set scalar = A_0*exp(-10r^2), where r is distance from center of domain
state_pert(i, j, k, RhoScalar_comp) = parms_d.A_0 * exp(-10.*r*r);

// Set an initial value for QKE
state_pert(i, j, k, RhoQKE_comp) = parms_d.QKE_0;
// Set an initial value for KE
state_pert(i, j, k, RhoKE_comp) = parms_d.KE_0;

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/AWAKEN/inputs_All_EWP
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ erf.check_int = 10000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 1200 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE vorticity SMark
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE vorticity SMark

# SOLVER CHOICE
erf.alpha_T = 0.0
Expand Down
2 changes: 1 addition & 1 deletion Exec/AWAKEN/inputs_KingPlains_EWP
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ erf.check_int = 10000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE vorticity SMark
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE vorticity SMark

# SOLVER CHOICE
erf.alpha_T = 0.0
Expand Down
2 changes: 1 addition & 1 deletion Exec/AWAKEN/inputs_KingPlains_Fitch
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ erf.check_int = 10000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE vorticity SMark
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE vorticity SMark

# SOLVER CHOICE
erf.alpha_T = 0.0
Expand Down
2 changes: 1 addition & 1 deletion Exec/AWAKEN/inputs_KingPlains_SimpleAD
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ erf.check_int = 10000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE vorticity SMark
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE vorticity SMark

# SOLVER CHOICE
erf.alpha_T = 0.0
Expand Down
1 change: 0 additions & 1 deletion Exec/DevTests/ABL_with_WW3/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct ProbParm : ProbParmDefaults {
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real KE_0 = 0.1;
amrex::Real QKE_0 = 0.1;

amrex::Real KE_decay_height = -1;
amrex::Real KE_decay_order = 1;
Expand Down
11 changes: 0 additions & 11 deletions Exec/DevTests/ABL_with_WW3/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("KE_0", parms.KE_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_decay_height", parms.KE_decay_height);
pp.query("KE_decay_order", parms.KE_decay_order);

Expand Down Expand Up @@ -135,16 +134,6 @@ Problem::init_custom_pert(
1e-12);
}
}
if (state_pert.nComp() > RhoQKE_comp) {
// PBL
state_pert(i, j, k, RhoQKE_comp) = r_hse(i,j,k) * parms_d.QKE_0;
if (parms_d.KE_decay_height > 0) {
// scale initial SGS kinetic energy with height
state_pert(i, j, k, RhoQKE_comp) *= max(
std::pow(1 - min(z/parms_d.KE_decay_height,1.0), parms_d.KE_decay_order),
1e-12);
}
}

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/DevTests/LandSurfaceModel/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ erf.molec_diff_type = "None"
erf.les_type = "Smagorinsky"
erf.Cs = 0.1
#erf.pbl_type = "MYNN2.5"
#erf.QKE_0 = 0.5
#erf.KE_0 = 0.5

erf.use_terrain = true
erf.terrain_smoothing = 2
Expand Down
2 changes: 1 addition & 1 deletion Exec/DevTests/TemperatureSource/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ProbParm : ProbParmDefaults {
amrex::Real rho_0 = 0.0;
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real U_0 = 0.0;
amrex::Real V_0 = 0.0;
Expand Down
6 changes: 3 additions & 3 deletions Exec/DevTests/TemperatureSource/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
pp.query("rho_0", parms.rho_0);
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_0", parms.KE_0);

pp.query("U_0", parms.U_0);
pp.query("V_0", parms.V_0);
Expand Down Expand Up @@ -96,8 +96,8 @@ Problem::init_custom_pert(
// Set scalar = A_0*exp(-10r^2), where r is distance from center of domain
state_pert(i, j, k, RhoScalar_comp) = parms_d.A_0 * exp(-10.*r*r);

// Set an initial value for QKE
state_pert(i, j, k, RhoQKE_comp) = parms_d.QKE_0;
// Set an initial value for KE
state_pert(i, j, k, RhoKE_comp) = parms_d.KE_0;

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/DevTests/TropicalCyclone/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "ERF_prob_common.H"

struct ProbParm : ProbParmDefaults {
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real Xc_0 = 0.0;
amrex::Real Yc_0 = 0.0;
Expand Down
8 changes: 4 additions & 4 deletions Exec/DevTests/TropicalCyclone/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Problem::Problem()
pp.query("U_0", parms.U_0); // for Rayleigh damping
pp.query("V_0", parms.V_0); // for Rayleigh damping
pp.query("W_0", parms.W_0); // for Rayleigh damping
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_0", parms.KE_0);

pp.query("Xc_0", parms.Xc_0);
pp.query("Yc_0", parms.Yc_0);
Expand Down Expand Up @@ -60,11 +60,11 @@ Problem::init_custom_pert(
// and/or set initial values for other scalars
//

// QKE for PBL
Real QKE_0 = parms.QKE_0;
// KE for MYNN or Deardorff
Real KE_0 = parms.KE_0;
amrex::ParallelFor(bx, [=] AMREX_GPU_DEVICE(int i, int j, int k) noexcept
{
state_pert(i, j, k, RhoQKE_comp) = r_hse(i,j,k) * QKE_0;
state_pert(i, j, k, RhoKE_comp) = r_hse(i,j,k) * KE_0;
});

//
Expand Down
6 changes: 3 additions & 3 deletions Exec/DevTests/TropicalCyclone/inputs
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ erf.check_int = 1000 # number of timesteps between checkpoints
#erf.plotfile_type = netcdf
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 200 # number of timesteps between plotfiles
erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta QKE Kmv Khv
erf.plot_vars_1 = density x_velocity y_velocity z_velocity pressure theta KE Kmv Khv

# SOLVER CHOICE
erf.use_gravity = true
erf.pbl_type = "MYNN2.5"
erf.advect_QKE = false
erf.advect_KE = false
erf.les_type = "None"
erf.molec_diff_type = "None"
#erf.molec_diff_type = "Constant"
Expand Down Expand Up @@ -92,7 +92,7 @@ prob.RZERO = 100e3
prob.ZZERO = 5e3
prob.RMAX = 20e3
prob.VMAX = 15.
prob.QKE_0 = 0.5
prob.KE_0 = 0.5

# INITIALIZATION WITH ATM DATA
erf.init_type = "input_sounding"
Expand Down
2 changes: 1 addition & 1 deletion Exec/EWP/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ProbParm : ProbParmDefaults {
amrex::Real rho_0 = 0.0;
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real U_0 = 0.0;
amrex::Real V_0 = 0.0;
Expand Down
6 changes: 3 additions & 3 deletions Exec/EWP/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
pp.query("rho_0", parms.rho_0);
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_0", parms.KE_0);

pp.query("U_0", parms.U_0);
pp.query("V_0", parms.V_0);
Expand Down Expand Up @@ -87,8 +87,8 @@ Problem::init_custom_pert(
// Set scalar = A_0*exp(-10r^2), where r is distance from center of domain
state_pert(i, j, k, RhoScalar_comp) = parms_d.A_0 * exp(-10.*r*r);

// Set an initial value for QKE
state_pert(i, j, k, RhoQKE_comp) = parms_d.QKE_0;
// Set an initial value for KE
state_pert(i, j, k, RhoKE_comp) = parms_d.KE_0;

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/EWP/inputs_1WT_lat_lon
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ erf.check_int = 1000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE num_turb vorticity
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE num_turb vorticity

# ADVECTION SCHEMES
erf.dycore_horiz_adv_type = "Centered_2nd"
Expand Down
2 changes: 1 addition & 1 deletion Exec/EWP/inputs_1WT_x_y
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ erf.check_int = 1000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE num_turb vorticity
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE num_turb vorticity

# ADVECTION SCHEMES
erf.dycore_horiz_adv_type = "Centered_2nd"
Expand Down
2 changes: 1 addition & 1 deletion Exec/EWP/inputs_WindFarm_lat_lon
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ erf.check_int = 10000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 1000 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE num_turb vorticity
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE num_turb vorticity

# SOLVER CHOICE
erf.alpha_T = 0.0
Expand Down
2 changes: 1 addition & 1 deletion Exec/EWP/inputs_WindFarm_x_y
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ erf.check_int = 10000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # prefix of plotfile name
erf.plot_int_1 = 1000 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta QKE num_turb vorticity
erf.plot_vars_1 = density rhoadv_0 x_velocity y_velocity z_velocity pressure temp theta KE num_turb vorticity

# SOLVER CHOICE
erf.alpha_T = 0.0
Expand Down
4 changes: 2 additions & 2 deletions Exec/RegTests/Bomex/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Problem::Problem (const Real* problo, const Real* probhi)
pp.query("rho_0", parms.rho_0);
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("QKE_0", parms.KE_0);
pp.query("KE_0", parms.KE_0);

pp.query("U_0", parms.U_0);
pp.query("V_0", parms.V_0);
Expand Down Expand Up @@ -129,7 +129,7 @@ Problem::init_custom_pert (
// Set scalar = A_0*exp(-10r^2), where r is distance from center of domain
state_pert(i, j, k, RhoScalar_comp) = parms_d.A_0 * exp(-10.*r*r);

// Set an initial value for QKE
// Set an initial value for KE
if (parms_d.custom_TKE) {
state_pert(i, j, k, RhoKE_comp) = (1.0 - z/prob_hi[2]) * r_hse(i,j,k);
} else {
Expand Down
1 change: 0 additions & 1 deletion Exec/RegTests/TurbulentInflow/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ struct ProbParm : ProbParmDefaults {
amrex::Real T_0 = 300.0;
amrex::Real A_0 = 1.0;
amrex::Real KE_0 = 0.1;
amrex::Real QKE_0 = 0.1;

amrex::Real KE_decay_height = -1;
amrex::Real KE_decay_order = 1;
Expand Down
11 changes: 0 additions & 11 deletions Exec/RegTests/TurbulentInflow/ERF_prob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Problem::Problem(const amrex::Real* problo, const amrex::Real* probhi)
pp.query("T_0", parms.T_0);
pp.query("A_0", parms.A_0);
pp.query("KE_0", parms.KE_0);
pp.query("QKE_0", parms.QKE_0);
pp.query("KE_decay_height", parms.KE_decay_height);
pp.query("KE_decay_order", parms.KE_decay_order);

Expand Down Expand Up @@ -135,16 +134,6 @@ Problem::init_custom_pert(
1e-12);
}
}
if (state_pert.nComp() > RhoQKE_comp) {
// PBL
state_pert(i, j, k, RhoQKE_comp) = r_hse(i,j,k) * parms_d.QKE_0;
if (parms_d.KE_decay_height > 0) {
// scale initial SGS kinetic energy with height
state_pert(i, j, k, RhoQKE_comp) *= max(
std::pow(1 - min(z/parms_d.KE_decay_height,1.0), parms_d.KE_decay_order),
1e-12);
}
}

if (use_moisture) {
state_pert(i, j, k, RhoQ1_comp) = 0.0;
Expand Down
2 changes: 1 addition & 1 deletion Exec/SimpleActuatorDisk/ERF_prob.H
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ProbParm : ProbParmDefaults {
amrex::Real rho_0 = 0.0;
amrex::Real T_0 = 0.0;
amrex::Real A_0 = 1.0;
amrex::Real QKE_0 = 0.1;
amrex::Real KE_0 = 0.1;

amrex::Real U_0 = 0.0;
amrex::Real V_0 = 0.0;
Expand Down
Loading

0 comments on commit 585db67

Please sign in to comment.