da_check_xtoy_adjoint_ssmi_tb.inc

References to this file elsewhere.
1 subroutine da_check_xtoy_adjoint_ssmi_tb (oi, y, adjtest_lhs, pertile_lhs)
2 
3    !-----------------------------------------------------------------------
4    ! Purpose: TBD
5    !-----------------------------------------------------------------------
6 
7    implicit none
8 
9    type (ob_type), intent(in)     :: oi            ! 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 
14    integer                        :: n             ! loop counter.
15    real :: var
16 
17    if (oi%num_ssmi_tb > 0) then
18       do n=1, oi%num_ssmi_tb
19          y%ssmi_tb(n)%tb19v = y%ssmi_tb(n)%tb19v/typical_tb19v_rms
20          y%ssmi_tb(n)%tb19h = y%ssmi_tb(n)%tb19h/typical_tb19h_rms
21          y%ssmi_tb(n)%tb22v = y%ssmi_tb(n)%tb22v/typical_tb22v_rms
22          y%ssmi_tb(n)%tb37v = y%ssmi_tb(n)%tb37v/typical_tb37v_rms
23          y%ssmi_tb(n)%tb37h = y%ssmi_tb(n)%tb37h/typical_tb37h_rms
24          y%ssmi_tb(n)%tb85v = y%ssmi_tb(n)%tb85v/typical_tb85v_rms
25          y%ssmi_tb(n)%tb85h = y%ssmi_tb(n)%tb85h/typical_tb85h_rms
26 
27           var = (y%ssmi_tb(n)%tb19v) ** 2 &
28               + (y%ssmi_tb(n)%tb19h) ** 2 &
29               + (y%ssmi_tb(n)%tb22v) ** 2 &
30               + (y%ssmi_tb(n)%tb37v) ** 2 &
31               + (y%ssmi_tb(n)%tb37h) ** 2 &
32               + (y%ssmi_tb(n)%tb85v) ** 2 &
33               + (y%ssmi_tb(n)%tb85h) ** 2 
34 
35          pertile_lhs = pertile_lhs + var
36 
37          if (oi%ssmi_tb(n)%loc%proc_domain) then
38             adjtest_lhs = adjtest_lhs + var
39          end if
40          y%ssmi_tb(n)%tb19v = y%ssmi_tb(n)%tb19v/typical_tb19v_rms
41          y%ssmi_tb(n)%tb19h = y%ssmi_tb(n)%tb19h/typical_tb19h_rms
42          y%ssmi_tb(n)%tb22v = y%ssmi_tb(n)%tb22v/typical_tb22v_rms
43          y%ssmi_tb(n)%tb37v = y%ssmi_tb(n)%tb37v/typical_tb37v_rms
44          y%ssmi_tb(n)%tb37h = y%ssmi_tb(n)%tb37h/typical_tb37h_rms
45          y%ssmi_tb(n)%tb85v = y%ssmi_tb(n)%tb85v/typical_tb85v_rms
46          y%ssmi_tb(n)%tb85h = y%ssmi_tb(n)%tb85h/typical_tb85h_rms
47       end do
48    end if
49 
50 end subroutine da_check_xtoy_adjoint_ssmi_tb
51 
52