[GRASSLIST:9982] Filling with flood

Hi All,
I have a surface of watershed and wish to simulate a dam
to see the area of inundation (flooding).

Please suggest a simple method in GRASS6 to create a reservoir (Dam)

ThanQ
Ravi


Do you Yahoo!?
With a free 1 GB, there’s more in store with Yahoo! Mail.

  I have a surface of watershed and wish to simulate a dam
  to see the area of inundation (flooding).
   
  Please suggest a simple method in GRASS6 to create a reservoir (Dam)

d.rast.edit or r.digit+r.patch to make the dam, then use r.basins.fill?,
r.fill.dir? or the module recently (in the last month) announced on the
mailing list to fill depressions & r.mapcalc to compare/crop.

Hamish

Hi
It will be nice if I can get a workedout example
where in a DEM is used to create a Dam and then flood it.

Ravi

Hamish hamish_nospam@yahoo.com wrote:

I have a surface of watershed and wish to simulate a dam
to see the area of inundation (flooding).

Please suggest a simple method in GRASS6 to create a reservoir (Dam)

d.rast.edit or r.digit+r.patch to make the dam, then use r.basins.fill?,
r.fill.dir? or the module recently (in the last month) announced on the
mailing list to fill depressions & r.mapcalc to compare/crop.

Hamish


Bring words and photos together (easily) with
PhotoMail - it’s free and works with your Yahoo! Mail.

Hi,

How I did it:

Creating dam:
1) With r.digit digitise map dam line; Assign correct height to it;
2) Grow it to 2 cells atleast to avoid any holes in dam;
3) With r.mapcalc add dam to DEM.

Filling lake:
1) With r.digit create map with atleast one cell with any value below
target water level (seed);
2) Feed in DEM, seed, target water level to r.lake.

You'r done!

Maris.

Attached:
sm_ice.jpg - screenshot form movie showing Smiltene palaeolake and
possible ice margin, north Vidzeme, Latvia. Created with described
steps, only instead of r.lake I used r.mapcalc with script (~20h to
get such map on P4 3GHz compared to 1min on 800MGz PIII with r.lake).

r_lake.zip - source code of new GRASS module. Use at Your own risk!
Currently it lacks nice blue color gradient for output maps. Any
comments - welcome.

2006/1/25, RAVI KUMAR <ravivundavalli@yahoo.com>:

Hi
It will be nice if I can get a workedout example
where in a DEM is used to create a Dam and then flood it.

Ravi

Hamish <hamish_nospam@yahoo.com> wrote:

> I have a surface of watershed and wish to simulate a dam
> to see the area of inundation (flooding).
>
> Please suggest a simple method in GRASS6 to create a reservoir (Dam)

d.rast.edit or r.digit+r.patch to make the dam, then use r.basins.fill?,
r.fill.dir? or the module recently (in the last month) announced on the
mailing list to fill depressions & r.mapcalc to compare/crop.

Hamish

________________________________
Bring words and photos together (easily) with
PhotoMail - it's free and works with your Yahoo! Mail.

(attachments)

sm_ice.jpg

Hi all, an alternate way that I have made reservoirs is to use r.contour and make only the one contour line that I care about. Then use v.digit to modify that line at the point that I want the dam. Convert that vector line to an area, and then back to a raster and voila, you have a surface that is at the height of your reservoir. This was a relatively fast method for me.

-Ian

On Jan 25, 2006, at 7:34 AM, Māris Nartišs wrote:

Hi,

How I did it:

Creating dam:
1) With r.digit digitise map dam line; Assign correct height to it;
2) Grow it to 2 cells atleast to avoid any holes in dam;
3) With r.mapcalc add dam to DEM.

Filling lake:
1) With r.digit create map with atleast one cell with any value below
target water level (seed);
2) Feed in DEM, seed, target water level to r.lake.

You'r done!

Maris.

Attached:
sm_ice.jpg - screenshot form movie showing Smiltene palaeolake and
possible ice margin, north Vidzeme, Latvia. Created with described
steps, only instead of r.lake I used r.mapcalc with script (~20h to
get such map on P4 3GHz compared to 1min on 800MGz PIII with r.lake).

r_lake.zip - source code of new GRASS module. Use at Your own risk!
Currently it lacks nice blue color gradient for output maps. Any
comments - welcome.

2006/1/25, RAVI KUMAR <ravivundavalli@yahoo.com>:

Hi
It will be nice if I can get a workedout example
where in a DEM is used to create a Dam and then flood it.

Ravi

Hamish <hamish_nospam@yahoo.com> wrote:

I have a surface of watershed and wish to simulate a dam
to see the area of inundation (flooding).

Please suggest a simple method in GRASS6 to create a reservoir (Dam)

d.rast.edit or r.digit+r.patch to make the dam, then use r.basins.fill?,
r.fill.dir? or the module recently (in the last month) announced on the
mailing list to fill depressions & r.mapcalc to compare/crop.

Hamish

________________________________
Bring words and photos together (easily) with
PhotoMail - it's free and works with your Yahoo! Mail.

<sm_ice.jpg>

>
What happens if a big asteroid hits Earth? Judging from realistic simulations involving a sledge hammer and a common laboratory frog, we can assume it will be pretty bad.
  - Dave Barry

-------------------------------------------------------------
This message has been scanned by Postini anti-virus software.

Wow, lots of good ideas.

Creating dam:
1) With r.digit digitise map dam line; Assign correct height to it;
2) Grow it to 2 cells atleast to avoid any holes in dam;
3) With r.mapcalc add dam to DEM.

Filling lake:
1) With r.digit create map with atleast one cell with any value below
target water level (seed);
2) Feed in DEM, seed, target water level to r.lake.

Could the seed be part of the module? seed_location=x,y seed_elevation=z
Could save some effort, the less work that needs to be done by hand the
better / faster.

Another question.. how to model sea level rise / storm surge?
v.in.region to get an outside box -> v.to.rast -> r.lake?

e.g. combine with images like this by Markus + Jachym's v.extrude:
http://mpa.itc.it/markus/grass61/demos/

and you have *incredibly* effective graphics to show to planners,
public, etc. Make an animation of the flooding happening in NVIZ,
even more so. e.g. do for Downtown New Orleans.. as most major world
cities are harbour-front, there is much demand and modelling already
happening around this.

In the past I have used a trick in NVIZ with a second, semi-transparent,
constant surface and raised & lowered the z-offset*, but that is really
visualization only qualitative approach.

[*] http://bambi.otago.ac.nz/hamish/pics/sill_iceage_115m.jpg

River flooding is more difficult I guess as the surface is not at a
constant elevation, but it would be nice to transfer watershed volume
accumulations to a flood which rose until volume was exhausted?

Hamish

Hi,

1) as it is my first piece of C code, could somebody look on it. Any
suggestions = welcome;

2) specifying seed as x,y pair is in my planed feature list. Still
possibility to use raster map as seed is important, cuz seed must be
at least one cell with value>0, so it can be already existing lake
map, also output from previous module runs. It is possible to create
cool anime with water level falling :slight_smile:

3) next week I will have to present this module at local conference[1]
and I will need some cool presentation stuff. Thanks for idea about
flooding city in 3D. If I will manage to create such anime, I will
give it for putting on GRASS site.

4) before adding this module to CVS, I want to i) add blue gradient to
output map (see commented code at end of module source); ii) add
ability to set seed as x,y. As now seems that ice age is over, I will
be able to work at home to add those features (last week air
temperature at my room was about +10C, cuz outside temperature was
below -30C).

tnx for ideas, interest,
Maris.

[1] http://www.lu.lv/petnieciba/konferences/lu64/ (in Latvian) ~=
"University of Latvia 64. scientific conference"

2006/1/26, Hamish <hamish_nospam@yahoo.com>:

Wow, lots of good ideas.

> Creating dam:
> 1) With r.digit digitise map dam line; Assign correct height to it;
> 2) Grow it to 2 cells atleast to avoid any holes in dam;
> 3) With r.mapcalc add dam to DEM.
>
> Filling lake:
> 1) With r.digit create map with atleast one cell with any value below
> target water level (seed);
> 2) Feed in DEM, seed, target water level to r.lake.

Could the seed be part of the module? seed_location=x,y seed_elevation=z
Could save some effort, the less work that needs to be done by hand the
better / faster.

Another question.. how to model sea level rise / storm surge?
v.in.region to get an outside box -> v.to.rast -> r.lake?

e.g. combine with images like this by Markus + Jachym's v.extrude:
http://mpa.itc.it/markus/grass61/demos/

and you have *incredibly* effective graphics to show to planners,
public, etc. Make an animation of the flooding happening in NVIZ,
even more so. e.g. do for Downtown New Orleans.. as most major world
cities are harbour-front, there is much demand and modelling already
happening around this.

In the past I have used a trick in NVIZ with a second, semi-transparent,
constant surface and raised & lowered the z-offset*, but that is really
visualization only qualitative approach.

[*] http://bambi.otago.ac.nz/hamish/pics/sill_iceage_115m.jpg

River flooding is more difficult I guess as the surface is not at a
constant elevation, but it would be nice to transfer watershed volume
accumulations to a flood which rose until volume was exhausted?

Hamish

On Thu, Jan 26, 2006 at 02:22:19PM +0200, M?ris Narti?s wrote:

Hi,

1) as it is my first piece of C code, could somebody look on it. Any
suggestions = welcome;

2) specifying seed as x,y pair is in my planed feature list. Still
possibility to use raster map as seed is important, cuz seed must be
at least one cell with value>0, so it can be already existing lake
map, also output from previous module runs. It is possible to create
cool anime with water level falling :slight_smile:

3) next week I will have to present this module at local conference[1]
and I will need some cool presentation stuff. Thanks for idea about
flooding city in 3D. If I will manage to create such anime, I will
give it for putting on GRASS site.

You can flood Trento:
http://grass.itc.it/grass60/screenshots/index.php
below the screenshot you'll find the link to download the data.

Idea:
- get their SHAPE file of buildings (2D footprints)
- run v.to.rast to make 3D flat buildings "DEM" from that
- add to real DEM with r.mapcalc (use SRTM tile) or leave it flat
- there is the Adige river going through the city
- use VMAP0 river map to use river as seed
- use r.carve to carve river into DEM
- r.lake to flood the city :slight_smile:

If you flood more than 300m above DEM, the water will nicely
flow into the next valley versus Venice, otherwise you'll
flood Verona.

I can give you the SRTM tile and VMAP0 river map offlist, if
needed.

4) before adding this module to CVS, I want to i) add blue gradient to
output map (see commented code at end of module source); ii) add
ability to set seed as x,y. As now seems that ice age is over, I will
be able to work at home to add those features (last week air
temperature at my room was about +10C, cuz outside temperature was
below -30C).

brr

tnx for ideas, interest,
Maris.

[1] http://www.lu.lv/petnieciba/konferences/lu64/ (in Latvian) ~=
"University of Latvia 64. scientific conference"

Good luck!

Markus