1 subroutine da_setup_obs_structures_chem_sfc(ob, iv, grid)
3 !---------------------------------------------------------------------------
4 ! Purpose: Define, allocate and read observation structure.
5 !---------------------------------------------------------------------------
9 type (y_type), intent(out) :: ob ! Observation structure.
10 type (iv_type), intent(inout) :: iv ! O-B structure.
11 type (domain) , intent(inout) :: grid ! model data
13 character(len=filename_len) :: filename
14 integer :: n,i,j,k, itime, ichem, iplt
17 integer :: istart,iend,jstart,jend
21 if (trace_use) call da_trace_entry("da_setup_obs_structures_chem_sfc")
23 filename = "ob_chemsfc.ascii"
25 !--------------------------------------------------------------------------
26 ! [1.0] Scan data - only necessary if an alternative format is implemented
27 !--------------------------------------------------------------------------
28 call da_scan_obs_chem_sfc(iv, filename, grid)
30 iv%time = 1 !!! Fixed by Soyoung Ha (June-2021)
31 iv%info(chemic_surf)%plocal(iv%time) = iv%info(chemic_surf)%nlocal
32 iv%info(chemic_surf)%ptotal(iv%time) = iv%info(chemic_surf)%ntotal
34 !--------------------------------------------------------------------------
35 ! Allocate the ob based on input number of obs:
36 !--------------------------------------------------------------------------
37 call da_allocate_observations_chem_sfc (iv)
39 !--------------------------------------------------------------------------
41 !--------------------------------------------------------------------------
42 call da_read_obs_chem_sfc(iv, filename, grid)
44 !--------------------------------------------------------------------------
45 ! [3.0] Calculate innovation vector (O-B) and create (smaller) ob structure:
46 !--------------------------------------------------------------------------
47 call da_fill_obs_structures_chem_sfc(iv, ob)
49 if (trace_use) call da_trace_exit("da_setup_obs_structures_chem_sfc")
51 end subroutine da_setup_obs_structures_chem_sfc