NCEPLIBS-w3emc
2.12.0
Loading...
Searching...
No Matches
w3fa13.f
Go to the documentation of this file.
1
C> @file
2
C> @brief Computes Trig Functions
3
C> @author Joe Sela @date 1980-11-21
4
5
C> Computes trig functions used in 2.5 by 2.5 lat,lon
6
C> mapping routines. w3fa13() must be called at least once before
7
C> calls to w3ft08(), w3ft09(), w3ft10(), w3ft11().
8
C>
9
C> Program history log:
10
C> - Joe Sela 1980-11-21
11
C> - Ralph Jones 1984-06-01 Change to vs fortran
12
C>
13
C> @param[out] TRIGS 216 trig values, used by subroutine w3fa12().
14
C> @param[out] RCOS 37 colatitudes used by subroutines w3ft09() ,w3ft11()
15
C>
16
C> @author Joe Sela @date 1980-11-21
17
SUBROUTINE
w3fa13
(TRIGS,RCOS)
18
C
19
REAL
RCOS(*)
20
REAL
TRIGS(*)
21
C
22
SAVE
23
C
24
DATA
pi /3.14159265358979323846/
25
C
26
n = 144
27
mode = 3
28
drad = 2.5*pi/180.
29
C
30
DO
100 lat = 2,37
31
arg = (lat-1)*drad
32
rcos(lat) = 1./sin(arg)
33
100
CONTINUE
34
C
35
rcos(1) = 77777.777
36
imode = iabs(mode)
37
nn = n
38
IF
(imode.GT.1.AND.imode.LT.6) nn = n/2
39
angle = 0.0
40
del = (pi+pi)/float(nn)
41
l = nn+nn
42
C
43
DO
200 i = 1,l,2
44
trigs(i) = cos(angle)
45
trigs(i+1) = sin(angle)
46
angle = angle+del
47
200
CONTINUE
48
C
49
IF
(imode.EQ.1)
RETURN
50
IF
(imode.EQ.8)
RETURN
51
angle = 0.0
52
del = 0.5*del
53
nh = (nn+1)/2
54
l = nh+nh
55
la = nn+nn
56
C
57
DO
300 i = 1,l,2
58
trigs(la+i) = cos(angle)
59
trigs(la+i+1) = sin(angle)
60
angle = angle+del
61
300
CONTINUE
62
C
63
IF
(imode.LE.3)
RETURN
64
del = 0.5*del
65
angle = del
66
la = la+nn
67
C
68
DO
400 i = 2,nn
69
trigs(la+i) = 2.0*sin(angle)
70
angle = angle+del
71
400
CONTINUE
72
C
73
RETURN
74
END
w3fa13
subroutine w3fa13(trigs, rcos)
Computes trig functions used in 2.5 by 2.5 lat,lon mapping routines.
Definition
w3fa13.f:18
src
w3fa13.f
Generated by
1.9.8