1 subroutine da_allocate_y_rain (iv, y)
3 !---------------------------------------------------------------------------
4 ! Purpose: Allocate arrays used in y and residual obs structures.
5 !---------------------------------------------------------------------------
9 type (iv_type), intent(in) :: iv ! Ob type input.
10 type (y_type), intent(inout) :: y ! Residual type structure.
12 !---------------------------------------------------------------------------
13 ! [1.0] Copy number of observations:
14 !---------------------------------------------------------------------------
16 if (trace_use) call da_trace_entry("da_allocate_y_rain")
18 y % nlocal(rain) = iv%info(rain)%nlocal
19 y % ntotal(rain) = iv%info(rain)%ntotal
21 !---------------------------------------------------------------------------
23 !---------------------------------------------------------------------------
25 if (y % nlocal(rain) > 0) then
26 allocate (y % rain(1:y % nlocal(rain)))
27 y % rain(1:y % nlocal(rain)) % rain = 0.0
30 if (trace_use) call da_trace_exit("da_allocate_y_rain")
32 end subroutine da_allocate_y_rain