diff --git a/sources/operators.F90 b/sources/operators.F90 index 5446291..4c528d2 100644 --- a/sources/operators.F90 +++ b/sources/operators.F90 @@ -198,13 +198,13 @@ module operators real(kind=8), dimension(:,:,:,:), intent(in) :: u real(kind=8), dimension(:,:,:) , intent(out) :: v -! local arrays -! - real(kind=8), dimension(:,:,:), allocatable :: w - ! local variables ! integer :: dir + +! local arrays +! + real(kind=8), dimension(size(u,2), size(u,3), size(u,4)) :: w ! !------------------------------------------------------------------------------- ! @@ -214,10 +214,6 @@ module operators call start_timer(imd) #endif /* PROFILE */ -! allocate temporary array -! - allocate(w(size(u,2), size(u,3), size(u,4))) - ! reset the output array ! v(:,:,:) = 0.0d+00 @@ -236,10 +232,6 @@ module operators end do ! directions -! deallocate temporary array -! - deallocate(w) - #ifdef PROFILE ! stop accounting time for the divergence operator calculation ! @@ -347,7 +339,7 @@ module operators ! local arrays ! - real(kind=8), dimension(:,:,:), allocatable :: w + real(kind=8), dimension(size(u,2), size(u,3), size(u,4)) :: w ! !------------------------------------------------------------------------------- ! @@ -357,10 +349,6 @@ module operators call start_timer(imc) #endif /* PROFILE */ -! allocate temporary array -! - allocate(w(size(u,2), size(u,3), size(u,4))) - ! === calculate Vx component === ! ! contribution from the Y derivative of Uz @@ -427,10 +415,6 @@ module operators ! v(3,:,:,:) = v(3,:,:,:) - w(:,:,:) -! deallocate temporary array -! - deallocate(w) - #ifdef PROFILE ! stop accounting time for the rotation operator calculation ! @@ -472,7 +456,7 @@ module operators ! local arrays ! - real(kind=8), dimension(:,:,:), allocatable :: w + real(kind=8), dimension(size(u,1), size(u,2), size(u,3)) :: w ! !------------------------------------------------------------------------------- ! @@ -482,10 +466,6 @@ module operators call start_timer(iml) #endif /* PROFILE */ -! allocate temporary array -! - allocate(w(size(u,1), size(u,2), size(u,3))) - ! calculate the second derivative of U along the X direction ! call derivative_2nd(1, dh(1), u(:,:,:), w(:,:,:)) @@ -512,10 +492,6 @@ module operators v(:,:,:) = v(:,:,:) + w(:,:,:) #endif /* NDIMS == 3 */ -! deallocate temporary array -! - deallocate(w) - #ifdef PROFILE ! stop accounting time for the laplace operator calculation !