It's been quite a while since I did any Fortran, but that looks like a one dimensional array, with 31 elements. On the other hand, to reference any of the 31 elements, you'd need to specify four indices, the last three being 15,1,1.
In C, something like float a[1][1][1][31]; would, I think, allocate the same amount of storage, and a macro like #define A[1,j,k,l]=a[l-1][k-1][j+15][i-15] would let you use A[i,15,1,1] to refer to a[0][0][0][i].
But just using float a[31]; and ignoring the last three indices seems simpler.
Of course, if you're using an allocate, you probably want a malloc in C, but that's fairly straightforward.
|