Update IBTrACS version #1059
4 fail, 704 pass in 8m 56s
708 tests 704 ✅ 8m 56s ⏱️
1 suites 0 💤
1 files 4 ❌
Results for commit 6a28387.
Annotations
Check warning on line 0 in climada.hazard.test.test_tc_tracks.TestIbtracs
github-actions / Core / Unit Test Results (3.10)
test_ibtracs_correct_pass (climada.hazard.test.test_tc_tracks.TestIbtracs) failed
tests_xml/tests.xml [took 1s]
Raw output
AssertionError: 1006.7886 != 1008 within 0 places (1.21142578125 difference)
self = <climada.hazard.test.test_tc_tracks.TestIbtracs testMethod=test_ibtracs_correct_pass>
def test_ibtracs_correct_pass(self):
"""Check estimate_missing option"""
tc_try = tc.TCTracks.from_ibtracs_netcdf(
provider="usa", storm_id="1982267N25289", estimate_missing=True
)
self.assertAlmostEqual(
tc_try.data[0]["central_pressure"].values[0], 1013, places=0
)
> self.assertAlmostEqual(
tc_try.data[0]["central_pressure"].values[5], 1008, places=0
)
E AssertionError: 1006.7886 != 1008 within 0 places (1.21142578125 difference)
climada/hazard/test/test_tc_tracks.py:280: AssertionError
Check warning on line 0 in climada.hazard.test.test_tc_tracks.TestIbtracs
github-actions / Core / Unit Test Results (3.10)
test_penv_rmax_penv_pass (climada.hazard.test.test_tc_tracks.TestIbtracs) failed
tests_xml/tests.xml [took 1s]
Raw output
AssertionError: False is not true
self = <climada.hazard.test.test_tc_tracks.TestIbtracs testMethod=test_penv_rmax_penv_pass>
def test_penv_rmax_penv_pass(self):
"""from_ibtracs_netcdf"""
tc_track = tc.TCTracks.from_ibtracs_netcdf(
provider="usa", storm_id="1992230N11325"
)
penv_ref = np.ones(97) * 1010
penv_ref[26:36] = [1011, 1012, 1013, 1014, 1015, 1014, 1014, 1014, 1014, 1012]
> self.assertTrue(
np.allclose(tc_track.get_track()["environmental_pressure"].values, penv_ref)
)
E AssertionError: False is not true
climada/hazard/test/test_tc_tracks.py:87: AssertionError
Check warning on line 0 in climada.hazard.test.test_tc_tracks.TestFuncs
github-actions / Core / Unit Test Results (3.10)
test_generate_centroids (climada.hazard.test.test_tc_tracks.TestFuncs) failed
tests_xml/tests.xml [took 1s]
Raw output
AssertionError:
Arrays are not almost equal to 6 decimals
Mismatched elements: 2 / 4 (50%)
Max absolute difference: 0.0149841
Max relative difference: 9.50858357e-05
x: array([157.600006, -19.200001, 257.600006, 10.799999])
y: array([157.585022, -19.200001, 257.585022, 10.799999])
self = <climada.hazard.test.test_tc_tracks.TestFuncs testMethod=test_generate_centroids>
def test_generate_centroids(self):
"""Test centroids generation feature."""
storms = ["1988169N14259", "2002073S16161", "2002143S07157"]
tc_track = tc.TCTracks.from_ibtracs_netcdf(
storm_id=storms, provider=["usa", "bom"]
)
cen = tc_track.generate_centroids(10, 1)
cen_bounds = (157.585022, -19.200001, 257.585022, 10.799999)
self.assertEqual(cen.size, 44)
self.assertEqual(np.unique(cen.lat).size, 4)
self.assertEqual(np.unique(cen.lon).size, 11)
np.testing.assert_array_equal(np.diff(np.unique(cen.lat)), 10)
np.testing.assert_array_equal(np.diff(np.unique(cen.lon)), 10)
> np.testing.assert_array_almost_equal(cen.total_bounds, cen_bounds)
climada/hazard/test/test_tc_tracks.py:727:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../micromamba/envs/climada_env_3.10/lib/python3.10/contextlib.py:79: in inner
return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_array_almost_equal.<locals>.compare at 0x7fa6702e5120>, array([157.6000061 , -19.20000076, 257.6000061 , 10.79999924]), (157.585022, -19.200001, 257.585022, 10.799999))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 6 decimals', 'precision': 6, 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 6 decimals
E
E Mismatched elements: 2 / 4 (50%)
E Max absolute difference: 0.0149841
E Max relative difference: 9.50858357e-05
E x: array([157.600006, -19.200001, 257.600006, 10.799999])
E y: array([157.585022, -19.200001, 257.585022, 10.799999])
../../../micromamba/envs/climada_env_3.10/lib/python3.10/contextlib.py:79: AssertionError
Check warning on line 0 in climada.hazard.test.test_tc_tracks.TestFuncs
github-actions / Core / Unit Test Results (3.10)
test_get_extent (climada.hazard.test.test_tc_tracks.TestFuncs) failed
tests_xml/tests.xml [took 1s]
Raw output
AssertionError:
Arrays are not almost equal to 6 decimals
Mismatched elements: 3 / 4 (75%)
Max absolute difference: 0.01499905
Max relative difference: 0.00085561
x: array([153.600006, -23.200001, 258.699997, 17.5 ])
y: array([153.585022, -23.200001, 258.714996, 17.514986])
self = <climada.hazard.test.test_tc_tracks.TestFuncs testMethod=test_get_extent>
def test_get_extent(self):
"""Test extent/bounds attributes."""
storms = ["1988169N14259", "2002073S16161", "2002143S07157"]
tc_track = tc.TCTracks.from_ibtracs_netcdf(
storm_id=storms, provider=["usa", "bom"]
)
bounds = (153.585022, -23.200001, 258.714996, 17.514986)
bounds_buf = (153.485022, -23.300001, 258.814996, 17.614986)
> np.testing.assert_array_almost_equal(tc_track.bounds, bounds)
climada/hazard/test/test_tc_tracks.py:706:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../../../micromamba/envs/climada_env_3.10/lib/python3.10/contextlib.py:79: in inner
return func(*args, **kwds)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
args = (<function assert_array_almost_equal.<locals>.compare at 0x7fa6ac439870>, (153.60000610351562, -23.200000762939453, 258.6999969482422, 17.5), (153.585022, -23.200001, 258.714996, 17.514986))
kwds = {'err_msg': '', 'header': 'Arrays are not almost equal to 6 decimals', 'precision': 6, 'verbose': True}
@wraps(func)
def inner(*args, **kwds):
with self._recreate_cm():
> return func(*args, **kwds)
E AssertionError:
E Arrays are not almost equal to 6 decimals
E
E Mismatched elements: 3 / 4 (75%)
E Max absolute difference: 0.01499905
E Max relative difference: 0.00085561
E x: array([153.600006, -23.200001, 258.699997, 17.5 ])
E y: array([153.585022, -23.200001, 258.714996, 17.514986])
../../../micromamba/envs/climada_env_3.10/lib/python3.10/contextlib.py:79: AssertionError