[Thread Prev][Thread Next][Index]

writing averages


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
I would like to get a monthly climatology over the 15 years for each
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
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
user guide:

use era15_4x5mon_197901.nc   ! first year, first month

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!


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