Well I have already posted before,but even with much help from other collegues it didn't work.
do i=1,nsites
do ico=1,nc
if(ivarp(ico).ne.0)then
iprd=ivarp(ico)
apr4sens(1,i,iprd)=apr1dsens(i,iprd)
apr4sens(2,i,iprd)=apr2dsens(i,iprd)
apr4sens(3,i,iprd)=apr3dsens(i,iprd)
apr4sens(4,i,iprd)=apr4dsens(i,iprd)
endif
enddo
enddo
do i=1,nsites
do ico=1,nc
if(ivarp(ico).ne.0)then
iprd=ivarp(ico)
do k=1,4
write(128,*)apr4sens(k,i,iprd)
enddo
endif
enddo
enddo
I am giving relevant part of the code.I write apr4sens into file.Works fine.But how to write it to new array?I need new array which I could reshape,transpose and so on.Idea from Jaques:
group(1,:,= apr1dsens
group(2,:,= apr2dsens
group(3,:,= apr3dsens
group(4,:,= apr4dsens
IT DOESN'T WORK HERE!
do i=1,nsites
do ico=1,nc
if(ivarp(ico).ne.0)then
iprd=ivarp(ico)
apr4sens(1,i,iprd)=apr1dsens(i,iprd)
apr4sens(2,i,iprd)=apr2dsens(i,iprd)
apr4sens(3,i,iprd)=apr3dsens(i,iprd)
apr4sens(4,i,iprd)=apr4dsens(i,iprd)
endif
enddo
enddo
do i=1,nsites
do ico=1,nc
if(ivarp(ico).ne.0)then
iprd=ivarp(ico)
do k=1,4
write(128,*)apr4sens(k,i,iprd)
enddo
endif
enddo
enddo
I am giving relevant part of the code.I write apr4sens into file.Works fine.But how to write it to new array?I need new array which I could reshape,transpose and so on.Idea from Jaques:
group(1,:,= apr1dsens
group(2,:,= apr2dsens
group(3,:,= apr3dsens
group(4,:,= apr4dsens
IT DOESN'T WORK HERE!