da_residual_polaramv.inc
References to this file elsewhere.
1 subroutine da_residual_polaramv(oi, y, re, &
2 np_missing, np_bad_data, &
3 np_obs_used, np_available)
4 !-------------------------------------------------------------------------
5 ! Purpose: TBD
6 !-------------------------------------------------------------------------
7
8 implicit none
9
10 type (ob_type), intent(in) :: oi ! Innovation vector (O-B).
11 type (y_type) , intent(in) :: y ! y = H (xa)
12 type (y_type) , intent(inout) :: re ! Residual vector (O-A).
13
14 integer , intent(inout) :: np_available, np_obs_used, &
15 np_missing , np_bad_data
16
17 type (bad_data_type) :: n_obs_bad
18 integer :: n, k
19
20 if (oi%num_polaramv > 0) then
21
22 n_obs_bad % u % num = number_type(0, 0, 0)
23 n_obs_bad % v % num = number_type(0, 0, 0)
24
25 do n=1, oi%num_polaramv
26 do k=1, oi%polaramv(n)%info%levels
27 np_available = np_available + 2
28
29 re%polaramv(n)%u(k) = da_residual(n, 0, y%polaramv(n)%u(k), &
30 oi%polaramv(n)%u(k), n_obs_bad % u)
31 re%polaramv(n)%v (k)= da_residual(n, 0, y%polaramv(n)%v(k), &
32 oi%polaramv(n)%v(k), n_obs_bad % v)
33 end do
34 end do
35
36 np_missing = np_missing + n_obs_bad % u % num % miss + &
37 n_obs_bad % v % num % miss
38 np_bad_data = np_bad_data + n_obs_bad % u % num % bad + &
39 n_obs_bad % v % num % bad
40 np_obs_used = np_obs_used + n_obs_bad % u % num % use + &
41 n_obs_bad % v % num % use
42
43 end if
44
45 end subroutine da_residual_polaramv
46
47