-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model B discontinuity at 50% Humidity #68
Comments
I've found a temporary solutions in the meanwhile @anadiedrichs will fix the package. There are two main problems:
So i've slightly modified the algorithm introducing those limitations and introducing the possibility of having the full range formula using equation 8 #Workaround calcDewPoint.B MOD
The new calcDewPoint.Bmod function documentation could be Arguments Value Here below the results
in order to see deviations from humidity.to.dewpoint from weathermetrics package powered by Brooke Anderson https://github.com/geanders/weathermetrics/ ex<-data.table::CJ(Temperature=seq(-20,60,1),Humidity=seq(0,100,5) )
ex<-rbind(cbind(ex,Dewpoint=calcDewPoint(ex$Humidity, ex$Temperature,mode="A")-weathermetrics::humidity.to.dewpoint(rh = ex$Humidity, t = ex$Temperature, temperature.metric = "celsius"),Model=c(rep("A",dim(ex)[1]))),
cbind(ex,Dewpoint=calcDewPoint(ex$Humidity, ex$Temperature,mode="B")-weathermetrics::humidity.to.dewpoint(rh = ex$Humidity, t = ex$Temperature, temperature.metric = "celsius"),Model=c(rep("B_Original",dim(ex)[1]))),
cbind(ex,Dewpoint=calcDewPoint.Bmod(ex$Humidity, ex$Temperature, equation="linear")-weathermetrics::humidity.to.dewpoint(rh = ex$Humidity, t = ex$Temperature, temperature.metric = "celsius"),Model=c(rep("BmodLinear",dim(ex)[1]))),
cbind(ex,Dewpoint=calcDewPoint.Bmod(ex$Humidity, ex$Temperature, equation="quadratic")-weathermetrics::humidity.to.dewpoint(rh = ex$Humidity, t = ex$Temperature, temperature.metric = "celsius"),Model=c(rep("BmodQuadratic",dim(ex)[1]))),
cbind(ex,Dewpoint=calcDewPoint.Bmod(ex$Humidity, ex$Temperature, equation="Log")-weathermetrics::humidity.to.dewpoint(rh = ex$Humidity, t = ex$Temperature, temperature.metric = "celsius"),Model=c(rep("BmodLog",dim(ex)[1]))) ,
cbind(ex,Dewpoint=calcDewPoint(ex$Humidity, ex$Temperature,mode="C")-weathermetrics::humidity.to.dewpoint(rh = ex$Humidity, t = ex$Temperature, temperature.metric = "celsius"),Model=c(rep("C",dim(ex)[1]))))
ex %>%
filter(Model!="B_Original" & Model!="C") %>%
ggplot( aes(x=Humidity, y=Dewpoint, group=Temperature, color=Temperature)) +
geom_line() +
viridis::scale_color_viridis(discrete = FALSE, option="magma") +
theme(
legend.position="none",
plot.title = element_text(size=14)
) +
facet_wrap(~Model) ex %>%
filter(Model=="B_Original" ) %>%
ggplot( aes(x=Humidity, y=Dewpoint, group=Temperature, color=Temperature)) +
geom_line() +
viridis::scale_color_viridis(discrete = FALSE, option="magma") +
theme(
legend.position="none",
plot.title = element_text(size=14)
) +
facet_wrap(~Model)
ex %>%
filter(Model=="C" ) %>%
ggplot( aes(x=Humidity, y=Dewpoint, group=Temperature, color=Temperature)) +
geom_line() +
viridis::scale_color_viridis(discrete = FALSE, option="magma") +
theme(
legend.position="none",
plot.title = element_text(size=14)
) +
facet_wrap(~Model)
|
Dear all
here my example
What's happen to model B?
The text was updated successfully, but these errors were encountered: