pydune.data_processing.getting_CDSdata#

getting_CDSdata(dataset, variable_dic, name, Nsplit=1, file='info.txt', on_grid=True)[source]#

This fuction helps to download data from datasets stored in the Climate Data Store.

Parameters:
  • dataset (int) – dataset in which downloading the data. It can be ‘reanalysis-era5-single-levels’ or ‘reanalysis-era5-land’ for now.

  • variable_dic (dic) – variable dictionnary to provide as a request.

  • name (str) – name used to label the downloaded files.

  • Nsplit (int) – number of requests in which the main request is split (the default is 1). If too small, will be corrected automatically.

  • file (str) – filename under which some information about the request will be saved (the default is ‘info.txt’).

  • on_grid (bool) – if True, the required coordinates will be matched with the native grid of the requested dataset. Otherwise, the dataset will be downloaded at the requested coordinates, using the interpolation of the CDS server (the default is True).

Returns:

file_names – the list of downloaded file names

Return type:

list

Examples

>>> month = [i for i in range(1, 13)]
>>> day = [i for i in range(1, 32)]
>>> time = [i for i in range(0, 24)]
>>> year = [i for i in range(1950, 2023)]
>>> area = [-16.65, 11.9, -16.66, 11.91]
>>> variable_dic = {'format': 'netcdf',
                'variable': ['v10'],
                'month': month,
                'day': day,
                'time': time,
                'year': year,
                'area': area,
                'grid': [1.0, 1.0]}
>>> a = CDS.Getting_wind_data('reanalysis-era5-land',
                          variable_dic, 'Angola_coast_v10',
                          Nsplit=6,
                          file='info.txt',
                          on_grid=False)

Examples using pydune.data_processing.getting_CDSdata#

Downloading data from the ERA* datasets

Downloading data from the ERA* datasets