da_check_xtoy_adjoint_synop.inc
References to this file elsewhere.
1 subroutine da_check_xtoy_adjoint_synop(iv, y, adjtest_lhs, pertile_lhs)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: TBD
5 !-----------------------------------------------------------------------
6
7 implicit none
8
9 type (iv_type), intent(in) :: iv ! obs. inc. vector (o-b).
10 type (y_type) , intent(inout) :: y ! y = h (xa)
11 real , intent(inout) :: adjtest_lhs, pertile_lhs
12
13 integer :: n ! Loop counter.
14
15 if (trace_use_dull) call da_trace_entry("da_check_xtoy_adjoint_synop")
16
17 do n=1, iv%info(synop)%nlocal
18 if (iv%info(synop)%zk(1,n) < 1.0) then
19 y%synop(n)%u = 0.0
20 y%synop(n)%v = 0.0
21 y%synop(n)%t = 0.0
22 y%synop(n)%p = 0.0
23 y%synop(n)%q = 0.0
24 cycle
25 end if
26
27 y%synop(n)%u = y%synop(n)%u/typical_u_rms
28 y%synop(n)%v = y%synop(n)%v/typical_v_rms
29 y%synop(n)%t = y%synop(n)%t/typical_t_rms
30 y%synop(n)%p = y%synop(n)%p/typical_p_rms
31 y%synop(n)%q = y%synop(n)%q/typical_q_rms
32
33 if (iv%info(synop)%proc_domain(1,n)) then
34 adjtest_lhs = adjtest_lhs + (y%synop(n)%u)**2 + (y%synop(n)%v)**2 + (y%synop(n)%t)**2 &
35 + (y%synop(n)%p)**2 + (y%synop(n)%q)**2
36 end if
37
38 pertile_lhs = pertile_lhs + (y%synop(n)%u)**2 + (y%synop(n)%v)**2 + (y%synop(n)%t)**2 &
39 + (y%synop(n)%p)**2 + (y%synop(n)%q)**2
40
41 y%synop(n)%u = y%synop(n)%u/typical_u_rms
42 y%synop(n)%v = y%synop(n)%v/typical_v_rms
43 y%synop(n)%t = y%synop(n)%t/typical_t_rms
44 y%synop(n)%p = y%synop(n)%p/typical_p_rms
45 y%synop(n)%q = y%synop(n)%q/typical_q_rms
46 end do
47
48 if (trace_use_dull) call da_trace_exit("da_check_xtoy_adjoint_synop")
49
50 end subroutine da_check_xtoy_adjoint_synop
51
52