Description Usage Arguments Value Note Author(s) References See Also Examples
Calculates the zenith and azimuth angle of the position of the sun, based mostly on routines from Iqbal (1983).
By default, it is assumed that the time of day is not given in local apparent time (LAT, also known as 'solar time'). To convert the standard time to LAT, the longitude of the location, and the longitude of the nearest time zone border must be given.
Alternatively, use LAT=TRUE
to specify that the time of day is in LAT
(that is, solar maximum occurs exactly at noon).
The user can specify a number of timesteps (KHRS
), so that the solar
positions are calculated for the midpoint of each timestep (this is used
within YplantQMC). Alternatively, specify timeofday
directly.
1 2 |
year |
YYYY - to account for eccentricity (small effect). |
month |
Month number |
day |
Day of month number |
lat |
Latitude, degrees. |
long |
Longitude, degrees. Optional (only used for local apparent time correction.) |
tzlong |
Longitude of the nearest timezone border |
KHRS |
Number of timesteps in a day (optional). See Details. |
timeofday |
Optional, time of day (in hours) (a vector of any length) to calculate the position of the sun |
LAT |
Logical (default=FALSE). Are the times of day given in 'local apparent time'? |
A list with the following components:
Time in decimal hours
Solar altitude (degrees)
Solar azimuth (degrees. N=0, E=90)
Day length in hours
Time of sunset (hours)
Solar zenith position (radians)
This routine is no doubt less accurate that the NOAA routines provided
by the solarpos
function in the maptools
package. It is easier
to use, though.
Remko Duursma, based mostly on original FORTRAN code by Belinda Medlyn.
Iqbal, B., 1983. An Introduction to Solar Radiation. Academic Press, New York, 386 pp
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.