NCEPLIBS-w3emc
2.12.0
Loading...
Searching...
No Matches
w3fc05.f
Go to the documentation of this file.
1
C> @file
2
C> @brief Earth U,V wind components to dir and spd.
3
C> @author John Stackpole @date 1981-12-30
4
5
C> Given the true (Earth oriented) wind components
6
C> compute the wind direction and speed.
7
C> Input winds at the pole are assumed to follow the WMO
8
C> conventions, with the output direction computed in accordance
9
C> with WMO standards for reporting winds at the pole.
10
C> (see office note 241 for WMO definition.)
11
C>
12
C> Program history log:
13
C> - John Stackpole 1981-12-30
14
C> - P. Chase 1988-10-19 Allow output values to overlay input
15
C> - Ralph Jones 1991-03-05 Changes for cray cft77 fortran
16
C> - Dennis Keyser 1992-10-21 Added 1.e-3 to direction to allow truncation
17
C> to nearest whole degree to be correct (keeps agreement between cray & nas versions)
18
C>
19
C> @param[in] U REAL Earth-oriented U-component.
20
C> @param[in] V REAL Earth-oriented V-component.
21
C> @param[out] DIR REAL Wind direction, degrees. Values will
22
C> be from 0 to 360 inclusive.
23
C> @param[out] SPD REAL Wind speed in same units as input.
24
C>
25
C> @note If speed is less than 1e-10 then direction will be set to zero.
26
C>
27
C> @author John Stackpole @date 1981-12-30
28
SUBROUTINE
w3fc05
(U, V, DIR, SPD)
11700000
29
C
30
C VARIABLES.....
31
C
32
REAL
U, V, DIR, SPD, XSPD
33
C
34
C CONSTANTS.....
35
C
36
DATA
spdtst/1.0e-10/
37
DATA
rtod /57.2957795/
38
DATA
dchalf/180.0/
39
C
40
xspd = sqrt(u * u + v * v)
41
IF
(xspd .LT. spdtst)
THEN
42
dir = 0.0
43
ELSE
44
dir = atan2(u,v) * rtod + dchalf + 1.e-3
45
ENDIF
46
spd = xspd
47
RETURN
48
END
w3fc05
subroutine w3fc05(u, v, dir, spd)
Given the true (Earth oriented) wind components compute the wind direction and speed.
Definition
w3fc05.f:29
src
w3fc05.f
Generated by
1.9.8