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    !---------------------------------------------------------------------------
13    ! [1.0] Calculate saturation specific humidity:
14    !---------------------------------------------------------------------------
15 
16    call da_tp_to_qs( t, p, es, qs )
17    
18    !---------------------------------------------------------------------------
19    ! [2.0] Calculate relative humidity:
20    !---------------------------------------------------------------------------
21 
22    rh = 100.0 * q / qs
23 
24 end subroutine da_tpq_to_rh
25 
26