fake_acv Subroutine

subroutine fake_acv(acv_array, long, larg, param, ech)

Arguments

Type IntentOptional Attributes Name
real(kind=R8), intent(out), allocatable, dimension(:,:) :: acv_array
integer(kind=I4), intent(in) :: long
integer(kind=I4), intent(in) :: larg
real(kind=R8), intent(in), dimension(1:3) :: param
real(kind=R8), intent(in), dimension(1:2) :: ech

Called by

proc~~fake_acv~~CalledByGraph proc~fake_acv fake_acv program~test_anisotropy test_anisotropy program~test_anisotropy->proc~fake_acv

Source Code

subroutine fake_acv(acv_array, long, larg, param, ech)
implicit none
real   (kind=R8), intent(out), allocatable, dimension(:,:)  :: acv_array
integer(kind=I4), intent(in)                                :: long, larg
real   (kind=R8), intent(in), dimension(1:3)                :: param
real   (kind=R8), intent(in), dimension(1:2)                :: ech

   integer(kind=I4) :: i, j, ia, ib, i0, j0
   real   (kind=R8) :: a, b, ang, c, s, echx, echy

   allocate( acv_array(1:long, 1:larg) )

   a   = param(1)
   b   = param(2)
   ang = param(3)

   echx = ech(1)
   echy = ech(2)

   ia = int( a / echx )
   ib = int( b / echy )

   i0 = long / 2 + 1
   j0 = larg / 2 + 1

   c = cos( ang * PI_R8 / 180 )
   s = sin( ang * PI_R8 / 180 )

   do j = 1, larg
   do i = 1, long

      acv_array(i, j) = exp( log(1./2.) * sqrt( ( ( +c * (i - i0) + s * (j - j0) ) / ia )**2 +   &  !
                                                ( ( -s * (i - i0) + c * (j - j0) ) / ib )**2 ) )    !

   enddo
   enddo

return
endsubroutine fake_acv