da_transform_xtoy_geoamv.inc

References to this file elsewhere.
1 subroutine da_transform_xtoy_geoamv (grid, iv, y)
2 
3    !-------------------------------------------------------------------------
4    ! Purpose: X to Y Transform operator for Geo. AMVs
5    !-------------------------------------------------------------------------
6 
7    implicit none
8 
9    type (domain),  intent(in)    :: grid
10    type (iv_type), intent(in)    :: iv       ! Innovation vector (O-B).
11    type (y_type),  intent(inout) :: y        ! y = h (grid%xa)
12 
13    integer           :: n
14    real, allocatable :: u(:,:)
15    real, allocatable :: v(:,:)
16 
17    if (trace_use_dull) call da_trace_entry("da_transform_xtoy_geoamv")
18 
19    allocate (u(iv%info(geoamv)%max_lev,iv%info(geoamv)%n1:iv%info(geoamv)%n2))
20    allocate (v(iv%info(geoamv)%max_lev,iv%info(geoamv)%n1:iv%info(geoamv)%n2))
21 
22    call da_interp_lin_3d (grid%xa%u, iv%info(geoamv), u)
23    call da_interp_lin_3d (grid%xa%v, iv%info(geoamv), v)
24 
25    do n=iv%info(geoamv)%n1,iv%info(geoamv)%n2
26       y%geoamv(n)%u(:) = u(1:size(y%geoamv(n)%u),n)
27       y%geoamv(n)%v(:) = v(1:size(y%geoamv(n)%v),n)
28    end do
29 
30    deallocate (u)
31    deallocate (v)
32 
33    if (trace_use_dull) call da_trace_exit("da_transform_xtoy_geoamv")
34 
35 end subroutine da_transform_xtoy_geoamv
36 
37