Here is a problem that I would manage easily in fortran 77 but it seems to be more tricky in 90 (but probably i'm wrong):
suppose to have NV arrays of the same shape and dimensions, say (nx,ny,nz). I would like to have a unique array with 4 dims, one indicating the variable to address.
In 77 this would be easily managed using common
program unit 1:
real(nx,ny,nz) a,b,c
common/qaz/a,b,c
program unit 2: (nv==3)
real(nv,nx,ny,nz) v
common/qaz/c
This defines the relationships
v(1,i,j,k)=a(i,j,k)
v(2,i,j,k)=b(i,j,k)
v(3,i,j,k)=c(i,j,k)
Is there any way to do int in 90 without the use of common?
suppose to have NV arrays of the same shape and dimensions, say (nx,ny,nz). I would like to have a unique array with 4 dims, one indicating the variable to address.
In 77 this would be easily managed using common
program unit 1:
real(nx,ny,nz) a,b,c
common/qaz/a,b,c
program unit 2: (nv==3)
real(nv,nx,ny,nz) v
common/qaz/c
This defines the relationships
v(1,i,j,k)=a(i,j,k)
v(2,i,j,k)=b(i,j,k)
v(3,i,j,k)=c(i,j,k)
Is there any way to do int in 90 without the use of common?