da_check_max_iv_ships.inc
References to this file elsewhere.
1 subroutine da_check_max_iv_ships(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,ittf,itqv,itqvf
12
13 logical :: failed
14 integer :: n
15
16 if (trace_use_dull) call da_trace_entry("da_check_max_iv_ships")
17
18 !----------------------------------------------------------------------------
19 ! [1.0] Open diagnostic file:
20 !---------------------------------------------------------------------------
21
22 if (rootproc .and. check_max_iv_print) then
23 write (check_max_iv_unit,'(A)') &
24 '----------------------------------------------------------------'
25 write (unit = check_max_iv_unit, fmt = '(A,/)') 'MAX ERROR TEST QC:'
26
27 write (unit = check_max_iv_unit, fmt = '(/,9(A,F3.0,/))') &
28 'Error max test ratio for Ships_U = ',max_error_uv, &
29 'Error max test ratio for Ships_V = ',max_error_uv, &
30 'Error max test ratio for Ships_P = ',max_error_p, &
31 'Error max test ratio for Ships_T = ',max_error_t, &
32 'Error max test ratio for Ships_QV = ',max_error_q
33 end if
34
35 !---------------------------------------------------------------------------
36 ! [2.0] Perform maximum innovation vector check:
37 !---------------------------------------------------------------------------
38
39 failed = .false.
40
41 do n=iv%info(ships)%n1,iv%info(ships)%n2
42 call da_max_error_qc (it, iv%info(ships), n, iv%ships(n)%u, max_error_uv, itu, ituf, check_max_iv_unit, 'U ', failed, check_max_iv_print)
43 call da_max_error_qc (it, iv%info(ships), n, iv%ships(n)%v, max_error_uv, itvv, itvvf, check_max_iv_unit, 'V ', failed, check_max_iv_print)
44 call da_max_error_qc (it, iv%info(ships), n, iv%ships(n)%p, max_error_p, itp, itpf, check_max_iv_unit, 'Press', failed, check_max_iv_print)
45 call da_max_error_qc (it, iv%info(ships), n, iv%ships(n)%t, max_error_t, itt, ittf, check_max_iv_unit, 'TEMP ', failed, check_max_iv_print)
46 ! Mixing ratio, same ratio as relative humidity
47 call da_max_error_qc (it, iv%info(ships), n, iv%ships(n)%q, max_error_q, itqv, itqvf, check_max_iv_unit, 'QV ', failed, check_max_iv_print)
48 end do
49
50 if (trace_use_dull) call da_trace_exit("da_check_max_iv_ships")
51
52 end subroutine da_check_max_iv_ships
53
54