ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_init_rayleigh_damping.H
Go to the documentation of this file.
1 #include <ERF_ParFunctions.H>
2 
3 /**
4  * Initialize a Rayleigh damping layer with the same structure as in WRF, based
5  * on Durran and Klemp 1983
6 */
7 void
8 erf_init_rayleigh (amrex::Vector<amrex::Vector<amrex::Real> >& rayleigh_ptrs,
9  amrex::Geometry const& geom,
10  std::unique_ptr<amrex::MultiFab>& /*z_phys_nd*/,
11  amrex::Real /*zdamp*/) override
12 {
13  const int khi = geom.Domain().bigEnd()[2];
14  for (int k = 0; k <= khi; k++)
15  {
16  rayleigh_ptrs[Rayleigh::ubar][k] = parms.U_0;
17  rayleigh_ptrs[Rayleigh::vbar][k] = parms.V_0;
18  rayleigh_ptrs[Rayleigh::wbar][k] = parms.W_0;
19  rayleigh_ptrs[Rayleigh::thetabar][k] = parms.T_0;
20  }
21 }
@ ubar
Definition: ERF_DataStruct.H:66
@ wbar
Definition: ERF_DataStruct.H:66
@ vbar
Definition: ERF_DataStruct.H:66
@ thetabar
Definition: ERF_DataStruct.H:66
void erf_init_rayleigh(amrex::Vector< amrex::Vector< amrex::Real > > &rayleigh_ptrs, amrex::Geometry const &geom, std::unique_ptr< amrex::MultiFab > &, amrex::Real) override
Definition: ERF_init_rayleigh_damping.H:8