Skip to content

Commit fad11b6

Browse files
nataraj2Mahesh NatarajanAMLattanziasalmgren
authored
Plot rain accumulation (#1478)
Co-authored-by: Mahesh Natarajan <[email protected]> Co-authored-by: Aaron M. Lattanzi <[email protected]> Co-authored-by: Ann Almgren <[email protected]>
1 parent c25fdba commit fad11b6

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

Exec/SquallLine_2D/inputs_moisture

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ amr.check_int = 1000 # number of timesteps between checkpoints
3838
# PLOTFILES
3939
erf.plot_file_1 = plt # root name of plotfile
4040
erf.plot_int_1 = 60 # number of timesteps between plotfiles
41-
erf.plot_vars_1 = density rhotheta rhoQ1 rhoQ2 rhoQ3 x_velocity y_velocity z_velocity pressure theta temp qv qc qrain pert_dens
41+
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
4242

4343
# SOLVER CHOICE
4444
erf.use_gravity = true

Exec/SquallLine_2D/inputs_moisture_Gabersek

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ amr.check_int = 1000 # number of timesteps between checkpoints
5050
# PLOTFILES
5151
erf.plot_file_1 = plt # root name of plotfile
5252
erf.plot_int_1 = 100 # number of timesteps between plotfiles
53-
erf.plot_vars_1 = density rhotheta rhoQ1 rhoQ2 rhoQ3 x_velocity y_velocity z_velocity pressure theta temp qv qc qrain pert_dens
53+
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
5454

5555
# SOLVER CHOICE
5656
erf.use_gravity = true

Source/IO/Plotfile.cpp

+7
Original file line numberDiff line numberDiff line change
@@ -766,6 +766,13 @@ ERF::WritePlotFile (int which, Vector<std::string> plot_var_names)
766766
MultiFab::Divide(mf[lev], Sm, Rho_comp , mf_comp, 1, 0);
767767
mf_comp += 1;
768768
}
769+
770+
if (containerHasElement(plot_var_names, "rain_accum"))
771+
{
772+
MultiFab rain_accum_mf(*(qmoist[lev][0]), make_alias, 0, 1);
773+
MultiFab::Copy(mf[lev],rain_accum_mf,0,mf_comp,1,0);
774+
mf_comp += 1;
775+
}
769776
}
770777

771778
#ifdef ERF_USE_PARTICLES

Source/Microphysics/Kessler/Init_Kessler.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void Kessler::Init (const MultiFab& cons_in,
2929
m_gtoe = grids;
3030

3131
MicVarMap.resize(m_qmoist_size);
32-
MicVarMap = {MicVar_Kess::qt, MicVar_Kess::qv, MicVar_Kess::qcl, MicVar_Kess::qp, MicVar_Kess::rain_accum};
32+
MicVarMap = {MicVar_Kess::rain_accum, MicVar_Kess::qt, MicVar_Kess::qv, MicVar_Kess::qcl, MicVar_Kess::qp};
3333

3434
// initialize microphysics variables
3535
for (auto ivar = 0; ivar < MicVar_Kess::NumVars; ++ivar) {

0 commit comments

Comments
 (0)