da_jo_and_grady_ssmi_tb.inc
References to this file elsewhere.
1 subroutine da_jo_and_grady_ssmi_tb(oi, re, jo, jo_grad_y)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: TBD
5 !-----------------------------------------------------------------------
6
7 implicit none
8
9 type (ob_type), intent(in) :: oi ! Ob Inc. structure.
10 type (y_type), intent(in) :: re ! Residual structure.
11 type (y_type), intent(inout) :: jo_grad_y ! Grad_y(Jo)
12 type (jo_type), intent(out) :: jo ! Obs cost function.
13
14 integer :: n
15
16 jo % ssmi_tb19v = 0.
17 jo % ssmi_tb19h = 0.
18 jo % ssmi_tb22v = 0.
19 jo % ssmi_tb37v = 0.
20 jo % ssmi_tb37h = 0.
21 jo % ssmi_tb85v = 0.
22 jo % ssmi_tb85h = 0.
23
24 do n=1, oi%num_ssmi_tb
25
26 jo_grad_y%ssmi_tb(n)%tb19v = - re%ssmi_tb(n)%tb19v / &
27 (oi%ssmi_tb(n)%tb19v%error * &
28 oi%ssmi_tb(n)%tb19v%error)
29
30 jo_grad_y%ssmi_tb(n)%tb19h = - re%ssmi_tb(n)%tb19h / &
31 (oi%ssmi_tb(n)%tb19h%error * &
32 oi%ssmi_tb(n)%tb19h%error)
33
34 jo_grad_y%ssmi_tb(n)%tb22v = - re%ssmi_tb(n)%tb22v / &
35 (oi%ssmi_tb(n)%tb22v%error * &
36 oi%ssmi_tb(n)%tb22v%error)
37
38 jo_grad_y%ssmi_tb(n)%tb37v = - re%ssmi_tb(n)%tb37v / &
39 (oi%ssmi_tb(n)%tb37v%error * &
40 oi%ssmi_tb(n)%tb37v%error)
41
42 jo_grad_y%ssmi_tb(n)%tb37h = - re%ssmi_tb(n)%tb37h / &
43 (oi%ssmi_tb(n)%tb37h%error * &
44 oi%ssmi_tb(n)%tb37h%error)
45
46 jo_grad_y%ssmi_tb(n)%tb85v = - re%ssmi_tb(n)%tb85v / &
47 (oi%ssmi_tb(n)%tb85v%error * &
48 oi%ssmi_tb(n)%tb85v%error)
49
50 jo_grad_y%ssmi_tb(n)%tb85h = - re%ssmi_tb(n)%tb85h / &
51 (oi%ssmi_tb(n)%tb85h%error * &
52 oi%ssmi_tb(n)%tb85h%error)
53
54 if (oi%ssmi_tb(n)%loc%proc_domain) then
55 jo % ssmi_tb19v = jo % ssmi_tb19v - &
56 re%ssmi_tb(n)%tb19v * jo_grad_y%ssmi_tb(n)%tb19v
57
58 jo % ssmi_tb19h = jo % ssmi_tb19h - &
59 re%ssmi_tb(n)%tb19h * jo_grad_y%ssmi_tb(n)%tb19h
60
61 jo % ssmi_tb22v = jo % ssmi_tb22v - &
62 re%ssmi_tb(n)%tb22v * jo_grad_y%ssmi_tb(n)%tb22v
63
64 jo % ssmi_tb37v = jo % ssmi_tb37v - &
65 re%ssmi_tb(n)%tb37v * jo_grad_y%ssmi_tb(n)%tb37v
66
67 jo % ssmi_tb37h = jo % ssmi_tb37h - &
68 re%ssmi_tb(n)%tb37h * jo_grad_y%ssmi_tb(n)%tb37h
69
70 jo % ssmi_tb85v = jo % ssmi_tb85v - &
71 re%ssmi_tb(n)%tb85v * jo_grad_y%ssmi_tb(n)%tb85v
72
73 jo % ssmi_tb85h = jo % ssmi_tb85h - &
74 re%ssmi_tb(n)%tb85h * jo_grad_y%ssmi_tb(n)%tb85h
75
76 end if
77 end do
78
79 jo % ssmi_tb19h = 0.5 * jo % ssmi_tb19h
80 jo % ssmi_tb19v = 0.5 * jo % ssmi_tb19v
81 jo % ssmi_tb22v = 0.5 * jo % ssmi_tb22v
82 jo % ssmi_tb37h = 0.5 * jo % ssmi_tb37h
83 jo % ssmi_tb37v = 0.5 * jo % ssmi_tb37v
84 jo % ssmi_tb85h = 0.5 * jo % ssmi_tb85h
85 jo % ssmi_tb85v = 0.5 * jo % ssmi_tb85v
86
87 end subroutine da_jo_and_grady_ssmi_tb
88
89