Description Usage Arguments References Examples
lcl
calculates the Lifting Condensation Level in
meters.
1 2 3 4 5 |
p |
Numeric; presusre in Pascals. |
tk |
Numeric; temperature in Kelvin. |
rh |
Numeric; relative humidity with respect to liquid water if tk >= 273.15 K and with respect to ice if tk < 273.15 K. |
rhl |
Numeric; relative humidity with respect to liquid water |
rhs |
Numeric; relative humidity with respect to ice |
return_ldl |
Logical; Do you want Lifting Deposition Level LDL? |
return_min_lcl_ldl |
Logical; Do you want min of LCL and LDL? |
tktrip |
Numeric; It is the triple-point temperature. Default 273.16 K |
ptrip |
Numeric; It is the triple-point vapour pressure. Default 611.65 Pa |
E0v |
Numeric; It is the difference in specific internal energy between water vapor and liquid at the triple point. Default = 2.3740E6 J/Kg. |
E0s |
Numeric; Default = 0.3337E6 J/Kg. |
ggr |
Numeric; gravity, 9.81 m/s^2 |
rgasa |
Numeric; gas constant for dry air 287.04 J/kg/K |
rgasv |
Numeric; gas constant for water vapor 461 J/kg/K |
cva |
Numeric; 719 J/kg/K |
cvv |
Numeric; 1418 J/kg/K |
cvl |
Numeric; 4119 J/kg/K |
cvs |
Numeric; 1861 J/kg/K |
cpa |
Numeric; cva + rgasa |
cpv |
Numeric; cvv + rgasv |
Romps, D. M. (2017). Exact Expression for the Lifting Condensation Level. Journal of the Atmospheric Sciences, 74(12), 3891-3900.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | {
a <- abs(lcl(1e5,300,rhl=.5,return_ldl=FALSE))
b <- 1433.844139279*units::as_units("m")
c <- 1
as.numeric(a / b) - c < 1e-10
if(
abs(as.numeric(lcl(1e5,300,rhs=.5,return_ldl=FALSE))/( 923.2222457185)-1) < 1e-10 &
abs(as.numeric(lcl(1e5,200,rhl=.5,return_ldl=FALSE))/( 542.8017712435)-1) < 1e-10 &
abs(as.numeric(lcl(1e5,200,rhs=.5,return_ldl=FALSE))/( 1061.585301941)-1) < 1e-10 &
abs(as.numeric(lcl(1e5,300,rhl=.5,return_ldl=TRUE ))/( 1639.249726127)-1) < 1e-10 &
abs(as.numeric(lcl(1e5,300,rhs=.5,return_ldl=TRUE ))/( 1217.336637217)-1) < 1e-10 &
abs(as.numeric(lcl(1e5,200,rhl=.5,return_ldl=TRUE ))/(-8.609834216556)-1) < 1e-10 &
abs(as.numeric(lcl(1e5,200,rhs=.5,return_ldl=TRUE ))/( 508.6366558898)-1) < 1e-10 ) {
cat('Success\n')
} else {
cat('Failure\n')
}
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.