For my thesis, I need to get the average of ERA5 land values at 15.00 and 16:00 for specific days in each month. To clarify, I've been trying the following:
import cdstoolbox as ct
@ct.application(title='Download data')
@ct.output.download()
@ct.output.download()
@ct.output.download()
def download_application():
data1, data2, data3 = ct.catalogue.retrieve(
'reanalysis-era5-land',
{
'variable': [
'10m_u_component_of_wind', '10m_v_component_of_wind', '2m_temperature',
],
'year': '2019',
'month': '03',
'day': [
'05', '12', '19',
'23', '24', '27',
'28',
],
'time': [
'15.00',16:00',
],
'area': [
41, -80.5, 34,
-74,
],
'grid':['0.008333333', '0.00833333']
}
)
temperature_mean = ct.cube.resample(data3, freq='day', dim='time', how='mean')
uwind_mean = ct.cube.resample(data2, freq='day', dim='time', how='mean')
vwind_mean = ct.cube.resample(data1, freq='day', dim='time', how='mean')
return temperature_mean, uwind_mean, vwind_mean
With the goal of obtaining 7 two-dimensional arrays (one per day) for each variable, where each pixel contains the average of the estimates at 15.00 and 16.00.
But when I then try to visualize the output in Snap or Spyder, it makes almost no sense - there are 24 timesteps, of which 7(located in a seemigly random way along the list) seem to contain just the estimate made at 15.00.
Any suggestion on how to solve this matter would be dearly appreciated.