From: Bithi De <bde_at_nyahnyahspammersnyahnyah>
Date: Thu Oct 17 2013 - 00:40:09 MDT

Dear All,
I have a timeseries for a 480 timesteps. I want to create a polynomial that
would capture the major variability of the timeseries, but mine is fitting
very smoothly.

I followed
* http://www.ncl.ucar.edu/Document/Functions/Built-in/lspoly.shtml and
using this, the polynomial is fitting smoothly without showing the major
variability of the data.
*http://www.ncl.ucar.edu/Applications/Scripts/interp1d_1.ncl, I can fit the
curve showing the variability but could not create the polynomial function
of same dimension.
Is it possible to do using NCL?

Thanks for your time and help!

For 1st approach the code is like this:

;*************test time series***********

   printVarSummary(ts_rev) ; dataset 32*480

 ;create polynomial function

  xi= ispan(1,480,1)

   do i=0,31
   t=new((/480/), "float")
   t = ts_rev(i,:)

  n = 3
  c = lspoly(xi,t, 1, n)
  Y = c(0) + c(1)*xi + c(2)*xi^2 ;Polynomial
And For plot, I did like the follows to overlay two plots:

 xy_orig = gsn_csm_xy(wks,xi,t,res)
 xy_interp = gsn_csm_xy(wks,xi,Y,sres)


Bithi De

Graduate Student , Research Assistant
International Arctic Research Center , University of Alaska Fairbanks
Fairbanks , Alaska -99775

ncl-talk mailing list
List instructions, subscriber options, unsubscribe:

Received on Thu Oct 17 00:40:22 2013

This archive was generated by hypermail 2.1.8 : Fri Nov 01 2013 - 08:58:14 MDT