1 #ifndef ERF_FLOOD_ENGINE_H
2 #define ERF_FLOOD_ENGINE_H
5 #include <AMReX_MultiFab.H>
6 #include <AMReX_REAL.H>
65 const amrex::MultiFab&
xvel;
66 const amrex::MultiFab&
yvel;
114 virtual const char*
name ()
const = 0;
140 const amrex::MultiFab* z_phys_nd_atm) = 0;
152 virtual void start_run (amrex::Real stop_time,
int max_step,
int steps_per_coarse_step)
154 amrex::ignore_unused(stop_time, max_step, steps_per_coarse_step);
178 amrex::ignore_unused(checkpointname);
198 amrex::ignore_unused(restart_chkfile, step);
199 amrex::Abort(std::string(
"[FLOOD] flood engine \"") +
name()
200 +
"\" does not support restart from a checkpoint");
213 virtual void write_plotfile (
const std::string& plotfile_prefix, amrex::Real time,
int step)
const
215 amrex::ignore_unused(plotfile_prefix, time, step);
236 virtual const amrex::MultiFab*
plot_var (
const std::string&
name)
const
238 amrex::ignore_unused(
name);
Flood grid data structure, construction and the maps between the flood grid and the atmospheric colum...
A flood engine behind the shared coupling layer.
Definition: ERF_FloodEngine.H:109
virtual const amrex::MultiFab * plot_var(const std::string &name) const
The field plot_var_names() lists as name, on the flood grid.
Definition: ERF_FloodEngine.H:236
virtual void start_run(amrex::Real stop_time, int max_step, int steps_per_coarse_step)
Start-up after initialize(), once the run's end is known.
Definition: ERF_FloodEngine.H:152
virtual void advance(const FloodForcing &forcing)=0
Advance the flood over one step of its level.
virtual void initialize(const ERF &erf, int lev, const FloodGrid &fg, const amrex::MultiFab *z_phys_nd_atm)=0
Set the engine up on the flood grid.
virtual std::vector< std::string > plot_var_names() const
Flood fields the ERF plotfile can carry, by name.
Definition: ERF_FloodEngine.H:226
virtual void write_plotfile(const std::string &plotfile_prefix, amrex::Real time, int step) const
Write the engine's plotfile of the flood grid.
Definition: ERF_FloodEngine.H:213
virtual void read_checkpoint(const std::string &restart_chkfile, int step)
Restore the engine's state from a checkpoint on a restart.
Definition: ERF_FloodEngine.H:196
virtual void verify_prerequisites(const ERF &erf, int lev)=0
Check the engine's own inputs against the ERF configuration.
virtual bool wants_surface_precip() const
The engine takes the surface precipitation in FloodForcing.
Definition: ERF_FloodEngine.H:167
virtual ~FloodEngine()=default
virtual const char * name() const =0
Name of the engine, as erf.flood.engine selects it.
virtual void write_checkpoint(const std::string &checkpointname) const
Write the engine's own state to the checkpoint directory.
Definition: ERF_FloodEngine.H:176
Definition: ERF_InterpolationUtils.H:15
@ fg
Definition: ERF_AdvanceMorrison.cpp:111
The atmospheric state a flood engine reads for one step.
Definition: ERF_FloodEngine.H:62
const amrex::MultiFab & z_phys_cc
Cell-center height [m] of the terrain-following mesh.
Definition: ERF_FloodEngine.H:67
double time
Start of the step [s], in double as ERF's own clock.
Definition: ERF_FloodEngine.H:63
amrex::Real dt
Step of the flood grid's level [s].
Definition: ERF_FloodEngine.H:64
const amrex::MultiFab & yvel
y-velocity on y-faces [m/s], after this step's dycore
Definition: ERF_FloodEngine.H:66
const amrex::MultiFab * precip_k0
Definition: ERF_FloodEngine.H:87
const amrex::MultiFab & xvel
x-velocity on x-faces [m/s], after this step's dycore
Definition: ERF_FloodEngine.H:65
2D horizontal flood grid
Definition: ERF_FloodGrid.H:42