aiRthermo (version 1.1)

PT2Theta: Potential Temperature from pressure and temperature

Description

This function calculates the potential temperature from given temperature and pressure

Usage

PT2Theta(P, Temp, w = 0, consts = export_constants())

Arguments

P

A vector with pressure values (Pa)

Temp

A vector with temperature values (K)

w

A vector with mixing ratio values (kg/kg). Default value 0.

consts

The constants defined in aiRthermoConstants data are necessary.

Value

This function returns a vector with potencial temperature. Mixing ratio is only used to correct the value of \(c_p\), not to calculate a moist adiabatic evolution.

See Also

moistCp

Examples

Run this code
# NOT RUN {
data(RadiosondeD)
dPs<-RadiosondeD[,1]*100
dTs<-C2K(RadiosondeD[,3])
dThetas=PT2Theta(dPs,dTs)
# }

Run the code above in your browser using DataLab