Trying to average multiple variables at the same time. Doesn't seem to be working. Seems like "data" is an xarray object with two variables (vas,uas) but the daily_means doesn't want to operate on both. I tried accessing individual DataArrays by using data.uas, data.vas but that doesn't seem to work either.
Thanks
Axel
import cdstoolbox as ct
@ct.application(title='Download data')
@ct.output.download()
def download_application():
data = ct.catalogue.retrieve(
'reanalysis-era5-single-levels',
{
'product_type': 'reanalysis',
'variable': [
'10m_u_component_of_wind', '10m_v_component_of_wind',
],
'year': '2017',
'month': '01',
'day': [
'01', '02',
],
'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',
],
}
)
print(data)
daily_mean_u=ct.climate.daily_mean(data)
return data