1 subroutine da_fill_obs_structures_chem_sfc(iv, ob)
3 !----------------------------------------------------------------------------
4 ! Purpose: Allocates observation structure and fills it from iv.
5 !----------------------------------------------------------------------------
9 type (iv_type), intent(inout) :: iv ! Obs and header structure.
10 type (y_type), intent(out) :: ob ! (Smaller) observation structure.
12 integer :: n, k, iplt ! Loop counters.
13 ! real :: rh_error ! RH obs. error.
14 ! real :: q_error ! q obs. error.
15 ! real :: geometric_h, geopotential_h
19 if (trace_use) call da_trace_entry("da_fill_obs_structures_chem_sfc")
21 !---------------------------------------------------------------------------
22 ! Initialise obs error factors (which will be overwritten in use_obs_errfac)
23 !---------------------------------------------------------------------------
25 iv % chemic_surf_ef = 1.0
27 !----------------------------------------------------------------------
28 ! [1.0] Allocate innovation vector and observation structures:
29 !----------------------------------------------------------------------
30 call da_allocate_y_chem_sfc(iv, ob)
32 !----------------------------------------------------------------------
33 ! [2.0] Transfer observations:
34 !----------------------------------------------------------------------
36 ! [2.20] Transfer chemic obs:
39 if (iv%info(chemic_surf)%nlocal > 0) then
40 do n = 1, iv%info(chemic_surf)%nlocal
41 do k = PARAM_FIRST_SCALAR, num_chemic_surf
42 ob % chemic_surf(n) % chem(k) = iv % chemic_surf(n) % chem(k) % inv
47 if (trace_use) call da_trace_exit("da_fill_obs_structures_chem_sfc")
49 end subroutine da_fill_obs_structures_chem_sfc