View source: R/sw_dbW_WeatherDatabase.R
dbW_getWeatherData | R Documentation |
Weather data for the soil water simulation run can be stored in the input data or it can be separate to keep the input data size down for multiple variations of the same site. This function is used to return the weather data from a predefined weather database. Using the database was faster then reading in multiple weather files from disk.
dbW_getWeatherData(
Site_id = NULL,
lat = NULL,
long = NULL,
tol_xy = 1e-04,
Label = NULL,
startYear = NULL,
endYear = NULL,
Scenario = "Current",
Scenario_id = NULL,
ignore.case = FALSE,
stop_if_missing = TRUE,
verbose = FALSE
)
Site_id |
An integer value. The IDs/database key of the queried site. |
lat |
A numeric vector or |
long |
A numeric vector or |
tol_xy |
A numeric value. The tolerance used to match requested longitude and latitude values. |
Label |
A character string. The name/label of the queried site. |
startYear |
A numeric value. First calendar year of the weather data. |
endYear |
A numeric value. Last calendar year of the weather data. |
Scenario |
A character string. The name/label of a climate scenario. |
Scenario_id |
An integer value The ID/database key of the queried scenario. |
ignore.case |
A logical value. |
stop_if_missing |
A logical value. If |
verbose |
A logical value. |
If there is missing data, then impute or use the built-in Markov
weather generator (see examples for sw_exec
).
If one site and one scenario were requested, then returns
weather data as list. Each element is an object of class
swWeatherData
and contains data for one year.
If more than one site or more than scenario were requested, then returns
a list of such weather data lists.
Elements of the returned list may be NULL
if there is no
weather data object for the requested site scenario combination and if
stop_if_missing
is FALSE
.
This function returns the first record of weather data for a site x scenario combination even if duplicate entries match the query.
getWeatherData_folders
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.