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, SpatRaster object, two-dimensional array or matrix of temperature (ºC).

h

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

p

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

Details

if tc is a SpatRaster, a SpatRaster 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 Sept. 5, 2024, 8:37 p.m.