zenaz: Calculates position of the sun

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

Calculates the zenith and azimuth angle of the position of the sun, based mostly on routines from Iqbal (1983).

Usage

1
2
3
4
5
6
7
8
9
zenaz(year = 2012, 
month = 4, 
day = 1, 
lat = -33.6, 
long = 150.7, 
tzlong = long, 
KHRS = 24, 
timeofday = NA, 
LAT = FALSE)

Arguments

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'?

Details

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.

Value

A list with the following components:

hour

Time in decimal hours

altitude

Solar altitude (degrees)

azimuth

Solar azimuth (degrees. N=0, E=90)

daylength

Day length in hours

sunset

Time of sunset (hours)

zenrad

Solar zenith position (radians)

Note

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.

Author(s)

Remko Duursma, based mostly on original FORTRAN code by Belinda Medlyn.

References

Iqbal, B., 1983. An Introduction to Solar Radiation. Academic Press, New York, 386 pp

See Also

setHemi

Examples

1
2
3
4
5
6
# Simple use
zenaz(month=8, day=16, timeofday=12, lat=-33)

# Get half-hourly solar positions
hourpos <- zenaz(month=2, day=16, KHRS=48, lat=-33, long=155, tzlong=150)
 with(hourpos, plot(hour, altitude, type='o',ylab=expression(Altitude~(degree))))

YplantQMC documentation built on May 2, 2019, 5:50 p.m.

Related to zenaz in YplantQMC...