1 subroutine da_transform_xtoseasfcwind_lin(grid)
3 !----------------------------------------------------------------------------
4 ! Purpose: Convert (U-V in m/s) components into wind speed (Speed in m/s)
5 !----------------------------------------------------------------------------
9 type (domain), intent(inout) :: grid
11 real :: const, rgh_fac, height
14 if (trace_use) call da_trace_entry("da_transform_xtoseasfcwind_lin")
16 const = log(10.0/0.0001)
22 height = grid%xb%h(i,j,k) - grid%xb%terr(i,j)
23 if (height <= 0.0) then
24 message(1) = "Negative height found"
25 write(unit=message(2),FMT='(2I6,A,F10.2,A,F10.2)') &
26 i,j,' ht = ',grid%xb%h(i,j,k) ,' terr = ',grid%xb%terr(i,j)
27 call da_error(__FILE__,__LINE__,message(1:2))
30 rgh_fac = const/log(height/0.0001) ! roughness = 0.0001
31 grid%xa%speed(i,j) = (grid%xa%u(i,j,k)*grid%xb%u(i,j,k) &
32 + grid%xa%v(i,j,k)*grid%xb%v(i,j,k)) * rgh_fac*rgh_fac / grid%xb%speed(i,j)
36 if (trace_use) call da_trace_exit("da_transform_xtoseasfcwind_lin")
38 end subroutine da_transform_xtoseasfcwind_lin