basinLapseRates: Calculates basin-wide lapse rates

Description Usage Arguments Value Author(s) See Also Examples

View source: R/basinLapseRates.R

Description

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.

Usage

1
basinLapseRates(temps = NULL, elevs = NULL)

Arguments

temps

Required. A time series data frame of air temperatures in Celsius or K, as returned by read_tb0. The first column must be datetime, which is a POSIXct value. Each station's elevation will be in a separate column.

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).

Value

If successful, returns a data frame with 24 rows (one for each hour), and 12 columns (one for each month), containing the lapse rates.

Author(s)

Kevin Shook

See Also

gridTemp read_tb0

Examples

1
2
3
## Not run: 
lapse_rates <- basinLapseRates(temperatures, elevations)
## End(Not run)

CentreForHydrology/MESHr documentation built on Jan. 11, 2021, 8:34 p.m.