aiRthermo (version 1.0)

virtual_temperature: Virtual Temperature

Description

This function calculates the virtual temperature from given pressure and mixing ratio.

Usage

virtual_temperature(P, Temp, w, consts = export_constants())

Arguments

P

A vector with pressure values in Pa

Temp

A vector with temperature values in Kelvin

w

A vector with mixing ratio values in kg/kg

consts

The constants defined in aiRthermoConstants data are necessary.

Value

This function returns a vector with virtual temperature values

See Also

q2e

Examples

Run this code
# NOT RUN {
data(RadiosondeD)
dPs<-RadiosondeD[,1]*100
dTs<-C2K(RadiosondeD[,3])
dws<-RadiosondeD[,6]/1000
virtual_temperature(dPs,dTs,dws)
# }

Run the code above in your browser using DataCamp Workspace