Hi Jaison, Thanks for your help. The example is very useful. I have obtained a
solution to my problem following the lines of the example. A minor question is why the extra item "(X=18.8E:18.8E(378.8),
Y=91.3S:91.3N)" appears in the title of new variable UWND_JJA (see
following lines). yes? use uwnd_jja_mean.nc yes? show data currently SET data sets: 1> .\uwnd_jja_mean.nc (default) name
title
I
J
K L UWND_JJA JJA Seasonal Mean
UWND
1:144 1:73
... 1:11 (X=18.8E:18.8E(378.8),
Y=91.3S:91.3N) This extra item "(X=18.8E:18.8E(378.8), Y=91.3S:91.3N)" also appeared
in my SLP_JJA case. How can I remove it? Best regards, Yun -----Original Message----- Hi Yun, Here is an example using
monthly_navy_winds dataset. Also see these two mails, which deals with somewhat similar questions : http://ferret.pmel.noaa.gov/Ferret/Mail_Archives/fu_2004/msg00575.html http://www.ferret.noaa.gov/Ferret/Mail_Archives/fu_2005/msg00018.html Hope this helps... Jaison !-------Example : JJA seasonal mean from monthly data----------- ! \ cancel mode verify ! Drawbacks : Data should start at January of a year. Otherwise !
"yr_months" variable should be modified accordingly. ! ! monthly navy winds : 16-JAN-1982 to 17-DEC-1992 !----------------------------------------------------------- use monthly_navy_winds ! create a mask such that only JJA is valid
and all other months ! are set to missing value let L_indx = L[GT=uwnd] let yr_months = L_indx- 12*INT((L_indx-1)/12) list yr_months ! JJA --> L is 6-8 let mask_other_months = IF yr_months GT 5 AND
yr_months LT 9 THEN 1 list yr_months, mask_other_months ! Apply the mask let uwnd_masked = uwnd[d=1] *
mask_other_months list/x=60/y=10 uwnd_masked ! Club the JJA values together let uwnd_compr = COMPRESSL(uwnd_masked) list/x=60/y=10 uwnd_compr ! 1982-1992 --> 11 years --> 11*3=33
data points ! we need to average this data points in pairs
of 3 to find the ! seasonal mean. Easy way is to use two
abstract axes, one ! with 33 points (ranging from 1-33) and
another one with ! 11 points (ranging from 2-32) and
regrid using @AVE. define axis/t=1:33:1 t33 let uwnd_jja_all = uwnd_compr[gt=t33@ASN] list/x=60/y=10 uwnd_jja_all define axis/t=2:32:3 t11 ! for the exact
seasonal mean let uwnd_jja_av =
uwnd_jja_all[gt=t11@AVE] ! now assign a proper yearly time axis defined
over 1982-1992 ! here we dont need any interpolation
but the grid change ! ..so use @ASN regridding define axis/t=1982:1992:1/units=years tyear let uwnd_jja = uwnd_jja_av[gt=tyear@ASN] list/x=60/y=10 uwnd_jja ! 6.36 7.99 7.12
8.51 9.46 9.32 set var/title="JJA Seasonal Mean
UWND"/units="m/s" uwnd_jja ! save to a NetCDF file for future use ! sp rm -f uwnd_jja_mean.nc ! save/file=uwnd_jja_mean.nc/APPEND uwnd_jja !-------------end of example------------------------------------- On Wed, 20 Sep 2006 Yun.Li@csiro.au wrote: > Hi Ansley, > > > > I am trying to do "Leaving only JJA SLP data" from a
monthly NCEP SLP > data "slp.mon.mean.nc". I have looked at >
http://ferret.pmel.noaa.gov/Ferret/FAQ/analysis/seasonal_masking.html. > But I could not get a solution because of my poor ferret
skills. Could > you please give me a help here? > > > > Thanks, > > > > > > Yun > > > > > > > > _____ > > From: Ansley Manke [mailto:Ansley.B.Manke@noaa.gov] > Sent: Wednesday, 20 September 2006 3:02 AM > To: Li, Yun (CMIS, Floreat) > Cc: oar.pmel.ferret_users@noaa.gov > Subject: Re: [ferret_users] How can I produce a time series of JJA > averages (or other intervals) from a monthly time series? > > > > Hi Yun, > Here are a couple of FAQ's for you to look at - if one of these is
the > kind of thing you want to do. If you need help applying the ideas, > please write back to the users list. > > This FAQ makes a "seasonal mask" to pick out data from
part of each > year. It does the problem with units of time in days; but if
you're > starting with monthly data you could do a similar thing with
months, > with JJA being months 6,7,8. You could combine this with the
COMPRESS > functions to remove the missing data and leave only the JJA data. >
http://ferret.pmel.noaa.gov/Ferret/FAQ/analysis/seasonal_masking.html > > Or, did you have in mind a climatology, averaging all of the JJA
data > for all years, and returning just one point? In that case,
see > "climatology, creating" in the Users Guide, and this FAQ
for more > examples > http://ferret.pmel.noaa.gov/Ferret/FAQ/analysis/climatologies.html > > Ansley > > Yun.Li@csiro.au wrote: > > Dear Ferreters, > > > > I am trying to produce a seasonal time series (such as JJA time
series) > from a monthly time series. > > > > There is an example from the Ferret FAQ on "How can I produce
a time > series of annual averages (or other intervals) from a monthly time > series?" > > > >
http://ferret.wrc.noaa.gov/Ferret/FAQ/analysis/annual_from_monthly.html > > > > I would be most grateful if you can let me know how to produce a > seasonal averaged time series (such as June-July-August average
time > series) from a monthly time series by modifying the code used to
produce > annual time series in the above web page, that is, > > > > yes? SET DATA
monthly_navy_winds > > yes? DEFINE
AXIS/EDGES/T0=1-jan-1900/UNITS=days tann82_92 = > DAYS1900(X[i=1982:1993:1],1,1) > > yes? PLOT/X=180/Y=0 uwnd > > yes? PLOT/X=180/Y=0/over
uwnd[gt=tann82_92@ave] ! the above > plot > > > > > > > > Thanks, > > > > Yun Li > > CSIRO, > > > > > > |