Learn R Programming

solaR (version 0.37)

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 ‘"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
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 i
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:
  • wnumeric, solar hour angle (radians)
  • amanlogical, TRUE when Sun is above the horizon
  • cosThzSnumeric, cosine of the solar zenith angle
  • AzSnumeric, solar acimuth angle (radians)
  • AlSnumeric, solar elevation angle (radians)
  • Bo0numeric, extra-atmospheric irradiance (W/m2)
  • rd, rgnumeric, 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.

encoding

UTF-8

References

  • Cooper, P.I., Solar Energy, 12, 3 (1969). "The Absorption of Solar Radiation in Solar Stills"
Spencer, Search 2 (5), 172, http://www.mail-archive.com/sundial@uni-koeln.de/msg01050.html Strous: http://www.astro.uu.nl/~strous/AA/en/reken/zonpositie.html Michalsky, J., 1988: The Astronomical Almanac's algorithm for approximate solar position (1950-2050), Solar Energy 40, 227-235, ftp://climate1.gsfc.nasa.gov/wiscombe/Solar_Rad/SunAngles/sunae.f 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–164, 1979. Perpiñán, O, Energía Solar Fotovoltaica, 2012. http://procomun.wordpress.com/documentos/libroesf/ Perpiñán, O. (2012), "solaR: Solar Radiation and Photovoltaic Systems with R", Journal of Statistical Software, 50(9), 1-32, http://www.jstatsoft.org/v50/i09/

See Also

fSolD

Examples

Run this code
###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