import cdsapi

c = cdsapi.Client()

for format_file in ['grib','netcdf']:
    if format_file == 'grib':
        extension = '.grib'
    else:
        extension = '.nc'
    
    filename = '../archives/reanalysis/32_reanalysis-uerra-europe-height-levels' + extension

    c.retrieve(
        'reanalysis-uerra-europe-height-levels',
        {
            'format':format_file,
            'year':'2000',
            'month':'01',
            'day':'01',
            'time':'06:00',
            'variable':'wind_speed',
            'height_level':[
                '15_m','250_m','500_m'
            ]
        },
        filename)
