ERF
Energy Research and Forecasting: An Atmospheric Modeling Code
FloodEngineTemplate Class Reference

#include <ERF_FloodEngineTemplate.H>

Inheritance diagram for FloodEngineTemplate:
Collaboration diagram for FloodEngineTemplate:

Public Member Functions

const char * name () const override
 The name erf.flood.engine selects this engine by, for example "my_flood". More...
 
void verify_prerequisites (const ERF &erf, int lev) override
 
void initialize (const ERF &erf, int lev, const FloodGrid &fg, const amrex::MultiFab *z_phys_nd_atm) override
 
void start_run (amrex::Real stop_time, int max_step, int steps_per_coarse_step) override
 Optional: the run's end, once known (stop time, max_step, substeps). More...
 
void advance (const FloodForcing &forcing) override
 
bool wants_surface_precip () const override
 Optional: false for an engine that reads no precipitation (default true). More...
 
void write_checkpoint (const std::string &checkpointname) const override
 Optional: the engine's state under checkpointname/Level_<lev>/. More...
 
void read_checkpoint (const std::string &restart_chkfile, int step) override
 Optional: restore what write_checkpoint wrote (the default aborts). More...
 
void write_plotfile (const std::string &plotfile_prefix, amrex::Real time, int step) const override
 Optional: the engine's own plotfile of the flood grid. More...
 
std::vector< std::string > plot_var_names () const override
 Optional: fields for the ERF plotfile, each named "flood_...". More...
 
const amrex::MultiFab * plot_var (const std::string &name) const override
 Optional: the field plot_var_names() lists as name, on the flood grid. More...
 
- Public Member Functions inherited from FloodEngine
virtual ~FloodEngine ()=default
 

Member Function Documentation

◆ advance()

void FloodEngineTemplate::advance ( const FloodForcing &  forcing)
overridevirtual

Advance over [forcing.time, forcing.time + forcing.dt]. forcing.precip_k0 holds this step's liquid and frozen precipitation per atmospheric column [kg/m2]; fill_flood_from_atm_k0 (ERF_FloodGrid.H) copies a component onto the flood grid.

Implements FloodEngine.

◆ initialize()

void FloodEngineTemplate::initialize ( const ERF &  erf,
int  lev,
const FloodGrid &  fg,
const amrex::MultiFab *  z_phys_nd_atm 
)
overridevirtual

Allocate the engine's fields on fg.ba and fg.dm and set its initial state. z_phys_nd_atm is the terrain the atmosphere sees.

Implements FloodEngine.

◆ name()

const char* FloodEngineTemplate::name ( ) const
overridevirtual

The name erf.flood.engine selects this engine by, for example "my_flood".

Implements FloodEngine.

◆ plot_var()

const amrex::MultiFab* FloodEngineTemplate::plot_var ( const std::string &  name) const
overridevirtual

Optional: the field plot_var_names() lists as name, on the flood grid.

Reimplemented from FloodEngine.

◆ plot_var_names()

std::vector<std::string> FloodEngineTemplate::plot_var_names ( ) const
overridevirtual

Optional: fields for the ERF plotfile, each named "flood_...".

Reimplemented from FloodEngine.

◆ read_checkpoint()

void FloodEngineTemplate::read_checkpoint ( const std::string &  restart_chkfile,
int  step 
)
overridevirtual

Optional: restore what write_checkpoint wrote (the default aborts).

Reimplemented from FloodEngine.

◆ start_run()

void FloodEngineTemplate::start_run ( amrex::Real  stop_time,
int  max_step,
int  steps_per_coarse_step 
)
overridevirtual

Optional: the run's end, once known (stop time, max_step, substeps).

Reimplemented from FloodEngine.

◆ verify_prerequisites()

void FloodEngineTemplate::verify_prerequisites ( const ERF &  erf,
int  lev 
)
overridevirtual

Check the engine's own inputs against the ERF configuration, once at start-up, before the flood grid is built. Abort naming the input on anything the engine cannot run (a missing terrain file, a grid ratio it does not support).

Implements FloodEngine.

◆ wants_surface_precip()

bool FloodEngineTemplate::wants_surface_precip ( ) const
overridevirtual

Optional: false for an engine that reads no precipitation (default true).

Reimplemented from FloodEngine.

◆ write_checkpoint()

void FloodEngineTemplate::write_checkpoint ( const std::string &  checkpointname) const
overridevirtual

Optional: the engine's state under checkpointname/Level_<lev>/.

Reimplemented from FloodEngine.

◆ write_plotfile()

void FloodEngineTemplate::write_plotfile ( const std::string &  plotfile_prefix,
amrex::Real  time,
int  step 
) const
overridevirtual

Optional: the engine's own plotfile of the flood grid.

Reimplemented from FloodEngine.


The documentation for this class was generated from the following file: