1 subroutine da_obs_proc_station(obs,fm,uvq_direct)
3 !-----------------------------------------------------------------------
4 ! Purpose: Processing obs data read in at a station:
6 ! (1) Surface correction
8 ! (3) Missing data check
9 !-----------------------------------------------------------------------
13 type (multi_level_type), intent(inout) :: obs
15 logical,optional :: uvq_direct
16 real :: po, to, rho, es, qs, qvo
19 if (trace_use_dull) call da_trace_entry("da_obs_proc_station")
21 do i = 1, obs % info % levels
22 !-----------------------------------------------------------------------
23 ! Gross check for t, p & q
24 !-----------------------------------------------------------------------
26 if (obs%each(i)%t %inv < 75.0 .or. obs%each(i)%t %inv > 350.0 ) then
27 obs%each(i)%t %inv = missing_r
28 obs%each(i)%t %qc = missing
30 if (obs%each(i)%p %inv <= 0.0 .or. obs%each(i)%p %inv > 110000.0) then
31 obs%each(i)%p %inv = missing_r
32 obs%each(i)%p %qc = missing
34 if (obs%each(i)%rh%inv < 0.0) then
35 obs%each(i)%rh%inv = missing_r
36 obs%each(i)%rh%qc = missing
39 if(.not. (present(uvq_direct) .and. uvq_direct) .and. fm.ne.161) then
40 po = obs % each(i) % p % inv
41 to = obs % each(i) % t % inv
42 rho = obs % each(i) % rh % inv
44 if (ob_format == ob_format_ascii) then ! Calculate q if possible:
45 if (abs(po - missing_r) > 1.0 .and. abs(to - missing_r) > 1.0 .and. &
46 abs(rho- missing_r) > 1.0) then
48 call da_tp_to_qs(to, po, es, qs)
53 qvo = rho * qs / 100.0
59 obs % each(i) % q % inv = qvo
60 obs % each(i) % q % qc = obs % each(i) % rh % qc
61 obs % each(i) % q % error = obs % each(i) % rh % error
64 obs % each(i) % q % inv = obs % each(i) % rh % inv
65 obs % each(i) % q % qc = obs % each(i) % rh % qc
66 obs % each(i) % q % error = obs % each(i) % rh % error
69 if (trace_use_dull) call da_trace_exit("da_obs_proc_station")
71 end subroutine da_obs_proc_station