Description Usage Arguments Details Value Note Author(s) References See Also Examples
Functions to calculate sun elevation angle and solar radiation by hour, and maximum daily. Applies to one day or sequence of multiple consecutive days. Also included is azimuth by hour and atmospheric effects.
1 2 3 4 5 6 7 8 | sun.dec(nday)
sun.elev.max(nday,lat)
sun.rad.yr(nday,lat,Lm)
sun.elev.hr(nday, lat,hr.noon)
sun.rad.hr(nday,lat,hr.noon,Lm,sdr=0)
sun.rad.hr.mult(nday,lat,Lm,sdr=0,sw.plot=T)
sun.path(nday,lat)
sun.atmos(nday,lat,rho)
|
nday |
day of the year |
lat |
latitude |
Lm |
max radiation in the day |
hr.noon |
hour with respect to noon, negative for hours before noon, and positive for hours after noon |
sdr |
An optional argument with default value zero is the standard deviation of noise or variability to be imposed on the hourly radiation |
sw.plot |
optional logical variable to decide to plot the results |
rho |
reflectivity |
sun.dec: calculates declination for a given day of the year sun.elev.max: maximum sun elevation angle for a given day sun.rad.yr: uses the annual average of maximum radiation in the day Lm to convert maximum elevation into radiation. sun.elev.hr: Sun elevation by hour during the day requires an argument for the hour with respect to noon. Elevation is made zero when the calculation yields negative values. sun.rad.hr: uses the annual average of maximum radiation in the day Lm to convert elevation by hour into radiation by hour (optionally can impose variability). sun.rad.hr.mult:calculates hourly radiation for multiple consecutive days. sun.path: calculates sun elevation and azimuth by hour of the day. sun.atmos: calculates atmospheric effects.
dec |
declination |
elev |
maximum sun elevation angle for the day or for each hr of the day |
rad |
radiation for the day, for each hour of teh day, or for the running hour in multiple days |
hr.cum |
total running hr for multiple days |
hr.noon |
hour with respect to noon |
azi |
azimuth |
I0 |
ET solar radiation kW/m2 |
A |
atmospheric effect |
opt.depth |
optical depth |
air.mass |
air mass |
I |
matrix containing IB=direct baeam, ID=diffuse, IR=reflected, and IT=total |
Support for ecosystem simulation
Miguel F. Acevedo Acevedo@unt.edu
Acevedo M.F. 2012. Simulation of Ecological and Environmental Models. CRC Press.
Masters G. 2004. Renewable and Efficient Electric Power Systems, Wiley-IEEE Press.
Primary productivity functions PPrates.depth
, PP.Steele
, DO.PP.pond
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 | ## Not run:
# day of year
nday <- seq(1,365); nd <- length(nday)
dec <- sun.dec(nday)
lat = c(-32,-23.45,23.45,32); nl <- length(lat)
elev <- matrix(nrow=nd,ncol=nl)
for(i in 1:nl) elev[,i] <- sun.elev.max(nday,lat[i])
nday <- seq(1,365); nd <- length(nday)
Lm = c(500,600); nl <- length(Lm)
lat <- 32.90
rad <- matrix(nrow=nd,ncol=nl)
for(i in 1:nl) rad[,i] <- sun.rad.yr(nday,lat,Lm[i])
# latitude tropic, and dallas (DFW)
lat = c(23.45,32.90); nl <- length(lat)
nday = c(15,81,180); nd <- length(nday)
hr.noon <- seq(-12,+12,0.1); nh <- length(hr.noon)
elev <- matrix(nrow=nh,ncol=nl);rad <- matrix(nrow=nh,ncol=nl)
j=1
for(i in 1:nl){
elev[,i] <- sun.elev.hr(nday[j],lat[i],hr.noon)
rad[,i] <- sun.rad.hr(nday[j],lat[i],hr.noon,Lm=600)
}
elev <- matrix(nrow=nh,ncol=nd);rad <- matrix(nrow=nh,ncol=nd)
j=2
for(i in 1:nd){
elev[,i] <- sun.elev.hr(nday[i],lat[j],hr.noon)
rad[,i] <- sun.rad.hr(nday[i],lat[j],hr.noon,Lm=600)
}
# latitude dallas (DFW)
lat = 32.90; nday = c(39:41); Lm=600
X <- sun.rad.hr.mult(nday,lat,Lm,sdr=0,sw.plot=TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.