Skip to content

Commit

Permalink
Remove unnecessary assert (#1594)
Browse files Browse the repository at this point in the history
  • Loading branch information
fmaussion committed Jun 12, 2023
1 parent 78900d1 commit 4ca41b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions oggm/sandbox/distribute_2d.py
Expand Up @@ -150,8 +150,12 @@ def assign_points_to_band(gdir, topo_variable='glacier_topo_smoothed',
# Area gridded and area flowline should be similar
assert np.allclose(nnpix_per_band_cumsum.max(), len(topo_data_flat), rtol=0.1)
# All bands should have pixels in them
assert np.nanmax(band_index) == len(bins) - 1
assert np.nanmin(band_index) == 0
# Below not allways working - to investigate
# rgi_ids = ['RGI60-11.03887'] # This is Marmlolada
# base_url = 'https://cluster.klima.uni-bremen.de/~oggm/gdirs/oggm_v1.6/
# L3-L5_files/2023.1/elev_bands/W5E5'
# assert np.nanmax(band_index) == len(bins) - 1
# assert np.nanmin(band_index) == 0
assert np.all(np.isfinite(band_index[glacier_mask]))

# Ok now assign within band using ice thickness weighted by elevation
Expand Down

0 comments on commit 4ca41b1

Please sign in to comment.