Skip to content

Commit

Permalink
more fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Aug 24, 2024
1 parent e0c9419 commit 9dfa647
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions oggm/tests/test_prepro.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions oggm/tests/test_shop.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions oggm/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
)
Expand Down

0 comments on commit 9dfa647

Please sign in to comment.