climpred.tutorial.load_dataset#
- climpred.tutorial.load_dataset(name: Union[None, str] = None, cache: bool = True, cache_dir: str = '~/.climpred_data', github_url: str = 'https://github.com/pangeo-data/climpred-data', branch: str = 'master', extension: Union[None, str] = None, proxy_dict: Optional[Dict[str, str]] = None, **kws) Dataset [source]#
Load example data or a mask from an online repository.
- Parameters:
name – Name of the netcdf file containing the dataset, without the
.nc
extension. IfNone
, this function prints out the available datasets to import.cache – If
True
, cache data locally for use on later calls.cache_dir – The directory in which to search for and cache the data.
github_url – Github repository where the data is stored.
branch – The git branch to download from.
extension – Subfolder within the repository where the data is stored.
proxy_dict – Dictionary with keys as either “http” or “https” and values as the proxy server. This is useful if you are on a work computer behind a firewall and need to use a proxy out to download data.
kws – Keywords passed to
open_dataset()
.
- Returns:
The desired
xarray.Dataset
Examples
>>> from climpred.tutorial import load_dataset >>> proxy_dict = {"http": "127.0.0.1"} >>> ds = load_dataset("FOSI-SST", cache=False, proxy_dict=proxy_dict)