1 subroutine da_w_adjustment_adj(xb,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.
13 real, dimension(ims:ime,jms:jme,kms:kme), intent(inout) :: WZ_a
17 real, dimension(ims:ime,jms:jme,kms:kme) :: WZ_b
22 if (trace_use) call da_trace_entry("da_w_adjustment_adj")
24 call da_wz_base(xb,WZ_b)
32 EBXL19=EBXL19+WZ_b(I,J,K)*(xb%hf(I,J,K)-xb%hf(I,J,K+1))
33 EBXL29=EBXL29+ABS(WZ_b(I,J,K))*(xb%hf(I,J,K)-xb%hf(I,J,K+1))
40 EBXL1=EBXL1-WZ_a(I,J,K)*ABS(WZ_b(I,J,K))/EBXL29
41 EBXL2=EBXL2-WZ_a(I,J,K)* &
42 ABS(WZ_b(I,J,K))*(-EBXL19)/EBXL29**2
43 WZ_a(I,J,K)=WZ_a(I,J,K)*(1.0-EBXL19/EBXL29 &
44 *SIGN(1.0,WZ_b(I,J,K)))
48 WZ_a(I,J,K)=WZ_a(I,J,K)+EBXL2*(xb%hf(I,J,K)-xb%hf(I,J,K+1)) &
49 *SIGN(1.0,WZ_b(I,J,K))
50 WZ_a(I,J,K)=WZ_a(I,J,K)+EBXL1*(xb%hf(I,J,K)-xb%hf(I,J,K+1))
55 if (trace_use) call da_trace_exit("da_w_adjustment_adj")
57 end subroutine da_w_adjustment_adj