da_check_max_iv_buoy.inc
References to this file elsewhere.
1 subroutine da_check_max_iv_buoy(iv, it, itu,ituf,itvv,itvvf,itp,itpf,itt,ittf,itqv,itqvf)
2
3 !-----------------------------------------------------------------------
4 ! Purpose: TBD
5 !-----------------------------------------------------------------------
6
7 implicit none
8
9 type(iv_type), intent(inout) :: iv
10 integer, intent(in) :: it ! Outer iteration
11 integer, intent(inout) :: itu,ituf,itvv,itvvf,itp,itpf,itt
12 integer, intent(inout) :: ittf,itqv,itqvf
13
14 logical :: failed
15 integer :: n
16
17 if (trace_use_dull) call da_trace_entry("da_check_max_iv_buoy")
18
19 !---------------------------------------------------------------------------
20 ! [1.0] Open diagnostic file:
21 !---------------------------------------------------------------------------
22
23 if (rootproc .and. check_max_iv_print) then
24 write (check_max_iv_unit,'(A)') &
25 '----------------------------------------------------------------'
26 write (unit = check_max_iv_unit, fmt = '(A,/)') 'MAX ERROR TEST QC:'
27
28 write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))') &
29 'Error max test ratio for Buoy_U = ',max_error_uv, &
30 'Error max test ratio for Buoy_V = ',max_error_uv, &
31 'Error max test ratio for Buoy_P = ',max_error_p, &
32 'Error max test ratio for Buoy_T = ',max_error_t, &
33 'Error max test ratio for Buoy_QV = ',max_error_q
34 end if
35
36 !---------------------------------------------------------------------------
37 ! [2.0] Perform maximum innovation vector check:
38 !---------------------------------------------------------------------------
39
40 failed = .false.
41
42 do n=iv%info(buoy)%n1,iv%info(buoy)%n2
43 call da_max_error_qc (it, iv%info(buoy), n, iv%buoy(n)%u, max_error_uv, itu, ituf, check_max_iv_unit, 'U ', failed, check_max_iv_print)
44 call da_max_error_qc (it, iv%info(buoy), n, iv%buoy(n)%v, max_error_uv, itvv, itvvf, check_max_iv_unit, 'V ', failed, check_max_iv_print)
45 call da_max_error_qc (it, iv%info(buoy), n, iv%buoy(n)%p, max_error_p, itp, itpf, check_max_iv_unit, 'Press', failed, check_max_iv_print)
46 call da_max_error_qc (it, iv%info(buoy), n, iv%buoy(n)%t, max_error_t, itt, ittf, check_max_iv_unit, 'TEMP ', failed, check_max_iv_print)
47 ! Mixing ratio, same ratio as relative humidity
48 call da_max_error_qc (it, iv%info(buoy), n, iv%buoy(n)%q, max_error_q, itqv, itqvf, check_max_iv_unit, 'QV ', failed, check_max_iv_print)
49 end do
50
51 if (trace_use_dull) call da_trace_exit("da_check_max_iv_buoy")
52
53 end subroutine da_check_max_iv_buoy
54
55