1 subroutine da_w_adjustment_lin(xb,W_a,WZ_a)
3 !---------------------------------------------------------------------------
4 ! Purpose: Adjust vertical velocity increments
6 ! Assumptions: 1) Model level stored top down.
7 !---------------------------------------------------------------------------
11 type (xb_type), intent(in) :: xb ! first guess structure.
12 real, intent(out) :: w_a(ims:ime,jms:jme,kms:kme)
13 real, intent(inout) :: wz_a(ims:ime,jms:jme,kms:kme)
16 real :: wz_b(ims:ime,jms:jme,kms:kme)
20 if (trace_use) call da_trace_entry("da_w_adjustment_lin")
22 call da_wz_base(xb,WZ_b)
31 ebxl1=ebxl1+wz_a(i,j,k)*(xb%hf(i,j,k)-xb%hf(i,j,k+1))
32 ebxl19=ebxl19+wz_b(i,j,k)*(xb%hf(i,j,k)-xb%hf(i,j,k+1))
33 ebxl2=ebxl2+wz_a(i,j,k)*(xb%hf(i,j,k)-xb%hf(i,j,k+1)) &
34 *sign(1.0,wz_b(i,j,k))
35 ebxl29=ebxl29+abs(wz_b(i,j,k))*(xb%hf(i,j,k)-xb%hf(i,j,k+1))
39 wz_a(i,j,k)=wz_a(i,j,k)*(1.-ebxl19/ebxl29*sign(1.0,wz_b(i,j,k)))- &
40 ebxl1*abs(wz_b(i,j,k))/ebxl29+ &
41 ebxl2*abs(wz_b(i,j,k))*ebxl19/ebxl29**2
47 if (trace_use) call da_trace_exit("da_w_adjustment_lin")
49 end subroutine da_w_adjustment_lin