1 subroutine da_allocate_y_chem_sfc (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.
13 !---------------------------------------------------------------------------
14 ! [1.0] Copy number of observations:
15 !---------------------------------------------------------------------------
17 if (trace_use) call da_trace_entry("da_allocate_y_chem_sfc")
19 y % nlocal(chemic_surf) = iv%info(chemic_surf)%nlocal
20 y % ntotal(chemic_surf) = iv%info(chemic_surf)%ntotal
22 !---------------------------------------------------------------------------
24 !---------------------------------------------------------------------------
26 if (y % nlocal(chemic_surf) > 0) then
27 allocate (y % chemic_surf(1:y % nlocal(chemic_surf)))
28 do ilocal = 1, y % nlocal(chemic_surf)
29 allocate (y % chemic_surf(ilocal)%chem (num_chemic_surf) )
30 y % chemic_surf(ilocal) % chem(:) = 0.0
34 if (trace_use) call da_trace_exit("da_allocate_y_chem_sfc")
36 end subroutine da_allocate_y_chem_sfc