da_transform_xtoy_polaramv_adj.inc

References to this file elsewhere.
1 subroutine da_transform_xtoy_polaramv_adj (iv, jo_grad_y, jo_grad_x)
2 
3    !-------------------------------------------------------------------------
4    ! Purpose: X to Y Transpose operator for Polar AMVs 
5    !-------------------------------------------------------------------------
6 
7    implicit none
8 
9    type (iv_type), intent(in)    :: iv          ! obs. inc vector (o-b).
10    type (y_type) , intent(in)    :: jo_grad_y   ! grad_y(jo)
11    type (x_type) , intent(inout) :: jo_grad_x   ! grad_x(jo)
12 
13    integer           :: n     ! Loop counter.
14    real, allocatable :: u(:,:)
15    real, allocatable :: v(:,:)
16 
17    if (trace_use_dull) call da_trace_entry("da_transform_xtoy_polaramv_adj")
18 
19    allocate (u(iv%info(polaramv)%max_lev,iv%info(polaramv)%n1:iv%info(polaramv)%n2))
20    allocate (v(iv%info(polaramv)%max_lev,iv%info(polaramv)%n1:iv%info(polaramv)%n2))
21 
22    do n=iv%info(polaramv)%n1,iv%info(polaramv)%n2
23       u(1:size(jo_grad_y%polaramv(n)%u),n) = jo_grad_y%polaramv(n)%u(:)
24       v(1:size(jo_grad_y%polaramv(n)%v),n) = jo_grad_y%polaramv(n)%v(:)
25    end do
26 
27    call da_interp_lin_3d_adj (jo_grad_x%u, iv%info(polaramv), u)
28    call da_interp_lin_3d_adj (jo_grad_x%v, iv%info(polaramv), v)
29 
30    deallocate (u)
31    deallocate (v)
32 
33    if (trace_use_dull) call da_trace_exit("da_transform_xtoy_polaramv_adj")
34 
35 end subroutine da_transform_xtoy_polaramv_adj
36 
37