I want to write my data for a periodic boundary, implying the zero-th index needs to written at the end for both i and j direction. Also, rho(m+1,n+1)=rho(0,0) needs to be written. The current code for writing data is:
do j=0,n
write(2,"(F16.8)")(rho(i,j),i=0,m)
end do
How can the data be written in such a way I mentioned above? Something like the following
j ...
i 1 2 3
. 4 5 6
. 7 8 9
1 2 3 1
4 5 6 4
7 8 9 7
1 2 3 1
(n-i,m-j)? I don't know if I understand your question correctly.