C+ C NAME: C nrSpline2 C PURPOSE: C Return second derivatives Y2A in x2 direction for all MxN grid C points (X1A,X2A) . The Y2A array is needed as input to subroutine C nrSplInt2. C CATEGORY: C Math: interpolation and extrapolation C CALLING SEQUENCE: subroutine nrSpline2(M,N,X1A,X2A,YA,Y2A) C INPUTS: C M,N integer C X1A(M) real array with x1 values C X2A(N) real array with x2 values C YA(M,N) real 2D array with function values C OUTPUTS: C Y2A(M,N) real 2nd derivatives in x2 direction C in grid points (X1A,X2A) C CALLS: C nrSpline C PROCEDURE: C See Numerical Recipes, par. 3.6, p. 100 C nrSpline is used on all N columns (constant X1) to obtain the second C derivatives in the x2 direction of a 1-dimensional natural spline C through fnc-values Y(N,Ix2=1..M). C MODIFICATION HISTORY: C JUN-1993, Paul Hick (UCSD/CASS; pphick@ucsd.edu) C- integer M integer N real X1A(M ) real X2A( N) real YA (M,N) real Y2A(M,N) parameter (NMAX = 1000) real YTMP (NMAX) real Y2TMP(NMAX) if (N .gt. NMAX) call Say('nrSpline2','E','Stop','Too small parameter NMAX') do J=1,M do K=1,N YTMP(K) = YA(J,K) end do call nrSpline(N,X2A,YTMP,1.0e30,1.0e30,Y2TMP) do K=1,N Y2A(J,K)=Y2TMP(K) end do end do return end