Re: Which interpolation function shall I use?

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Fri May 14 2010 - 11:53:04 MDT

Well, if you have
"missing values within, and maybe quite a lot of them"

then *you* must decide what interpolation approach should
be used. You know the 'physics' of the data.

Maybe, you will have to try several methods. Two straight
forward functions

     xNew = poisson_grid_fill( x, False, 1, 1500, 1e-2, 0.6, 0)

or
     xNew = x ; copy all meta data

     dimx = dimsizes(x)
     ntim = dimx(0)
     nwav = dimx(1)

     nmsg = -nwav ; all points filled in
     xNew = linmsg_n(x, nmsg, 0) ;

==
If the above or other NCL functions are not suitable,
then you will have to write something that does what you need.

Good luck

On 05/14/2010 08:09 AM, eddycarl wrote:
> Hi Dennis,
>
> Thanks for replying! Sorry if I am not clear about my problem. As I
> mentioned before, x is a 2d array x(time,wavelength) which is a function
> of time and wavelength. And, wavelength with unit of nm, is something
> like: (1000, 800, 750, 600, 500, 350, 200, 100). If I want a time series
> y(time) at a particular wavelength 550nm, then which interpolation
> function shall I use? Well, I try to use linint1_n_Wrap, but it did not
> give a valid output. The problem may related to the data itself though.
> Well, yes, wavelength is the same each time. But, there are missing
> values within, and maybe quite a lot of them. For example, the data can
> be all missing at the wavelengths (500, 600, 750nm) which are close to
> 550nm.
> Thanks,
>
> -Eddy
>
> "Dennis Shea" <shea@ucar.edu>:
>>Based on the above, it is not clear [to me] what you want.
>>
>> q(time,wavelength) ; generic==> q(y,x)
>> Q = q(wavelength|:,time|) ; Q(x,y)
>>
>>
>>For each time, are all wavelength the same?
>>
>> fo = linint2_points(xi,yi,fi, False, xo,yo, 0) ; generic
>>
>>
>> wavp = 7.5 ; your "particular wavelength"
>> WAVp = conform(time, wavp, 0)
>> wavo = linint2_points(time,wavelength, Q, False, time, WAVp, 0)
>
>
>
> ------------------------------------------------------------------------
> 网易为中小企业免费提供企业邮箱(自主域名) <http://ym.163.com/?from=od3>

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 14 11:53:08 2010

This archive was generated by hypermail 2.1.8 : Wed May 26 2010 - 10:39:13 MDT