1 subroutine da_transform_xtoy_qscat(grid, iv, y)
3 !-----------------------------------------------------------------------
5 ! Updated for Analysis on Arakawa-C grid
6 ! Author: Syed RH Rizvi, MMM/ESSL/NCAR, Date: 10/22/2008
7 !-----------------------------------------------------------------------
11 type (domain), intent(in) :: grid
12 type (iv_type), intent(in) :: iv ! Innovation vector (O-B).
13 type (y_type), intent(inout) :: y ! y = h (grid%xa) (linear)
15 integer :: n ! Loop counter.
17 real, allocatable :: u(:,:)
18 real, allocatable :: v(:,:)
19 real, allocatable :: ub(:,:)
20 real, allocatable :: vb(:,:)
22 if (trace_use_dull) call da_trace_entry("da_transform_xtoy_qscat")
24 allocate (u(1,iv%info(qscat)%n1:iv%info(qscat)%n2))
25 allocate (v(1,iv%info(qscat)%n1:iv%info(qscat)%n2))
26 allocate (ub(1,iv%info(qscat)%n1:iv%info(qscat)%n2))
27 allocate (vb(1,iv%info(qscat)%n1:iv%info(qscat)%n2))
30 call da_interp_lin_3d (grid%xa%u, iv%info(qscat), u,'u')
31 call da_interp_lin_3d (grid%xa%v, iv%info(qscat), v,'v')
33 call da_interp_lin_3d (grid%xa%u, iv%info(qscat), u)
34 call da_interp_lin_3d (grid%xa%v, iv%info(qscat), v)
36 call da_interp_lin_3d (grid%xb%u, iv%info(qscat), ub)
37 call da_interp_lin_3d (grid%xb%v, iv%info(qscat), vb)
39 do n=iv%info(qscat)%n1,iv%info(qscat)%n2
40 if (wind_sd_qscat) then
41 call da_uv_to_sd_lin(y%qscat(n)%u,y%qscat(n)%v,u(1,n),v(1,n),ub(1,n),vb(1,n))
54 if (trace_use_dull) call da_trace_exit("da_transform_xtoy_qscat")
56 end subroutine da_transform_xtoy_qscat