From: monir on 22 Dec 2009 11:16 On Dec 22, 5:53 am, "robin" <robi...(a)bigpond.com> wrote: > e p chandler wrote in message ... > > >"monir" <mon...(a)mondenet.com> wrote in message > >news:4c037cfc-2a89-44a4-93c5-e6a0c57b4974(a)g23g2000vbr.googlegroups.com.... > >On Dec 20, 6:42 pm, "e p chandler" <e...(a)juno.com> wrote: > > >---> Yes, you can get away with DIMENSIONING the 1D arrays in your > >subroutines to (1). Yes you can pass a 1D array that is actually longer than > >that declared. > > Robin wrote: > That was a mid-1960s hack for adjustable dimensions - long since > obsolete. > Monir was not talking about that. > > These issues were discussed at length and explained in the post > "Could this result in array distortion" > that you inititiated. Robin; 1) In the earlier post: "Can this result in array distortion ??", the question was regarding passing multidimensional arrays with diffirent sizes than those declared in the calling routine. Here the question is regarding using argument list integers to dim local multidimensional arrays. NOT the same! 2) It appears at this point and after extensive numerical experimentation that the problem might actually be associated with some kind of "numerical instability" rather than a code issue. The reason for this tentative conclusion is that my algorithm (F77) works fine under "certain conditions", which I'm trying to find out. 3) For example, if I pass fictitious data values for the 3D array "ya" (same dimensions, and everything else remain UNCHANGED) to the main routine: ! ************************************************************ SUBROUTINE Splint3d(x1a, x2a, x3a, 1 ya, maxPln,maxR,maxTH, 2 k, m, n, 3 x1, x2, x3, Z) ! ************************************************************ ! USES: Splie2d , Splin2d , Splined , Splintd the program works perfectly, producing the correct results (up to 11-12 decimal figures), while using the actual analytical data for "ya" (with no singularities or jump discontinuities), it produces rubbish! Keep in mind that the only thing that's changing here is the values of the 3D array "ya". (..the above 4 arrays: x1a(1D),x2a(1D),x3a(1D),ya(3D) are dim exactly as in the calling routine, as pointed out in my post Dec 20, 4:46 pm)) Earlier, JB wrote: > After all, programming is supposed to be a painful exercise in frustration. I entirely agree!! Regards. Monir |