aiRthermo (version 1.1)

TTheta2P: Pressure from temperature and potential temperature

Description

This function calculates the pressure from given potential temperature and temperature, assuming a dry adiabatic evolution (mixing ratio is only used to correct the values of \(c_p\)).

Usage

TTheta2P(Temp, Theta, w = 0, consts = export_constants())

Arguments

Temp

A vector with temperature values in Kelvin

Theta

A vector with potential temperature values in Kelvin

w

Initial value of mixing ratio (kg/kg). By default 0.

consts

The constants defined in aiRthermoConstants data are necessary.

Value

This function returns a vector with pressure values

Examples

Run this code
# NOT RUN {
	data(RadiosondeD)
dPs<-RadiosondeD[,1]*100
dTs<-C2K(RadiosondeD[,3])
dws<-RadiosondeD[,6]/1000
dTds<-w2Td(dPs,dws)
dThetas<-PT2Theta(dPs,dTs)
TTheta2P(dTs,dThetas)

# }

Run the code above in your browser using DataLab