da_transform_xtoy_qscat_adj.inc
References to this file elsewhere.
1 subroutine da_transform_xtoy_qscat_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 ! Index dimension.
16 real :: dx, dxm !
17 real :: dy, dym !
18
19 if (iv%num_qscat > 0) then
20 do n=iv%ob_numb(iv%current_ob_time-1)%qscat + 1, &
21 iv%ob_numb(iv%current_ob_time)%qscat
22
23 ! [1.1] Get horizontal interpolation weights:
24
25 i = iv%qscat(n)%loc%i
26 dy = iv%qscat(n)%loc%dy
27 dym = iv%qscat(n)%loc%dym
28 j = iv%qscat(n)%loc%j
29 dx = iv%qscat(n)%loc%dx
30 dxm = iv%qscat(n)%loc%dxm
31
32 ! [1.2] Interpolate horizontally:
33 call da_interp_obs_lin_2d_adj(jo_grad_x % u, xp, i, j, dx, dy, dxm, dym, &
34 jo_grad_y%qscat(n)%u, iv%qscat(n)%zk)
35 call da_interp_obs_lin_2d_adj(jo_grad_x % v, xp, i, j, dx, dy, dxm, dym, &
36 jo_grad_y%qscat(n)%v, iv%qscat(n)%zk)
37 end do
38 end if
39
40 end subroutine da_transform_xtoy_qscat_adj
41
42