da_transform_xtoy_pilot.inc
References to this file elsewhere.
1 subroutine da_transform_xtoy_pilot (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, k ! Index dimension.
16 real :: dx, dxm !
17 real :: dy, dym !
18
19 if (iv%num_pilot > 0) then
20 do n=iv%ob_numb(iv%current_ob_time-1)%pilot + 1, iv%ob_numb(iv%current_ob_time)%pilot
21
22 !xyh y%pilot(n)%u(:) = 0.0
23 !xyh y%pilot(n)%v(:) = 0.0
24
25 k = iv % pilot(n) % info % levels
26
27 if (k < 1) cycle
28
29 ! [1.3] Get horizontal interpolation weights:
30
31 i = iv%pilot(n)%loc%i
32 dy = iv%pilot(n)%loc%dy
33 dym = iv%pilot(n)%loc%dym
34 j = iv%pilot(n)%loc%j
35 dx = iv%pilot(n)%loc%dx
36 dxm = iv%pilot(n)%loc%dxm
37
38 ! [1.4] Interpolate horizontally:
39 call da_interp_lin_3d(xa % u, xp, i, j, dx, dy, dxm, dym, &
40 y%pilot(n)%u, k, iv%pilot(n)%zk, k)
41 call da_interp_lin_3d(xa % v, xp, i, j, dx, dy, dxm, dym, &
42 y%pilot(n)%v, k, iv%pilot(n)%zk, k)
43 end do
44 end if
45
46 end subroutine da_transform_xtoy_pilot
47
48