da_transform_xtoy_profiler.inc

References to this file elsewhere.
1 subroutine da_transform_xtoy_profiler (grid, iv, y)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
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) (linear)
12 
13    integer :: n  ! Loop counter.
14 
15    real, allocatable :: model_u(:,:)  ! Model value u at ob location.
16    real, allocatable :: model_v(:,:)  ! Model value v at ob location.
17 
18    if (trace_use_dull) call da_trace_entry("da_transform_xtoy_profiler")
19 
20    allocate (model_u(iv%info(profiler)%max_lev,iv%info(profiler)%n1:iv%info(profiler)%n2))
21    allocate (model_v(iv%info(profiler)%max_lev,iv%info(profiler)%n1:iv%info(profiler)%n2))
22 
23    call da_interp_lin_3d (grid%xa%u, iv%info(profiler), model_u)
24    call da_interp_lin_3d (grid%xa%v, iv%info(profiler), model_v)
25 
26    do n=iv%info(profiler)%n1,iv%info(profiler)%n2
27       y%profiler(n)%u(:) = model_u(1:iv%info(profiler)%levels(n),n)
28       y%profiler(n)%v(:) = model_v(1:iv%info(profiler)%levels(n),n)
29    end do
30 
31    deallocate (model_u)
32    deallocate (model_v)
33    
34    if (trace_use_dull) call da_trace_exit("da_transform_xtoy_profiler")
35 
36 end subroutine da_transform_xtoy_profiler 
37 
38