Learn R Programming

solaR2 (version 0.11)

C_solarAngles: Solar angles

Description

A set of functions that compute the apparent movement of the Sun from the Earth.

Usage

## Declination
declination(d, method = 'michalsky')

## Eccentricity eccentricity(d, method = 'michalsky')

## Equation of time eot(d)

## Solar time sunrise(d, lat, method = 'michalsky', decl = declination(d, method = method))

## Extraterrestrial irradiation bo0d(d, lat, method = 'michalsky', decl = declination(d, method = method), eo = eccentricity(d, method = method), ws = sunrise(d, lat, method = method))

## Sun hour angle sunHour(d, BTi, sample = 'hour', EoT = TRUE, method = 'michalsky', eqtime = eot(d))

## Cosine of the zenith angle zenith(d, lat, BTi, sample = 'hour', method = 'michalsky', decl = declination(d, method = method), w = sunHour(d, BTi, sample, method = method))

## Azimuth angle azimuth(d, lat, BTi, sample = 'hour', method = 'michalsky', decl = declination(d, method = method), w = sunHour(d, BTi, sample, method = method), cosThzS = zenith(d, lat, BTi, sample, method = method, decl = decl, w = w))

Value

A vector with the calculated elements. Its size varies depending on whether the calculations are daily or intradaily.

Arguments

d

Date, a daily time base, it may be the result of fBTd

method

character, method for the sun geometry calculations, to be chosen from 'cooper', 'spencer', 'michalsky' and 'strous'. See references for details.

lat

numeric, latitude (degrees) of the point of the Earth where calculations are needed. It is positive for locations above the Equator.

sample

Character, increment of the intradaily sequence.

BTi

POSIXct, intradily time base, it may the result of fBTi.

EoT

logical, if EoT=TRUE (default value), the function sunHour use the Equation of time

decl, eo, ws, eqtime, w, cosThzS

Arguments that compute the variables they reference (default value). It can be replaced with previously calculated values to avoid calculating the same variable twice.

Author

Francisco Delgado López, Oscar Perpiñán Lamigueiro.

References

See Also

fSolD, fSolI, calcSol

Examples

Run this code
library("data.table")
setDTthreads(2)

d = fBTd(mode = 'serie')[100]

decl = declination(d, method = 'michalsky')
decl

w = sunHour(d, sample = 'hour', method = 'michalsky')
w

cosThzS = zenith(d, lat = 37.2, sample = 'hour',
                 method = 'michalsky',
                 decl = decl,
                 w = w)
cosThzS

Run the code above in your browser using DataLab