[Thread Prev][Thread Next][Index]

Re: composite plot



Hi Hein,
When Ferret goes to regrid, it checks whether the two grids are
defined on the same region.  However you can use TSEQUENCE
to put all of your 24-month sections of data on a common abstract
time axis, as follows.  I've made an example using the COADS data,
and averaged in x and y to make sure the data sections are fairly
complete.

   use coads

   let sstave = sst[x=180:200@ave,y=0:20@ave]
   let sst1 = tsequence(sstave[t=1-jan-1960:31-dec-1964])
   let sst2 = tsequence(sstave[t=1-jan-1965:31-dec-1969])
   let sst3 = tsequence(sstave[t=1-jan-1970:31-dec-1974])

   plot  sst1, sst2, sst3
   plot/over/color=blue/thick (sst1+sst2+sst3)/3

Ansley Manke

Hein Zelle wrote:

> 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

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246




[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement