Thanks for the reply David - I didn't know to look at the reshape function.
...However, I have one more (simple?) question: Is it possible to reshape the latitude/z contour plot (where z=month number) back to a time/latitude contour plot (i.e. month name on the x-axis, latitude on the z axis)? Tried using reshape again, but I'm not getting very far!
Just to clarify about my data/script:
yes? show grid my_dat !my raw data
GRID (G002)
name axis # p
bsp; end
normal X
LAT LATITUDE 15 r 70S 70N
LEV Z (hPa) 3 i- 1.5 15
TAX TIME 325 r 15-DEC-1978 00:00 15-DEC-2005 00:00
yes? define axis/t=1979:2005:1 tyear !Omit Dec 1978
yes? define axis/z=1:12:1 zmonth
yes? let my_dat15 = my_dat[k=3,l=2:325] !Get 2D (lat/time) variable<
id = z[gz=zmonth] + t[gt=tyear] + y[gy=my_dat15]
yes? let my_reshape = reshape(my_dat15,out_grid)
yes? show grid my_reshape
GRID (G003)
name axis # pts start end
normal X
LAT LATITUDE 15 r 70S 70N
ZMONTH Z  
bsp; 12 r 1 12
TYEAR T 27 r 1979 2005
yes? let p = t[gt=my_reshape] !Do the regression
yes? let q = my_shape
yes? set grid q
yes? go regresst
yes? fill slope*10 !Decadal trend
Cheers,
Paul
On Feb 10, 2009, at 3:35 PM, David Wang wrote:
Hi all,
Can't find this in the documentation or email group....
I have a time series of monthly mean data (Dec 1978-Dec 2005) on pressure (z) and latitude (y) axes. I would like to be able to do a 2D plot of lat vs time that shows the linear trend for each month. I see that using the regresst tool produces a trend for the whole time series, so is there a way to do it for each month individually? The only way I thought was to load in a time series of each month individually, do the regression, output to a file, combine 12 files using NCO, then re-read back into ferret to do the plotting - there's got to be a simpler way I guess!?
Thanks for any help,
Paul
-----
Paul Young
Chemistry and Clim
> Chemical Sciences Division
NOAA Earth System Research Laboratory
325 Broadway R/CSD8
Boulder CO 80305-3328
USA
Tel: +1 303-497-4711
Fax: +1 303-497-5686
--
life grows, death doesn't.
-----
Paul Young
Chemistry and Climate Processes
Chemical Sciences Division NOAA Earth System Research Laboratory
325 Broadway R/CSD8
Boulder CO 80305-3328
USA
Tel: +1 303-497-4711
Fax: +1 303-497-5686