1 subroutine da_calculate_grady_chem_sfc(iv, re, jo_grad_y)
3 !-------------------------------------------------------------------------
4 ! Purpose: Applies obs inverse on re-vector
5 !-------------------------------------------------------------------------
9 type (iv_type), intent(in) :: iv ! Innovation vector.
10 type (y_type), intent(inout) :: re ! Residual vector.
11 type (y_type), intent(inout) :: jo_grad_y ! Grad_y(Jo)
15 if (trace_use_dull) call da_trace_entry("da_calculate_grady_chem_sfc")
17 do ichem = PARAM_FIRST_SCALAR ,num_chemic_surf
18 do n=1, iv%info(chemic_surf)%nlocal
19 if (iv%chemic_surf(n)%chem(ichem)%qc < obs_qc_pointer) re%chemic_surf(n)%chem(ichem) = 0.0
21 jo_grad_y%chemic_surf(n)%chem(ichem) = -re%chemic_surf(n)%chem(ichem) / &
22 (iv%chemic_surf(n)%chem(ichem)%error * iv%chemic_surf(n)%chem(ichem)%error)
26 if (trace_use_dull) call da_trace_exit("da_calculate_grady_chem_sfc")
28 end subroutine da_calculate_grady_chem_sfc