calcSol: Apparent movement of the Sun from the Earth

Description Usage Arguments Value Author(s) References Examples

View source: R/calcSol.R

Description

Compute the apparent movement of the Sun from the Earth with the functions fSolD and fSolI.

Usage

1
2
3
calcSol(lat, BTd, sample = 'hour', BTi,
        EoT = TRUE, keep.night = TRUE,
        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 time base, a POSIXct object which may be the result of fBTd. It is not considered if BTi is provided.

sample

Increment of the intradaily sequence. It is a character string, containing one of ‘"sec"’, ‘"min"’, ‘"hour"’. This can optionally be preceded by a (positive or negative) integer and a space, or followed by ‘"s"’. It is used by seq.POSIXt.

It is not considered if BTi is provided.

BTi

Intradaily time base, a POSIXct object to be used by fSolI. It could be the index of the G0I argument to calcG0.

EoT

logical, if TRUE the Equation of Time is used. Default is TRUE.

keep.night

logical, if TRUE (default) the night is included in the time series.

method

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

Value

A Sol-class object.

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
BTd = fBTd(mode = 'serie')

lat = 37.2
sol = calcSol(lat, BTd[100])
print(as.zooD(sol))

library(lattice)
xyplot(as.zooI(sol))

solStrous = calcSol(lat, BTd[100], method = 'strous')
print(as.zooD(solStrous))

solSpencer = calcSol(lat, BTd[100], method = 'spencer')
print(as.zooD(solSpencer))

solCooper = calcSol(lat, BTd[100], method = 'cooper')
print(as.zooD(solCooper))

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
2020-04-09 0.1370975 0.9961129 -1.675708 9603.402 -0.004636675
                decl        eo        ws    Bo0d          EoT
2020-04-09 0.1348321 0.9961129 -1.673947 9582.29 -0.004636675
                decl        eo        ws     Bo0d          EoT
2020-04-09 0.1336107 0.9961129 -1.672998 9570.899 -0.004636675
                decl        eo        ws     Bo0d          EoT
2020-04-09 0.1314892 0.9950482 -1.671351 9540.885 -0.004636675

solaR documentation built on Jan. 19, 2020, 5:06 p.m.