da_check_max_iv_sonde_sfc.inc

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