calc_globrad {LWFBrook90R}R Documentation

Calculate global solar radiation from sunshine duration hours

Description

Uses functions taken from the 'sirad' package to determine astronomical daylength and extraterrestrial radiation, from which global radiation is calculated using the Angström-formula.

Usage

calc_globrad(dates, sunhours, lat, a0 = 0.25, b0 = 0.5, full_output = FALSE)

Arguments

dates

Date vector

sunhours

Vector of sunshine duration hours, same length as dates.

lat

Latitude in decimal degrees.

a0

Angström parameter a, defaults to 0.25.

b0

Angström parameter b, defaults to 0.5.

full_output

Return extraterrestrial radiation and daylength along with global radiation?

Value

A sequence of global radiation in MJ/(m² d) with the length of dates, or (if full_output = TRUE) a data.frame holding day of year, dates, sunhours, daylength, and extraterrestrial and calculated global solar radiation. A warning is generated if some sunshine duration hours are higher than the expected daylength at the specified latitude.

Examples

dates <- seq.Date(as.Date("2002-01-01"), as.Date("2003-12-31"), by = 'day')
calc_globrad(dates, sunhours = runif(365, 0, 7),lat = 52.8)
calc_globrad(dates, sunhours = runif(365, 0, 7),lat = 52.8, full_output = TRUE)

[Package LWFBrook90R version 0.5.3 Index]