Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request too large when adding grid parameter #113

Open
GMavrak opened this issue Aug 21, 2024 · 0 comments
Open

Request too large when adding grid parameter #113

GMavrak opened this issue Aug 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@GMavrak
Copy link

GMavrak commented Aug 21, 2024

What happened?

Good morning,

I want to download ocean waves and wind variables for the dataset: 'ERA5 hourly data on single levels from 1940 to present' through the cdsapi (I have migrated to CDS-Beta).

When I execute the request without placing the grid parameter, i.e.:

import cdsapi

dataset = "reanalysis-era5-single-levels"
months = ['0' + str(x) if x < 10 else str(x) for x in range(1, 13)]

request = {
    'product_type': ['reanalysis'],
    'variable': ['10m_u_component_of_wind', '10m_v_component_of_wind', 'mean_wave_direction', 'significant_height_of_combined_wind_waves_and_swell', 'mean_direction_of_total_swell', 'mean_direction_of_wind_waves', 'mean_period_of_total_swell', 'significant_height_of_total_swell', 'significant_height_of_wind_waves'],
    'year': ['2024'],
    'month': months,
    'day': ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
    'time': ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'],
    'data_format': 'grib',
    'download_format': 'unarchived',
    'area': [46, 15, 44.5, 16.5]
}

client = cdsapi.Client()
client.retrieve(dataset, request).download()

the request is executed and downloaded normally. However, when I place the grid parameter in order to have the same spatial granularity in both ocean waves and wind variables, I take the following error:

RuntimeError: 403 Client Error: cost limits exceeded
Your request is too large, please reduce your selection.

Is this behavior expected? Because with the grid parameter, I ask to fetch fewer data, as the wind variables have by default 0.25 granularity.

What are the steps to reproduce the bug?

import cdsapi

dataset = "reanalysis-era5-single-levels"
months = ['0' + str(x) if x < 10 else str(x) for x in range(1, 13)]

request = {
    'product_type': ['reanalysis'],
    'variable': ['10m_u_component_of_wind', '10m_v_component_of_wind', 'mean_wave_direction', 'significant_height_of_combined_wind_waves_and_swell', 'mean_direction_of_total_swell', 'mean_direction_of_wind_waves', 'mean_period_of_total_swell', 'significant_height_of_total_swell', 'significant_height_of_wind_waves'],
    'year': ['2024'],
    'month': months,
    'grid': ['0.5', '0.5'],
    'day': ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19', '20', '21', '22', '23', '24', '25', '26', '27', '28', '29', '30', '31'],
    'time': ['00:00', '01:00', '02:00', '03:00', '04:00', '05:00', '06:00', '07:00', '08:00', '09:00', '10:00', '11:00', '12:00', '13:00', '14:00', '15:00', '16:00', '17:00', '18:00', '19:00', '20:00', '21:00', '22:00', '23:00'],
    'data_format': 'grib',
    'download_format': 'unarchived',
    'area': [46, 15, 44.5, 16.5]
}

client = cdsapi.Client()
client.retrieve(dataset, request).download()

Version

v0.7.1

Platform (OS and architecture)

Windows 10 x64

Relevant log output

No response

Accompanying data

No response

Organisation

No response

@GMavrak GMavrak added the bug Something isn't working label Aug 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant