updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_ssmi / da_calculate_grady_ssmi_rv.inc
blob427560aa5d033fd2236f860997a5ed6e60c2abfe
1 subroutine da_calculate_grady_ssmi_rv(iv, re, jo_grad_y)
3    !-------------------------------------------------------------------------
4    ! Purpose: Applies obs inverse on re-vector
5    !-------------------------------------------------------------------------
7    implicit none
9    type (iv_type), intent(in)   :: iv          ! Ob Inc. structure.
10    type (y_type), intent(inout) :: re          ! Residual structure.
11    type (y_type), intent(inout) :: jo_grad_y   ! Grad_y(Jo)
13    integer                      :: n
15    if (trace_use_dull) call da_trace_entry("da_calculate_grady_ssmi_rv")
17    do n=1, iv%info(ssmi_rv)%nlocal
18       if (iv%ssmi_rv(n)%speed%qc < obs_qc_pointer) then
19          re%ssmi_rv(n)%speed = 0.0
20       end if
21       jo_grad_y%ssmi_rv(n)%Speed = - re%ssmi_rv(n)%Speed / (iv%ssmi_rv(n)%Speed%error * iv%ssmi_rv(n)%Speed%error)
23       if (iv%ssmi_rv(n)%tpw%qc < obs_qc_pointer) then
24          re%ssmi_rv(n)%tpw = 0.0
25       end if
26       jo_grad_y%ssmi_rv(n)%tpw = -re%ssmi_rv(n)%tpw / (iv%ssmi_rv(n)%tpw%error * iv%ssmi_rv(n)%tpw%error)
27    end do  
29    if (trace_use_dull) call da_trace_exit("da_calculate_grady_ssmi_rv")
31 end subroutine da_calculate_grady_ssmi_rv