-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathls.c
53 lines (34 loc) · 1.4 KB
/
ls.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/*******************************************************************/
/* ls.c ->void LS(in,out,shape) */
/* Jing M. Chen, [email protected] */
/* Sylvain G. Leblanc [email protected] */
/*******************************************************************/
/* This subroutine computes Cv, Cs, Lo_90, mu */
/* Latest update January 2004 */
/*******************************************************************/
# include <stdio.h>
# include <math.h>
# include "data.h"
void LS(in_p,out_p,shape)
struct PARAMETER in_p;
struct RESULT *out_p;
int shape;
{
double LAI_HOT_SPOT =1;
out_p->mu = in_p.LAI*in_p.B/(in_p.D*out_p->V);
out_p->Ls=out_p->Gs*LAI_HOT_SPOT/cos(in_p.SZA);
out_p->H = 1./(out_p->mu);
out_p->lambda_m = out_p->H*tan(out_p->xi) ;
if(shape==1)
{
out_p->Lo_90 = out_p->mu*PI*in_p.R*(in_p.Hb+out_p->Hc/3.)/(2*in_p.Hb+out_p->Hc);
out_p->Cs = out_p->Gs*out_p->Ss*out_p->mu/out_p->Lo_90;
out_p->Cv = out_p->Gv*out_p->Sv*out_p->mu/out_p->Lo_90; /*test 5 Feb 1999 */
}
if(shape==2)
{
out_p->Lo_90 = out_p->mu*in_p.R*4/3.; /* January 12, 2004 */
out_p->Cs = out_p->Gs*out_p->Ss*out_p->mu/out_p->Lo_90;
out_p->Cv = out_p->Gv*out_p->Sv*out_p->mu/out_p->Lo_90;
}
}