da_residual_satem.inc
References to this file elsewhere.
1 subroutine da_residual_satem(oi, y, re, &
2 np_missing, np_bad_data, &
3 np_obs_used, np_available)
4
5 !-----------------------------------------------------------------------
6 ! Purpose: Calculate residuals for satem obs
7 !-----------------------------------------------------------------------
8
9 implicit none
10
11 type (ob_type), intent(in) :: oi ! Innovation vector (O-B).
12 type (y_type) , intent(in) :: y ! y = H (xa)
13 type (y_type) , intent(inout) :: re ! Residual structure.
14
15 integer , intent(inout) :: np_available, np_obs_used, &
16 np_missing , np_bad_data
17
18 type (bad_data_type) :: n_obs_bad
19 integer :: n, k
20
21 if (oi%num_Satem > 0) then
22 n_obs_bad % thickness % num = number_type(0, 0, 0)
23
24 do n=1, oi%num_Satem
25 do k=1, oi%satem(n)%info%levels
26 np_available = np_available + 1
27 re%Satem(n)%thickness(k) = da_residual(n, k, y%Satem(n)%thickness(k), &
28 oi%Satem(n)%thickness(k), n_obs_bad % thickness)
29 end do
30 end do
31
32 np_missing = np_missing + n_obs_bad % thickness % num % miss
33 np_bad_data = np_bad_data + n_obs_bad % thickness % num % bad
34 np_obs_used = np_obs_used + n_obs_bad % thickness % num % use
35 end if
36
37 end subroutine da_residual_satem
38
39