I'm working on a project where I have a number of arrays of the same size in the 1st, 2nd and 3rd dimension, although the sizes may vary in the 4th dimension.
I would like to group these arrays by constructing a pointer which concatenates these arrays.
To make this less abstract, let's say I have 2 arrays:
A (size: N1 x N2 x N3 x N4a)
B (size: N1 x N2 x N3 x N4b)
in previous versions of the project these arrays where copied to an array C of size N1 x N2 x N3 x (N4a + N4b)
which would then be passed to a subroutine to perform ffts on this array.
I would like to avoid this copying operation and construct a pointer p
which would contain the same data as the array C in the previous version but without the explicit copying and additional memory allocation.
Is this possible in Fortran?