1 subroutine da_transform_xtoy_rain(grid, iv, y, hr_rainc, hr_rainnc)
2 !--------------------------------------------------------------------------
4 !--------------------------------------------------------------------------
8 type (domain), intent(inout) :: grid
9 type (iv_type), intent(in) :: iv ! Innovation vector (O-B).
10 type (y_type), intent(inout) :: y ! y = h (grid%xa) (linear)
11 real, dimension(ims:ime,jms:jme), intent(in) :: hr_rainc, hr_rainnc
13 integer :: n ! Loop counter.
15 real, allocatable :: model_rainc(:)
16 real, allocatable :: model_rainnc(:)
18 if (trace_use) call da_trace_entry("da_transform_xtoy_rain")
20 allocate (model_rainc(iv%info(rain)%n1:iv%info(rain)%n2))
21 allocate (model_rainnc(iv%info(rain)%n1:iv%info(rain)%n2))
26 call da_interp_lin_2d (hr_rainc, iv%info(rain), 1, model_rainc)
27 call da_interp_lin_2d (hr_rainnc, iv%info(rain), 1, model_rainnc)
29 do n=iv%info(rain)%n1,iv%info(rain)%n2
30 if (iv % rain(n) % rain % qc == missing_data) then
33 y%rain(n)%rain = model_rainc(n) + model_rainnc(n)
37 deallocate (model_rainc)
38 deallocate (model_rainnc)
40 if (trace_use) call da_trace_exit("da_transform_xtoy_rain")
42 end subroutine da_transform_xtoy_rain