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