Description Usage Arguments Value Examples
Fit clear sky model.
1 2 |
model |
Name of model to be fit. |
x |
Dataframe, named list or named vector containing date information for model. Must have elements named 'DayOfYear', 'Year' and 'Interval'. Alternatively, dayofyear, year and interval can be passed directly to clear_sky as arguments. |
y |
Dataframe, named list or named vector containing location information for model. Must have elements named 'Latitude', 'Longitude', 'Timezone' or 'TZ' and, if necessary for the model, 'Elevation'. Alternatively, latitude, longitude, timezone and elevation can be passed directly to clear_sky as arguments. |
data |
Vector of observed data corresponding to the model. Optional. |
dayofyear |
A vector of the day(s) of the year that the model is to be fit to. Ignore if using x. |
year |
A vector of the year(s) that the model is to be fit to. If using x, ignore. |
interval |
Interval, in minutes, for which the model is to be fit, starting from midnight. Ignore if using x. |
tz |
Timezone/UTC Offset. Ignore if using y. |
latitude |
Latitude of the location for the model. Ignore if using y. |
longitude |
Longitude of the location for the model. Ignore if using y. |
elevation |
Elevation of the location for the model. Ignore if using y. |
parameters |
Optional named vector or list of parameters for the model. |
An object of class 'clearsky' containing the components predicted, a vector of predicted GHI values corresponding to the specified interval, model, the model name, and time.interval, the specified interval. If observed data is passed via the data argument, the 'clearsky' object will also contain the component observed, the vector of observed data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | # Fit Robledo-Soler model to the year of 2014 for Eugene, Oregon
time_info <- list(DayOfYear = 1:365,
Year = 2014,
Interval = 1)
location_info <- list(Latitude = 44.05,
Longitude = -123.07,
TZ = -8)
model_params <- c(a = 1000, b = 1.5, c = 0.2)
model <- clear_sky('RS', x = time_info, y = location_info,
parameters = model_params)
# Alternatively, pass time and location arguments direct to the model
model <- clear_sky('RS', dayofyear = 1:365, year = 2014, interval = 1,
latitude = 44.05, longitude = -123.07, tz = -8)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.