lapserate: Calculates the moist adiabatic lapse rate

View source: R/othertools.R

lapserateR Documentation

Calculates the moist adiabatic lapse rate

Description

lapserate is used to calculate changes in temperature with height.

Usage

lapserate(tc, h, p = 101300)

Arguments

tc

a single numeric value, raster object, two-dimensional array or matrix of temperature (ºC).

h

a single numeric value, raster object, two-dimensional array or matrix of specific humidity (kg kg-1 ).

p

an optional single numeric value, raster object, two-dimensional array or matrix of atmospheric pressure (Pa).

Details

if tc is a raster, a raster object is returned. This function calculates the theoretical lapse rate. Environmental lapse rates can vary due to winds.

Value

the lapse rate (º m-1 ).

Examples

lapserate(20, 0) * 1000 # dry lapse rate per km
h <- humidityconvert(100, intype = "relative", 20)
lapserate(20, h$specific) * 1000 # lapse rate per km when relative humidity is 100%

ilyamaclean/microclima documentation built on Oct. 31, 2023, 11:41 p.m.