
csa3lxs is called to find values for an approximating cubic spline for three-dimensional input data at a list of specified coordinates. csa3xs is called if you want to weight the input data values, calculate derivatives, or handle data sparse areas specially. If you do not want to do any of these three things, then use csa3ls.
Note: This function is only available in version 4.1.1 of NCL. If your site is licensed for version 4.1, then you can get version 4.1.1 for free. To get version 4.1.1 of NCAR Graphics software, please contact your site representative. If you don't know who your site representative is, then send email to ncarginf@ucar.edu or call (303) 497-1201.
function csa3lxs(
xi[*] : float,
yi[*] : float,
zi[*] : float,
ui[*] : float,
wts[*] : float,
knots[3] : integer
smth[1] : float
nderiv[3] : integer
xo[*] : float
yo[*] : float
zo[*] : float
)
csa3lxs is in the csagrid package - a software package that implements a cubic spline approximation algorithm to fit a function to input data. The input for the approximation is a set of randomly-spaced data. These data may be one-dimensional, two-dimensional, or three-dimensional.
The general documentation for csagrid contains several complete examples for entries in the csagrid package.
begin
;
; Create the input arrays.
;
xmin = -2.
xmax = 2.
ymin = -2.
ymax = 2.
zmin = -2.
zmax = 2.
nx = 21
ny = 21
nz = 21
ndata = 1000
xi = new(ndata,float)
yi = new(ndata,float)
zi = new(ndata,float)
ui = new(ndata,float)
do i=0,ndata-1
xi(i) = xmin + (xmax-xmin)*rand()/32767.
yi(i) = ymin + (ymax-ymin)*rand()/32767.
zi(i) = zmin + (zmax-zmin)*rand()/32767.
ui(i) = xi(i)*xi(i) + yi(i)*yi(i) + zi(i)*zi(i)
end do
;
; Calculate an approximation value for the first order partial
; with respect to X at a single point.
;
knots = (/4,4,4/)
wts = -1.
smth = 0.
nderiv = (/0,1,0/)
xo = 1.5
yo = 1.0
zo = 0.5
uo = csa3lxs(xi,yi,zi,ui,wts,knots,smth,nderiv,xo,yo,zo)
end
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?