Difference between revisions of "Creating Patch Maps"

From Rhessys
Jump to navigationJump to search
m
 
Line 1: Line 1:
A patch is the smallest spacial level in RHESSys.  This is where the majority of computation happens.  Creating a good patch map is a balance between using enough patches to capture the behavior of your watershed, but using few enough to keep computation times reasonable.  There is no single best way to create patch maps, as the ideal patch map will change depending on both your actual watershed, and the questions are you are asking.  The following are a few methods that RHESSys users have had success with.  
+
A patch is the smallest spacial level in RHESSys.  This is where the majority of computation happens.  Creating a good patch map is a balance between using enough patches to capture the behavior of your watershed, but using few enough to keep computation times reasonable.  There is no single best way to create patch maps, as the ideal patch map will change depending on both your actual watershed, and the questions you are asking.  The following are a few methods that RHESSys users have had success with.  Users should feel free to append any methods that they like and the problem they were examining to this page.  
  
 
A general rule for thinking about your patches, you want them to be homogenius with respect to the property you are interested in, and heterogenius
 
A general rule for thinking about your patches, you want them to be homogenius with respect to the property you are interested in, and heterogenius
with respect to most other inputs.  For example if you are curious about effects of vegetation, it may  
+
with respect to most other inputs.  For example if you are curious about effects of vegetation, it may be useful to incorporate your vegetation map
 +
into your method of creating patches.
  
 
====DEM Pixels====
 
====DEM Pixels====
The most straightforward way is to use each DEM pixel as a patch.  This method is nice as it will capture all possible variation within your watershed.  However it is also the most computationally expensive, and will only work for very small watersheds.   
+
The most straightforward way is to use each DEM pixel as a patch.  This method is nice as it will capture all possible topographic variation within your watershed.  However it is also the most computationally expensive, and will only work for very small watersheds.   
  
 
To create this map, you need to convert the DEM to a map of unique integers.  This can be done based on the row and column index of the DEM cell.
 
To create this map, you need to convert the DEM to a map of unique integers.  This can be done based on the row and column index of the DEM cell.

Latest revision as of 14:37, 4 January 2010

A patch is the smallest spacial level in RHESSys. This is where the majority of computation happens. Creating a good patch map is a balance between using enough patches to capture the behavior of your watershed, but using few enough to keep computation times reasonable. There is no single best way to create patch maps, as the ideal patch map will change depending on both your actual watershed, and the questions you are asking. The following are a few methods that RHESSys users have had success with. Users should feel free to append any methods that they like and the problem they were examining to this page.

A general rule for thinking about your patches, you want them to be homogenius with respect to the property you are interested in, and heterogenius with respect to most other inputs. For example if you are curious about effects of vegetation, it may be useful to incorporate your vegetation map into your method of creating patches.

DEM Pixels

The most straightforward way is to use each DEM pixel as a patch. This method is nice as it will capture all possible topographic variation within your watershed. However it is also the most computationally expensive, and will only work for very small watersheds.

To create this map, you need to convert the DEM to a map of unique integers. This can be done based on the row and column index of the DEM cell. First you need to find out how many columns are in your DEM.

Use the command G> r.info <DEM name> to find the number of columns. Once you know that, you run

G> r.mapcalc 'patch_map = row()*<number of columns> + col()'

Clumps

Clumping is the easiest method. Using the grass r.clump program, you can create patches of adjacent identical altitudes. While this will decrease the total patch count from the DEM pixels method, it may still be too many patches.

G> r.clump input=<DEM name> output=<patchmap name>

Altitude/Basin Cuts

This method will allow you to create far fewer patches than DEM pixels or the clumping methods, while still preserving the hydrological soundness of your patches. The idea is to break up the watershed into altitude bands, then intersect these bands with the hillslope map. You can use the hillslope map that you generated for the hillslope level in your worldfile template using r.watershed, or you can create a higher resolution hillslope.

First, cut the DEM into bands by altitude. For example, if your DEM spans 3000m,

G> r.mapcalc 'alt_bands = int(DEM / 100)'

alt_bands will be broken up into 30 bands. In order to break these bands up by hillslopes, you will add the two maps together. The catch is to multiply the hillslope map by a large enough number so that each hillslope/alt_band combination is a unique number. Chose a power of ten greater than the number of altitude bands, in this case, 100. Then compute the final patch map as

G> r.mapcalc 'patch_map = hillslope * 100 + alt_bands'