Last change
on this file since 374 was
135,
checked in by aslmd, 14 years ago
|
CHANGEMENT ARBORESCENCE ETAPE 2 -- NON COMPLET
|
File size:
2.1 KB
|
Line | |
---|
1 | SUBROUTINE mufract(jjm,pdecli, plat, pmu, pfract) |
---|
2 | IMPLICIT NONE |
---|
3 | c |
---|
4 | c======================================================================= |
---|
5 | c |
---|
6 | c Calcul of equivalent solar angle and and fraction of day without |
---|
7 | c diurnal cycle. |
---|
8 | c |
---|
9 | c parmeters : |
---|
10 | c ----------- |
---|
11 | c |
---|
12 | c Input : |
---|
13 | c ------- |
---|
14 | c jjm number of points |
---|
15 | c pdecli solar declinaison |
---|
16 | c plat(jjm) latitude |
---|
17 | c |
---|
18 | c Output : |
---|
19 | c -------- |
---|
20 | c pmu(jjm) equivalent cosinus of the solar angle |
---|
21 | c pfract(jjm) fractionnal day |
---|
22 | c |
---|
23 | c |
---|
24 | c======================================================================= |
---|
25 | c |
---|
26 | c----------------------------------------------------------------------- |
---|
27 | c |
---|
28 | c 0. Declarations : |
---|
29 | c ----------------- |
---|
30 | c |
---|
31 | c Arguments : |
---|
32 | c ----------- |
---|
33 | |
---|
34 | INTEGER jjm |
---|
35 | REAL plat(jjm),pmu(jjm), pfract(jjm) |
---|
36 | REAL pdecli |
---|
37 | c |
---|
38 | c Local variables : |
---|
39 | c ----------------- |
---|
40 | |
---|
41 | INTEGER j |
---|
42 | REAL pi |
---|
43 | REAL z,cz,sz,tz,phi,cphi,sphi,tphi |
---|
44 | REAL ap,a,t,b |
---|
45 | c |
---|
46 | c======================================================================= |
---|
47 | c |
---|
48 | pi = 4. * atan(1.0) |
---|
49 | z = pdecli |
---|
50 | cz = cos (z*pi/180.) |
---|
51 | sz = sin (z*pi/180.) |
---|
52 | c |
---|
53 | DO 20 j = 1, jjm |
---|
54 | c |
---|
55 | phi = plat(j) |
---|
56 | cphi = cos(phi) |
---|
57 | if (cphi.le.1.e-9) cphi=1.e-9 |
---|
58 | sphi = sin(phi) |
---|
59 | tphi = sphi / cphi |
---|
60 | b = cphi * cz |
---|
61 | t = -tphi * sz / cz |
---|
62 | a = 1.0 - t*t |
---|
63 | ap = a |
---|
64 | IF(t.eq.0.) THEN |
---|
65 | t=0.5*pi |
---|
66 | ELSE |
---|
67 | IF (a.lt.0.) a = 0. |
---|
68 | t = sqrt(a) / t |
---|
69 | IF (t.lt.0.) THEN |
---|
70 | t = -atan (-t) + pi |
---|
71 | ELSE |
---|
72 | t = atan(t) |
---|
73 | ENDIF |
---|
74 | ENDIF |
---|
75 | pmu(j) = (sphi*sz*t) / pi + b*sin(t)/pi |
---|
76 | pfract(j) = t / pi |
---|
77 | IF (ap .lt.0.) THEN |
---|
78 | pmu(j) = sphi * sz |
---|
79 | pfract(j) = 1.0 |
---|
80 | ENDIF |
---|
81 | IF (pmu(j).le.0.0) pmu(j) = 0.0 |
---|
82 | pmu(j) = pmu(j) / pfract(j) |
---|
83 | IF (pmu(j).eq.0.) pfract(j) = 0. |
---|
84 | c |
---|
85 | 20 CONTINUE |
---|
86 | c |
---|
87 | RETURN |
---|
88 | END |
---|
89 | c |
---|
90 | c* end of mufract |
---|
91 | c======================================================================= |
---|
92 | c |
---|
Note: See
TracBrowser
for help on using the repository browser.