<HTML> <BODY BGCOLOR=#ccccdd LINK=#0000aa VLINK=#0000ff ALINK=#ff0000 ><BASE TARGET="bottom_target"><PRE>
<A NAME='DA_RESIDUAL_NEW'><A href='../../html_code/tools/da_residual_new.inc.html#DA_RESIDUAL_NEW' TARGET='top_target'><IMG SRC="../../gif/bar_red.gif" border=0></A>

subroutine da_residual_new(yy, qc, inv, rr) 1,2

   !-----------------------------------------------------------------------
   ! Purpose: TBD
   !-----------------------------------------------------------------------

   implicit none

   integer, intent(in)  :: qc(:,:)
   real,    intent(in)  :: inv(:,:)
   real,    intent(in)  :: yy(:,:)
   real,    intent(out) :: rr(:,:)

   if (trace_use) call da_trace_entry("da_residual_new")
  
   where (qc(:,:) &gt;= obs_qc_pointer)
      rr(:,:) = inv(:,:) - yy(:,:)
   elsewhere
      rr(:,:) = 0.0
   endwhere

   if (trace_use) call da_trace_exit("da_residual_new")

end subroutine da_residual_new