Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
emanuel-schmid committed Jul 19, 2024
2 parents dc47702 + 410f154 commit e2874ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion climada_petals/hazard/test/test_tc_rainfield.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
_track_to_si_with_q_and_shear,
)
from climada.util.api_client import Client
from climada.util.constants import DEMO_DIR
from climada.util.constants import SYSTEM_DIR


def getTestData():
Expand Down Expand Up @@ -112,6 +112,8 @@ def test_tcr(self):
self.assertAlmostEqual(tc_haz.intensity[0, 100], 123.55255892009247)
self.assertAlmostEqual(tc_haz.intensity[0, 260], 15.148539942329757)

@unittest.skipUnless(SYSTEM_DIR.joinpath("IBTrACS.ALL.v04r00.nc").is_file(),
"IBTrACS file is missing, no download in unitttests")
def test_cross_antimeridian(self):
# Two locations on the island Taveuni (Fiji), one west and one east of 180° longitude.
# We list the second point twice, with different lon-normalization:
Expand Down
3 changes: 3 additions & 0 deletions climada_petals/hazard/test/test_tc_surge_bathtub.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

from climada.hazard import Centroids, TCTracks, TropCyclone
from climada_petals.hazard.tc_surge_bathtub import _fraction_on_land, TCSurgeBathtub
from climada.util.constants import SYSTEM_DIR


class tmp_artifical_topo(object):
Expand Down Expand Up @@ -175,6 +176,8 @@ def test_surge_from_track(self):
self.assertAlmostEqual(inten[9, 31], max(-1.270 + slr, 0), places=2)
self.assertAlmostEqual(inten[14, 34] - slr, 2.805, places=2)

@unittest.skipUnless(SYSTEM_DIR.joinpath("IBTrACS.ALL.v04r00.nc").is_file(),
"IBTrACS file is missing, no download in unitttests")
def test_cross_antimeridian(self):
# Two locations on the island Taveuni (Fiji), one west and one east of 180° longitude.
# We list the second point twice, with different lon-normalization:
Expand Down

0 comments on commit e2874ff

Please sign in to comment.