1 subroutine da_check_xtoy_adjoint_synop(iv, y, adjtest_lhs, pertile_lhs)
3 !-----------------------------------------------------------------------
5 !-----------------------------------------------------------------------
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
13 integer :: n ! Loop counter.
15 if (trace_use_dull) call da_trace_entry("da_check_xtoy_adjoint_synop")
17 do n=iv%info(synop)%n1, iv%info(synop)%n2
18 if (iv%info(synop)%zk(1,n) < 1.0 .and. sfc_assi_options /= 2) then
27 if ( sfc_assi_options == 2 ) then
28 if (iv%synop(n)%u%qc < 0) y%synop(n)%u = 0.0
29 if (iv%synop(n)%v%qc < 0) y%synop(n)%v = 0.0
30 if (iv%synop(n)%t%qc < 0) y%synop(n)%t = 0.0
31 if (iv%synop(n)%p%qc < 0) y%synop(n)%p = 0.0
32 if (iv%synop(n)%q%qc < 0) y%synop(n)%q = 0.0
35 y%synop(n)%u = y%synop(n)%u/typical_u_rms
36 y%synop(n)%v = y%synop(n)%v/typical_v_rms
37 y%synop(n)%t = y%synop(n)%t/typical_t_rms
38 y%synop(n)%p = y%synop(n)%p/typical_p_rms
39 y%synop(n)%q = y%synop(n)%q/typical_q_rms
41 if (iv%info(synop)%proc_domain(1,n)) then
42 adjtest_lhs = adjtest_lhs + (y%synop(n)%u)**2 + (y%synop(n)%v)**2 + (y%synop(n)%t)**2 &
43 + (y%synop(n)%p)**2 + (y%synop(n)%q)**2
46 pertile_lhs = pertile_lhs + (y%synop(n)%u)**2 + (y%synop(n)%v)**2 + (y%synop(n)%t)**2 &
47 + (y%synop(n)%p)**2 + (y%synop(n)%q)**2
49 y%synop(n)%u = y%synop(n)%u/typical_u_rms
50 y%synop(n)%v = y%synop(n)%v/typical_v_rms
51 y%synop(n)%t = y%synop(n)%t/typical_t_rms
52 y%synop(n)%p = y%synop(n)%p/typical_p_rms
53 y%synop(n)%q = y%synop(n)%q/typical_q_rms
56 if (trace_use_dull) call da_trace_exit("da_check_xtoy_adjoint_synop")
58 end subroutine da_check_xtoy_adjoint_synop