-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxi.c
38 lines (24 loc) · 865 Bytes
/
xi.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*******************************************************************/
/* xi.c ->double XI(sza,vza,phi) */
/* Jing M. Chen, [email protected] */
/* Sylvain G. Leblanc [email protected] */
/*******************************************************************/
/* Subroutine thatcalculte the scattering angle (phase angle) */
/* Latest update November 30,1995 */
/*******************************************************************/
# include <math.h>
# include <stdio.h>
double XI(sza,vza,phi)
double sza,vza,phi;
{
double Uy,Uz;
double Vy,Vz;
double answer;
Uy = sin(sza);
Uz = cos(sza);
Vy = sin(vza)*cos(phi);
Vz = cos(vza);
answer = (Uy*Vy+Uz*Vz);
answer = acos(answer);
return answer ;
}