Skip to content

Commit

Permalink
Merge branch 'development' into cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AMLattanzi authored Dec 17, 2024
2 parents 261a7c3 + 4c6445b commit 3a54999
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 17 deletions.
6 changes: 3 additions & 3 deletions Exec/ABL/inputs_GABLS1_deardorff
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,10 @@ erf.Ck = 0.1 # Coefficient in Moeng1984, Eqn. 19
erf.Ce = 0.7 # Note: Ce_lcoeff = C_e - 1.9*C_k
erf.Ce_wall = 3.9 # To account for "wall effects"

erf.rayleigh_damp_U = true
erf.rayleigh_damp_V = true
erf.rayleigh_damp_U = false
erf.rayleigh_damp_V = false
erf.rayleigh_damp_W = true
erf.rayleigh_damp_T = true
erf.rayleigh_damp_T = false
erf.rayleigh_dampcoef = 0.2 # [1/s] following FastEddy
erf.rayleigh_zdamp = 100. # from Beare et al. 2006, "most models applied gravity wave damping above 300 m"

Expand Down
8 changes: 4 additions & 4 deletions Exec/MoistRegTests/Bomex/input_Kessler
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 3200 3200 4000
amr.n_cell = 32 32 100
geometry.prob_extent = 6400 6400 4000
amr.n_cell = 64 64 100

geometry.is_periodic = 1 1 0

Expand Down Expand Up @@ -64,8 +64,8 @@ erf.dycore_horiz_adv_type = Upwind_3rd
erf.dycore_vert_adv_type = Upwind_3rd
erf.dryscal_horiz_adv_type = Upwind_3rd
erf.dryscal_vert_adv_type = Upwind_3rd
erf.moistscal_horiz_adv_type = WENO5
erf.moistscal_vert_adv_type = WENO5
erf.moistscal_horiz_adv_type = Upwind_3rd
erf.moistscal_vert_adv_type = Upwind_3rd

erf.moisture_model = "Kessler_NoRain"
erf.buoyancy_type = 1
Expand Down
8 changes: 4 additions & 4 deletions Exec/MoistRegTests/Bomex/input_SAM
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ amrex.fpe_trap_invalid = 1
fabarray.mfiter_tile_size = 1024 1024 1024

# PROBLEM SIZE & GEOMETRY
geometry.prob_extent = 3200 3200 4000
amr.n_cell = 32 32 100
geometry.prob_extent = 6400 6400 4000
amr.n_cell = 64 64 100

geometry.is_periodic = 1 1 0

Expand Down Expand Up @@ -64,8 +64,8 @@ erf.dycore_horiz_adv_type = Upwind_3rd
erf.dycore_vert_adv_type = Upwind_3rd
erf.dryscal_horiz_adv_type = Upwind_3rd
erf.dryscal_vert_adv_type = Upwind_3rd
erf.moistscal_horiz_adv_type = WENO5
erf.moistscal_vert_adv_type = WENO5
erf.moistscal_horiz_adv_type = Upwind_3rd
erf.moistscal_vert_adv_type = Upwind_3rd

erf.moisture_model = "SAM"
erf.buoyancy_type = 1
Expand Down
3 changes: 2 additions & 1 deletion Source/Microphysics/ERF_EulerianMicrophysics.H
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ public:
const amrex::Real&, /*!< current time */
const SolverChoice &solverChoice, /*!< Solver choice object */
amrex::Vector<amrex::Vector<amrex::MultiFab>>&, /*!< Dycore state variables */
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& /*!< terrain */) override
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>&, /*!< terrain */
const amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& ) override
{
m_moist_model[lev]->Advance(dt_advance, solverChoice);
}
Expand Down
5 changes: 3 additions & 2 deletions Source/Microphysics/ERF_LagrangianMicrophysics.H
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,11 @@ public:
const amrex::Real& time, /*!< current time */
const SolverChoice& /*solverChoice*/, /*!< Solver choice object */
amrex::Vector<amrex::Vector<amrex::MultiFab>>& a_vars, /*!< Dycore state variables */
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& a_z/*!< terrain */) override
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& a_z/*!< terrain */,
const amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& a_phys_bc_types ) override
{
if (lev > 0) return;
m_moist_model->Advance(dt_advance, iter, time, a_vars, a_z);
m_moist_model->Advance(dt_advance, iter, time, a_vars, a_z, a_phys_bc_types);
}

/*! \brief update microphysics variables from ERF state variables */
Expand Down
4 changes: 3 additions & 1 deletion Source/Microphysics/ERF_Microphysics.H
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <vector>
#include <string>
#include "ERF_DataStruct.H"
#include "ERF_IndexDefines.H"

/*! \brief Base class for microphysics interface */
class Microphysics {
Expand Down Expand Up @@ -39,7 +40,8 @@ public:
const amrex::Real&,
const SolverChoice&,
amrex::Vector<amrex::Vector<amrex::MultiFab>>&,
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& ) = 0;
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>&,
const amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& ) = 0;

/*! \brief update microphysics variables from ERF state variables */
virtual void Update_Micro_Vars_Lev (const int&, amrex::MultiFab&) = 0;
Expand Down
4 changes: 3 additions & 1 deletion Source/Microphysics/Null/ERF_NullMoistLagrangian.H
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifdef ERF_USE_PARTICLES

#include <AMReX_AmrParGDB.H>
#include "ERF_IndexDefines.H"
#include "ERF_NullMoist.H"

/* forward declaration */
Expand Down Expand Up @@ -53,7 +54,8 @@ public:
const int&, /* iter */
const amrex::Real&, /* time */
amrex::Vector<amrex::Vector<amrex::MultiFab>>&, /* state variables */
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>& /* terrain */) { }
const amrex::Vector<std::unique_ptr<amrex::MultiFab>>&, /* terrain */
const amrex::GpuArray<ERF_BC, AMREX_SPACEDIM*2>& ) { }

protected:

Expand Down
2 changes: 1 addition & 1 deletion Source/TimeIntegration/ERF_AdvanceMicrophysics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void ERF::advance_microphysics (int lev,
{
if (solverChoice.moisture_type != MoistureType::None) {
micro->Update_Micro_Vars_Lev(lev, cons);
micro->Advance(lev, dt_advance, iteration, time, solverChoice, vars_new, z_phys_nd);
micro->Advance(lev, dt_advance, iteration, time, solverChoice, vars_new, z_phys_nd, phys_bc_type);
micro->Update_State_Vars_Lev(lev, cons);
}
}

0 comments on commit 3a54999

Please sign in to comment.