
Last chance! 50% off unlimited learning
Sale ends in
Functions related to common atmospheric thermodynamic relationships.
IdealGas(p, t, rho, R = 287.058)Adiabat(p, t, theta, p0 = 1e+05, kappa = 2/7)
VirtualTemperature(p, t, e, tv, epsilon = 0.622)
MixingRatio(p, e, w, epsilon = 0.622)
ClausiusClapeyron(t, es)
DewPoint(p, ws, td, epsilon = 0.622)
Each function returns the value of the missing state variable.
pressure
temperature
density
gas constant for air
potential temperature
reference pressure
ratio of dry air constant and specific heat capacity at constant pressure
vapour partial pressure
virtual temperature
ratio of dry air constant and vapour constant
mixing ratio
saturation vapour partial pressure
saturation mixing ratio
dewpoint
IdealGas
computes pressure, temperature or density of air according to the
ideal gas law
Adiabat
computes pressure, temperature or potential temperature according to
the adiabatic relationship
VirtualTemperature
computes pressure, temperature, vapour partial pressure or
virtual temperature according to the virtual temperature definition
MixingRatio
computes pressure, vapour partial temperature, or mixing ratio
according to
ClausiusClapeyron
computes saturation pressure or temperature according
to the August-Roche-Magnus formula
DewPoint
computes pressure, saturation mixing ration or dew point
from the relationship
Is important to take note of the units in which each variable is provided.
With the default values, pressure should be passed in Pascals, temperature and
potential temperature in Kelvins, and density in ClausiusClayperon
and DewPoint
require and return values in those units.
The defaults value of the R
and kappa
parameters are correct for dry air,
for the case of moist air, use the virtual temperature instead of the actual
temperature.
http://www.atmo.arizona.edu/students/courselinks/fall11/atmo551a/ATMO_451a_551a_files/WaterVapor.pdf
Other meteorology functions:
Derivate()
,
EOF()
,
GeostrophicWind()
,
WaveFlux()
,
waves
IdealGas(1013*100, 20 + 273.15)
IdealGas(1013*100, rho = 1.15) - 273.15
(theta <- Adiabat(70000, 20 + 273.15))
Adiabat(70000, theta = theta) - 273.15
# Relative humidity from T and Td
t <- 25 + 273.15
td <- 20 + 273.15
p <- 1000000
(rh <- ClausiusClapeyron(td)/ClausiusClapeyron(t))
# Mixing ratio
ws <- MixingRatio(p, ClausiusClapeyron(t))
w <- ws*rh
DewPoint(p, w) - 273.15 # Recover Td
Run the code above in your browser using DataLab