Learn R Programming

solrad (version 1.0.0)

Solar: Calculating Solar Variables

Description

This function calculates solar variables including radiation components, solar angles and positions and day length.

Usage

Solar(DOY, Lat, Lon, SLon, DS, Elevation, Slope, Aspect)

Arguments

DOY

Day of year

Lat

Latitude (in degrees)

Lon

Longitude in degrees

SLon

Standard longitude (based on time zone) in degrees

DS

Daylight saving in minutes

Elevation

Elevation of the site in meters

Slope

Site slope in degrees

Aspect

Site aspect with respect to the south in degrees

Examples

Run this code
# NOT RUN {
#Calculating solar variables and angles

DOY <- seq(0, 2, .05)

solar <- Solar(DOY, Lat = 45, Lon=10, SLon=10, DS=0, Elevation = 1000, Slope = 10, Aspect = 0)
#Note: only the difference between Lon and SLon matters not each value

par(mfrow=c(3,1))
plot(DOY, solar$Altitude, ylim = c(-90,90))
plot(DOY, solar$Azimuth, col= 'red')

plot(DOY, solar$Sdiropen)
lines(DOY, solar$Sdifopen, col='red')

# }

Run the code above in your browser using DataLab