landlab.components.overland_flow.generate_overland_flow_Bates

generate_overland_flow.py.

This component simulates overland flow using the 2-D numerical model of shallow-water flow over topography using the Bates et al. (2010) algorithm for storage-cell inundation modeling.

Written by Jordan Adams, based on code written by Greg Tucker.

Last updated: April 21, 2016

class OverlandFlowBates[source]

Bases: Component

Simulate overland flow using Bates et al. (2010).

Landlab component that simulates overland flow using the Bates et al., (2010) approximations of the 1D shallow water equations to be used for 2D flood inundation modeling.

This component calculates discharge, depth and shear stress after some precipitation event across any raster grid. Default input file is named “overland_flow_input.txt’ and is contained in the landlab.components.overland_flow folder.

Parameters:
  • grid (RasterGridModel) – A grid.

  • input_file (str) –

    Contains necessary and optional inputs. If not given, default input file is used.

    • Manning’s n is required.

    • Storm duration is needed if rainfall_duration is not passed in the initialization

    • Rainfall intensity is needed if rainfall_intensity is not passed in the initialization

    • Model run time can be provided in initialization. If not it is set to the storm duration

  • h_init (float, optional) – Some initial depth in the channels. Default = 0.001 m

  • g (float, optional) – Gravitational acceleration, \(m / s^2\)

  • alpha (float, optional) – Non-dimensional time step factor from Bates et al., (2010)

  • rho (integer, optional) – Density of water, \(kg / m^3\)

  • ten_thirds (float, optional) – Precalculated value of \(10 / 3\) which is used in the implicit shallow water equation.

Examples

>>> DEM_name = "DEM_name.asc"
>>> (rg, z) = read_esri_ascii(DEM_name)  
>>> of = OverlandFlowBates(rg)  

References

Required Software Citation(s) Specific to this Component

None Listed

Additional References

Bates, P., Horritt, M., Fewtrell, T. (2010). A simple inertial formulation of the shallow water equations for efficient two-dimensional flood inundation modelling Journal of Hydrology 387(1-2), 33-45. https://dx.doi.org/10.1016/j.jhydrol.2010.03.027

__init__(grid, h_init=1e-05, alpha=0.7, mannings_n=0.03, g=scipy.constants.g, rainfall_intensity=0.0)[source]
static __new__(cls, *args, **kwds)
calc_time_step()[source]
cite_as = ''
property coords

Return the coordinates of nodes on grid attached to the component.

property current_time

Current time.

Some components may keep track of the current time. In this case, the current_time attribute is incremented. Otherwise it is set to None.

Return type:

current_time

definitions = (('surface_water__depth', 'Depth of water on the surface'), ('surface_water__discharge', 'Volumetric discharge of surface water'), ('topographic__elevation', 'Land surface topographic elevation'))
property dt

component timestep.

Type:

dt

classmethod from_path(grid, path)

Create a component from an input file.

Parameters:
  • grid (ModelGrid) – A landlab grid.

  • path (str or file_like) – Path to a parameter file, contents of a parameter file, or a file-like object.

Returns:

A newly-created component.

Return type:

Component

property grid

Return the grid attached to the component.

property h

The depth of water at each node.

initialize_optional_output_fields()

Create fields for a component based on its optional field outputs, if declared in _optional_var_names.

This method will create new fields (without overwrite) for any fields output by the component as optional. New fields are initialized to zero. New fields are created as arrays of floats, unless the component also contains the specifying property _var_type.

initialize_output_fields(values_per_element=None)

Create fields for a component based on its input and output var names.

This method will create new fields (without overwrite) for any fields output by, but not supplied to, the component. New fields are initialized to zero. Ignores optional fields. New fields are created as arrays of floats, unless the component specifies the variable type.

Parameters:

values_per_element (int (optional)) – On occasion, it is necessary to create a field that is of size (n_grid_elements, values_per_element) instead of the default size (n_grid_elements,). Use this keyword argument to acomplish this task.

input_var_names = ('surface_water__depth', 'topographic__elevation')
name = 'OverlandFlowBates'
optional_var_names = ()
output_var_names = ('surface_water__depth', 'surface_water__discharge')
overland_flow(dt=None)[source]

For one time step, this generates ‘overland flow’ across a given grid by calculating discharge at each node.

Using the depth slope product, shear stress is calculated at every node.

Outputs water depth, discharge and shear stress values through time at every point in the input grid.

Parameters:
  • grid (RasterModelGrid) – A grid.

  • dt (float, optional) – Time step. Either set when called or the component will do it for you.

property shape

Return the grid shape attached to the component, if defined.

property surface_water__discharge

The discharge of water on active links.

unit_agnostic = False
units = (('surface_water__depth', 'm'), ('surface_water__discharge', 'm3/s'), ('topographic__elevation', 'm'))
classmethod var_definition(name)

Get a description of a particular field.

Parameters:

name (str) – A field name.

Returns:

A description of each field.

Return type:

tuple of (name, *description*)

classmethod var_help(name)

Print a help message for a particular field.

Parameters:

name (str) – A field name.

classmethod var_loc(name)

Location where a particular variable is defined.

Parameters:

name (str) – A field name.

Returns:

The location (‘node’, ‘link’, etc.) where a variable is defined.

Return type:

str

var_mapping = (('surface_water__depth', 'node'), ('surface_water__discharge', 'link'), ('topographic__elevation', 'node'))
classmethod var_type(name)

Returns the dtype of a field (float, int, bool, str…).

Parameters:

name (str) – A field name.

Returns:

The dtype of the field.

Return type:

dtype

classmethod var_units(name)

Get the units of a particular field.

Parameters:

name (str) – A field name.

Returns:

Units for the given field.

Return type:

str