da_transform_xtoy_airsr.inc

References to this file elsewhere.
1 subroutine da_transform_xtoy_airsr (xa, iv, xp, y)
2 
3    !-------------------------------------------------------------------------
4    ! Purpose: Does transforms from model space to AIRS locations
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_airsr > 0) then
20       do n=iv%ob_numb(iv%current_ob_time-1)%airsr + 1, iv%ob_numb(iv%current_ob_time)%airsr
21 
22          ! [1.1] Get horizontal interpolation weights:
23 
24          i = iv%airsr(n)%loc%i
25          j = iv%airsr(n)%loc%j
26          dx = iv%airsr(n)%loc%dx
27          dy = iv%airsr(n)%loc%dy
28          dxm = iv%airsr(n)%loc%dxm
29          dym = iv%airsr(n)%loc%dym
30 
31          k = iv % airsr(n) % info % levels
32 
33          if (k < 1) cycle
34 
35          ! [1.2] Interpolate horizontally:
36          call da_interp_lin_3d(xa % t, xp, i, j, dx, dy, dxm, dym, &
37                            y%airsr(n)%t, k, iv%airsr(n)%zk, k)
38          call da_interp_lin_3d(xa % q, xp, i, j, dx, dy, dxm, dym, &
39                            y%airsr(n)%q, k, iv%airsr(n)%zk, k)
40       end do
41    end if
42 
43 end subroutine da_transform_xtoy_airsr
44 
45