Skip to content

Commit

Permalink
Fixed tests after apparent_temperature bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
tlmquintino committed Oct 31, 2022
1 parent 78d72ce commit 7209111
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 59 deletions.
100 changes: 50 additions & 50 deletions tests/at.csv
Original file line number Diff line number Diff line change
@@ -1,50 +1,50 @@
5.100242432957708161e+01
3.449740895610079860e+01
2.074967507181270321e+00
2.096941171926744119e+00
2.160254141187522237e+00
2.262479193843887515e+00
2.338145633078909214e+00
2.511509240779616903e+00
2.599762969085702480e+00
2.642738204950546788e+00
2.801978837092974572e+00
2.799831929862136803e+00
2.851373327244516531e+00
2.838405532193178260e+00
2.810421970432855687e+00
2.766849465700261135e+00
2.671880179530717214e+00
2.620345791258614554e+00
2.583728871307698682e+00
2.465442113011420133e+00
2.399355705329412558e+00
2.352226447969542278e+00
2.264717458352549784e+00
2.152606649338906664e+00
2.035412884957622737e+00
1.990729871611904400e+00
2.464991514967704234e+01
2.445104963689163924e+01
2.389397117863717313e+01
2.382617606048461312e+01
2.383488495070884028e+01
2.441405668515216121e+01
2.504592470560618267e+01
2.583905228331690296e+01
2.774766396275197167e+01
2.928022309433919190e+01
3.174269497508419136e+01
3.230018527240406456e+01
3.263975143616852392e+01
3.279010555501537283e+01
3.269971309065846299e+01
3.180222740076209220e+01
3.125108149283875036e+01
2.986900463940935424e+01
2.901139119980211944e+01
2.844745086027921843e+01
2.713042435831607690e+01
2.621993961092107384e+01
2.515227198136460629e+01
2.479812433401065164e+01
5.236640221870072764e+01
3.451104873499201631e+01
2.479725552679497014e+00
2.502852852191892907e+00
2.563580588910781444e+00
2.663501536462035801e+00
2.737882522015013365e+00
2.912416936282284041e+00
3.004224330979354818e+00
3.052780166439447385e+00
3.221937408867859176e+00
3.228390141485817821e+00
3.252687595912391316e+00
3.250341068722150339e+00
3.230222445576544033e+00
3.194848804433604528e+00
3.104869627279470023e+00
3.057198011431580653e+00
3.019283650478939762e+00
2.895873549806992742e+00
2.825313182120510191e+00
2.775599145059459261e+00
2.685895803500159218e+00
2.574285418878332621e+00
2.428519960904850450e+00
2.392259786548038392e+00
2.544207976900497670e+01
2.522057704492198127e+01
2.464748772726488824e+01
2.457260608244905598e+01
2.458612246960097991e+01
2.516894453964016520e+01
2.580220845847588862e+01
2.658899861572785994e+01
2.846993396780635521e+01
2.995277886602622175e+01
3.225670319952337195e+01
3.275567792266883771e+01
3.305068850132727221e+01
3.318125912137014666e+01
3.310020966617560134e+01
3.224070141042290061e+01
3.174252429281858667e+01
3.045548113458363559e+01
2.969758649940848727e+01
2.921896609081181850e+01
2.797121313284014832e+01
2.711106343471271884e+01
2.603096310577751638e+01
2.569895076814128743e+01
10 changes: 1 addition & 9 deletions tests/test_scalars.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def test_apparent_temperature(self):
va = 3
at = tmf.calculate_apparent_temperature(t2mk, va)
# print(f"at {at}")
assert at == pytest.approx(27.844072534, abs=1e-6)
assert at == pytest.approx(29.89003936825, abs=1e-6)

def test_wbgts(self):
t2mk = tmf.celsius_to_kelvin(30.0)
Expand Down Expand Up @@ -147,14 +147,6 @@ def test_wbgt(self):
# print(f"wbgt {wbgt}")
assert wbgt[0] == pytest.approx(22.03818628, abs=1e-6)

def test_wbt_dj(self):
t2m = np.array([295])
td = np.array([290])
p = np.array([1000])
wbtdj = tmf.calculate_wbt_dj(t2k=t2m, p=p, tdk=td)

assert wbtdj == pytest.approx(45.114, abs=1e-3)

def test_calculate_cos_solar_zenith_angle(self):
# should return ~ 0.360303587797559
cossza = tmf.calculate_cos_solar_zenith_angle(
Expand Down

0 comments on commit 7209111

Please sign in to comment.