   
      SUBROUTINE R_NK_resh____(N,K,Matr_input,Matr_output)
C
C	########################################################################
C
C	Valerio Cappellini                                         February 2007
C
C     USES :: None
C     COMPATIBILITY :: Fortran 90
C     VERSION :: 1.0.0
C
C     R_NK_resh____.f :: it take as input the 2 INTEGER numbers N and K and a 
C                 NxKxNxK REAL matrix M and return as output the NxNxKxK REAL 
C                 matrix "RESHUFFLED M"
C
C	########################################################################
C
$	debug
	implicit none
       
      INTEGER N,K
	REAL Matr_input(N,K,N,K), Matr_output(N,N,K,K)
	
      Matr_output=RESHAPE(Matr_input,(/N,N,K,K/),(/0.,0./),(/1,3,2,4/))
	
      RETURN
      END
