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 (iv_type), intent(inout) :: iv ! O-B structure.
13
14 integer :: i, nchan
15 logical :: amsua, amsub, hirs, msu,airs,hsb, ssmis, mhs
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 amsua = trim(rttov_inst_name(rtminit_sensor(i))) == 'amsua'
24 amsub = trim(rttov_inst_name(rtminit_sensor(i))) == 'amsub'
25 hirs = trim(rttov_inst_name(rtminit_sensor(i))) == 'hirs'
26 msu = trim(rttov_inst_name(rtminit_sensor(i))) == 'msu'
27 airs = trim(rttov_inst_name(rtminit_sensor(i))) == 'airs'
28 hsb = trim(rttov_inst_name(rtminit_sensor(i))) == 'hsb'
29 ssmis = trim(rttov_inst_name(rtminit_sensor(i))) == 'ssmis'
30 mhs = trim(rttov_inst_name(rtminit_sensor(i))) == 'mhs'
31
32 if (hirs) then
33 call da_qc_hirs(i,nchan,ob,iv)
34 else if (airs) then
35 call da_qc_airs(i,nchan,ob,iv)
36 else if ( hsb ) then
37 ! call da_qc_hsb(i,nchan,ob,iv)
38 call da_warning(__FILE__,__LINE__,(/'QC Not implemented for HSB'/))
39 else if (amsua) then
40 call da_qc_amsua(i,nchan,ob,iv)
41 else if ( amsub ) then
42 call da_qc_amsub(i,nchan,ob,iv)
43 else if (msu) then
44 ! call da_qc_msu(i,nchan, ob,iv)
45 call da_warning(__FILE__,__LINE__,(/'QC Not implemented for MSU'/))
46 else if (ssmis) then
47 call da_qc_ssmis(i,nchan,ob,iv)
48 else if (mhs) then
49 call da_qc_mhs(i,nchan,ob,iv)
50 else
51 write(unit=message(1),fmt='(A,A)') &
52 "Unrecognized instrument",trim(rttov_inst_name(rtminit_sensor(i)))
53 call da_error(__FILE__,__LINE__,message(1:1))
54 end if
55
56 end do
57 #endif
58
59 if (trace_use) call da_trace_exit("da_qc_crtm")
60
61 end subroutine da_qc_crtm
62
63