[Thread Prev][Thread Next][Index]
writing averages
Hi,
I have the following problem:
I have 15 years of met data organized in monthly netcdf files.
The time step is 6 hours, so there are 124 records for each variable
in each January file, 112 records for each variable in each February
file,
...
I would like to get a monthly climatology over the 15 years for each
variable.
So appending the monthly means to each file was easy, doing:
let t2mc=T2M[l=@sum]/t2m[l=@ngd]
save/file=$1/append t2mc
for all files.
I thought, I could write those means out to another file, while I was
doing
this, but I was not clear on how to get the time info across. I do need
a decent
netcdf file in the end, since I need to use it in a model run.
So I tried, to get the time info from another variable, as outlined in
the
user guide:
use era15_4x5mon_197901.nc ! first year, first month
define
axis/T="16-JAN-1979:00:00":"16-DEC-1993:00:00":1/T0="1-JAN-1979:00:00"/npoints=180/unit=mon
tecm
define grid/like t2m/T=tecm
define grid/T=tecm ttss
let ts=T[G=ttss]*0
let t2mc=t2m[l=@SUM]/T2M[L=@NGD]+ts
save/file=xx.nc t2mc[l=1]
use era15_4x5mon_197902.nc ! first year, second month
save/append/file=xx.nc t2mc[l=2]
Somehow, this does not lead to the desired result - I always have only
one record
in the file xx.nc.
Any suggestions greatly appreciated.
Oh, yes, I thought I'd try nco, but the make turned out fairly nasty -
so success yet.
I guess I have to get gnu make - it seems the generic sun does not do
the trick....
There, too, any ideas most welcome...
Thanks a lot!
Cheers,
Joerg
--
Jörg Kaduk Tel.: 1 650 325 1521 x 416
Carnegie Institution of Washington FAX: 1 650 325 6857
Dept. of Plant Biology
260 Panama Street joerg@jasper.stanford.edu
Stanford, CA 94305-1297 http://Jasper.Stanford.EDU/joerg/
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement