[英]Average a Months' worth of NetCDF data to one 24hr-day
I hope you're well --我希望你很好 -
I have multiple files all having one month of hourly data.我有多个文件都有一个月的每小时数据。
Wind = Jun1.variables['wind'][:,:,:]
Wind = Jun2.variables['winds'][:,:,:]
etc
Below shows the dimensions下图显示尺寸
I want to average each individual files in a way to calculate the hourly average to get the diurnal cycle for each month with array shape (time, lon, lat) of:我想以一种计算每小时平均值的方式对每个单独的文件进行平均,以获得每个月的昼夜周期,数组形状(时间、经度、纬度)为:
If Charlie's interpretation is correct (I think it is from your desired array shape) then you can work out the diurnal cycle over a multi day period with CDO using如果查理的解释是正确的(我认为它来自您想要的阵列形状),那么您可以使用 CDO 计算出多天的昼夜周期
cdo dhourmean in.nc out.nc
I think you need to make sure you have a recent version of cdo for this.我认为您需要确保为此拥有最新版本的 cdo。 v1.9.5 should be okay.
v1.9.5 应该没问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.