View source: R/esqc_Wet_Bulb_Calculator.R
1 | Tf_single(Ta, RH, elevation)
|
Ta |
|
RH |
|
elevation |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (Ta, RH, elevation)
{
press = (1 - ((0.0065 * elevation)/(273.15 + 15)))^5.255 *
1013
T = seq(from = -30, to = 30, by = 1)
lambda_array = 0.0016286 * (press/(2.501 - 0.002361 * T))
lambda = mean(lambda_array)
Tf = seq(from = -20, to = 30, by = 0.01)
VP1 = dampfdruck2(Ta, (RH/100))
VP2 = Dampfdrucksprung(Ta, Tf, lambda)
index = which(abs(VP2 - VP1) == min(abs(VP2 - VP1)))
Tfsingle = Tf[index]
return(Tfsingle)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.