# Difference between revisions of "R.sun"

From GRASS-Wiki

HamishBowman (talk | contribs) (||) |
HamishBowman (talk | contribs) (→Testing: +tips) |
||

Line 11: | Line 11: | ||

Create an artificial surface containing a Gaussian mound: | Create an artificial surface containing a Gaussian mound: | ||

{{AddonCmd|r.surf.volcano}} out=gauss method=gaussian kurtosis=1 | {{AddonCmd|r.surf.volcano}} out=gauss method=gaussian kurtosis=1 | ||

+ | |||

+ | Overlay some 100m contours to show underlying topography: | ||

+ | r.contour in=gauss out=gauss_100m_contours step=100 | ||

+ | d.vect gauss_200m_contours color=white | ||

+ | |||

+ | Set map's color table to highlight detail: | ||

+ | r.colors rad_test.day355.beam col=bcyr -e | ||

+ | d.legend rad_test.day355.beam range=1300,1500 | ||

=== Time step === | === Time step === |

## Revision as of 00:47, 11 August 2009

## Contents

## Help page

- r.sun manual page

## Tips

The speed of r.sun is much higher if r.horizon is used first and the resulting maps are given as input to r.sun. Background: the horizon needs to be computed only one time before, not in every step within r.sun. See the example at the end of the r.sun help page.

### Testing

Create an artificial surface containing a Gaussian mound:

```
r.surf.volcano out=gauss method=gaussian kurtosis=1
```

Overlay some 100m contours to show underlying topography:

r.contour in=gauss out=gauss_100m_contours step=100 d.vect gauss_200m_contours color=white

Set map's color table to highlight detail:

r.colors rad_test.day355.beam col=bcyr -e d.legend rad_test.day355.beam range=1300,1500

### Time step

The following three images demonstrate the effects of using different time **step** parameters.

r.sun -s elevin="gauss" glob_rad="rad.global.30minT" day=180 step=0.5

r.sun -s elevin="gauss" glob_rad="rad.global.15minT" day=180 step=0.25

r.sun -s elevin="gauss" glob_rad="rad.global.03minT" day=180 step=0.05

The 3 minute time step takes roughly ten times as long to run as the 30 minute timestep.

## ToDo

- Add support for OpenMP parallelization