fSolD: Daily apparent movement of the Sun from the Earth

Description Usage Arguments Value Note Author(s) References Examples

View source: R/fSolD.R

Description

Compute the daily apparent movement of the Sun from the Earth. This movement is mainly described (for the simulation of photovoltaic systems) by the declination angle, the sunset angle and the daily extra-atmospheric irradiation.

Usage

1
fSolD(lat, BTd, method='michalsky')

Arguments

lat

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

BTd

Daily temporal base, a POSIXct object which 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.

Value

A zoo object with these components:

decl

Declination angle (radians) for each day of year in dn or BTd

eo

Factor of correction due the eccentricity of orbit of the Earth around the Sun.

ws

Sunset angle (in radians) for each day of year. Due to the convention which considers that the solar hour angle is negative before midday, this angle is negative.

Bo0d

Extra-atmospheric daily irradiation (watt-hour per squared meter) incident on a horizontal surface

EoT

Equation of Time.

Note

The latitude is stored as the attribute lat of the result, and thus it is accessible with attr(object, 'lat').

Author(s)

Oscar Perpiñán Lamigueiro.

References

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
BTd=fBTd(mode='serie')

lat=37.2
fSolD(lat,BTd[100])
fSolD(lat,BTd[100], method='strous')
fSolD(lat,BTd[100], method='spencer')
fSolD(lat,BTd[100], method='cooper')

lat=-37.2
fSolD(lat,BTd[283])

#Solar angles along the year
SolD<-fSolD(lat,BTd=fBTd())

library(lattice)
xyplot(SolD)

#Calculation of the daylength for several latitudes
library(latticeExtra)

Lats=c(-60,-40,-20,0,20,40,60)
NomLats=ifelse(Lats>0, paste(Lats,'N', sep=''), paste(abs(Lats), 'S',
sep=''))
NomLats[Lats==0]='0'

mat=matrix(nrow=365, ncol=length(Lats))
colnames(mat)=NomLats
WsZ=zoo(mat, fBTd(mode='serie'))

for (i in seq_along(Lats)){
    SolDaux<-fSolD(lat=Lats[i],BTd=fBTd(mode='serie'));
    WsZ[,i]<-r2h(2*abs(SolDaux$ws))}

p=xyplot(WsZ, superpose=TRUE,
        ylab=expression(omega[s] (h)), auto.key=FALSE)
plab<-p+glayer(panel.text(x[1], y[1], NomLats[group.number], pos=2))
print(plab)

Example output

Loading required package: zoo

Attaching package: 'zoo'

The following objects are masked from 'package:base':

    as.Date, as.Date.numeric

Loading required package: lattice
Loading required package: latticeExtra
Loading required package: RColorBrewer
Time Zone set to UTC.

                decl        eo        ws     Bo0d          EoT
2018-04-10 0.1402242 0.9961129 -1.678141 9632.502 -0.004636675
attr(,"lat")
[1] 37.2
               decl        eo        ws     Bo0d          EoT
2018-04-10 0.138189 0.9961129 -1.676557 9613.567 -0.004636675
attr(,"lat")
[1] 37.2
                decl        eo        ws     Bo0d          EoT
2018-04-10 0.1336107 0.9961129 -1.672998 9570.899 -0.004636675
attr(,"lat")
[1] 37.2
                decl        eo        ws     Bo0d          EoT
2018-04-10 0.1314892 0.9950482 -1.671351 9540.885 -0.004636675
attr(,"lat")
[1] 37.2
                 decl       eo        ws     Bo0d        EoT
2018-10-10 -0.1174501 1.002975 -1.660478 9484.403 0.06178353
attr(,"lat")
[1] -37.2

solaR documentation built on May 2, 2019, 6:07 p.m.

Related to fSolD in solaR...