Small bugfix in CO2 implementation of Ciddor function

This commit is contained in:
yosata committed 2020-05-28 11:30:37 +02:00
1 parent 1819c5f632
commit 835ff586ab
1 file changed
+4 -2
+4 -2
View File
@@ -32,10 +32,10 @@ def BarrellAndSears(l, T=288.15, p=101325, H=0):
n = R/1e6 + 1
return n
def Ciddor(l):
def Ciddor(l, CO2=450):
'''
From Ciddor, 1996
Equations 1
Equations 1 and 2
At default conditions only. For more flexibility use
Observatory.n_tph()
@@ -47,6 +47,8 @@ def Ciddor(l):
'''
s = 1 / l
R = 5792105 / (238.0185 - s**2) + 167917 / (57.362 - s**2)
if CO2 != 450:
R = R * (1 + 0.534e-6 * (CO2 - 450))
n = R/1e8 + 1
return n