Toggle navigation
Ocean Color Science Software
Jump to content
ocssw
V2022
web
ocssw
ocssw_src
oel_hdf4
libnav
angles.f
Go to the documentation of this file.
1
SUBROUTINE
angles(M,A,B,CN,SN,TN)
2
C VERSION OF 4/2/87
3
C PURPOSE
4
C COMPUTES COS(M*A), SIN(M*A), M*TAN(B) AND STORE VALUES IN
5
C ARRAYS CN, SN, TN
6
C INPUT
7
C M = ORDER OF SPHERICAL HARMONICS TO BE EVALUATED
8
C A = LONGITUDE FROM GREENWICH (RAD)
9
C B = LATITUDE (RAD)
10
C OUTPUT
11
C CN = M-D ARRAY OF COS VALUES
12
C SN = M-D ARRAY OF SIN VALUES
13
C TN = M-D ARRAY OF TAN VALUES
14
C CALLED BY SUBROUTINES
15
C DER
16
C CALL SUBROUTINES
17
C NONE
18
C REFERENCES
19
C JPL EM 312/87-153, 20 APRIL 1987
20
C ANALYSIS
21
C J. H. KWOK - JPL
22
C PROGRAMMER
23
C J. H. KWOK - JPL
24
C PROGRAM MODIFICATIONS
25
C NONE
26
C COMMENTS
27
C
28
IMPLICIT DOUBLE PRECISION
(a-h,o-z)
29
dimension cn(41),sn(41),tn(41)
30
DATA
zero,one,two/0.d0,1.d0,2.d0/
31
cn(1)=one
32
sn(1)=zero
33
tn(1)=zero
34
IF
(m.EQ.0)
RETURN
35
cn(2)=dcos(a)
36
sn(2)=dsin(a)
37
tn(2)=dtan(b)
38
IF
(m.EQ.1)
RETURN
39
DO
100 i=2,m
40
cn(i+1)=two*cn(2)*cn(i)-cn(i-1)
41
sn(i+1)=two*cn(2)*sn(i)-sn(i-1)
42
100 tn(i+1)=tn(2)+tn(i)
43
RETURN
44
END
45