Functions for gridding 2-d data. These routines are part of the Dsgrid package which implements a simple inverse distance weighted interpolation algorithm.
function dsgrid2s( x[*] : float, y[*] : float, z[*] : float, xo[*] : float, yo[*] : float ) function dsgrid2d( x[*] : double, y[*] : double, z[*] : double, xo[*] : double, yo[*] : double )
Both dsgrid2s and dsgrid2d are called after all of the desired values for control parameters have been set using the procedure dssetp. dsgrid2s is the single precision version and dsgrid2d is the double precision version.
begin NUM = 6 NX = 61 NY = 61 xi = (/0.00, 1.00, 0.00, 1.00, 0.40, 0.75/) yi = (/0.00, 0.00, 1.00, 1.00, 0.20, 0.65/) zi = (/0.00, 0.00, 0.00, 0.00, 1.25, 0.80/) xeye = 3.3 yeye = -3.3 zeye = 3.3 xo = new((/NX/),float) yo = new((/NY/),float) ; ; Create the output grid. ; xinc = 1./(NX-1) yinc = 1./(NY-1) ii = fspan(0.,60.,NX) xo = xinc * ii yo = yinc * ii ; ; Exponent equals 0.5 ; dssetp("exp", 0.5) output = dsgrid2s(xi, yi, zi, xo, yo) end
NG4.1 Home, Index, Examples, Glossary, Feedback, Ref Contents, Ref WhereAmI?