da_transform_xtoy_gpsref.inc
References to this file elsewhere.
1 subroutine da_transform_xtoy_gpsref (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)
13
14 integer :: n ! Loop counter.
15 integer :: i, j ! Index dimension.
16 real :: dx, dxm !
17 real :: dy, dym !
18 integer :: num_levs ! obs vertical levels
19
20 if (iv%num_gpsref < 1) return
21
22 do n=iv%ob_numb(iv%current_ob_time-1)%gpsref + 1, &
23 iv%ob_numb(iv%current_ob_time)%gpsref
24
25 ! y%gpsref(n)%ref(:) = 0.0
26 num_levs = iv % gpsref(n) % info % levels
27
28 i = iv%gpsref(n)%loc%i
29 j = iv%gpsref(n)%loc%j
30 dx = iv%gpsref(n)%loc%dx
31 dy = iv%gpsref(n)%loc%dy
32 dxm = iv%gpsref(n)%loc%dxm
33 dym = iv%gpsref(n)%loc%dym
34
35 call da_interp_lin_3d(xa%ref, xp, i, j, dx, dy, dxm, dym, &
36 y%gpsref(n)%ref, num_levs, iv%gpsref(n)%zk, num_levs)
37 end do
38
39 end subroutine da_transform_xtoy_gpsref
40
41