def load_dataset(dataset_id,
                 variable,
                 esgf_username,
                 esgf_password,
                 search_url=DEFAULT_ESGF_SEARCH,
                 elevation_index=0,
                 name='',
                 save_path='/tmp',
                 **additional_constraints):
    download_data = _get_file_download_data(url=search_url,
                                            dataset_id=dataset_id,
                                            variable=variable)

    datasets = []
    for url, var in download_data:
        _download_files([url],
                        esgf_username,
                        esgf_password,
                        download_directory=save_path)

        file_save_path = os.path.join(save_path, url.split('/')[-1])
        datasets.append(local.load_file(file_save_path,
                                        var,
                                        name=name,
                                        elevation_index=elevation_index))

    origin = {
        'source': 'esgf',
        'dataset_id': dataset_id,
        'variable': variable
    }
    for ds in datasets:
        ds.origin = origin

    return datasets
Load an ESGF dataset.
dataset/ETHPy150Open apache/climate/ocw/data_source/esgf.py/load_dataset