da_tpq_to_rh.inc
References to this file elsewhere.
1 subroutine da_tpq_to_rh( t, p, q, es, qs, rh )
2
3 !---------------------------------------------------------------------------
4 ! Purpose: Convert T/p/q to relative humidity rh.
5 !---------------------------------------------------------------------------
6
7 implicit none
8
9 real, intent(in) :: t, p, q
10 real, intent(out) :: es, qs, rh
11
12 if (trace_use_dull) call da_trace_entry("da_tpq_to_rh")
13
14 !---------------------------------------------------------------------------
15 ! [1.0] Calculate saturation specific humidity:
16 !---------------------------------------------------------------------------
17
18 call da_tp_to_qs( t, p, es, qs )
19
20 !---------------------------------------------------------------------------
21 ! [2.0] Calculate relative humidity:
22 !---------------------------------------------------------------------------
23
24 rh = 100.0 * q / qs
25
26 if (trace_use_dull) call da_trace_exit("da_tpq_to_rh")
27
28 end subroutine da_tpq_to_rh
29
30