Skip to content

r.lake.series

Fills lake at given point(s) to given levels.

r.lake.series [-nc] elevation=name output=name start_water_level=float end_water_level=float water_level_step=float [coordinates=east,north] [seed_raster=name] [time_step=integer] [time_unit=string] [nproc=integer] [--overwrite] [--verbose] [--quiet] [--qq] [--ui]

Example:

r.lake.series elevation=name output=name start_water_level=float end_water_level=float water_level_step=float

grass.script.run_command("r.lake.series", elevation, output, start_water_level, end_water_level, water_level_step, coordinates=None, seed_raster=None, time_step=30, time_unit="minutes", nproc=1, flags=None, overwrite=False, verbose=False, quiet=False, superquiet=False)

Example:

gs.run_command("r.lake.series", elevation="name", output="name", start_water_level=float, end_water_level=float, water_level_step=float)

Parameters

elevation=name [required]
    Name of input elevation raster map
output=name [required]
    Name of the output space time raster dataset
    The name of the dataset is used as a base name for created output maps. Map names will consist of a base name, underscore and water level value or number depending on -c flag.
start_water_level=float [required]
    Start water level
    Units should be meters?
end_water_level=float [required]
    Final (maximal) water level
    Units should be meters?
water_level_step=float [required]
    Water level step
    Units should be meters?
coordinates=east,north
    Seed point coordinates
    Either this coordinates pair or a seed map name have to be specified.
seed_raster=name
    Name of input raster map with given starting point(s) (at least 1 cell > 0)
    Either this parameter or a coordinates pair have to be specified.
time_step=integer
    Time increment
    Time increment between two states (maps) used to register output maps in space-time raster dataset. Used together with time_units parameter.
    Allowed values: 0-
    Default: 30
time_unit=string
    Time units
    Time units used to register output maps in space-time raster dataset. Used together with time_step parameter.
    Allowed values: years, months, days, hours, minutes, seconds
    Default: minutes
nproc=integer
    Number of processes to run in parallel (currently ignored)
    Allowed values: 1-
    Default: 1
-n
    Use negative depth values for lake raster map
    This flag is passed to r.lake module.
-c
    Use map number instead of the water level in map name (currently ignored)
    This names are always in the right alphabetical order and are also valid vector map names.
--overwrite
    Allow output files to overwrite existing files
--help
    Print usage summary
--verbose
    Verbose module output
--quiet
    Quiet module output
--qq
    Very quiet module output
--ui
    Force launching GUI dialog

elevation : str, required
    Name of input elevation raster map
    Used as: input, raster, name
output : str, required
    Name of the output space time raster dataset
    The name of the dataset is used as a base name for created output maps. Map names will consist of a base name, underscore and water level value or number depending on -c flag.
    Used as: output, strds, name
start_water_level : float, required
    Start water level
    Units should be meters?
end_water_level : float, required
    Final (maximal) water level
    Units should be meters?
water_level_step : float, required
    Water level step
    Units should be meters?
coordinates : tuple[float, float] | list[float] | str, optional
    Seed point coordinates
    Either this coordinates pair or a seed map name have to be specified.
    Used as: input, coords, east,north
seed_raster : str, optional
    Name of input raster map with given starting point(s) (at least 1 cell > 0)
    Either this parameter or a coordinates pair have to be specified.
    Used as: input, raster, name
time_step : int, optional
    Time increment
    Time increment between two states (maps) used to register output maps in space-time raster dataset. Used together with time_units parameter.
    Allowed values: 0-
    Default: 30
time_unit : str, optional
    Time units
    Time units used to register output maps in space-time raster dataset. Used together with time_step parameter.
    Allowed values: years, months, days, hours, minutes, seconds
    Default: minutes
nproc : int, optional
    Number of processes to run in parallel (currently ignored)
    Allowed values: 1-
    Default: 1
flags : str, optional
    Allowed values: n, c
    n
        Use negative depth values for lake raster map
        This flag is passed to r.lake module.
    c
        Use map number instead of the water level in map name (currently ignored)
        This names are always in the right alphabetical order and are also valid vector map names.
overwrite: bool, optional
    Allow output files to overwrite existing files
    Default: False
verbose: bool, optional
    Verbose module output
    Default: False
quiet: bool, optional
    Quiet module output
    Default: False
superquiet: bool, optional
    Very quiet module output
    Default: False

DESCRIPTION

r.lake.series fills a lake or any area from a given start point or areas specified by raster map (seed_raster option). The module generates one map containing filled areas for each water level specified by water level options (start_water_level, end_water_level, water_level_step). This module uses r.lake module to generate individual maps for the map series. See r.lake manual for further discussion. Note that water level is absolute height, so it should be in same range as you digital elevation model. On the other hand, water depth in output maps is relative to the water level.

This module outputs:

  • a space-time raster dataset containing a map series
  • a map series containing maps of areas with water for each water level

EXAMPLE

The following example presents a bigger flooding in rural area of North Carolina sample dataset and included also visualization examples.

# using unix-like shell syntax

# set computational region
g.region raster=elev_lid792_1m
# prepare input data
v.to.rast -d input=streams output=rural_streams use=val val=1

# compute a flooding scenario
r.lake.series elevation=elev_lid792_1m seed=rural_streams \
              start_wl=104.0 end_wl=115.0 wl_step=0.2 output=flooding

# visualize the flooding space-time raster dataset
g.gui.animation strds=flooding

# alternatively explore maps from dataset
# prepare shaded relief map
r.relief input=elev_lid792_1m output=elev_lid792_1m_shade
# set color table for streams
r.colors map=rural_streams rules=- <<EOF
1 blue
EOF

# open d.mon or map display
d.mon wx1

# show base maps
d.rast elev_lid792_1m_shade
d.rast rural_streams

# show particular flooding maps
d.rast flooding_105.0
d.rast flooding_108.0
d.rast flooding_114.0

image-alt image-alt image-alt

Figure: A bigger flooding in rural area of North Carolina sample dataset with water level at 105, 108 and 114 meters (water depth differs in different areas).

SEE ALSO

r.lake

AUTHORS

Vaclav Petras, NCSU OSGeoREL,
Maris Nartiss (author of r.lake)

SOURCE CODE

Available at: r.lake.series source code (history)
Latest change: Friday Feb 21 10:10:05 2025 in commit 7d78fe3