Reputation: 31
I am having trouble trying to combine three files to be averaged. I am not so sure how to even start. I have three files
"nday1.06.nc , nday1.07.nc, nday.08.nc"
each with the variables
"filling on), ('SST', <class 'netCDF4._netCDF4.Variable'>
float32 SST(time, nlat, nlon)
long_name: Surface Potential Temperature
units: degC
coordinates: TLONG TLAT time
grid_loc: 2110
cell_methods: time: mean time: mean time: mean
_FillValue: 9.96921e+36
missing_value: 9.96921e+36
unlimited dimensions: time
current shape = (1, 2400, 3600)
I just need to average the SST variables and then an output file with the averages
Upvotes: 0
Views: 498
Reputation: 2078
Similarly, you could you use cdo, but you first need to merge the files:
cdo mergetime nday1.06.nc nday1.07.nc nday.08.nc mergedfile.nc
and then average:
cdo timmean mergedfile.nc out.nc
Upvotes: 1
Reputation: 3794
You need ncra
not ncwa
http://nco.sourceforge.net/nco.html#ncra
ncra nday1.06.nc nday1.07.nc nday.08.nc out.nc
Upvotes: 2