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 longitude), time increment, starting and ending days for computations. Values of slope inclination, aspect and elevation can be specified as well ("s" flag), by default 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 originally written by Michal Gallay for Institute of Botany Slovak Academy of Sciences in Bratislava, Slovakia.

Inputs require a text file, which is read by this script and the values contained enter the algorithm. 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 - elevation 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) does not 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 written 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, both in cooperation with Dusan Senko (Institute of Botany, Slovak Academy of Sciences) Script citation: Barka, I. Gallay, M., Senko, D. r.sunangle Python script in the GRASS GIS environment for calculation of solar radiation parameters. In: Mereďa P. et al., 2015: Ecological niche differentiation between tetra- and octoploids of Jacobaea vulgaris (Asteraceae). Preslia, Praha xx: xx-xx.

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