ECMWFCode4Earth / ml_drought

Machine learning to better predict and understand drought. Moving github.com/ml-clim
https://ml-clim.github.io/drought-prediction/
90 stars 18 forks source link

Review - Exporters #97

Closed cvitolo closed 4 years ago

cvitolo commented 5 years ago

This is a very handy functionality! If you are interested in monthly data from CDS you can request directly the monthly averages. Is there a reason why you request hourly data?

tommylees112 commented 5 years ago

We have the option to download both monthly and hourly data through the ERA5Exporter for example.

exporter = ERA5Exporter()
exporter.export(variable='total_precipitation', granularity='monthly')
cvitolo commented 5 years ago

Ohhh, I see. It was a bit confusing because in your example the selection request contains explicit times (see below).

Selection Request: {'area': '6.002/33.501/-5.202/42.283', 'format': 'netcdf', 'month': ['01'], 'product_type': 'monthly_averaged_reanalysis', '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'], 'variable': ['total_precipitation'], 'year': ['2010']}

If for the monthly exports, time is a redundant variable you can just close this issue. However, if you have some time to dedicate to this, it would be good to remove it from the printed statement.