da_qc_crtm.inc

References to this file elsewhere.
1 subroutine da_qc_crtm (ob, iv)
2 
3    !---------------------------------------------------------------------------
4    ! Purpose: perform quality control for radiance data.
5    !
6    ! METHOD:  seperated QC for each sensor
7    !---------------------------------------------------------------------------
8 
9    implicit none
10 
11    type (y_type),  intent(in)      :: ob         ! Observation structure.
12    type (ob_type), intent(inout)   :: iv         ! O-B structure.
13 
14    integer :: i, nchan,p,j
15    logical   :: amsua, amsub, hirs, msu,airs,hsb
16 
17    if (trace_use) call da_trace_entry("da_qc_crtm")
18 #ifdef CRTM
19 
20    do i = 1, iv%num_inst
21       nchan    = iv%instid(i)%nchan
22 
23       write(UNIT=stdout,FMT='(A,A)') ' Performing QC : ', iv%instid(i)%rttovid_string
24 
25       amsua = trim(rttov_inst_name(rtminit_sensor(i))) == 'amsua'
26       amsub = trim(rttov_inst_name(rtminit_sensor(i))) == 'amsub'
27       hirs  = trim(rttov_inst_name(rtminit_sensor(i))) == 'hirs'
28       msu   = trim(rttov_inst_name(rtminit_sensor(i))) == 'msu'
29       airs  = trim(rttov_inst_name(rtminit_sensor(i))) == 'airs'
30       hsb   = trim(rttov_inst_name(rtminit_sensor(i))) == 'hsb'
31 
32       if (hirs) then
33          ! 1.0 QC for HIRS
34          call da_qc_hirs(i,nchan,ob,iv)
35          !call da_warning(__FILE__,__LINE__,(/'QC Not implemented for HIRS'/))
36       else if (airs) then
37          call da_qc_airs(i,nchan,ob,iv)
38          !call da_warning(__FILE__,__LINE__,(/'QC Not implemented for AIRS'/))
39       else if ( hsb ) then
40          ! call da_qc_hsb(i,nchan,ob,iv)
41          call da_warning(__FILE__,__LINE__,(/'QC Not implemented for HSB'/))
42       else if (amsua) then
43          call da_qc_amsua(i,nchan,ob,iv)
44       else if ( amsub ) then
45          call da_qc_amsub(i,nchan,ob,iv)
46       else if (msu) then
47          ! call da_qc_msu(i,nchan, ob,iv)
48          call da_warning(__FILE__,__LINE__,(/'QC Not implemented for MSU'/))
49       else
50          write(unit=message(1),fmt='(A,A)') &
51             "Unrecognized instrument",trim(inst_name(rtminit_sensor(i)))
52          call da_error(__FILE__,__LINE__,message(1:1))
53       end if
54 
55    end do
56 #endif
57 
58    if (trace_use) call da_trace_exit("da_qc_crtm")
59 
60 end subroutine da_qc_crtm
61 
62