Displaying multiple files

Chi Nguyen Chi.Nguyen at SCI.MONASH.EDU.AU
Sun Dec 16 00:57:07 EST 2007


Hello Jason,

One solution would be creating a ctl file describing your data. And then use 'xdfopen' command to open the ctl file. After that you can do all normal averaging on this.

Your ctl should have the OPTIONS TEMPLATE, and could look something like this:

DSET uwnd.%y4.nc
OPTIONS template
XDEF ...
YDEF ...
ZDEF ...
TDEF 1460 linear 00z1JAN2001 1dy
VARS ..
..
..
ENDVARS

Please check with your data (e.g. using ncdump) to get the dimension to fill in the XDEF, YDEF, ZDEF, variables, vvv... And also, depends on how frequent is your data, you should modify the TDEF line (in the example above, I assumed that you have daily data).

Good luck!
Mai




Jason Snyder <jmssnyder at UCDAVIS.EDU> wrote:>
> I have the following wind data files that cover the following time
> ranges:
>
> uwnd.2001.nc  January 1 2001 to December 31 2001
> uwnd.2002.nc  January 1 2002 to December 31 2002
> uwnd.2003.nc  January 1 2003 to December 31 2003
> uwnd.2004.nc  January 1 2004 to December 31 2004
>
> I want to create a variable that would display the average wind from
> January 1 2001 to December 31 2004. How would I go about doing this? Can
> someone show me a method for opening all these netcdf files at once and
> creating an avrerage wind in the above time period specified from these 4
> files?
--
*********************************
Nguyen Chi Mai
School of Mathematical Sciences
R. 462, Bld. 28, Clayton Campus
Monash University
Work Ph. +61 3 9905 4424



More information about the gradsusr mailing list