dycove.sim.base.HydroEngineBase

class dycove.sim.base.HydroEngineBase[source]

Abstract interface for hydrodynamic engines.

All hydrodynamic models must implement this interface to be compatible with the base hydrodynamic simulation class.

__init__()

Methods

__init__()

check_simulation_inputs(simstate)

Perform checks on simulation time inputs.

cleanup()

Clean up resources.

get_cell_count()

Return number of active grid cells in the model.

get_elevation()

Return array of bed elevations at cell-centers.

get_rank()

Get current parallel processor/rank.

get_refdate()

Get model reference date as a datetime object.

get_vegetation()

Return stem dens., diam., and height arrays from numerical model.

get_velocity_and_depth()

Return velocity magnitude and depth arrays at cell-centers.

initialize()

Prepare engine to run (allocate memory, read/check inputs, print start, etc.)

is_parallel()

Return True if model is running in parallel based on number of active processors.

merge_parallel_veg(OutputManager)

Merge vegetation output files across MPI subdomains into single files.

set_vegetation(stemdens, stemdiam, stemheight)

Push vegetation arrays back into the numerical model.

step(seconds)

Advance the hydrodynamic model forward by a given number of seconds.

abstractmethod check_simulation_inputs(simstate)[source]

Perform checks on simulation time inputs.

abstractmethod cleanup()[source]

Clean up resources.

abstractmethod get_cell_count() int[source]

Return number of active grid cells in the model.

abstractmethod get_elevation() ndarray[source]

Return array of bed elevations at cell-centers.

abstractmethod get_rank()[source]

Get current parallel processor/rank.

abstractmethod get_refdate()[source]

Get model reference date as a datetime object. Required for now, only really used by DFM.

abstractmethod get_vegetation() tuple[ndarray, ndarray, ndarray][source]

Return stem dens., diam., and height arrays from numerical model.

abstractmethod get_velocity_and_depth() tuple[ndarray, ndarray][source]

Return velocity magnitude and depth arrays at cell-centers.

abstractmethod initialize()[source]

Prepare engine to run (allocate memory, read/check inputs, print start, etc.)

abstractmethod is_parallel()[source]

Return True if model is running in parallel based on number of active processors.

abstractmethod merge_parallel_veg(OutputManager)[source]

Merge vegetation output files across MPI subdomains into single files.

abstractmethod set_vegetation(stemdens, stemdiam, stemheight)[source]

Push vegetation arrays back into the numerical model.

abstractmethod step(seconds: int)[source]

Advance the hydrodynamic model forward by a given number of seconds.

ANUGA implements this by looping with domain.evolve(), while DFM calls dimr.update().