1 SUBROUTINE da_apply_be( be, cv, vp, grid )
5 TYPE (be_type), INTENT(IN) :: be ! Background error structure.
6 REAL, INTENT(IN) :: cv(:)! Control variable.
7 TYPE (vp_type), INTENT(INOUT) :: vp ! Grid point/EOF equivalent.
8 type (domain) , intent(inout) :: grid ! Dimensions and xpose buffers.
12 !-------------------------------------------------------------------------
13 ! [1.0] Make local-grid copy of vp from 1-dimensional global-grid cv.
14 !-------------------------------------------------------------------------
16 call da_cv_to_vv( cv_size, cv, be%cv_mz, be%ncv_mz, vp )
18 ! [2.0] Transform control variable:
21 !$OMP PRIVATE ( ij, k, j, i )
22 do ij = 1, grid%num_tiles
23 do k=grid%xp%kts,grid%xp%kte
24 do j=grid%j_start(ij), grid%j_end(ij)
25 do i=grid%xp%its,grid%xp%ite
26 vp % v1(i,j,k)=vp % v1(i,j,k)*be % corz(i,j,k,1)
27 vp % v2(i,j,k)=vp % v2(i,j,k)*be % corz(i,j,k,2)
28 vp % v3(i,j,k)=vp % v3(i,j,k)*be % corz(i,j,k,3)
29 vp % v4(i,j,k)=vp % v4(i,j,k)*be % corz(i,j,k,4)
36 !-----Transform 5th control variable
39 !$OMP PRIVATE ( ij, i, j )
40 do ij = 1, grid%num_tiles
41 do j=grid%j_start(ij),grid%j_end(ij)
42 do i=grid%xp%its,grid%xp%ite
43 vp % v5(i,j,k)=vp % v5(i,j,k)*be % corp(i,j)
49 CALL da_apply_rf( be, vp , grid )
51 END SUBROUTINE da_apply_be