1 subroutine da_deallocate_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_deallocate_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 deallocate (y % chemic_surf)
30 if (trace_use) call da_trace_exit("da_deallocate_y_chem_sfc")
32 end subroutine da_deallocate_y_chem_sfc