1 subroutine da_transform_xtoy_rain_adj(grid, iv, jo_grad_y, a_hr_rainc, a_hr_rainnc)
3 !--------------------------------------------------------------------------
5 !--------------------------------------------------------------------------
9 type (domain), intent(inout) :: grid
10 type (iv_type), intent(in) :: iv ! obs. inc vector (o-b).
11 type (y_type) , intent(inout) :: jo_grad_y ! grad_y(jo)
12 real, dimension(ims:ime,jms:jme), intent(inout) :: a_hr_rainc, a_hr_rainnc
14 integer :: n ! Loop counter.
15 integer :: i, j ! Index dimension.
16 real :: dx, dxm ! Interpolation weights.
17 real :: dy, dym ! Interpolation weights.
19 real, allocatable :: model_rainnc(:)
20 real, allocatable :: model_rainc(:)
22 if (trace_use) call da_trace_entry("da_transform_xtoy_rain_adj")
24 allocate (model_rainnc(iv%info(rain)%n1:iv%info(rain)%n2))
25 allocate (model_rainc(iv%info(rain)%n1:iv%info(rain)%n2))
30 do n=iv%info(rain)%n1,iv%info(rain)%n2
31 model_rainnc(n) = model_rainnc(n) + jo_grad_y%rain(n)%rain
32 model_rainc(n) = model_rainc(n) + jo_grad_y%rain(n)%rain
33 jo_grad_y%rain(n)%rain=0.0
36 call da_interp_lin_2d_adj (a_hr_rainc, iv%info(rain), 1, model_rainc)
37 call da_interp_lin_2d_adj (a_hr_rainnc, iv%info(rain), 1, model_rainnc)
39 deallocate (model_rainc)
40 deallocate (model_rainnc)
42 if (trace_use) call da_trace_exit("da_transform_xtoy_rain_adj")
44 end subroutine da_transform_xtoy_rain_adj