GRASS logo

NAME

r.sunangle - calculates solar incidence angle for a point location(s) on an inclined or a horizontal plane for particular day and time/time increment.

KEYWORDS

raster, angle

SYNOPSIS

r.sunangle
r.sunangle help
r.sunangle [-s] input_file=name [elev=name] [slope=name] [aspect=name] [output_file=name] [--overwrite] [--help] [--verbose] [--quiet]

Flags:

-s
Use terrain parameters from input file instead of raster maps
--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output

Parameters:

input_file=name [required]
Input txt file with points coordinates and time data
elev=name
Name of elevation raster map
slope=name
Name of slope raster map
aspect=name
Name of aspect raster map
output_file=name
Output txt file for results

DESCRIPTION

r.sunangle - This Python script calculates solar incidence angle for a point location/s on an inclined or a horizontal plane for particular day and time/time increment. Input file must contain IDs and positions of the points (latitude and longtitude), time increment, starting and ending days for computations. Values of slope inclination, aspect and elevation can be specified as well ("s" flag), by deffault they will be taken from raster layers specified as input parameters.

The algorithm employs the equations and terminology from : Hofierka, J., Suri, M. (2002, september 11). The solar radiation model for Open source GIS: implementation and applications. Trento, Italy.

Module is based on R script orginaly written by Michal Gallay.

Inputs require a text file, which is read by this script and the values containend enter the algortithm. The format of the input file should be: point;latitude;longitude;increment;day_start;day_end;slope_value;aspect_value;elevation_value point - ID of the point (number or text string) latitude - latitude of the point in decimal degrees longtitude of the point in decimal degrees increment - time increment in decimal hours (24.0 for one day) day_start - day of of the beginning (1 for January 1, 365 for December 31) day_end - day of of the end (1 for January 1, 365 for December 31) slope_value - slope inclination value in degrees aspect_value - aspect (orientation) in degrees (0 = north, 90 = east, 180 = south, 270 = west) elevation_value - elevation above sea level in m ( Values must be separated with ";" (semicolon).

If output file is not specified by user, then the results are saved in a new file_solar_incidence_angle.csv text file. The format of the output file is: 1;point;latitude;slope_angle;aspect_angle;day;time;inclined_sun_angle;inclined_sunset_time;horiz_sun_angle;horiz_sunset_time;sun_azimuth

Output text file contains header and computed values in one line per point and time step separated by ";" (semicolon). Output variables: point - point ID latitude - latitude in decimal degrees longitude - longitude in decimal degrees elevation - elavation in m above sea level slope_angle - slope inclination in degrees aspect_angle - aspect (orientation) in degrees (0 = north, 90 = east, 180 = south, 270 = west) day - day of year (1 for January 1, 365 for December 31) time - time in decimal hours inclined_sun_angle - sun angle above inclined surface in degrees inclined_sunset_time - local sunset time on inclined surface in decimal hours horiz_sun_angle - sun angle above horizontal surface in degrees, negative value when sun is below horizon (at night) horiz_sunset_time - local sunset time (astronomic) in decimal hours sun_azimuth - sun azimuth in degrees (0 = north, 90 = east, 180 = south, 270 = west) max_sun_angle - maximal sun angle above inclined surface in degrees delta_sun_angle - delta of the sun angle from maximal maximal sun angle above inclined surface in degrees

KNOWN ISSUES

The inclined_sunset_time can return NaN (no value) if (-C_33/C_31) returns value out of <-1;1>, e.g. arccos(-1.2) doesn't exist, This problem needs a closer look, but other variables are safe and reliable.

If point is outside of the current region and slope and aspect are going to be read from rasters, 0 is used for slope and aspect and * is writen to output in the fields elevation, slope_angle and aspect_angle.

EXAMPLE

File vstup.txt contains one line: A1;49.03358407;23.47107740;30;33;35;22.589;252.783;300 Use information on slope, aspect and elevation from input:
r.sunangle -s input_file=vstup.txt
Use information on slope, aspect and elevation from rasters dmr, sklon, orient:
r.sunangle input_file=vstup.txt elev=dmr slope=sklon aspect=orient

SEE ALSO

r.sunmask, r.sun,

AUTHOR

Grass implementation by Ivan Barka, National Forest Centre Zvolen, Slovakia Original R script: Michal Gallay

Last changed: $Date: 2014-08-15 14:00:00 +0100 $


Main index | Raster index | Topics index | Keywords Index | Full index

© 2003-2014 GRASS Development Team, GRASS GIS 7.1.svn Reference Manual