diff --git a/doc/examples/monthly-means.rst b/doc/examples/monthly-means.rst index 7cc47eb2847..16d8aaa32ec 100644 --- a/doc/examples/monthly-means.rst +++ b/doc/examples/monthly-means.rst @@ -92,7 +92,7 @@ Open the ``Dataset`` .. code:: python - ds = xr.tutorial.load_dataset('rasm') + ds = xr.tutorial.open_dataset('rasm').load() print(ds) diff --git a/doc/gallery/plot_cartopy_facetgrid.py b/doc/gallery/plot_cartopy_facetgrid.py index 3eded115263..5da58f3f03c 100644 --- a/doc/gallery/plot_cartopy_facetgrid.py +++ b/doc/gallery/plot_cartopy_facetgrid.py @@ -22,7 +22,7 @@ import xarray as xr # Load the data -ds = xr.tutorial.load_dataset('air_temperature') +ds = xr.tutorial.open_dataset('air_temperature') air = ds.air.isel(time=[0, 724]) - 273.15 # This is the map projection we want to plot *onto* diff --git a/doc/gallery/plot_colorbar_center.py b/doc/gallery/plot_colorbar_center.py index 4818b737632..88511a2d327 100644 --- a/doc/gallery/plot_colorbar_center.py +++ b/doc/gallery/plot_colorbar_center.py @@ -13,7 +13,7 @@ import xarray as xr # Load the data -ds = xr.tutorial.load_dataset('air_temperature') +ds = xr.tutorial.open_dataset('air_temperature') air = ds.air.isel(time=0) f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, figsize=(8, 6)) diff --git a/doc/gallery/plot_control_colorbar.py b/doc/gallery/plot_control_colorbar.py index 5802a57cf31..e7a275e8d86 100644 --- a/doc/gallery/plot_control_colorbar.py +++ b/doc/gallery/plot_control_colorbar.py @@ -12,7 +12,7 @@ import xarray as xr # Load the data -air_temp = xr.tutorial.load_dataset('air_temperature') +air_temp = xr.tutorial.open_dataset('air_temperature') air2d = air_temp.air.isel(time=500) # Prepare the figure diff --git a/doc/gallery/plot_lines_from_2d.py b/doc/gallery/plot_lines_from_2d.py index 93d7770238e..25691867fdf 100644 --- a/doc/gallery/plot_lines_from_2d.py +++ b/doc/gallery/plot_lines_from_2d.py @@ -17,7 +17,7 @@ import xarray as xr # Load the data -ds = xr.tutorial.load_dataset('air_temperature') +ds = xr.tutorial.open_dataset('air_temperature') air = ds.air - 273.15 # to celsius # Prepare the figure diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 2c87e0cab88..f409e3216dd 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -30,6 +30,10 @@ Breaking changes By `Maximilian Roos `_. - `cyordereddict` is no longer used as an optional dependency (:issue:`2744`). By `Joe Hamman `_. +- ``xarray.tutorial.load_dataset`` has been removed as scheduled in Xarray 0.11. + Instead, you can use ``tutorial.open_dataset(...).load()`` which allows you + to use tutorial datasets with dask. + By `Zac Hatfield-Dodds `_. Enhancements ~~~~~~~~~~~~ diff --git a/xarray/tutorial.py b/xarray/tutorial.py index 3f92bd9a400..6b61c916434 100644 --- a/xarray/tutorial.py +++ b/xarray/tutorial.py @@ -87,20 +87,3 @@ def open_dataset(name, cache=True, cache_dir=_default_cache_dir, _os.remove(localfile) return ds - - -def load_dataset(*args, **kwargs): - """ - `load_dataset` will be removed in version 0.12. The current behavior of - this function can be achived by using `tutorial.open_dataset(...).load()`. - - See Also - -------- - open_dataset - """ - warnings.warn( - "load_dataset` will be removed in xarray version 0.12. The current " - "behavior of this function can be achived by using " - "`tutorial.open_dataset(...).load()`.", - DeprecationWarning, stacklevel=2) - return open_dataset(*args, **kwargs).load()