[Thread Prev][Thread Next][Index]
How to do the mean of 4 files
Hi,dear ferret users
I have four netcdf files which have the same variables, same level, same
data range, but different time. ie, one data file is observed at 00
o'clock, the other three are 06, 12, 18 respectively.
What I want is to mean these 4 time's data and get a new data which can
be called mean.nc
I have write the following scirpt whick works well
use output.00.nc
use output.06.nc
use output.12.nc
use output.18.nc
set region/x=1:357.5/y=-90:90
let umean=(u[d=1,k=1,l=1]+u[d=2,k=1,l=1]+u[d=3,k=1,l=1]+u[d=4,k=1,l=1])/4
let vmean=(v[d=1,k=1,l=1]+v[d=2,k=1,l=1]+v[d=3,k=1,l=1]+v[d=4,k=1,l=1])/4
save/file=outputmean.nc umean,vmean
************************************
Because I want to compute all the levels and all the date range
so I add the following two lines
repeat/k=1:2
repeat/l=1:731
But this time it doesn't work
Can someboday give some guidence for this problem and how can get what I
want
Thanks a lot
_________________________________________________________________
与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement