Skip to content

Commit

Permalink
Merge branch 'development' into dg/moisture_model
Browse files Browse the repository at this point in the history
  • Loading branch information
debog committed Mar 8, 2024
2 parents 2c40cb6 + fad11b6 commit 2975396
Show file tree
Hide file tree
Showing 18 changed files with 13 additions and 1,460 deletions.
5 changes: 0 additions & 5 deletions CMake/BuildERFExe.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ function(build_erf_lib erf_lib_name)
${SRC_DIR}/Microphysics/Kessler/Kessler.cpp
${SRC_DIR}/Microphysics/Kessler/Diagnose_Kessler.cpp
${SRC_DIR}/Microphysics/Kessler/Update_Kessler.cpp
${SRC_DIR}/Microphysics/FastEddy/Init_FE.cpp
${SRC_DIR}/Microphysics/FastEddy/FastEddy.cpp
${SRC_DIR}/Microphysics/FastEddy/Diagnose_FE.cpp
${SRC_DIR}/Microphysics/FastEddy/Update_FE.cpp
${SRC_DIR}/LandSurfaceModel/SLM/SLM.cpp
${SRC_DIR}/LandSurfaceModel/MM5/MM5.cpp
)
Expand Down Expand Up @@ -212,7 +208,6 @@ function(build_erf_lib erf_lib_name)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/Microphysics/Null)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/Microphysics/SAM)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/Microphysics/Kessler)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/Microphysics/FastEddy)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/LandSurfaceModel)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/LandSurfaceModel/Null)
target_include_directories(${erf_lib_name} PUBLIC ${SRC_DIR}/LandSurfaceModel/SLM)
Expand Down
5 changes: 0 additions & 5 deletions Exec/Make.ERF
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,6 @@ include $(ERF_MOISTURE_NULL_DIR)/Make.package
VPATH_LOCATIONS += $(ERF_MOISTURE_NULL_DIR)
INCLUDE_LOCATIONS += $(ERF_MOISTURE_NULL_DIR)

ERF_MOISTURE_FE_DIR = $(ERF_SOURCE_DIR)/Microphysics/FastEddy
include $(ERF_MOISTURE_FE_DIR)/Make.package
VPATH_LOCATIONS += $(ERF_MOISTURE_FE_DIR)
INCLUDE_LOCATIONS += $(ERF_MOISTURE_FE_DIR)

ERF_MOISTURE_SAM_DIR = $(ERF_SOURCE_DIR)/Microphysics/SAM
include $(ERF_MOISTURE_SAM_DIR)/Make.package
VPATH_LOCATIONS += $(ERF_MOISTURE_SAM_DIR)
Expand Down
1 change: 0 additions & 1 deletion Exec/RegTests/Bubble/inputs_BF02_moist_bubble
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ erf.moistscal_vert_adv_type = "Upwind_3rd"
# PHYSICS OPTIONS
erf.les_type = "None"
erf.pbl_type = "None"
#erf.moisture_model = "FastEddy"
erf.moisture_model = "Kessler_NoRain"
erf.buoyancy_type = 1
erf.use_moist_background = true
Expand Down
2 changes: 1 addition & 1 deletion Exec/SquallLine_2D/inputs_moisture
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ amr.check_int = 1000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # root name of plotfile
erf.plot_int_1 = 60 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhotheta rhoQ1 rhoQ2 rhoQ3 x_velocity y_velocity z_velocity pressure theta temp qv qc qrain pert_dens
erf.plot_vars_1 = density rhotheta rhoQ1 rhoQ2 rhoQ3 x_velocity y_velocity z_velocity pressure theta temp qv qc qrain rain_accum pert_dens

# SOLVER CHOICE
erf.use_gravity = true
Expand Down
2 changes: 1 addition & 1 deletion Exec/SquallLine_2D/inputs_moisture_Gabersek
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ amr.check_int = 1000 # number of timesteps between checkpoints
# PLOTFILES
erf.plot_file_1 = plt # root name of plotfile
erf.plot_int_1 = 100 # number of timesteps between plotfiles
erf.plot_vars_1 = density rhotheta rhoQ1 rhoQ2 rhoQ3 x_velocity y_velocity z_velocity pressure theta temp qv qc qrain pert_dens
erf.plot_vars_1 = density rhotheta rhoQ1 rhoQ2 rhoQ3 x_velocity y_velocity z_velocity pressure theta temp qv qc qrain rain_accum pert_dens

# SOLVER CHOICE
erf.use_gravity = true
Expand Down
6 changes: 2 additions & 4 deletions Source/DataStructs/DataStruct.H
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ enum struct MoistureModelType{
};

enum struct MoistureType {
Kessler, SAM, FastEddy, Kessler_NoRain, None
Kessler, SAM, Kessler_NoRain, None
};

enum struct WindFarmType {
Expand Down Expand Up @@ -95,16 +95,14 @@ struct SolverChoice {
moisture_type = MoistureType::Kessler;
}else if (moisture_model_string == "Kessler_NoRain") {
moisture_type = MoistureType::Kessler_NoRain;
} else if (moisture_model_string == "FastEddy") {
moisture_type = MoistureType::FastEddy;
} else {
moisture_type = MoistureType::None;
}

// TODO: should we set default for dry??
// Set a different default for moist vs dry
if (moisture_type != MoistureType::None) {
if (moisture_type == MoistureType::FastEddy ||
if (moisture_type == MoistureType::Kessler_NoRain ||
moisture_type == MoistureType::SAM) {
buoyancy_type = 1; // asserted in make buoyancy
} else {
Expand Down
7 changes: 7 additions & 0 deletions Source/IO/Plotfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,13 @@ ERF::WritePlotFile (int which, Vector<std::string> plot_var_names)
MultiFab::Divide(mf[lev], Sm, Rho_comp , mf_comp, 1, 0);
mf_comp += 1;
}

if (containerHasElement(plot_var_names, "rain_accum"))
{
MultiFab rain_accum_mf(*(qmoist[lev][0]), make_alias, 0, 1);
MultiFab::Copy(mf[lev],rain_accum_mf,0,mf_comp,1,0);
mf_comp += 1;
}
}

#ifdef ERF_USE_PARTICLES
Expand Down
Loading

0 comments on commit 2975396

Please sign in to comment.