ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
ERF_WriteBndryPlanes.H
Go to the documentation of this file.
1 #ifndef ERF_WRITEBNDRYPLANES_H
2 #define ERF_WRITEBNDRYPLANES_H
3 
4 #include "AMReX_Gpu.H"
5 #include "AMReX_AmrCore.H"
6 #include <AMReX_BndryRegister.H>
7 
8 
9 /** Interface for writing boundary planes
10  *
11  * This class performs the necessary file operations to write boundary planes
12  *
13  */
15 {
16 public:
17  explicit WriteBndryPlanes (amrex::Vector<amrex::BoxArray>& grids,
18  amrex::Vector<amrex::Geometry>& geom);
19 
20  void write_planes (int t_step, amrex::Real time,
21  amrex::Vector<amrex::Vector<amrex::MultiFab>>& vars_new,
22  bool is_moist);
23 
24 private:
25 
26  //! IO output box region
27  amrex::Box target_box;
28 
29  //! Geometry objects for all levels
30  amrex::Vector<amrex::Geometry>& m_geom;
31 
32  //! File name for IO
33  std::string m_filename{""};
34 
35  //! File name for Native time file
36  std::string m_time_file{""};
37 
38  //! Variables for IO
39  amrex::Vector<std::string> m_var_names;
40 
41  //! Timestep and times to be stored in time.dat
42  amrex::Vector<amrex::Real> m_in_times;
43  amrex::Vector<int> m_in_timesteps;
44 
45  // This defaults to level 0, but if we can fit the whole target_box
46  // inside a higher level, we will use the finest data possible
47  static int bndry_lev;
48 
49  //! controls extents on native bndry output
50  const int m_in_rad = 1;
51  const int m_out_rad = 1;
52  const int m_extent_rad = 0;
53 };
54 
55 #endif /* ERF_BOUNDARYPLANE_H */
Definition: ERF_WriteBndryPlanes.H:15
amrex::Vector< amrex::Geometry > & m_geom
Geometry objects for all levels.
Definition: ERF_WriteBndryPlanes.H:30
static int bndry_lev
Definition: ERF_WriteBndryPlanes.H:47
amrex::Vector< amrex::Real > m_in_times
Timestep and times to be stored in time.dat.
Definition: ERF_WriteBndryPlanes.H:42
const int m_out_rad
Definition: ERF_WriteBndryPlanes.H:51
const int m_extent_rad
Definition: ERF_WriteBndryPlanes.H:52
WriteBndryPlanes(amrex::Vector< amrex::BoxArray > &grids, amrex::Vector< amrex::Geometry > &geom)
Definition: ERF_WriteBndryPlanes.cpp:54
amrex::Box target_box
IO output box region.
Definition: ERF_WriteBndryPlanes.H:27
void write_planes(int t_step, amrex::Real time, amrex::Vector< amrex::Vector< amrex::MultiFab >> &vars_new, bool is_moist)
Definition: ERF_WriteBndryPlanes.cpp:119
const int m_in_rad
controls extents on native bndry output
Definition: ERF_WriteBndryPlanes.H:50
amrex::Vector< int > m_in_timesteps
Definition: ERF_WriteBndryPlanes.H:43
amrex::Vector< std::string > m_var_names
Variables for IO.
Definition: ERF_WriteBndryPlanes.H:39
std::string m_time_file
File name for Native time file.
Definition: ERF_WriteBndryPlanes.H:36
std::string m_filename
File name for IO.
Definition: ERF_WriteBndryPlanes.H:33