1 subroutine da_get_innov_vector_radiance (it, grid, ob, iv)
3 !---------------------------------------------------------------------------
4 ! PURPOSE: Calculate innovation vector for radiance data.
6 ! METHOD: d = y - H(x) - bc
7 ! 1. obs BT - simulated BT
9 ! 3. Radiances Quality Control
11 ! HISTORY: 10/24/2007 - Creation from da_get_innov_vector_crtm Tom Auligne
12 !---------------------------------------------------------------------------
16 integer, intent(in) :: it ! External iteration.
17 type(domain), intent(in) :: grid
18 type (y_type), intent(inout) :: ob ! Observation structure.
19 type (iv_type), intent(inout) :: iv ! O-B structure.
23 if(trace_use) call da_trace_entry("da_get_innov_vector_radiance")
25 iv%instid(:)%info%n1 = iv%instid(:)%info%plocal(iv%time-1) + 1
26 iv%instid(:)%info%n2 = iv%instid(:)%info%plocal(iv%time)
28 !------------------------------------------------------------------------
29 ! [1.0] calculate components of innovation vector
30 !------------------------------------------------------------------------
31 if (rtm_option == rtm_option_rttov) then
33 call da_get_innov_vector_rttov( it, grid, ob, iv )
36 call da_error(__FILE__,__LINE__, &
37 (/"Must compile with $RTTOV option for radiances"/))
39 elseif (rtm_option == rtm_option_crtm) then
41 call da_get_innov_vector_crtm (it, grid, ob, iv )
43 call da_error(__FILE__,__LINE__, &
44 (/"Must compile with $CRTM option for radiances"/))
47 call da_warning(__FILE__,__LINE__,(/"Unknown Radiative Transfer Model"/))
50 !------------------------------------------------------------------------
51 ! [2.0] Perform (Variational) bias correction
52 !------------------------------------------------------------------------
53 if (use_varbc .or. freeze_varbc) then
54 call da_varbc_pred(iv)
55 !varbc coldstart can not be done here when num_fgat_time>1
56 !because da_varbc_coldstart uses all obs from all time slots
57 else if (biascorr) then
58 do inst = 1, iv%num_inst ! loop for sensor
59 write(unit=stdout,fmt='(A,A)') 'Performing bias correction for ', &
60 trim(iv%instid(inst)%rttovid_string)
61 call da_biascorr(inst,ob,iv)
62 end do ! end loop for sensor
65 if(trace_use) call da_trace_exit("da_get_innov_vector_radiance")
67 end subroutine da_get_innov_vector_radiance