Skip to content

Commit a8f0643

Browse files
authored
Add new datasets to tutorial.load_dataset docstring (#6719)
* Add new datasets to tutorial.load_dataset docstring * Add basin_mask; file types. * [skip-ci] Add docstring for tutorial.load_dataset
1 parent 3a9546f commit a8f0643

File tree

1 file changed

+37
-1
lines changed

1 file changed

+37
-1
lines changed

xarray/tutorial.py

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ def _construct_cache_dir(path):
3838
}
3939
file_formats = {
4040
"air_temperature": 3,
41+
"air_temperature_gradient": 4,
42+
"basin_mask": 4,
43+
"ersstv5": 4,
4144
"rasm": 3,
4245
"ROMS_example": 4,
4346
"tiny": 3,
@@ -88,11 +91,14 @@ def open_dataset(
8891
Available datasets:
8992
9093
* ``"air_temperature"``: NCEP reanalysis subset
94+
* ``"air_temperature_gradient"``: NCEP reanalysis subset with approximate x,y gradients
95+
* ``"basin_mask"``: Dataset with ocean basins marked using integers
9196
* ``"rasm"``: Output of the Regional Arctic System Model (RASM)
9297
* ``"ROMS_example"``: Regional Ocean Model System (ROMS) output
9398
* ``"tiny"``: small synthetic dataset with a 1D data variable
9499
* ``"era5-2mt-2019-03-uk.grib"``: ERA5 temperature data over the UK
95100
* ``"eraint_uvz"``: data from ERA-Interim reanalysis, monthly averages of upper level data
101+
* ``"ersstv5"``: NOAA's Extended Reconstructed Sea Surface Temperature monthly averages
96102
97103
Parameters
98104
----------
@@ -108,7 +114,9 @@ def open_dataset(
108114
109115
See Also
110116
--------
111-
xarray.open_dataset
117+
tutorial.load_dataset
118+
open_dataset
119+
load_dataset
112120
"""
113121
try:
114122
import pooch
@@ -218,9 +226,37 @@ def load_dataset(*args, **kwargs):
218226
Open, load into memory, and close a dataset from the online repository
219227
(requires internet).
220228
229+
If a local copy is found then always use that to avoid network traffic.
230+
231+
Available datasets:
232+
233+
* ``"air_temperature"``: NCEP reanalysis subset
234+
* ``"air_temperature_gradient"``: NCEP reanalysis subset with approximate x,y gradients
235+
* ``"basin_mask"``: Dataset with ocean basins marked using integers
236+
* ``"rasm"``: Output of the Regional Arctic System Model (RASM)
237+
* ``"ROMS_example"``: Regional Ocean Model System (ROMS) output
238+
* ``"tiny"``: small synthetic dataset with a 1D data variable
239+
* ``"era5-2mt-2019-03-uk.grib"``: ERA5 temperature data over the UK
240+
* ``"eraint_uvz"``: data from ERA-Interim reanalysis, monthly averages of upper level data
241+
* ``"ersstv5"``: NOAA's Extended Reconstructed Sea Surface Temperature monthly averages
242+
243+
Parameters
244+
----------
245+
name : str
246+
Name of the file containing the dataset.
247+
e.g. 'air_temperature'
248+
cache_dir : path-like, optional
249+
The directory in which to search for and write cached data.
250+
cache : bool, optional
251+
If True, then cache data locally for use on subsequent calls
252+
**kws : dict, optional
253+
Passed to xarray.open_dataset
254+
221255
See Also
222256
--------
257+
tutorial.open_dataset
223258
open_dataset
259+
load_dataset
224260
"""
225261
with open_dataset(*args, **kwargs) as ds:
226262
return ds.load()

0 commit comments

Comments
 (0)