OGGM / oggm

Open Global Glacier Model
http://oggm.org
BSD 3-Clause "New" or "Revised" License
223 stars 105 forks source link

Failed test_models, test_prepro and test_shop #1409

Closed xuepingFu closed 2 years ago

xuepingFu commented 2 years ago

when I run pytest, it shows:

(oggm_env) fuxp@fuxp-virtual-machine:~$ pytest --pyargs oggm =========================================================================================== test session starts =========================================================================================== platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0 Matplotlib: 3.5.1 Freetype: 2.10.4 rootdir: /home/fuxp plugins: mpl-0.130 collected 333 items

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py ...s.ss [ 2%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py .ss.......s...s....sss [ 8%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_minimal.py ... [ 9%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py ....F.........................sss.......ssss.ss.ss..ssssssss..sssssssssssssssssssss [ 34%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_numerics.py sssss.ssssss.s.ssss.sss.sss.s [ 43%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py .......F..........s.F....F......FsF...ss...s.s..F..ss.....sssssss.Fsssss.......... [ 67%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py s.......sF [ 70%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py ...................sss.......ss...s...................ss.s..ssss.ssssss..sss...s.ss.ss.ss.. [ 98%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_workflow.py ssssss [100%]

================================================================================================ FAILURES ================================================================================================= _____ TestMassBalanceModels.testrepr ____

self = <oggm.tests.test_models.TestMassBalanceModels object at 0x7f5c0b821790> hef_gdir = RGI id: RGI50-11.00897 Region: 11: Central Europe Subregion: 11-01: Alps Name: Hintere...or ice cap Area: 8.036 km2 Lon, Lat: (10.7584, 46.8003) Grid (nx, ny): (279, 234) Grid (dx, dy): (50.0, -50.0)

def test_repr(self, hef_gdir):
    from textwrap import dedent

    expected = dedent("""\
    <oggm.MassBalanceModel>
      Class: PastMassBalance
      Attributes:
        - hemisphere: nh
        - rho: 900.0
        - mu_star: 198.9489403133207
        - bias: 0
        - t_solid: 0.0
        - t_liq: 2.0
        - t_melt: -1.0
        - repeat: False
        - ref_hgt: 3160.0
        - ys: 1802
        - ye: 2003
    """)

    mb_mod = massbalance.PastMassBalance(hef_gdir, bias=0)
  assert mb_mod.__repr__() == expected

E AssertionError: assert '<oggm.MassBa... - ye: 2003\n' == '<oggm.MassBa... - ye: 2003\n' E Skipping 108 identical leading characters in diff, use -v to show E - u_star: 198.9489403133207 E + u_star: 199.92255911945682 E - bias: 0 E - t_solid: 0.0 E - t_liq: 2.0 E - t_melt: -1.0... E
E ...Full output truncated (5 lines hidden), use '-vv' to show

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py:378: AssertionError ____ TestGIS.test_glacier_masks_otherglacier ____

self =

@pytest.mark.skipif((LooseVersion(rasterio.__version__) <
                     LooseVersion('1.0')),
                    reason='requires rasterio >= 1.0')
def test_glacier_masks_other_glacier(self):

    # This glacier geometry is simplified by OGGM
    # https://github.com/OGGM/oggm/issues/451
    entity = gpd.read_file(get_demo_file('RGI60-14.03439.shp')).iloc[0]

    cfg.PATHS['dem_file'] = get_demo_file('RGI60-14.03439.tif')
    cfg.PARAMS['border'] = 1

    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)
    gis.define_glacier_region(gdir)
    gis.glacier_masks(gdir)
    # The test below does NOT pass on OGGM
    shutil.copyfile(gdir.get_filepath('gridded_data'),
                    os.path.join(self.testdir, 'default_masks.nc'))
    gis.simple_glacier_masks(gdir, write_hypsometry=True)
    with utils.ncDataset(gdir.get_filepath('gridded_data')) as nc:
        area = np.sum(nc.variables['glacier_mask'][:] * gdir.grid.dx**2)
        np.testing.assert_allclose(area*10**-6, gdir.rgi_area_km2,
                                   rtol=1e-1)
    shutil.copyfile(gdir.get_filepath('gridded_data'),
                    os.path.join(self.testdir, 'simple_masks.nc'))

    dfh = pd.read_csv(gdir.get_filepath('hypsometry'))
    np.testing.assert_allclose(dfh['Slope'], entity.Slope, atol=1)
    np.testing.assert_allclose(dfh['Aspect'], entity.Aspect, atol=10)
    np.testing.assert_allclose(dfh['Zmed'], entity.Zmed, atol=20)
    np.testing.assert_allclose(dfh['Zmax'], entity.Zmax, atol=20)
  np.testing.assert_allclose(dfh['Zmin'], entity.Zmin, atol=20)

E AssertionError: E Not equal to tolerance rtol=1e-07, atol=20 E
E Mismatched elements: 1 / 1 (100%) E Max absolute difference: 21. E Max relative difference: 0.00528568 E x: array([3994.]) E y: array(3973)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:391: AssertionError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:00:02: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:00:02: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:00:02: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:00:02: oggm.cfg: PARAMS['border'] changed from 40 to 20. 2022-04-06 11:00:02: oggm.cfg: PARAMS['border'] changed from 20 to 1. 2022-04-06 11:00:03: oggm.core.gis: (RGI60-14.03439) define_glacier_region 2022-04-06 11:00:03: oggm.core.gis: (RGI60-14.03439) glacier_masks 2022-04-06 11:00:03: oggm.core.gis: (RGI60-14.03439) process_dem 2022-04-06 11:00:03: oggm.core.gis: (RGI60-14.03439) simple_glaciermasks ____ TestCenterlines.testdownstream ____

self =

def test_downstream(self):

    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]

    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)
    gis.define_glacier_region(gdir)
    gis.glacier_masks(gdir)
    centerlines.compute_centerlines(gdir)
    centerlines.initialize_flowlines(gdir)
    centerlines.compute_downstream_line(gdir)

    d = gdir.read_pickle('downstream_line')
    cl = gdir.read_pickle('inversion_flowlines')[-1]
    self.assertEqual(
        len(d['full_line'].coords) - len(d['downstream_line'].coords),
        cl.nx)
  np.testing.assert_allclose(d['downstream_line'].length, 12, atol=0.5)

E AssertionError: E Not equal to tolerance rtol=1e-07, atol=0.5 E
E Mismatched elements: 1 / 1 (100%) E Max absolute difference: 2.00710857 E Max relative difference: 0.16725905 E x: array(9.992891) E y: array(12)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:636: AssertionError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:00:10: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:00:10: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:00:10: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:00:10: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-06 11:00:10: oggm.core.gis: (RGI50-11.00897) define_glacier_region 2022-04-06 11:00:10: oggm.core.gis: (RGI50-11.00897) glacier_masks 2022-04-06 11:00:10: oggm.core.gis: (RGI50-11.00897) process_dem 2022-04-06 11:00:11: oggm.core.centerlines: (RGI50-11.00897) compute_centerlines 2022-04-06 11:00:11: oggm.core.centerlines: (RGI50-11.00897) initialize_flowlines 2022-04-06 11:00:11: oggm.core.centerlines: (RGI50-11.00897) compute_downstreamline ____ TestElevationBandFlowlines.test_irregular_grid __

self =

def test_irregular_grid(self):
    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]

    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)
    gis.define_glacier_region(gdir)
    gis.simple_glacier_masks(gdir)
    centerlines.elevation_band_flowline(gdir)

    df = pd.read_csv(gdir.get_filepath('elevation_band_flowline'), index_col=0)

    # Almost same because of grid VS shape
    np.testing.assert_allclose(df.area.sum(), gdir.rgi_area_m2, rtol=0.01)

    # Length is very different but that's how it is
  np.testing.assert_allclose(df.dx.sum(), entity['Lmax'], rtol=0.2)

E AssertionError: E Not equal to tolerance rtol=0.2, atol=0 E
E Mismatched elements: 1 / 1 (100%) E Max absolute difference: 1455.05673634 E Max relative difference: 0.20271061 E x: array(5722.943264) E y: array(7178)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:835: AssertionError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:00:20: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:00:20: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:00:20: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:00:20: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-06 11:00:20: oggm.cfg: PARAMS['baseline_climate'] changed from CRU to ``. 2022-04-06 11:00:20: oggm.core.gis: (RGI50-11.00897) define_glacier_region 2022-04-06 11:00:20: oggm.core.gis: (RGI50-11.00897) simple_glacier_masks 2022-04-06 11:00:20: oggm.core.gis: (RGI50-11.00897) process_dem 2022-04-06 11:00:20: oggm.core.centerlines: (RGI50-11.00897) elevation_bandflowline ____ TestGeometry.testwidth ____

self =

def test_width(self):

    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]

    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)
    gis.define_glacier_region(gdir)
    gis.glacier_masks(gdir)
    centerlines.compute_centerlines(gdir)
    centerlines.initialize_flowlines(gdir)
    centerlines.catchment_area(gdir)
    centerlines.catchment_width_geom(gdir)
    centerlines.catchment_width_correction(gdir)

    area = 0.
    otherarea = 0.
    evenotherarea = 0
    hgt = []
    harea = []

    cls = gdir.read_pickle('inversion_flowlines')
    for cl in cls:
        harea.extend(list(cl.widths * cl.dx))
        hgt.extend(list(cl.surface_h))
        area += np.sum(cl.widths * cl.dx)
        evenotherarea += np.sum(cl.widths_m * cl.dx_meter)
    with utils.ncDataset(gdir.get_filepath('gridded_data')) as nc:
        otherarea += np.sum(nc.variables['glacier_mask'][:])

    with utils.ncDataset(gdir.get_filepath('gridded_data')) as nc:
        mask = nc.variables['glacier_mask'][:]
        topo = nc.variables['topo_smoothed'][:]
    rhgt = topo[np.where(mask)][:]

    tdf = gdir.read_shapefile('outlines')
    np.testing.assert_allclose(area, otherarea, rtol=0.1)
    np.testing.assert_allclose(evenotherarea, gdir.rgi_area_m2)
    area *= (gdir.grid.dx) ** 2
    otherarea *= (gdir.grid.dx) ** 2
    np.testing.assert_allclose(area * 10**-6, float(tdf['Area']),
                               rtol=1e-4)

    # Check for area distrib
    bins = np.arange(utils.nicenumber(np.min(hgt), 50, lower=True),
                     utils.nicenumber(np.max(hgt), 50)+1,
                     50.)
    h1, b = np.histogram(hgt, weights=harea, density=True, bins=bins)
    h2, b = np.histogram(rhgt, density=True, bins=bins)
  self.assertTrue(utils.rmsd(h1*100*50, h2*100*50) < 1)

E AssertionError: False is not true

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:1129: AssertionError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:00:30: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:00:30: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:00:30: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:00:30: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-06 11:00:30: oggm.core.gis: (RGI50-11.00897) define_glacier_region 2022-04-06 11:00:31: oggm.core.gis: (RGI50-11.00897) glacier_masks 2022-04-06 11:00:31: oggm.core.gis: (RGI50-11.00897) process_dem 2022-04-06 11:00:31: oggm.core.centerlines: (RGI50-11.00897) compute_centerlines 2022-04-06 11:00:31: oggm.core.centerlines: (RGI50-11.00897) initialize_flowlines 2022-04-06 11:00:31: oggm.core.centerlines: (RGI50-11.00897) catchment_area 2022-04-06 11:00:32: oggm.core.centerlines: (RGI50-11.00897) catchment_width_geom 2022-04-06 11:00:33: oggm.core.centerlines: (RGI50-11.00897) catchment_width_correction _ TestClimate.test_climateqc

self =

def test_climate_qc(self):

    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]

    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)
    gis.define_glacier_region(gdir)
    gis.glacier_masks(gdir)
    centerlines.compute_centerlines(gdir)
    centerlines.initialize_flowlines(gdir)
    centerlines.catchment_area(gdir)
    centerlines.catchment_width_geom(gdir)
    centerlines.catchment_width_correction(gdir)
    climate.process_custom_climate_data(gdir)

    # Raise ref hgt a lot
    fc = gdir.get_filepath('climate_historical')
    with utils.ncDataset(fc, 'a') as nc:
        nc.ref_hgt = 10000
    climate.historical_climate_qc(gdir)

    with utils.ncDataset(fc, 'r') as nc:
        assert (nc.ref_hgt - nc.uncorrected_ref_hgt) < -4000

    mbdf = gdir.get_ref_mb_data()
    res = climate.t_star_from_refmb(gdir, mbdf=mbdf['ANNUAL_BALANCE'],
                                    glacierwide=True)

    cfg.PARAMS['min_mu_star'] = 10
    with pytest.raises(MassBalanceCalibrationError):
        climate.local_t_star(gdir, tstar=res['t_star'], bias=res['bias'])

    cfg.PARAMS['min_mu_star'] = 5
  climate.local_t_star(gdir, tstar=res['t_star'], bias=res['bias'])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:1726:


anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:490: in _entity_task out = task_func(gdir, **kwargs)


gdir = RGI id: RGI50-11.00897 Region: 11: Central Europe Subregion: 11-01: Alps Name: Hintere...lacier Terminus type: Land-terminating Status: Glacier or ice cap Area: 8.036 km2 Lon, Lat: (10.7584, 46.8003)

@entity_task(log, writes=['local_mustar', 'climate_info'],
             fallback=_fallback_local_t_star)
def local_t_star(gdir, *, ref_df=None, tstar=None, bias=None,
                 clip_mu_star=None, min_mu_star=None, max_mu_star=None):
    """Compute the local t* and associated glacier-wide mu*.

    If ``tstar`` and ``bias`` are not provided, they will be interpolated from
    the reference t* list (``ref_df``).

    If none of these are provided (the default), this list be obtained from
    the current working directory (``ref_tstars.csv`` and associated params
    ``ref_tstars_params.json``). These files can either be generated with a
    call to ``compute_ref_t_stars`` if you know what you are doing, ot you
    can obtain pre-preprocessed lists from our servers:
    https://cluster.klima.uni-bremen.de/~oggm/ref_mb_params/

    The best way to fetch them is to use
    :py:func:`oggm.workflow.download_ref_tstars`.

    Note: the glacier wide mu* is output here just for indication. It might be
    different from the flowlines' mu* in some cases.

    Parameters
    ----------
    gdir : :py:class:`oggm.GlacierDirectory`
        the glacier directory to process
    ref_df : :py:class:`pandas.DataFrame`, optional
        replace the default calibration list with your own.
    tstar: int, optional
        the year where the glacier should be equilibrium
    bias: float, optional
        the associated reference bias
    clip_mu_star: bool, optional
        defaults to cfg.PARAMS['clip_mu_star']
    min_mu_star: bool, optional
        defaults to cfg.PARAMS['min_mu_star']
    max_mu_star: bool, optional
        defaults to cfg.PARAMS['max_mu_star']
    """

    if tstar is None or bias is None:
        # Do our own interpolation
        if ref_df is None:
            # Use the the local calibration
            msg = ('If `ref_df` is not provided, please put a list of '
                   '`ref_tstars.csv` and associated params '
                   '`ref_tstars_params.json` in the working directory. '
                   'Please see the documentation of local_t_star '
                   'for more information.')
            fp = os.path.join(cfg.PATHS['working_dir'], 'ref_tstars.csv')
            if not os.path.exists(fp):
                raise InvalidWorkflowError(msg)
            ref_df = pd.read_csv(fp)

            # Check that the params are fine
            fp = os.path.join(cfg.PATHS['working_dir'], 'ref_tstars_params.json')
            if not os.path.exists(fp):
                raise InvalidWorkflowError(msg)
            with open(fp, 'r') as fp:
                ref_params = json.load(fp)
            for k, v in ref_params.items():
                if cfg.PARAMS[k] != v:
                    msg = ('The reference t* list you are trying to use was '
                           'calibrated with different MB parameters.')
                    raise MassBalanceCalibrationError(msg)

        # Compute the distance to each glacier
        distances = utils.haversine(gdir.cenlon, gdir.cenlat,
                                    ref_df.lon, ref_df.lat)

        # Take the 10 closest
        aso = np.argsort(distances)[0:9]
        amin = ref_df.iloc[aso]
        distances = distances[aso]**2

        # If really close no need to divide, else weighted average
        if distances.iloc[0] <= 0.1:
            tstar = amin.tstar.iloc[0]
            bias = amin.bias.iloc[0]
        else:
            tstar = int(np.average(amin.tstar, weights=1./distances).round())
            bias = np.average(amin.bias, weights=1./distances)

    # Add the climate related params to the GlacierDir to make sure
    # other tools cannot fool around without re-calibration
    out = gdir.get_climate_info()
    out['mb_calib_params'] = {k: cfg.PARAMS[k] for k in MB_PARAMS}
    gdir.write_json(out, 'climate_info')

    # We compute the overall mu* here but this is mostly for testing
    # Climate period
    mu_hp = int(cfg.PARAMS['mu_star_halfperiod'])
    yr = [tstar - mu_hp, tstar + mu_hp]

    # Do we have a calving glacier?
    cmb = calving_mb(gdir)

    log.info('(%s) local mu* computation for t*=%d', gdir.rgi_id, tstar)

    # Get the corresponding mu
    years, temp_yr, prcp_yr = mb_yearly_climate_on_glacier(gdir, year_range=yr)
    assert len(years) == (2 * mu_hp + 1)

    # mustar is taking calving into account (units of specific MB)
    mustar = (np.mean(prcp_yr) - cmb) / np.mean(temp_yr)
    if not np.isfinite(mustar):
        raise MassBalanceCalibrationError('{} has a non finite '
                                          'mu'.format(gdir.rgi_id))

    # mu* constraints
    if clip_mu_star is None:
        clip_mu_star = cfg.PARAMS['clip_mu_star']
    if min_mu_star is None:
        min_mu_star = cfg.PARAMS['min_mu_star']
    if max_mu_star is None:
        max_mu_star = cfg.PARAMS['max_mu_star']

    # Clip it?
    if clip_mu_star:
        mustar = utils.clip_min(mustar, min_mu_star)

    # If mu out of bounds, raise
    if not (min_mu_star <= mustar <= max_mu_star):
      raise MassBalanceCalibrationError('{}: mu* out of specified bounds: '

'{:.2f}'.format(gdir.rgi_id, mustar)) E oggm.exceptions.MassBalanceCalibrationError: RGI50-11.00897: mu* out of specified bounds: 4.88

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/climate.py:1026: MassBalanceCalibrationError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:00:33: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:00:33: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:00:33: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:00:34: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-06 11:00:34: oggm.cfg: PARAMS['baseline_climate'] changed from CRU to `. 2022-04-06 11:00:34: oggm.core.gis: (RGI50-11.00897) define_glacier_region 2022-04-06 11:00:34: oggm.core.gis: (RGI50-11.00897) glacier_masks 2022-04-06 11:00:34: oggm.core.gis: (RGI50-11.00897) process_dem 2022-04-06 11:00:34: oggm.core.centerlines: (RGI50-11.00897) compute_centerlines 2022-04-06 11:00:34: oggm.core.centerlines: (RGI50-11.00897) initialize_flowlines 2022-04-06 11:00:34: oggm.core.centerlines: (RGI50-11.00897) catchment_area 2022-04-06 11:00:36: oggm.core.centerlines: (RGI50-11.00897) catchment_width_geom 2022-04-06 11:00:36: oggm.core.centerlines: (RGI50-11.00897) catchment_width_correction 2022-04-06 11:00:36: oggm.core.climate: (RGI50-11.00897) process_custom_climate_data 2022-04-06 11:00:36: oggm.core.climate: (RGI50-11.00897) historical_climate_qc 2022-04-06 11:00:37: oggm.core.climate: (RGI50-11.00897) t_star_from_refmb 2022-04-06 11:00:37: oggm.cfg: PARAMS['min_mu_star'] changed from5.0to10. 2022-04-06 11:00:37: oggm.core.climate: (RGI50-11.00897) local_t_star 2022-04-06 11:00:37: oggm.core.climate: (RGI50-11.00897) local mu* computation for t*=1902 2022-04-06 11:00:37: oggm.core.climate: MassBalanceCalibrationError occurred during task local_t_star on RGI50-11.00897: RGI50-11.00897: mu* out of specified bounds: 4.88 2022-04-06 11:00:37: oggm.cfg: PARAMS['min_mu_star'] changed from10to5`. 2022-04-06 11:00:37: oggm.core.climate: (RGI50-11.00897) local_t_star 2022-04-06 11:00:37: oggm.core.climate: (RGI50-11.00897) local mu computation for t=1902 2022-04-06 11:00:37: oggm.core.climate: MassBalanceCalibrationError occurred during task local_t_star on RGI50-11.00897: RGI50-11.00897: mu* out of specified bounds: 4.88 ____ TestClimate.test_ref_mbglaciers ____

self =

def test_ref_mb_glaciers(self):

    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]
    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)

    rids = utils.get_ref_mb_glaciers_candidates()
    assert len(rids) > 200

    rids = utils.get_ref_mb_glaciers_candidates(gdir.rgi_version)
    assert len(rids) > 200

    assert len(cfg.DATA) >= 2

    with pytest.raises(InvalidWorkflowError):
      utils.get_ref_mb_glaciers([gdir])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:1935:


anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:548: in _global_task return task_func(gdirs, *kwargs) anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:615: in get_ref_mb_glaciers mbdf = g.get_ref_mb_data(y0=y0, y1=y1) anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:2998: in get_ref_mb_data ci = self.get_climate_info(input_filesuffix=input_filesuffix) anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:2693: in get_climate_info with ncDataset(f) as nc: anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:360: in init super(ncDataset, self).init(args, **kwargs) src/netCDF4/_netCDF4.pyx:2307: in netCDF4._netCDF4.Dataset.init ???


??? E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)

src/netCDF4/_netCDF4.pyx:1923: UnicodeDecodeError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:00:53: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:00:53: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:00:53: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:00:53: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-06 11:00:53: oggm.cfg: PARAMS['baseline_climate'] changed from CRU to ``. 2022-04-06 11:00:54: oggm.utils: Applying global task get_ref_mb_glaciers on 1 glaciers ____ TestColumbiaCalving.test_find_calvingeb ____

self =

def test_find_calving_eb(self):

    gdir = init_columbia_eb('test_find_calving_eb')

    # Test default k (it overshoots)
    df = inversion.find_inversion_calving(gdir)

    mu_bef = gdir.get_diagnostics()['mu_star_before_calving']
    frac = cfg.PARAMS['calving_min_mu_star_frac']
    assert df['calving_mu_star'] == mu_bef * frac
    assert df['calving_flux'] > 0.5
  assert df['calving_rate_myr'] > 400

E assert 346.5359448086526 > 400

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:3022: AssertionError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:01:19: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:01:19: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:01:19: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:01:19: oggm.cfg: PARAMS['use_intersects'] changed from True to False. 2022-04-06 11:01:19: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-06 11:01:19: oggm.cfg: PARAMS['use_kcalving_for_inversion'] changed from False to True. 2022-04-06 11:01:19: oggm.cfg: PARAMS['use_kcalving_for_run'] changed from False to True. 2022-04-06 11:01:20: oggm.core.inversion: (RGI60-01.10689) find_inversion_calving 2022-04-06 11:01:20: oggm.core.inversion: (RGI60-01.10689) find_inversion_calving_from_anymb: found calving flux of 0.812 km3 yr-1 ____ Test_bedtopo.test_addconsensus ____

self = <oggm.tests.test_shop.Test_bedtopo object at 0x7f5c0b72a220>, class_case_dir = '/home/fuxp/OGGM/tests/db62349329688663b58af4fcc2b03731/Test_bedtopo' monkeypatch = <_pytest.monkeypatch.MonkeyPatch object at 0x7f5c0869bd00>

def test_add_consensus(self, class_case_dir, monkeypatch):

    # Init
    cfg.initialize()
    cfg.PARAMS['use_intersects'] = False
    cfg.PATHS['working_dir'] = class_case_dir
    cfg.PATHS['dem_file'] = get_demo_file('hef_srtm.tif')

    entity = gpd.read_file(get_demo_file('Hintereisferner_RGI5.shp'))
    entity['RGIId'] = 'RGI60-11.00897'
    gdir = workflow.init_glacier_directories(entity)[0]
    tasks.define_glacier_region(gdir)
    tasks.glacier_masks(gdir)

    ft = utils.get_demo_file('RGI60-11.00897_thickness.tif')
    monkeypatch.setattr(utils, 'file_downloader', lambda x: ft)
    bedtopo.add_consensus_thickness(gdir)

    # Check with rasterio
    cfg.add_to_basenames('consensus', 'consensus.tif')
    gis.rasterio_to_gdir(gdir, ft, 'consensus', resampling='bilinear')

    with xr.open_dataset(gdir.get_filepath('gridded_data')) as ds:
        mine = ds.consensus_ice_thickness

    with xr.open_rasterio(gdir.get_filepath('consensus')) as ds:
        ref = ds.isel(band=0)

    # Check area
    my_area = np.sum(np.isfinite(mine.data)) * gdir.grid.dx**2
    np.testing.assert_allclose(my_area, gdir.rgi_area_m2, rtol=0.07)

    rio_area = np.sum(ref.data > 0) * gdir.grid.dx**2
    np.testing.assert_allclose(rio_area, gdir.rgi_area_m2, rtol=0.15)
    np.testing.assert_allclose(my_area, rio_area, rtol=0.15)

    # They are not same:
    # - interpolation not 1to1 same especially at borders
    # - we preserve total volume
    np.testing.assert_allclose(mine.sum(), ref.sum(), rtol=0.01)
  assert utils.rmsd(ref, mine) < 2

E AssertionError: assert <xarray.DataArray 'consensus_ice_thickness' ()>\narray(3.39654, dtype=float32) < 2 E + where <xarray.DataArray 'consensus_ice_thickness' ()>\narray(3.39654, dtype=float32) = <function rmsd at 0x7f5c21b62ee0>(<xarray.DataArray (y: 154, x: 199)>\narray([[0., 0., 0., ..., 0., 0., 0.],\n [0., 0., 0., ..., 0., 0., 0.],\n ...iled: 0\n nodatavals: (nan,)\n scales: (1.0,)\n offsets: (0.0,)\n AREA_OR_POINT: Area, <xarray.DataArray 'consensus_ice_thickness' (y: 154, x: 199)>\narray([[nan, nan, nan, ..., nan, nan, nan],\n [nan,... thickness from the consensus estimate\n base_url: https://cluster.klima.uni-bremen.de/~fmaussion/icevol/composite/) E + where <function rmsd at 0x7f5c21b62ee0> = utils.rmsd

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py:570: AssertionError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-06 11:01:53: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-06 11:01:53: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-06 11:01:53: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-06 11:01:53: oggm.cfg: PARAMS['use_intersects'] changed from True to False. 2022-04-06 11:01:53: oggm.workflow: Execute entity task GlacierDirectory on 1 glaciers 2022-04-06 11:01:53: oggm.core.gis: (RGI60-11.00897) define_glacier_region 2022-04-06 11:01:54: oggm.core.gis: (RGI60-11.00897) glacier_masks 2022-04-06 11:01:54: oggm.core.gis: (RGI60-11.00897) process_dem 2022-04-06 11:01:54: oggm.shop.bedtopo: (RGI60-11.00897) add_consensus_thickness ============================================================================================ warnings summary ============================================================================================= anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:18 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:18: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_10 = str(pd.version) >= LooseVersion("1.0.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. other = LooseVersion(other)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:19 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:19: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_11 = str(pd.version) >= LooseVersion("1.1.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:20 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:20: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_115 = str(pd.version) >= LooseVersion("1.1.5")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:21 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:21: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_12 = str(pd.version) >= LooseVersion("1.2.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:29 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SHAPELY_GE_17 = str(shapely.version) >= LooseVersion("1.7.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:30 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:30: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SHAPELY_GE_18 = str(shapely.version) >= LooseVersion("1.8")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:31 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:31: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SHAPELY_GE_20 = str(shapely.version) >= LooseVersion("2.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:227 anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:227 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:227: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PYPROJ_LT_3 = LooseVersion(pyproj.version) < LooseVersion("3")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:228 anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:228 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:228: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PYPROJ_GE_31 = LooseVersion(pyproj.version) >= LooseVersion("3.1")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:366 anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:366 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:366: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(np.version) < LooseVersion('1.17'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:31 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:31: DeprecationWarning: Please use gaussian_filter1d from the scipy.ndimage namespace, the scipy.ndimage.filters namespace is deprecated. from scipy.ndimage.filters import gaussian_filter1d

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:32 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:32: DeprecationWarning: Please use distance_transform_edt from the scipy.ndimage namespace, the scipy.ndimage.morphology namespace is deprecated. from scipy.ndimage.morphology import distance_transform_edt

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33: DeprecationWarning: Please use label from the scipy.ndimage namespace, the scipy.ndimage.measurements namespace is deprecated. from scipy.ndimage.measurements import label, find_objects

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33: DeprecationWarning: Please use find_objects from the scipy.ndimage namespace, the scipy.ndimage.measurements namespace is deprecated. from scipy.ndimage.measurements import label, find_objects

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:19 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:19: DeprecationWarning: Please use label from the scipy.ndimage namespace, the scipy.ndimage.measurements namespace is deprecated. from scipy.ndimage.measurements import label

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:21 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:21: DeprecationWarning: Please use distance_transform_edt from the scipy.ndimage namespace, the scipy.ndimage.morphology namespace is deprecated. from scipy.ndimage.morphology import distance_transform_edt

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/init.py:15 anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/init.py:15 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/init.py:15: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(matplotlib.version) >= LooseVersion('2'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:304 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:304: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. @pytest.mark.skipif((LooseVersion(rasterio.version) <

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:305 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:305: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LooseVersion('1.0')),

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:360 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:360: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. @pytest.mark.skipif((LooseVersion(rasterio.version) <

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:361 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:361: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LooseVersion('1.0')),

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:393 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:393: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. @pytest.mark.skipif((LooseVersion(rasterio.version) <

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:394 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:394: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LooseVersion('1.0')),

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 12 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py: 27 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 5 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 135 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 5 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/io/file.py:362: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. pd.Int64Index,

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 24 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py: 54 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 10 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 270 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 10 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 32 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/io/file.py:389: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(gdal_version) >= LooseVersion("3.0.0") and crs:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 8 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 124 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 2 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 8 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:360: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(rasterio.version) >= LooseVersion('1.0'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 20 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:347: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for sub_poly in inter_poly:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 21 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:316: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. tdis = np.array([line.project(pb) for pb in pbs])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 21 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:320: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. points.append(pbs[int(p[0])])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 20 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 11 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:470: ShapelyDeprecationWarning: len for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the geoms property instead to get the number of parts of a multi-part geometry. if len(mult_intersect) == 0:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 20 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 11 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:472: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. mult_intersect = [m for m in mult_intersect if

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 20 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 13 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:486: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. out = out.append(line)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:1340: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. width = np.sum([l.length for l in line])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:1390: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for dwl in wl:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 14 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:1306: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for l in line:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 17 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 3 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 43 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 3 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:265: DeprecationWarning: Please use convolve1d from the scipy.ndimage namespace, the scipy.ndimage.filters namespace is deprecated. return filters.convolve1d(array, kernel, mode='mirror')

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestInitFlowlineOtherGlacier::test_define_divides anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_divides_as_glaciers anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream_bedshape anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_run /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:821: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. tdis = np.array([dline.project(pb) for pb in pbs])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestInitFlowlineOtherGlacier::test_define_divides anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_divides_as_glaciers anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream_bedshape anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_run /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:825: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. points.append(pbs[int(p[0])])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestInitFlowlineOtherGlacier::test_define_divides anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_divides_as_glaciers anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream_bedshape anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_run /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:826: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. dpoints.append(pbs[int(p[0])])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py::test_width /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/graphics.py:489: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for w in wl:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 22 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 2 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 1 warning /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:201: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. area = np.array([_tmp.area for _tmp in tmp])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 22 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 2 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 1 warning /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:203: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. tmp = tmp[_tokeep]

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestFilterNegFlux::test_filter /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:479: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for line in mult_intersect:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_compile_climate_input anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_compile_climate_input anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_process_cesm anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_process_cesm /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/shop/gcm_climate.py:205: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(xr.version) < LooseVersion('0.11'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py::Test_bedtopo::test_add_consensus /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py:555: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html with xr.open_rasterio(gdir.get_filepath('consensus')) as ds:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestPreproCLI::test_start_from_prepro /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/pyproj/crs/crs.py:131: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 in_crs_string = _prepare_from_proj_string(in_crs_string)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py:1496: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. data = data.append(s)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ========================================================================================= short test summary info ========================================================================================= FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestMassBalanceModels::test_repr - AssertionError: assert '<oggm.MassBa... - ye: 2003\n' == '<oggm.MassBa... - ye:... FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_glacier_masks_other_glacier - AssertionError: FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream - AssertionError: FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_irregular_grid - AssertionError: FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGeometry::test_width - AssertionError: False is not true FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestClimate::test_climate_qc - oggm.exceptions.MassBalanceCalibrationError: RGI50-11.00897: mu* out of specified b... FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestClimate::test_ref_mb_glaciers - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordina... FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestColumbiaCalving::test_find_calving_eb - assert 346.5359448086526 > 400 FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py::Test_bedtopo::test_add_consensus - AssertionError: assert <xarray.DataArray 'consensus_ice_thickness' ()>\narray(3.3... ================================================================== 9 failed, 194 passed, 130 skipped, 1159 warnings in 605.71s (0:10:05) ==================================================================

Can I neglect this error or how to tackle with it? Thanks for your help!

fmaussion commented 2 years ago

No you should not neglect it. What is the output of

from oggm.utils import show_versions
print(show_versions())

?

xuepingFu commented 2 years ago

OGGM environment is that:

OGGM environment:

System info:

python: 3.8.13.final.0
python-bits: 64
OS: Linux
OS-release: 5.11.0-36-generic
machine: x86_64
processor: x86_64

Packages info:

oggm: 1.5.2
numpy: 1.22.3
scipy: 1.8.0
pandas: 1.4.2
geopandas: 0.10.2
netCDF4: 1.5.8
matplotlib: 3.5.1
rasterio: 1.2.10
fiona: 1.8.21
pyproj: 3.3.0
shapely: 1.8.0
xarray: 2022.3.0
dask: 2022.04.0
salem: 0.3.7
OGGM git identifier: 4e5aa15c8dbcf5d6009f4e20e5c8beeebb69668e
fmaussion commented 2 years ago

yes the problem is the rasterio version - can you downgrade rasterio to <1.2.10 (mamba install rasterio<1.2.10) or reinstall from scratch as explained here: https://docs.oggm.org/en/stable/installing-oggm.html#installation-troubleshooting ?

xuepingFu commented 2 years ago

Thanks! I downgraded rasterio to <1.2.10 and checked my package based on this: https://docs.oggm.org/en/stable/installing-oggm.html#installation-troubleshooting ,but I still have 1 failed on test_prepro. Can I how to tackle with it? Thanks for your help! it shows: (oggm_env) fuxp@fuxp-virtual-machine:~$ pytest --pyargs oggm =========================================================================================== test session starts =========================================================================================== platform linux -- Python 3.8.13, pytest-7.1.1, pluggy-1.0.0 Matplotlib: 3.5.1 Freetype: 2.10.4 rootdir: /home/fuxp plugins: mpl-0.130, anyio-3.5.0 collected 333 items

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py ...s.ss [ 2%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py .ss.......s...s....sss [ 8%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_minimal.py ... [ 9%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py ..............................sss.......ssss.ss.ss..ssssssss..sssssssssssssssssssss [ 34%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_numerics.py sssss.ssssss.s.ssss.sss.sss.s [ 43%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py ..................s..............s....ss...s.s..F..ss.....sssssss..sssss.......... [ 67%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py s.......s. [ 70%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py ...................sss.......ss...s...................ss.s..ssss.ssssss..sss...s.ss.ss.ss.. [ 98%] anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_workflow.py ssssss [100%]

================================================================================================ FAILURES ================================================================================================= ____ TestClimate.test_ref_mbglaciers ____

self =

def test_ref_mb_glaciers(self):

    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]
    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)

    rids = utils.get_ref_mb_glaciers_candidates()
    assert len(rids) > 200

    rids = utils.get_ref_mb_glaciers_candidates(gdir.rgi_version)
    assert len(rids) > 200

    assert len(cfg.DATA) >= 2

    with pytest.raises(InvalidWorkflowError):
      utils.get_ref_mb_glaciers([gdir])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:1935:


anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:548: in _global_task return task_func(gdirs, *kwargs) anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:615: in get_ref_mb_glaciers mbdf = g.get_ref_mb_data(y0=y0, y1=y1) anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:2998: in get_ref_mb_data ci = self.get_climate_info(input_filesuffix=input_filesuffix) anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:2693: in get_climate_info with ncDataset(f) as nc: anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_workflow.py:360: in init super(ncDataset, self).init(args, **kwargs) src/netCDF4/_netCDF4.pyx:2330: in netCDF4._netCDF4.Dataset.init ???


??? E UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordinal not in range(128)

src/netCDF4/_netCDF4.pyx:1946: UnicodeDecodeError ------------------------------------------------------------------------------------------ Captured stderr call ------------------------------------------------------------------------------------------- 2022-04-08 10:03:38: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2022-04-08 10:03:38: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2022-04-08 10:03:38: oggm.cfg: Multiprocessing: using all available processors (N=2) 2022-04-08 10:03:38: oggm.cfg: PARAMS['border'] changed from 40 to 10. 2022-04-08 10:03:38: oggm.cfg: PARAMS['baseline_climate'] changed from CRU to ``. 2022-04-08 10:03:38: oggm.utils: Applying global task get_ref_mb_glaciers on 1 glaciers ============================================================================================ warnings summary ============================================================================================= anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:18 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:18: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_10 = str(pd.version) >= LooseVersion("1.0.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/setuptools/_distutils/version.py:351: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. other = LooseVersion(other)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:19 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:19: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_11 = str(pd.version) >= LooseVersion("1.1.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:20 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:20: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_115 = str(pd.version) >= LooseVersion("1.1.5")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:21 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:21: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PANDAS_GE_12 = str(pd.version) >= LooseVersion("1.2.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:29 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:29: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SHAPELY_GE_17 = str(shapely.version) >= LooseVersion("1.7.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:30 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:30: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SHAPELY_GE_18 = str(shapely.version) >= LooseVersion("1.8")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:31 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:31: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. SHAPELY_GE_20 = str(shapely.version) >= LooseVersion("2.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:227 anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:227 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:227: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PYPROJ_LT_3 = LooseVersion(pyproj.version) < LooseVersion("3")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:228 anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:228 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/_compat.py:228: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. PYPROJ_GE_31 = LooseVersion(pyproj.version) >= LooseVersion("3.1")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:366 anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:366 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:366: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(np.version) < LooseVersion('1.17'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:31 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:31: DeprecationWarning: Please use gaussian_filter1d from the scipy.ndimage namespace, the scipy.ndimage.filters namespace is deprecated. from scipy.ndimage.filters import gaussian_filter1d

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:32 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:32: DeprecationWarning: Please use distance_transform_edt from the scipy.ndimage namespace, the scipy.ndimage.morphology namespace is deprecated. from scipy.ndimage.morphology import distance_transform_edt

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33: DeprecationWarning: Please use label from the scipy.ndimage namespace, the scipy.ndimage.measurements namespace is deprecated. from scipy.ndimage.measurements import label, find_objects

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:33: DeprecationWarning: Please use find_objects from the scipy.ndimage namespace, the scipy.ndimage.measurements namespace is deprecated. from scipy.ndimage.measurements import label, find_objects

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:19 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:19: DeprecationWarning: Please use label from the scipy.ndimage namespace, the scipy.ndimage.measurements namespace is deprecated. from scipy.ndimage.measurements import label

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:21 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:21: DeprecationWarning: Please use distance_transform_edt from the scipy.ndimage namespace, the scipy.ndimage.morphology namespace is deprecated. from scipy.ndimage.morphology import distance_transform_edt

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/init.py:15 anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/init.py:15 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/init.py:15: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(matplotlib.version) >= LooseVersion('2'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:304 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:304: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. @pytest.mark.skipif((LooseVersion(rasterio.version) <

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:305 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:305: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LooseVersion('1.0')),

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:360 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:360: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. @pytest.mark.skipif((LooseVersion(rasterio.version) <

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:361 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:361: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LooseVersion('1.0')),

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:393 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:393: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. @pytest.mark.skipif((LooseVersion(rasterio.version) <

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:394 /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py:394: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. LooseVersion('1.0')),

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/init.py:24: DeprecationWarning: np.typeDict is a deprecated alias for np.sctypeDict. from .utilsextension import (

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/req_versions.py:20: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. min_numpy_version = LooseVersion('1.9.3')

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/req_versions.py:21: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. min_numexpr_version = LooseVersion('2.6.2')

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/req_versions.py:22: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. min_hdf5_version = LooseVersion('1.8.4')

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/req_versions.py:23: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. min_blosc_version = LooseVersion("1.4.1")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/req_versions.py:24: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. min_blosc_bitshuffle_version = LooseVersion("1.8.0")

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/filters.py:27: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. blosc_version = LooseVersion(tables.which_lib_version("blosc")[1])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/tests/common.py:36: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. hdf5_version = LooseVersion(tables.hdf5_version)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/tests/common.py:37: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. blosc_version = LooseVersion(tables.which_lib_version("blosc")[1])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 12 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py: 27 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 5 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 135 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 5 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/io/file.py:362: FutureWarning: pandas.Int64Index is deprecated and will be removed from pandas in a future version. Use pandas.Index with the appropriate dtype instead. pd.Int64Index,

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 24 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py: 54 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 10 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 270 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 10 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 32 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/geopandas/io/file.py:389: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(gdal_version) >= LooseVersion("3.0.0") and crs:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 8 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 124 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 2 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 8 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:360: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(rasterio.version) >= LooseVersion('1.0'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 20 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:347: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for sub_poly in inter_poly:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 21 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:316: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. tdis = np.array([line.project(pb) for pb in pbs])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 21 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:320: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. points.append(pbs[int(p[0])])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 20 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 11 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:470: ShapelyDeprecationWarning: len for multi-part geometries is deprecated and will be removed in Shapely 2.0. Check the length of the geoms property instead to get the number of parts of a multi-part geometry. if len(mult_intersect) == 0:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 20 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 11 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:472: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. mult_intersect = [m for m in mult_intersect if

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 20 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 13 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:486: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. out = out.append(line)

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:1340: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. width = np.sum([l.length for l in line])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:1390: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for dwl in wl:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 1 warning anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 14 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:1306: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for l in line:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 17 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py: 3 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 43 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 3 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:265: DeprecationWarning: Please use convolve1d from the scipy.ndimage namespace, the scipy.ndimage.filters namespace is deprecated. return filters.convolve1d(array, kernel, mode='mirror')

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py: 5 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 4 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 16 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/array.py:241: DeprecationWarning: np.object is a deprecated alias for the builtin object. To silence this warning, use object by itself. Doing this will not modify any behavior and is safe. Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations (oid, self.atom, self.shape, self._v_chunkshape) = self._open_array()

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/tables/atom.py:1224: DeprecationWarning: tostring() is deprecated. Use tobytes() instead. return pickle.loads(array.tostring())

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestInitFlowlineOtherGlacier::test_define_divides anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_divides_as_glaciers anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream_bedshape anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_run /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:821: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. tdis = np.array([dline.project(pb) for pb in pbs])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestInitFlowlineOtherGlacier::test_define_divides anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_divides_as_glaciers anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream_bedshape anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_run /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:825: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. points.append(pbs[int(p[0])])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_models.py::TestInitFlowlineOtherGlacier::test_define_divides anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGIS::test_divides_as_glaciers anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestCenterlines::test_downstream_bedshape anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_run /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/centerlines.py:826: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. dpoints.append(pbs[int(p[0])])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_graphics.py::test_width /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/graphics.py:489: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for w in wl:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 22 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 2 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 1 warning /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:201: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. area = np.array([_tmp.area for _tmp in tmp])

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 22 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py: 2 warnings anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py: 1 warning /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/core/gis.py:203: ShapelyDeprecationWarning: getitem for multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. tmp = tmp[_tokeep]

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py: 14 warnings /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:303: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for p in pbs:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestFilterNegFlux::test_filter /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/utils/_funcs.py:479: ShapelyDeprecationWarning: Iteration over multi-part geometries is deprecated and will be removed in Shapely 2.0. Use the geoms property to access the constituent parts of a multi-part geometry. for line in mult_intersect:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_compile_climate_input anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_compile_climate_input anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_process_cesm anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestGCMClimate::test_process_cesm /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/shop/gcm_climate.py:205: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if LooseVersion(xr.version) < LooseVersion('0.11'):

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py::Test_bedtopo::test_add_consensus /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_shop.py:555: DeprecationWarning: open_rasterio is Deprecated in favor of rioxarray. For information about transitioning, see: https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html with xr.open_rasterio(gdir.get_filepath('consensus')) as ds:

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestPreproCLI::test_start_from_prepro /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/pyproj/crs/crs.py:68: FutureWarning: '+init=:' syntax is deprecated. ':' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 return _prepare_from_string(" ".join(pjargs))

anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py::TestFakeDownloads::test_dl_verify /home/fuxp/anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_utils.py:1496: FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. data = data.append(s)

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ========================================================================================= short test summary info ========================================================================================= FAILED anaconda3/envs/oggm_env/lib/python3.8/site-packages/oggm/tests/test_prepro.py::TestClimate::test_ref_mb_glaciers - UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 0: ordina... ================================================================== 1 failed, 202 passed, 130 skipped, 1209 warnings in 691.46s (0:11:31) ==================================================================

fmaussion commented 2 years ago

OK yes I think you can ignore this failure. Have fun with OGGM!

Jinneedayu commented 1 year ago

OK yes I think you can ignore this failure. Have fun with OGGM!

I encountered two fails in test_graphics.py and test_prepro.py. The version of rasterio is 1.2.9.How to solve the two fails or can I ignore them?


plugins: anyio-3.6.2, mpl-0.0.0 collected 353 items

oggm/tests/test_benchmarks.py ...s.ss [ 1%] oggm/tests/test_graphics.py .ss.....F.s...s...x.sss [ 8%] oggm/tests/test_minimal.py ... [ 9%] oggm/tests/test_models.py ..............................ssss.....ss....sssssssss..sssssssssssssssssssssssssssssssssssss.sssss [ 37%] oggm/tests/test_numerics.py sssss.ss.ssssss.s.sssss.sss.sss.s [ 46%] oggm/tests/test_prepro.py .................s.................s..Fs.....sssssssss....s....... [ 65%] oggm/tests/test_shop.py sss............ [ 69%] oggm/tests/test_utils.py .........................sss.....ssss...s....................ss.s..ssss.ssssss..sss...s.ss.ss.ss.... [ 98%] oggm/tests/test_workflow.py ssssss. [100%]

============================================================================================================= FAILURES ============================================================================================================= _ test_widthcorrected

@pytest.mark.graphic
@mpl_image_compare(multi=True)
def test_width_corrected():
    fig, ax = plt.subplots()
    gdir = init_hef()
  graphics.plot_catchment_width(gdir, ax=ax, corrected=True,

add_intersects=True, add_touches=True)

oggm/tests/test_graphics.py:145:


oggm/graphics.py:230: in newplotfunc out = plotfunc(gdirs, ax=ax, smap=mp, **kwargs) oggm/graphics.py:578: in plot_catchment_width xi, yi = ogrid.transform(np.asarray(xi)[pok], ../miniconda3/envs/robot/lib/python3.8/site-packages/salem/gis.py:706: in transform x, y = _crs.ij_to_crs(x, y, crs=self.proj) ../miniconda3/envs/robot/lib/python3.8/site-packages/salem/gis.py:667: in ij_to_crs ret = transform_proj(self.proj, _crs, x, y) ../miniconda3/envs/robot/lib/python3.8/site-packages/salem/gis.py:1308: in transform_proj return _transform_internal(p1, p2, x, y, always_xy=True) ../miniconda3/envs/robot/lib/python3.8/site-packages/salem/gis.py:1278: in _transform_internal return trf.transform(x, y) ../miniconda3/envs/robot/lib/python3.8/site-packages/pyproj/transformer.py:812: in transform return self._transformer._transform_point( pyproj/_transformer.pyx:756: in pyproj._transformer._Transformer._transform_point ???


self = masked_array(data=[], mask=False, fill_value=1e+20, dtype=float64)

def __float__(self):
    """
    Convert to float.

    """
    if self.size > 1:
        raise TypeError("Only length-1 arrays can be converted "
                        "to Python scalars")
    elif self._mask:
        warnings.warn("Warning: converting a masked element to nan.", stacklevel=2)
        return np.nan
  return float(self.item())

E ValueError: can only convert an array of size 1 to a Python scalar

../miniconda3/envs/robot/lib/python3.8/site-packages/numpy/ma/core.py:4436: ValueError ------------------------------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------------------------- 2023-04-04 11:47:08: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2023-04-04 11:47:08: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2023-04-04 11:47:08: oggm.cfg: Multiprocessing: using all available processors (N=8) 2023-04-04 11:47:08: oggm.cfg: PARAMS['baseline_climate'] changed from GSWP3_W5E5 to `. 2023-04-04 11:47:08: oggm.cfg: PARAMS['trapezoid_lambdas'] changed from2.0to1. 2023-04-04 11:47:08: oggm.cfg: PARAMS['border'] changed from80to40. 2023-04-04 11:47:08: oggm.cfg: PARAMS['use_winter_prcp_fac'] changed fromTruetoFalse. 2023-04-04 11:47:08: oggm.cfg: PARAMS['use_temp_bias_from_file'] changed fromTruetoFalse. 2023-04-04 11:47:08: oggm.cfg: PARAMS['evolution_model'] changed fromSemiImplicittoFluxBased. 2023-04-04 11:47:08: oggm.cfg: PARAMS['downstream_line_shape'] changed fromtrapezoidaltoparabola. 2023-04-04 11:47:08: oggm.cfg: PARAMS['temp_bias_min'] changed from-15.0to-10. 2023-04-04 11:47:08: oggm.cfg: PARAMS['temp_bias_max'] changed from15.0to10`. __ TestClimate.test_mb_calibration_from_scalar_mb __

self =

def test_mb_calibration_from_scalar_mb(self):

    from oggm.core.massbalance import mb_calibration_from_scalar_mb
    from functools import partial
    mb_calibration_from_scalar_mb = partial(mb_calibration_from_scalar_mb,
                                            overwrite_gdir=True)

    hef_file = get_demo_file('Hintereisferner_RGI5.shp')
    entity = gpd.read_file(hef_file).iloc[0]

    gdir = oggm.GlacierDirectory(entity, base_dir=self.testdir)
    gis.define_glacier_region(gdir)
    gis.simple_glacier_masks(gdir)
    centerlines.elevation_band_flowline(gdir)
    centerlines.fixed_dx_elevation_band_flowline(gdir)
    climate.process_custom_climate_data(gdir)

    mbdf = gdir.get_ref_mb_data()
    mbdf['ref_mb'] = mbdf['ANNUAL_BALANCE']
    ref_mb = mbdf.ANNUAL_BALANCE.mean()
    ref_period = f'{mbdf.index[0]}-01-01_{mbdf.index[-1] + 1}-01-01'

    # Default is to calibrate melt_f
    mb_calibration_from_scalar_mb(gdir,
                                  ref_mb=ref_mb,
                                  ref_period=ref_period)

    h, w = gdir.get_inversion_flowline_hw()
    mb_new = massbalance.MonthlyTIModel(gdir)
    mbdf['melt_mb'] = mb_new.get_specific_mb(h, w, year=mbdf.index)

    # Check that results are all the same
    np.testing.assert_allclose(ref_mb, mbdf['melt_mb'].mean())
    # Yeah, it correlates but also not too crazy
  np.testing.assert_allclose(1, mbdf.corr()['ref_mb']['melt_mb'],

atol=0.35)

oggm/tests/test_prepro.py:1394:


../miniconda3/envs/robot/lib/python3.8/site-packages/pandas/core/frame.py:10054: in corr mat = data.to_numpy(dtype=float, na_value=np.nan, copy=False) ../miniconda3/envs/robot/lib/python3.8/site-packages/pandas/core/frame.py:1837: in to_numpy result = self._mgr.as_array(dtype=dtype, copy=copy, na_value=na_value) ../miniconda3/envs/robot/lib/python3.8/site-packages/pandas/core/internals/managers.py:1732: in as_array arr = self._interleave(dtype=dtype, na_value=na_value)


self = BlockManager Items: Index(['WGMS_ID', 'POLITICAL_UNIT', 'NAME', 'AREA', 'WINTER_BALANCE', 'SUMMER_BALANCE', 'AN...pe: object NumericBlock: slice(9, 10, 1), 1 x 50, dtype: float64 NumericBlock: slice(10, 11, 1), 1 x 50, dtype: float64 dtype = dtype('float64'), na_value = nan

def _interleave(
    self,
    dtype: np.dtype | None = None,
    na_value: object = lib.no_default,
) -> np.ndarray:
    """
    Return ndarray from blocks with specified item order
    Items must be contained in the blocks
    """
    if not dtype:
        # Incompatible types in assignment (expression has type
        # "Optional[Union[dtype[Any], ExtensionDtype]]", variable has
        # type "Optional[dtype[Any]]")
        dtype = interleaved_dtype(  # type: ignore[assignment]
            [blk.dtype for blk in self.blocks]
        )

    # TODO: https://github.com/pandas-dev/pandas/issues/22791
    # Give EAs some input on what happens here. Sparse needs this.
    if isinstance(dtype, SparseDtype):
        dtype = dtype.subtype
        dtype = cast(np.dtype, dtype)
    elif isinstance(dtype, ExtensionDtype):
        dtype = np.dtype("object")
    elif is_dtype_equal(dtype, str):
        dtype = np.dtype("object")

    result = np.empty(self.shape, dtype=dtype)

    itemmask = np.zeros(self.shape[0])

    if dtype == np.dtype("object") and na_value is lib.no_default:
        # much more performant than using to_numpy below
        for blk in self.blocks:
            rl = blk.mgr_locs
            arr = blk.get_values(dtype)
            result[rl.indexer] = arr
            itemmask[rl.indexer] = 1
        return result

    for blk in self.blocks:
        rl = blk.mgr_locs
        if blk.is_extension:
            # Avoid implicit conversion of extension blocks to object

            # error: Item "ndarray" of "Union[ndarray, ExtensionArray]" has no
            # attribute "to_numpy"
            arr = blk.values.to_numpy(  # type: ignore[union-attr]
                dtype=dtype,
                na_value=na_value,
            )
        else:
            arr = blk.get_values(dtype)
      result[rl.indexer] = arr

E ValueError: could not convert string to float: 'AT'

../miniconda3/envs/robot/lib/python3.8/site-packages/pandas/core/internals/managers.py:1794: ValueError ------------------------------------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------------------------------- 2023-04-04 11:49:04: oggm.cfg: Reading default parameters from the OGGM params.cfg configuration file. 2023-04-04 11:49:04: oggm.cfg: Multiprocessing switched OFF according to the parameter file. 2023-04-04 11:49:04: oggm.cfg: Multiprocessing: using all available processors (N=8) 2023-04-04 11:49:04: oggm.cfg: PARAMS['border'] changed from 80 to 10. 2023-04-04 11:49:04: oggm.cfg: PARAMS['baseline_climate'] changed from GSWP3_W5E5 to `. 2023-04-04 11:49:04: oggm.cfg: PARAMS['temp_bias_min'] changed from-15.0to-10. 2023-04-04 11:49:04: oggm.cfg: PARAMS['temp_bias_max'] changed from15.0to10. 2023-04-04 11:49:04: oggm.cfg: PARAMS['prcp_fac_max'] changed from10.0to5. 2023-04-04 11:49:04: oggm.cfg: PARAMS['use_winter_prcp_fac'] changed fromTruetoFalse. 2023-04-04 11:49:05: oggm.core.gis: (RGI50-11.00897) define_glacier_region 2023-04-04 11:49:05: oggm.core.gis: (RGI50-11.00897) simple_glacier_masks 2023-04-04 11:49:05: oggm.core.gis: (RGI50-11.00897) process_dem 2023-04-04 11:49:06: oggm.core.centerlines: (RGI50-11.00897) elevation_band_flowline 2023-04-04 11:49:06: oggm.core.centerlines: (RGI50-11.00897) fixed_dx_elevation_band_flowline 2023-04-04 11:49:06: oggm.core.climate: (RGI50-11.00897) process_custom_climate_data 2023-04-04 11:49:06: oggm.core.massbalance: (RGI50-11.00897) mb_calibration_from_scalar_mb ========================================================================================================= warnings summary ========================================================================================================= ../miniconda3/envs/robot/lib/python3.8/site-packages/skimage/util/dtype.py:27 /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/skimage/util/dtype.py:27: DeprecationWarning:np.bool8is a deprecated alias fornp.bool_`. (Deprecated NumPy 1.24) np.bool8: (False, True),

oggm/tests/test_benchmarks.py: 4 warnings oggm/tests/test_graphics.py: 2 warnings oggm/tests/test_models.py: 5 warnings oggm/tests/test_prepro.py: 54 warnings oggm/tests/test_shop.py: 2 warnings oggm/tests/test_utils.py: 15 warnings oggm/tests/test_workflow.py: 1 warning /home/hjp/oggm/oggm/utils/_workflow.py:2828: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead return np.round(float(_area), decimals=3)

oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion_attributes oggm/tests/test_benchmarks.py::TestSouthGlacier::test_mb oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow oggm/tests/test_graphics.py::test_thick_elev_bands /home/hjp/oggm/oggm/core/massbalance.py:1492: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead ref_mb = float(ref_mb_df['dmdtda']) * 1000

oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion oggm/tests/test_benchmarks.py::TestSouthGlacier::test_inversion_attributes oggm/tests/test_benchmarks.py::TestSouthGlacier::test_mb oggm/tests/test_benchmarks.py::TestSouthGlacier::test_workflow oggm/tests/test_graphics.py::test_thick_elev_bands /home/hjp/oggm/oggm/core/massbalance.py:1493: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead ref_mb_err = float(ref_mb_df['err_dmdtda']) * 1000

oggm/tests/test_graphics.py: 1 warning oggm/tests/test_models.py: 4 warnings oggm/tests/test_prepro.py: 9 warnings /home/hjp/oggm/oggm/utils/_workflow.py:3353: FutureWarning: Index.is_integer is deprecated. Use pandas.api.types.is_integer_dtype instead. if not mb_df.index.is_integer():

oggm/tests/test_graphics.py: 15 warnings /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:656: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. if 'Multi' in geom.type:

oggm/tests/test_graphics.py: 11 warnings /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:1175: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. if g.type == 'Polygon':

oggm/tests/test_graphics.py: 11 warnings /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:1178: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. if g.type in ['LineString', 'LinearRing']:

oggm/tests/test_graphics.py: 11 warnings /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:1182: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. if g.type == 'Point':

oggm/tests/test_graphics.py::test_width_corrected oggm/tests/test_graphics.py::test_thick_elev_bands /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:745: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. geomtype = shape.iloc[0].geometry.type

oggm/tests/test_graphics.py::test_width_corrected /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:762: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. if 'Multi' in g.type:

oggm/tests/test_graphics.py::test_thick_elev_bands /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/salem/graphics.py:749: ShapelyDeprecationWarning: The 'type' attribute is deprecated, and will be removed in the future. You can use the 'geom_type' attribute instead. if 'Multi' in g.type:

oggm/tests/test_numerics.py::TestIdealisedCases::test_run_until oggm/tests/test_numerics.py::TestIdealisedCases::test_run_until oggm/tests/test_numerics.py::TestFluxGate::test_find_flux_from_thickness

<__array_function__ internals>:200: DeprecationWarning: Calling nonzero on 0d arrays is deprecated, as it behaves surprisingly. Use `atleast_1d(cond).nonzero()` if the old behavior was intended. If the context of this warning is of the form `arr[nonzero(cond)]`, just use `arr[cond]`. oggm/tests/test_prepro.py::TestGIS::test_define_region /home/hjp/oggm/oggm/tests/test_prepro.py:101: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead np.testing.assert_allclose(myarea, float(tdf['Area']), rtol=1e-2) oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_to_inversion_flowline /home/hjp/oggm/oggm/tests/test_prepro.py:866: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead np.testing.assert_allclose(area * 10 ** -6, float(tdf['Area']), oggm/tests/test_prepro.py::TestElevationBandFlowlines::test_to_inversion_flowline /home/hjp/oggm/oggm/tests/test_prepro.py:880: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead np.testing.assert_allclose(new_area * 10 ** -6, float(tdf['Area'])) oggm/tests/test_prepro.py::TestGeometry::test_width /home/hjp/oggm/oggm/tests/test_prepro.py:1099: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead np.testing.assert_allclose(area * 10**-6, float(tdf['Area']), oggm/tests/test_prepro.py::TestGeometry::test_width /home/hjp/oggm/oggm/tests/test_prepro.py:1113: FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead np.testing.assert_allclose(new_area * 10**-6, float(tdf['Area'])) oggm/tests/test_utils.py::TestDLVerify::test_corrupted_file /home/hjp/miniconda3/envs/robot/lib/python3.8/site-packages/jupyter_client/connect.py:20: DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs given by the platformdirs library. To remove this warning and see the appropriate new directories, set the environment variable `JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`. The use of platformdirs will be the default in `jupyter_core` v6 from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write -- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html ===================================================================================================== short test summary info ====================================================================================================== FAILED oggm/tests/test_graphics.py::test_width_corrected - ValueError: can only convert an array of size 1 to a Python scalar FAILED oggm/tests/test_prepro.py::TestClimate::test_mb_calibration_from_scalar_mb - ValueError: could not convert string to float: 'AT' ========================================================================= 2 failed, 204 passed, 146 skipped, 1 xfailed, 169 warnings in 268.03s (0:04:28) ========================================================================== (
pat-schmitt commented 1 year ago

Hi @Jinneedayu, yes I think you can ignore them.

Are you working on a Mac?

Jinneedayu commented 1 year ago

Hi @Jinneedayu, yes I think you can ignore them.

Are you working on a Mac?

hi @pat-schmitt ,thank you. I work in windows and I install a ubuntu environment.