clear_sky: Clear sky models

Description Usage Arguments Value Examples

Description

Fit clear sky model.

Usage

1
2
clear_sky(model, x, y, data, dayofyear, year, interval, tz, latitude, longitude,
  elevation, parameters)

Arguments

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.

Value

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.

Examples

 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)

dslaw/clearskies documentation built on May 15, 2019, 4:21 p.m.