Thanks for your help. I am interested in hearing more about your
GRASS/SWAN workflow. We are looking into SWAN for future wave modeling.
I have written a Python script to dump the raster to ascii (r.out.arc),
and calculate fetches according to the Shore Protection Manual.
Unfortunately, there is a cost to dumping the grid and then loading it
again into Python, and an even greater cost in my rotation algorithm. My
code runs very slowly on larger grids. (Warning: geologist programming!)
I wonder if it would be difficult to bind Python to the C library of
Grass? If that were successful, we could build a simplified object model
for efficient scripting directly on the grass databases.
--
David Finlayson
University of Washington
School of Oceanography
Marine Science Building (MSB) 112
Seattle, WA 98195
(206) 616-9407
http://students.washington.edu/dfinlays
On Fri, 14 Mar 2003, H Bowman wrote:
> Is anyone aware of a script to calculate (wind) fetch from a raster?
not per se, but I am currently working on wave exposure models and might
offer something useful.
- I've adapted r.los to return compass bearing instead of vertical
angle. By running it from a series of regularly spaced viewpoints around
the edge of the map and extracting the answers that coincide with the
coastline it gives a pretty good qualitative view of what areas are
directly exposed to the ocean. r.los is severly limited to the number of
cells it can handle, as the calulation time goes up by cells^4 or something.
12km x 12km x 50m res was about the best I could get. It's a pity that
MASK doesn't work with it, as the coastline only represents a handful of
cells to analyze..
- r.cva would be a better solution, but I keep on making it segfault and
haven't played with it much. This would also solve a lot of the
computational time issues, and would let you add weighting to swell from
different compass bearings, etc.. r.cva is "cumulative viewshed analysis" and
is a more powerful adaptation of r.los available at:
http://www.ucl.ac.uk/~tcrnmar/GIS/r.cva.html
- the main thing I use is the SWAN near-shore wave model with input
bathymetry files generated by grass, and output fed back into GRASS,
with the help of some glue programs. For non-commerical use, you can run
it with the free Intel fortran compiler.
http://swan.ct.tudelft.nl/
http://www.intel.com/software/products/compilers/flin/noncom.htm
So nothing to do with fetch, but maybe what you want to do with the
answers from the fetch question.
regards,
Hamish