da_transform_xtoy_ssmt2_adj.inc

References to this file elsewhere.
1 subroutine da_transform_xtoy_ssmt2_adj(iv, xp, jo_grad_y, jo_grad_x)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    type (ob_type), intent(in)    :: iv          ! obs. inc vector (o-b).
10    type (xpose_type), intent(in) :: xp          ! Domain decomposition vars.
11    type (y_type) , intent(in)    :: jo_grad_y   ! grad_y(jo)
12    type (x_type) , intent(inout) :: jo_grad_x   ! grad_x(jo)
13 
14    integer                       :: n        ! Loop counter.
15    integer                       :: i, j, k  ! Index dimension.
16    real                          :: dx, dxm  ! 
17    real                          :: dy, dym  !
18 
19    if (iv%num_ssmt2 > 0) then
20       do n=1, iv % num_ssmt2
21          k = iv % ssmt2(n) % info % levels
22 
23          if (k < 1) cycle
24       
25          ! [1.1] Get horizontal interpolation weights:
26 
27          i = iv%ssmt2(n)%loc%i
28          dy = iv%ssmt2(n)%loc%dy
29          dym = iv%ssmt2(n)%loc%dym
30          j = iv%ssmt2(n)%loc%j
31          dx = iv%ssmt2(n)%loc%dx
32          dxm = iv%ssmt2(n)%loc%dxm
33 
34          ! [1.2] Interpolate horizontally:
35          call da_interp_lin_3d_adj(jo_grad_x % rh, xp, i, j, dx, dy, dxm, dym, &
36                                 jo_grad_y%ssmt2(n)%rh, k, iv%ssmt2(n)%zk, k)
37       end do 
38    end if
39 
40 end subroutine da_transform_xtoy_ssmt2_adj
41 
42