[Thread Prev][Thread Next][Index]

composite plot



Hello Ferret users,

I'm trying to make a composite plot by averaging 3 time regions
of a dataset together.  I'm having trouble getting the following
script to work:

> use "../data/sst-current-all.nc"
>
> ! define a time axis to assign data to
> define axis /t=1:24:1 /unit=months taxis
> 
> let sst1 = sstanom[d=1, t=1-jan-1991:31-dec-1992, gt=taxis@asn]
> let sst2 = sstanom[d=1, t=1-jan-1994:31-dec-1995, gt=taxis@asn]
> let sst3 = sstanom[d=1, t=1-jan-2002:31-dec-2003, gt=taxis@asn]
> 
> let sst_ave = (sst1+sst2+sst3)/3.0

When I try to "fill sst1[y=0n]", Ferret complains that taxis only has
24 valid indices, and that my original data is coming from index 1080:

 **ERROR: illegal limits: SSTANOM on grid (G005) is not in the range
T=1079.5:1103.5
   Axis extremes are T=0.5:24.5

How can I get ferret to assign my 2 year selections of data to a
timeaxis without matching the dates or indices of the time axes? I
think I could probably use @shf to get it to work, but then I need to
compute the exact shift amount for each period, which is cumbersome.

Second question: what would be a nicer way to compute the average of 3
(or more) of these periods?

Hein Zelle

>-----------------------------------------------------------------<
    Hein Zelle
    Dept. of Oceographic Research
    KNMI, The Netherlands
    work:        zelle@knmi.nl     http://www.knmi.nl/~zelle
    private:     hein@icce.rug.nl  http://www.icce.rug.nl/~hein
>-----------------------------------------------------------------<
--------------------------------------------------------------
Zie ook/see also: http://www.knmi.nl/maildisclaimer.html 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement