diff --git a/environment.yml b/environment.yml index fde49ab62..a9104e0b6 100644 --- a/environment.yml +++ b/environment.yml @@ -3,7 +3,7 @@ channels: - conda-forge dependencies: - matplotlib>=3.5 - - numpy>=1.17 + - numpy<2.0 - scipy>=1.6 - netcdf4<=1.6.1 - ffmpeg @@ -29,7 +29,7 @@ dependencies: - cmocean - utm - roaring-landmask>=0.7 - - trajan>=0.1.3 + - trajan>=0.6.3 - adios_db<1.2 - copernicusmarine - pip diff --git a/examples/example_openoil.py b/examples/example_openoil.py index 6bda4bede..1f2ae1723 100755 --- a/examples/example_openoil.py +++ b/examples/example_openoil.py @@ -8,7 +8,7 @@ from opendrift.readers import reader_netCDF_CF_generic from opendrift.models.openoil import OpenOil -o = OpenOil(loglevel=20, weathering_model='noaa') +o = OpenOil(loglevel=20, location='Norway') print(o.oiltypes) # Print available oil types diff --git a/opendrift/models/basemodel/__init__.py b/opendrift/models/basemodel/__init__.py index 647cea911..dd5ea0804 100644 --- a/opendrift/models/basemodel/__init__.py +++ b/opendrift/models/basemodel/__init__.py @@ -3114,7 +3114,7 @@ def plot_timestep(i): if cmap is None: cmap = 'jet' if isinstance(cmap, str): - cmap = matplotlib.cm.get_cmap(cmap) + cmap = matplotlib.colormaps[cmap] if color is not False: if isinstance(color, str): colorarray = self.get_property(color)[0].T @@ -3499,7 +3499,7 @@ def plot(self, lvmax = param.max() lc = LineCollection( segments, - #cmap=plt.get_cmap('Spectral'), + #cmap=plt.colormaps['Spectral'], cmap=cmap, norm=plt.Normalize(lvmin, lvmax), transform=gcrs) diff --git a/tests/models/test_models.py b/tests/models/test_models.py index 9d99c2d7b..44ad6ca2f 100644 --- a/tests/models/test_models.py +++ b/tests/models/test_models.py @@ -168,7 +168,7 @@ def test_openberg(self): arr=[0.16072658,0.16466097,0.17384121,0.17325179,0.1715925,0.15592695] for indx in range(len(arr)): - self.assertAlmostEqual(o.uw_weighting[indx],arr[indx],8) + self.assertAlmostEqual(o.uw_weighting[indx],arr[indx],7) self.assertAlmostEqual(o.history['lon'].data[0][1],3.991, 3) self.assertAlmostEqual(o.history['lat'].data[0][1],62.011, 3)