ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_ForestDrag.H
Go to the documentation of this file.
1 #ifndef ERF_FORESTDRAG_H_
2 #define ERF_FORESTDRAG_H_
3 
4 #include <memory>
5 #include <AMReX_MultiFab.H>
6 
7 /*
8  ForestDrag flow physics adapted from:
9  Lalic & Mihailovic (2004)
10  https://doi.org/10.1175/1520-0450(2004)043<0641:AERDLD>2.0.CO;2
11  */
13 {
14 public:
15 
16  explicit ForestDrag (std::string forestfile);
17 
18  ~ForestDrag () = default;
19 
20  void
21  define_drag_field (const amrex::BoxArray& ba,
22  const amrex::DistributionMapping& dm,
23  amrex::Geometry& geom,
24  amrex::MultiFab* z_phys_nd);
25 
26  amrex::MultiFab*
27  get_drag_field () { return m_forest_drag.get(); }
28 
29 private:
30  amrex::Vector<amrex::Real> m_type_forest;
31  amrex::Vector<amrex::Real> m_x_forest;
32  amrex::Vector<amrex::Real> m_y_forest;
33  amrex::Vector<amrex::Real> m_height_forest;
34  amrex::Vector<amrex::Real> m_diameter_forest;
35  amrex::Vector<amrex::Real> m_cd_forest;
36  amrex::Vector<amrex::Real> m_lai_forest;
37  amrex::Vector<amrex::Real> m_laimax_forest;
38  std::unique_ptr<amrex::MultiFab> m_forest_drag;
39 };
40 #endif
Definition: ERF_ForestDrag.H:13
ForestDrag(std::string forestfile)
Definition: ERF_ForestDrag.cpp:9
amrex::Vector< amrex::Real > m_diameter_forest
Definition: ERF_ForestDrag.H:34
amrex::Vector< amrex::Real > m_laimax_forest
Definition: ERF_ForestDrag.H:37
amrex::Vector< amrex::Real > m_lai_forest
Definition: ERF_ForestDrag.H:36
amrex::Vector< amrex::Real > m_x_forest
Definition: ERF_ForestDrag.H:31
amrex::Vector< amrex::Real > m_height_forest
Definition: ERF_ForestDrag.H:33
amrex::Vector< amrex::Real > m_cd_forest
Definition: ERF_ForestDrag.H:35
amrex::MultiFab * get_drag_field()
Definition: ERF_ForestDrag.H:27
std::unique_ptr< amrex::MultiFab > m_forest_drag
Definition: ERF_ForestDrag.H:38
~ForestDrag()=default
amrex::Vector< amrex::Real > m_type_forest
Definition: ERF_ForestDrag.H:30
void define_drag_field(const amrex::BoxArray &ba, const amrex::DistributionMapping &dm, amrex::Geometry &geom, amrex::MultiFab *z_phys_nd)
Definition: ERF_ForestDrag.cpp:32
amrex::Vector< amrex::Real > m_y_forest
Definition: ERF_ForestDrag.H:32