Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / da / da_par_util / da_transpose_z2x.inc
blob5790a7ca7b7dd6cf866d4ed8804e8dcab92cdb63
1 subroutine da_transpose_z2x (grid)
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
7    implicit none
9    type(domain), intent(inout)               :: grid
10    integer                                   :: ij, i, j, k
12    if (trace_use_dull) call da_trace_entry("da_transpose_z2x")
13    
14 #ifdef DM_PARALLEL
15 #include "XPOSE_V1_z2x.inc"
16 #else
17    !$OMP PARALLEL DO &
18    !$OMP PRIVATE ( ij, i, j, k )
19    do ij = 1 , grid%num_tiles
20       do k = grid%xp%kds, grid%xp%kde
21          do j = grid%j_start(ij), grid%j_end(ij)
22             do i = grid%xp%ids, grid%xp%ide
23                grid%xp % v1x(i,j,k) = grid%xp % v1z(i,j,k)
24             end do
25          end do
26       end do
27    end do
28    !$OMP END PARALLEL DO
29 #endif
31    if (trace_use_dull) call da_trace_exit("da_transpose_z2x")
33 end subroutine da_transpose_z2x