da_transform_xtoy_qscat.inc
References to this file elsewhere.
1 subroutine da_transform_xtoy_qscat(xa, iv, xp, y)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: TBD
5 !-----------------------------------------------------------------------
6
7 implicit none
8
9 type (x_type), intent(in) :: xa ! gridded analysis increment.
10 type (ob_type), intent(in) :: iv ! Innovation vector (O-B).
11 type (xpose_type), intent(in):: xp ! Domain decomposition vars.
12 type (y_type), intent(inout) :: y ! y = h (xa) (linear)
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 !xyh y%qscat(:)%u = 0.0
21 !xyh y%qscat(:)%v = 0.0
22
23 do n=iv%ob_numb(iv%current_ob_time-1)%qscat + 1, iv%ob_numb(iv%current_ob_time)%qscat
24 ! [1.1] Get horizontal interpolation weights:
25
26 i = iv%qscat(n)%loc%i
27 dy = iv%qscat(n)%loc%dy
28 dym = iv%qscat(n)%loc%dym
29 j = iv%qscat(n)%loc%j
30 dx = iv%qscat(n)%loc%dx
31 dxm = iv%qscat(n)%loc%dxm
32
33 ! [1.2] Interpolate horizontally:
34 call da_interp_obs_lin_2d(xa % u, xp, i, j, dx, dy, dxm, dym, &
35 y%qscat(n)%u, iv%qscat(n)%zk)
36 call da_interp_obs_lin_2d(xa % v, xp, i, j, dx, dy, dxm, dym, &
37 y%qscat(n)%v, iv%qscat(n)%zk)
38 end do
39 end if
40
41 end subroutine da_transform_xtoy_qscat
42
43