re-arrange time in line plot

Eric Altshuler ela at COLA.IGES.ORG
Tue Jul 31 13:46:22 EDT 2007


Sara,

You could compute the time series of area averages, then do the following:

Since your dataset goes from December to November, then I will assume that there are 12 time levels in the dataset with December having t=1, January t=2, ..., November having t=12. You can write the values to a file as follows (assuming your time series is a defined variable called 'var'):

'set gxout fwrite'
'set t 2 12'
'd var'
'set t 1'
'd var'
'disable fwrite'
'quit'

Now you will have a binary file named 'grads.fwrite' containing the time series from January to December. You'll need to make a ctl file for this new dataset, but that's simple. It will look something like:

dset grads.fwrite
undef 9.999e+20
title data
xdef 1 linear 0 1
ydef 1 linear 0 1
zdef 1 levels 1
tdef 12 linear 00z01jan2000 1mo
vars 1
var
endvars

Best regards,


Eric L. Altshuler
Assistant Research Scientist
Center for Ocean-Land-Atmosphere Studies
4041 Powder Mill Road, Suite 302
Calverton, MD 20705-3106
USA

E-mail: ela at cola.iges.org
Phone: (301) 902-1257
Fax: (301) 595-9793

----- Original Message -----
From: "Rauscher Sara A" <srausche at ICTP.IT>
To: GRADSUSR at LIST.CINECA.IT
Sent: Tuesday, July 31, 2007 6:13:57 AM (GMT-0500) America/New_York
Subject: re-arrange time in line plot

Hello,
I have a netcdf file of climatological averages that go from December to
November instead of January to December. I want to display a time series
of area averaged data in a line plot, but I want the data to go from
January to December. Is there any way of rearranging the data in grads
so that I can do this? I am hoping I don't have to redo the netcdf files.
thanks for any help,
sara

--

Dr. Sara A. Rauscher
Earth System Physics Section
The Abdus Salam International Centre for Theoretical Physics
Strada Costiera 11
34014 Trieste ITALY
ph: +39 040 2240 225 fax: +39 040 2240 449
email: srausche at ictp.it



More information about the gradsusr mailing list