View source: R/simpleMaxSolar.R
simpleMaxSolar | R Documentation |
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,
simpleMaxSolar(datetime, latitude, hoursOffset = 2, quiet = TRUE, logfile = "")
datetime |
Required. Can either be a vector of CRHMr datetimes or
any dataframe with a |
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
|
logfile |
Optional. Name of the file to be used for logging the action. Normally not used. |
If successful, returns a dataframe containing these variables:
datetime
So_MJ
, the daily extra-terrestrial radiation in MJ/m^2
So_W
, the daily extra-terrestrial radiation in W/m^2
R_h_d
, the conversion from daily to hourly fluxes
So_h_W
, the sub-daily extra-terrestrial radiation in W/m^2
So_h_MJ
, the sub-daily extra-terrestrial radiation in MJ/m^2
If unsuccessful, the value FALSE
will be returned.
This version is valid for latitudes between 49 ^\circ
N and 55^\circ
N. It is not known how well it will perform outside this range.
Kevin Shook
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.
maxSolar <- simpleMaxSolar(BadLake7376, 51.366)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.