1 subroutine da_fill_obs_structures_radar(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 ! 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_radar")
21 !---------------------------------------------------------------------------
22 ! Initialise obs error factors (which will be overwritten in use_obs_errfac)
23 !---------------------------------------------------------------------------
25 iv % radar_ef_rv = 1.0
26 iv % radar_ef_rf = 1.0
28 !----------------------------------------------------------------------
29 ! [1.0] Allocate innovation vector and observation structures:
30 !----------------------------------------------------------------------
31 call da_allocate_y_radar(iv, ob)
33 !----------------------------------------------------------------------
34 ! [2.0] Transfer observations:
35 !----------------------------------------------------------------------
37 ! [2.18] Transfer radar obs:
39 if (iv%info(radar)%nlocal > 0) then
40 do n = 1, iv%info(radar)%nlocal
41 do k = 1, iv%info(radar)%levels(n)
42 ! Copy observation variables:
43 !ob % radar(n) % rv(k) = iv % radar(n) % rv(k) % inv
44 !ob % radar(n) % rf(k) = iv % radar(n) % rf(k) % inv
45 if(iv % radar(n) % rv(k) % qc-missing_data>1.0) then
46 ob % radar(n) % rv(k) = iv % radar(n) % rv(k) % inv * radar_rv_rscl
48 if(iv % radar(n) % rf(k) % qc-missing_data>1.0) then
49 ob % radar(n) % rf(k) = iv % radar(n) % rf(k) % inv * radar_rf_rscl
55 if (trace_use) call da_trace_exit("da_fill_obs_structures_radar")
57 end subroutine da_fill_obs_structures_radar