Description Usage Arguments Value Author(s) See Also Examples
View source: R/basinLapseRates.R
This function calculates basin-wide historical lapse rates, by month and hour of day. The intent is to produce a file of rates that can be used for interpolation, when there are insufficient values to determine lapse rates from measured air temperatures. The lapse rates are determined as the slope of a linear regression of delta air temperature vs delta elevation for each time step. The delta air temperature is the difference in air temperature between each station's value and that of the lowest elevation station. The delta elevation is the difference between each station's elevation and that of the lowest-elevation station. Therefore the lapse rate is in K/m.
1 | basinLapseRates(temps = NULL, elevs = NULL)
|
temps |
Required. A time series data frame of air temperatures in
Celsius or K, as returned by |
elevs |
Required. A data frame of station elevations. Note that the first column must contain the station names (which must be the same as in the air temperatures), and the second column must contain the elevation (in m). |
If successful, returns a data frame with 24 rows (one for each hour), and 12 columns (one for each month), containing the lapse rates.
Kevin Shook
1 2 3 | ## Not run:
lapse_rates <- basinLapseRates(temperatures, elevations)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.