aiRthermo (version 1.0)

e2w: Compute Mixing Ratio from partial pressure of water vapour

Description

This function calculates the mixing ratio (kg/kg) from the partial vapour pressure of water vapour (Pa)

Usage

e2w(eh2o, P, consts = export_constants())

Arguments

eh2o

A vector with partial pressure of water vapour (Pa)

P

A vector with pressure (Pa) values

consts

The constants defined in aiRthermoConstants data are necessary.

Value

A vector with mixing ratio values

Examples

Run this code
# NOT RUN {
	
	
#Partial pressure of water vapour
data(RadiosondeA)
dPs<-RadiosondeA[,1]*100
dws<-RadiosondeA[,6]/1000
eh2o<-q2e(dPs,w2q(dws))
#Pressure
e2w(eh2o,dPs)
# }

Run the code above in your browser using DataCamp Workspace