Merge remote-tracking branch 'origin/release-v4.5.2'
[WRF.git] / var / da / da_ssmi / da_transform_xtospeed_lin.inc
blob5ade1fe703f7626384cfb29fc32f261fbf2b0c56
1 subroutine da_transform_xtospeed_lin(TGL_speed,U,V,TGL_u,TGL_v)
3    !----------------------------------------------------------------------------
4    ! Purpose: Convert (U-V in m/s) components into wind speed (Speed in m/s)
5    !----------------------------------------------------------------------------
7    implicit none
9    real, intent(out) :: TGL_speed
10    real, intent(in)  :: U,V
11    real, intent(in)  :: TGL_u,TGL_v
13    real :: speed
15    if (trace_use) call da_trace_entry("da_transform_xtospeed_lin")
17    speed = sqrt(U*U + V*V + 1.0e-6)
19    TGL_speed = (U*TGL_u + V*TGL_v)/speed
21    if (trace_use) call da_trace_exit("da_transform_xtospeed_lin")
23 end subroutine da_transform_xtospeed_lin