## NAME

r.sunmask - calculate cast shadow areas from sun position and DEM. Either A: exact sun position is specified, or B: date/time to calculate the sun position by r.sunmask itself.
(GRASS Raster Program)

## SYNOPSIS

r.sunmask [-zvs] elev=name output=name [altitude=value] [azimuth=value] [year=value] [month=value] [day=value] [hour=value] [minute=value] [second=value] [timezone=value] [east=value] [north=value]

## DESCRIPTION

r.sunmask creates an output map layer based on an input elevation raster map layer and the sun position. The output map layer contains the cast shadow areas arising from sun shine and elevations. The user can define the sun position either directly or the module calculates it from given location and date/time parameters using the NREL sun position algorithm. So either "A:"-parameters to specify the exact known sun position or "B:-parameters" to specify date/time for sun position calculation by r.sunmask itself have to be used.

### Flag:

-z
  Zero is a real elevation
-v
  verbose output
  displays sun related information like sunset/sunrise etc.
-s
  calculate sun position only and exit

### Parameters:

elev
  Elevation raster map to be used for shadow calculation
output
  Name for the resulting binary cast shadow raster map (1=shadow)
A: altitude
  altitude of the sun above horizon, degrees (options: 0-89.999)
A: azimuth
  azimuth of the sun from the north, degrees (options: 0-360)
B: year
  year (1950..2050) for sun position calculation
B: month
  month (0..12) for sun position calculation
B: day
  day (0..31) for sun position calculation
B: hour
  hour (0..12) for sun position calculation
B: minute
  minutes (0..60) for sun position calculation
B: second
  seconds (0..60) for sun position calculation
B: timezone
  timezone (east positive, offset from GMT, also use to adjust daylight savings)
east
  east coordinate (point of interest, default: map center)
north
  north coordinate (point of interest, default: map center)

The module performs sunset/sunrise checks and refraction correction for sun position calculation. Local coordinate systems are internally transformed to latitude/longitude for the SOLPOS algorithm. The elevation is not considered in the sunset/sunrise calculations.

## Notes

r.sunmask and daylight savings: Rather than convert time to GMT, the solpos algorithm uses what is called Local Standard Time, which is generally defined politically as an offset from GMT. So the key is the offset from GMT, which the solpos Time Zone parameter. If the user specifies clock time (different for winter and summer), he/she would have to change the Time Zone parameter seasonally in r.sunmask (timezone parameter).

Note: In latitude/longitude locations the position coordinates pair (east/west) has to be specified in decimal degree (not D:M:S). If not specified, the map center's coordinates will be used. Also g.region -l displays the map center's coordinates.

## Acknowledgements

Acknowledgements: National Renewable Energy Laboratory for their SOLPOS 2.0 sun position algorithm.

## SEE ALSO

g.region, r.sun, r.slope.aspect

## AUTHOR

Janne Soimasuo, Finland 1994
update to FP by Huidae Cho 2001
added solpos algorithm feature by Markus Neteler 2001

Last changed: $Date: 2003/03/28 17:33:55 $