1 subroutine da_check_xtoy_adjoint_metar(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_metar")
17 do n=iv%info(metar)%n1, iv%info(metar)%n2
18 if (iv%info(metar)%zk(1,n) < 1.0 .and. sfc_assi_options /= 2) then
28 if ( sfc_assi_options == 2 ) then
29 if (iv%metar(n)%u%qc < 0) y%metar(n)%u = 0.0
30 if (iv%metar(n)%v%qc < 0) y%metar(n)%v = 0.0
31 if (iv%metar(n)%t%qc < 0) y%metar(n)%t = 0.0
32 if (iv%metar(n)%p%qc < 0) y%metar(n)%p = 0.0
33 if (iv%metar(n)%q%qc < 0) y%metar(n)%q = 0.0
36 y%metar(n)%u = y%metar(n)%u/typical_u_rms
37 y%metar(n)%v = y%metar(n)%v/typical_v_rms
38 y%metar(n)%t = y%metar(n)%t/typical_t_rms
39 y%metar(n)%p = y%metar(n)%p/typical_p_rms
40 y%metar(n)%q = y%metar(n)%q/typical_q_rms
42 if (iv%info(metar)%proc_domain(1,n)) then
43 adjtest_lhs = adjtest_lhs &
51 pertile_lhs = pertile_lhs &
58 y%metar(n)%u = y%metar(n)%u/typical_u_rms
59 y%metar(n)%v = y%metar(n)%v/typical_v_rms
60 y%metar(n)%t = y%metar(n)%t/typical_t_rms
61 y%metar(n)%p = y%metar(n)%p/typical_p_rms
62 y%metar(n)%q = y%metar(n)%q/typical_q_rms
65 if (trace_use_dull) call da_trace_exit("da_check_xtoy_adjoint_metar")
67 end subroutine da_check_xtoy_adjoint_metar