updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / da / da_radar / da_radial_velocity_lin.inc
blob3f8cf251c6b9dc22e2599d32922f23557e590103
1 subroutine da_radial_velocity_lin(rv,p,u,v,w,qrn,ps,x,y,z,qrn9,rho)
3    !-----------------------------------------------------------------------
4    ! Purpose: Tangent linear of da_radial_velocity
5    ! History:
6    !    08/2017 - bug fix for Vt (Siou-Ying Jiang, CWB, Taiwan)
7    !-----------------------------------------------------------------------
9    implicit none
11    real, intent(in)  :: x, y, z
12    real, intent(in)  :: p, u, v, w, qrn, ps
13    real, intent(in)  :: qrn9
14    real, intent(in)  :: rho
15    real, intent(out) :: rv
17    real    :: r, alpha, vt
18    real    :: qrrc
19    real    :: qrn_g, qrn9_g
21    qrn_g = qrn *1000. ! kg/kg -> g/kg
22    qrn9_g= qrn9*1000. ! kg/kg -> g/kg
23    qrrc = 0.01        ! g/kg
24    vt = 0.0
26    if (trace_use) call da_trace_entry("da_radial_velocity_lin")
28    r     = sqrt(x*x+y*y+z*z)
29    alpha = (ps/p)**0.4
31    if (qrn9_g <= qrrc)then
32       vt=0.0
33    else
34       vt=0.675*alpha*qrn9_g**(-0.875)*qrn_g*rho**0.125
35    end if
37    rv = u*x+v*y+(w-vt)*z
38    rv = rv/r
40    if (trace_use) call da_trace_exit("da_radial_velocity_lin")
42 end subroutine da_radial_velocity_lin