da_transform_xtoy_airep.inc
References to this file elsewhere.
1 subroutine da_transform_xtoy_airep (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%grid%xa) (linear)
12
13 integer :: n ! Loop counter.
14
15 real, allocatable :: u(:,:)
16 real, allocatable :: v(:,:)
17 real, allocatable :: t(:,:)
18
19 if (trace_use_dull) call da_trace_entry("da_transform_xtoy_airep")
20
21 allocate (u(iv%info(airep)%max_lev,iv%info(airep)%n1:iv%info(airep)%n2))
22 allocate (v(iv%info(airep)%max_lev,iv%info(airep)%n1:iv%info(airep)%n2))
23 allocate (t(iv%info(airep)%max_lev,iv%info(airep)%n1:iv%info(airep)%n2))
24
25 call da_interp_lin_3d (grid%xa%u, iv%info(airep), u)
26 call da_interp_lin_3d (grid%xa%v, iv%info(airep), v)
27 call da_interp_lin_3d (grid%xa%t, iv%info(airep), t)
28
29 do n=iv%info(airep)%n1,iv%info(airep)%n2
30 y%airep(n)%u(:) = u(1:size(y%airep(n)%u),n)
31 y%airep(n)%v(:) = v(1:size(y%airep(n)%v),n)
32 y%airep(n)%t(:) = t(1:size(y%airep(n)%t),n)
33 end do
34
35 deallocate (u)
36 deallocate (v)
37 deallocate (t)
38
39 if (trace_use_dull) call da_trace_exit("da_transform_xtoy_airep")
40
41 end subroutine da_transform_xtoy_airep
42
43