trans_corner2center_real Subroutine

private subroutine trans_corner2center_real(tab_in, tab_out, long, larg)

Function to transform an acf real array so that the acf maximum is in the center

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(in), dimension(1:long, 1:larg) :: tab_in

2D array to transform

real(kind=R8), intent(out), dimension(1:long, 1:larg) :: tab_out

transformed 2D array

integer(kind=I4), intent(in) :: long

2D array length

integer(kind=I4), intent(in) :: larg

2D array width


Called by

proc~~trans_corner2center_real~~CalledByGraph proc~trans_corner2center_real trans_corner2center_real proc~trans_corner2center trans_corner2center proc~trans_corner2center->proc~trans_corner2center_real program~test_data_arch test_data_arch program~test_data_arch->proc~trans_corner2center

Source Code

   subroutine trans_corner2center_real(tab_in, tab_out, long, larg)
   !! Function to transform an acf real array so that the acf maximum is in the center
   implicit none
   integer(kind=I4), intent(in )                            :: long     !! *2D array length*
   integer(kind=I4), intent(in )                            :: larg     !! *2D array width*
   real   (kind=R8), intent(in ), dimension(1:long, 1:larg) :: tab_in   !! *2D array to transform*
   real   (kind=R8), intent(out), dimension(1:long, 1:larg) :: tab_out  !! *transformed 2D array*

      integer(kind=I4) :: i, j

      do j = 1, larg
         do i = 1, long
            tab_out(i, j) = tab_in( mod( i + long/2 - 1, long ) + 1, &  !
                                    mod( j + larg/2 - 1, larg ) + 1 )
         enddo
      enddo

   return
   endsubroutine trans_corner2center_real