simpleMaxSolar: Estimates extra-terrestrial shortwave radiation

View source: R/simpleMaxSolar.R

simpleMaxSolarR Documentation

Estimates extra-terrestrial shortwave radiation

Description

Simple estimation of extra-terrestrial radiation on a horizontal plane. Daily and sub-daily values in MJ/m^2 and W/m^2 are provided,

Usage

simpleMaxSolar(datetime, latitude, hoursOffset = 2, quiet = TRUE, logfile = "")

Arguments

datetime

Required. Can either be a vector of CRHMr datetimes or any dataframe with a datetime in column 1.

latitude

Required. The latitude for which values are to calculated.

hoursOffset

Optional. The offset (in hours) is added to the solar time to convert it to local time. The default value 2 shifts the daily peak to occur at 2 pm.

quiet

Optional. Suppresses display of messages, except for errors. If you are calling this function in an R script, you will usually leave quiet=TRUE (i.e. the default). If you are working interactively, you will probably want to set quiet=FALSE.

logfile

Optional. Name of the file to be used for logging the action. Normally not used.

Value

If successful, returns a dataframe containing these variables:

  1. datetime

  2. So_MJ, the daily extra-terrestrial radiation in MJ/m^2

  3. So_W, the daily extra-terrestrial radiation in W/m^2

  4. R_h_d, the conversion from daily to hourly fluxes

  5. So_h_W, the sub-daily extra-terrestrial radiation in W/m^2

  6. So_h_MJ, the sub-daily extra-terrestrial radiation in MJ/m^2

If unsuccessful, the value FALSE will be returned.

Note

This version is valid for latitudes between 49 ^\circN and 55^\circN. It is not known how well it will perform outside this range.

Author(s)

Kevin Shook

References

This code is based on Shook, K., and J. Pomeroy (2011), “Synthesis of incoming shortwave radiation for hydrological simulation”, Hydrol. Res., 42(6), 433, doi:10.2166/nh.2011.074.
Please cite this paper if you use this function in a publication.

Examples

maxSolar <- simpleMaxSolar(BadLake7376, 51.366)

CentreForHydrology/CRHMr documentation built on April 6, 2024, 5:27 p.m.