EF behavior of ef_ldv_speed function
Joaobazzo opened this issue · 4 comments
Hi Sergio,
Do you have any idea why this happens? I dont think it will change much of the results, but it looks like a basic discontinuity on the function...
I'm using the developing version
I'm trying to download Appendix 3 of EMEP/EEA guidebook but so far I'm not finding it
ef <- vein::ef_ldv_speed(v = "LCV",eu = "V",cc = "<3.5",
f = "G",p = "NOx",show.equation = T,
speed = vein::Speed(1:100,"km/h"))
#> a = 0.046, b = -0.017, c = -0.002, d = -0.002, e = 0, f = -0.019
#> Equation = ((a+ c*V+e*V^2+f/V )/(1+b*V+ d*V^2))*1*1
ef1 <- vein::ef_ldv_speed(v = "LCV",eu = "V",cc = "<3.5",
f = "G",p = "CO",show.equation = T,
speed = vein::Speed(1:100,"km/h"))
#> a = 0.343, b = -0.013, c = -0.007, d = 0, e = 0, f = 3.098
#> Equation = ((a+ c*V+e*V^2+f/V )/(1+b*V+ d*V^2))*1*1
par(mfrow=c(2,1))
plot(1:100,ef,type="o",main="NOx")
plot(1:100,ef1,type="o",main = "CO")
Created on 2020-03-11 by the reprex package (v0.3.0)
Hello @Joaobazzo thanks for reporting this important issue. I will check. I used the 2016 version of the guidelines present here
https://www.eea.europa.eu/publications/emep-eea-guidebook-2016
These were the EF for LCV in 2016
This the equations
Which is effectively giving me
I noticed that the version 2019 updated this EF. Therefore, I need to update internal data-base. As there is a lot of effort in ef_ldv_speed and ef_hdv_speed and the new EF includes more vehicular characterization, I think I will include a new function to access and speciate the new emission database https://www.eea.europa.eu/publications/emep-eea-guidebook-2019/part-b-sectoral-guidance-chapters/1-energy/1-a-combustion/road-transport-appendix-4-emission/view.
And then replace/update the internal databases from ef_ldv_speed and ef_hdv_speed
:/
Maybe, in the meantime, it could internally replaced by PC under the conditions of
LCV and Euro V.
i did it:
if(v == "LCV" && eu == "V") {
warning("When `v` is 'LCV' and `eu` is 'V', replaces `v` by 'PC' and `cc` by >'2000' see issue #204")
v <- "PC"
cc <- ">2000"
}
Thanks, Sergio, I'm taking a look on EMEP/EEA documentation.
I did exactly it, changed the EF condition to PC.
And thanks for letting me know about the new EFs!