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
15    logical   :: amsua, amsub, hirs, msu,airs,hsb, ssmis
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       ssmis = trim(rttov_inst_name(rtminit_sensor(i))) == 'ssmis'
32 
33       if (hirs) then
34          ! 1.0 QC for HIRS
35          call da_qc_hirs(i,nchan,ob,iv)
36          !call da_warning(__FILE__,__LINE__,(/'QC Not implemented for HIRS'/))
37       else if (airs) then
38          call da_qc_airs(i,nchan,ob,iv)
39          !call da_warning(__FILE__,__LINE__,(/'QC Not implemented for AIRS'/))
40       else if ( hsb ) then
41          ! call da_qc_hsb(i,nchan,ob,iv)
42          call da_warning(__FILE__,__LINE__,(/'QC Not implemented for HSB'/))
43       else if (amsua) then
44          call da_qc_amsua(i,nchan,ob,iv)
45       else if ( amsub ) then
46          call da_qc_amsub(i,nchan,ob,iv)
47       else if (msu) then
48          ! call da_qc_msu(i,nchan, ob,iv)
49          call da_warning(__FILE__,__LINE__,(/'QC Not implemented for MSU'/))
50       else if (ssmis) then
51          call da_qc_ssmis(i,nchan,ob,iv)
52 !         call da_warning(__FILE__,__LINE__,(/'QC Not implemented for SSMIS'/))
53       else
54          write(unit=message(1),fmt='(A,A)') &
55             "Unrecognized instrument",trim(rttov_inst_name(rtminit_sensor(i)))
56          call da_error(__FILE__,__LINE__,message(1:1))
57       end if
58 
59    end do
60 #endif
61 
62    if (trace_use) call da_trace_exit("da_qc_crtm")
63 
64 end subroutine da_qc_crtm
65 
66