Learn R Programming

solaR (version 0.46)

C_fSolI: Instantaneous apparent movement of the Sun from the Earth

Description

Compute the angles which describe the intradaily apparent movement of the Sun from the Earth.

Usage

fSolI(solD, sample = 'hour', BTi, EoT = TRUE, keep.night = TRUE, method = 'michalsky')

Arguments

solD

A zoo object with the result of fSolD

sample

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

It is not considered when BTi is provided.

BTi

Intradaily time base, a POSIXct object. It could be the index of the G0I argument to calcG0. fSolI will produce results only for those days contained both in solD and in BTi.

EoT

logical, if TRUE (default) the Equation of Time is used.

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 zoo object is returned with these components:

w

numeric, solar hour angle (radians)

aman

logical, TRUE when Sun is above the horizon

cosThzS

numeric, cosine of the solar zenith angle

AzS

numeric, solar acimuth angle (radians)

AlS

numeric, solar elevation angle (radians)

Bo0

numeric, extra-atmospheric irradiance (W/m2)

rd, rg

numeric, relation between irradiance and irradiation of diffuse and global values, respectively, following the correlations proposed by Collares-Pereira and Rabl

The latitude is stored as the attribute lat of this object.

References

  • Cooper, P.I., Solar Energy, 12, 3 (1969). "The Absorption of Solar Radiation in Solar Stills"

  • Spencer, Search 2 (5), 172, https://www.mail-archive.com/sundial@uni-koeln.de/msg01050.html

  • Strous: https://www.aa.quae.nl/en/reken/zonpositie.html

  • Michalsky, J., 1988: The Astronomical Almanac's algorithm for approximate solar position (1950-2050), Solar Energy 40, 227-235

  • Collares-Pereira, M. y Rabl, A., The average distribution of solar radiation: correlations between diffuse and hemispherical and between daily and hourly insolation values. Solar Energy, 22:155<U+2013>164, 1979.

  • Perpi<U+00F1><U+00E1>n, O, Energ<U+00ED>a Solar Fotovoltaica, 2015. (https://oscarperpinan.github.io/esf/)

  • Perpi<U+00F1><U+00E1>n, O. (2012), "solaR: Solar Radiation and Photovoltaic Systems with R", Journal of Statistical Software, 50(9), 1-32, 10.18637/jss.v050.i09

See Also

fSolD

Examples

Run this code
# NOT RUN {
###Angles for one day
BTd = fBTd(mode = 'serie')

#North hemisphere
lat = 37.2
solD <- fSolD(lat,BTd[100])
solI <- fSolI(solD, sample = 'hour')
print(solI)

#South hemisphere
lat = -37.2;
solDs <- fSolD(lat,BTd[283])
solIs <- fSolI(solDs, sample = 'hour')
print(solIs)

 ###Angles for the 12 average days
lat = 37.2;
solD <- fSolD(lat,BTd = fBTd(mode = 'prom'))
solI <- fSolI(solD, sample = '10 min', keep.night = FALSE)

library(lattice)
library(latticeExtra)

###Solar elevation angle vs. azimuth.
#This kind of graphics is useful for shadows calculations
mon = month.abb
p <- xyplot(r2d(AlS)~r2d(AzS),
    groups = month,
    data = solI, type = 'l', col = 'black',
    xlab = expression(psi[s]),ylab = expression(gamma[s]))

plab <- p + glayer({
  idx <- round(length(x)/2+1)
  panel.text(x[idx], y[idx], mon[group.value], pos = 3, offset = 0.2, cex = 0.8)})

print(plab)

# }

Run the code above in your browser using DataLab