From 9dfa647d7c8283e5e319964d08e3b7b5d8a6abdd Mon Sep 17 00:00:00 2001 From: Fabien Maussion Date: Sat, 24 Aug 2024 13:33:18 +0100 Subject: [PATCH] more fixes --- oggm/tests/test_prepro.py | 3 +-- oggm/tests/test_shop.py | 4 ++-- oggm/tests/test_utils.py | 1 + 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/oggm/tests/test_prepro.py b/oggm/tests/test_prepro.py index a8ed9e94e..0e93558ec 100644 --- a/oggm/tests/test_prepro.py +++ b/oggm/tests/test_prepro.py @@ -424,12 +424,11 @@ def test_glacier_masks_other_glacier(self): reason='requires rasterio >= 1.0') def test_rasterio_glacier_masks(self): - cfg.PARAMS['map_proj'] = 'tmerc' - # The GIS was double checked externally with IDL. hef_file = get_demo_file('Hintereisferner_RGI5.shp') entity = gpd.read_file(hef_file).iloc[0] + cfg.PARAMS['map_proj'] = 'tmerc' gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir) gis.define_glacier_region(gdir) diff --git a/oggm/tests/test_shop.py b/oggm/tests/test_shop.py index 83a84e2dd..3c2454c7f 100644 --- a/oggm/tests/test_shop.py +++ b/oggm/tests/test_shop.py @@ -138,7 +138,7 @@ def test_thickvel_to_glacier(self, class_case_dir, monkeypatch): thick = ds.millan_ice_thickness.where(mask).data # Simply some coverage and sanity checks - assert np.isfinite(thick).sum() / mask.sum() > 0.98 + assert np.isfinite(thick).sum() / mask.sum() > 0.97 assert np.nanmax(thick) > 800 assert np.nansum(thick) * gdir.grid.dx**2 * 1e-9 > 174 @@ -152,7 +152,7 @@ def test_thickvel_to_glacier(self, class_case_dir, monkeypatch): vy = ds.millan_vy.where(mask).data # Simply some coverage and sanity checks - assert np.isfinite(v).sum() / mask.sum() > 0.98 + assert np.isfinite(v).sum() / mask.sum() > 0.97 assert np.nanmax(v) > 2000 assert np.nanmax(vx) > 500 assert np.nanmax(vy) > 400 diff --git a/oggm/tests/test_utils.py b/oggm/tests/test_utils.py index 2d8094bd3..77228d919 100644 --- a/oggm/tests/test_utils.py +++ b/oggm/tests/test_utils.py @@ -1686,6 +1686,7 @@ def test_start_from_prepro(self): 'baseline_climate': 'CRU', 'use_winter_prcp_fac': False, 'use_temp_bias_from_file': False, + 'map_proj': 'tmerc', 'prcp_fac': 2.5, } )