da_check_xtoy_adjoint_ssmi_rv.inc
References to this file elsewhere.
1 subroutine da_check_xtoy_adjoint_ssmi_rv(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 real :: var
15
16 if (trace_use) call da_trace_entry("da_check_xtoy_adjoint_ssmi_rv")
17
18 if (iv%info(ssmi_rv)%nlocal > 0) then
19 do n=1, iv%info(ssmi_rv)%nlocal
20 y%ssmi_rv(n)%speed = y%ssmi_rv(n)%speed/typical_speed_rms
21 y%ssmi_rv(n)%tpw = y%ssmi_rv(n)%tpw/typical_tpw_rms
22
23 var = (y%ssmi_rv(n)%speed) ** 2 + (y%ssmi_rv(n)%tpw) ** 2
24
25 pertile_lhs = pertile_lhs + var
26
27 if (iv%info(ssmi_rv)%proc_domain(1,n)) then
28 adjtest_lhs = adjtest_lhs + var
29 end if
30
31 y%ssmi_rv(n)%speed = y%ssmi_rv(n)%speed/typical_speed_rms
32 y%ssmi_rv(n)%tpw = y%ssmi_rv(n)%tpw/typical_tpw_rms
33 end do
34 end if
35
36 if (trace_use) call da_trace_exit("da_check_xtoy_adjoint_ssmi_rv")
37
38 end subroutine da_check_xtoy_adjoint_ssmi_rv
39
40