1 subroutine da_transform_vchemtox_adj(grid, vchem, be)
3 !-----------------------------------------------------------------------
4 ! Purpose: Transform chemical CV to model space
5 !-----------------------------------------------------------------------
9 type(domain), intent(in) :: grid
10 type(xchem_type), intent(out) :: vchem ! Grid point/EOF equivalent.
11 type(be_type), intent(in) :: be ! Background error structure.
13 integer :: ij, ic, i, j, m, n ! Loop counters
17 if (trace_use) call da_trace_entry("da_transform_vchemtox_adj")
20 !$OMP PRIVATE ( ij, ic, m, n, j, i, temp )
24 do ij = 1 , grid%num_tiles
25 do ic = PARAM_FIRST_SCALAR, num_chem
26 !!! vchem%chem_ic(:,grid%j_start(ij):grid%j_end(ij),:,ic) = 0.D0
27 do m = kts,kte !LEVELS
28 do n = 1, be % v12(ic-1) % mz !EIGENMODES
29 do j = grid%j_start(ij), grid%j_end(ij) ! do j = jts, jte
30 temp = be % v12(ic-1) % evec (j,m,n) * be % v12(ic-1) % val (j,n)
32 vchem%chem_ic (i,j,n,ic) = vchem%chem_ic (i,j,n,ic) + &
33 temp * grid%xachem%chem_ic (i,j,m,ic)
42 if (trace_use) call da_trace_exit("da_transform_vchemtox_adj")
44 end subroutine da_transform_vchemtox_adj