da_residual_ssmt1.inc
References to this file elsewhere.
1 subroutine da_residual_ssmt1(iv, y, re, &
2 np_missing, np_bad_data, &
3 np_obs_used, np_available)
4
5 !-----------------------------------------------------------------------
6 ! Purpose: TBD
7 !-----------------------------------------------------------------------
8
9 implicit none
10
11 type (ob_type), intent(in) :: iv ! 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 (iv%num_ssmt1 > 0) then
22
23 n_obs_bad % t % num = number_type(0, 0, 0)
24
25 do n=1, iv%num_ssmt1
26 do k=1, iv%ssmt1(n)%info%levels
27 np_available = np_available + 1
28
29 re%ssmt1(n)%t(k) = da_residual(n, k, y%ssmt1(n)%t(k), &
30 iv%ssmt1(n)%t(k), n_obs_bad % t)
31 end do
32 end do
33
34 np_missing = np_missing + n_obs_bad % t % num % miss
35 np_bad_data = np_bad_data + n_obs_bad % t % num % bad
36 np_obs_used = np_obs_used + n_obs_bad % t % num % use
37
38 end if
39
40 end subroutine da_residual_ssmt1
41
42