Re: Looping through dtrend function

From: Hyacinth Nnamchi <hyacinth.1_at_nyahnyahspammersnyahnyah>
Date: Mon Oct 22 2012 - 23:55:18 MDT

Thank you very much Dennis, your suggestion works.

Hyacinth
> Date: Mon, 22 Oct 2012 23:09:21 -0600
> From: shea@ucar.edu
> To: hyacinth.1@hotmail.com
> CC: ncl-talk@ucar.edu
> Subject: Re: Looping through dtrend function
>
> [1] dtrend (dtrend_n) returns anomalies. It removes the mean.
>
> [2] Is 'x' one dimensional
> x(0)=Jan, x(1)=Feb, ... x(11)=Dec, x(12)=Jan_next year , ...
>
> x_dtrnd = x ; create array including meta data
> do nmo=0,nmos-1
> work = x(nmo::12) ; every 12-th value
> wavg = avg(work) ; average
> work = dtrnd(work, False) ; anomalies
> work = wavg + work ; add average back in
> x_dtrend(nmo::nmos) = work
> end do
>
>
>
> On 10/22/12 9:20 PM, Hyacinth Nnamchi wrote:
> > Hi;
> >
> > I am trying to detrend a monthly time series, month by month:
> >
> > nmos = 12
> > ntim = dimsizes(x)
> >
> > do n = 0,ntim-1,nmos
> > x_dtrnd = dtrend(x,False)
> > end do
> >
> > print(x_dtrnd(0:11))
> >
> > But the result doesn't look correct, looks like deviations from annual
> > mean. What could be wrong?
> >
> > Hyacinth
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > ncl-talk mailing list
> > List instructions, subscriber options, unsubscribe:
> > http://mailman.ucar.edu/mailman/listinfo/ncl-talk
> >
                                               

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 22 23:55:30 2012

This archive was generated by hypermail 2.1.8 : Tue Oct 23 2012 - 11:10:04 MDT