You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
monthly-means request with inconsistent product type returns hourly data without warning #161
I requested the dataset reanalysis-era5-single-levels-monthly-means, but mistakenly specified product_type="reanalysis" and omitted the time parameter (this used to work for previous reanalysis, with the previous API).
Problem: The request completed without an error or warning. However, the returned data contain instantaneous hourly fields (1st of the month, at 12:00) rather than monthly averages.
I got this conclusion after downloading and comparing the same variable using the correct product_type="monthly_averaged_reanalysis" and time="00:00" (as suggested by the CDS web interface). I also downloaded and compared with the same variable at hourly resolution.
I would expect an unsupported product type for the selected dataset, or a missing required parameter, to produce a validation error rather than return data with a different temporal meaning.
Could request validation reject this combination to prevent users from unknowingly treating hourly fields as monthly means?
I have attached three scripts with API pull request to download a few data (~20Mb) for "hcc" (high cloud cover) for 2022:
inconsistent monthly-means request
corrected monthly-means request
hourly request
I have also attached a plotting script and the three figures showing the returned field, the correctly requested monthly mean, and differences against the hourly reference fields.
Steps:
execute the 3 scripts to download 20Mb of sample files
execute the plotting script to create the comparison figures
check the header of the "good" and "bad" files (check hcc:GRIB_stepType)
Activity