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

Soil Moisture: spurious "Request too large" errors #48

Closed
pont-us opened this issue Apr 12, 2021 · 0 comments · Fixed by #49
Closed

Soil Moisture: spurious "Request too large" errors #48

pont-us opened this issue Apr 12, 2021 · 0 comments · Fixed by #49
Labels
bug Something isn't working

Comments

@pont-us
Copy link
Member

pont-us commented Apr 12, 2021

Consider, for example, the following request:

generated_cube = cds_store.open_data(
    'satellite-soil-moisture:volumetric:monthly',
    variable_names=['volumetric_surface_soil_moisture'],
    time_range=['2015-01-01', '2016-01-31']
)

This requests a modest three months at monthly resolution, but at time of writing results in the following error from the CDS API backend:

2021-04-12 13:53:46,053 ERROR Message: the request you have submitted is not valid
2021-04-12 13:53:46,054 ERROR Reason:  Request too large. Requesting 17856 items, limit is 12000

This request worked as recently as 2021-02-18, and the relevant parts of the CDS Store code have not changed since then, so evidently something has changed in the CDS server's implementation of its undocumented API.

Closer examination reveals that the actual request sent by the CDS store includes the following:

'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'],
'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']

This should not be there for a monthly average request. Presumably it was just ignored by previous versions of the CDS API. Removing the time parameter and setting day appropriately (according to the requested time-span and averaging period) would probably fix the bug.

@pont-us pont-us added the bug Something isn't working label Apr 12, 2021
pont-us added a commit that referenced this issue Apr 13, 2021
Addresses Issue #48.

Several soil moisture tests currently failing -- they will have to be
updated for compatibility with the changed request format.
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

Successfully merging a pull request may close this issue.

1 participant