1 | subroutine solang ( kgrid,psilon,pcolon,psilat,pcolat, |
---|
2 | & ptim1,ptim2,ptim3,pmu0,pfract ) |
---|
3 | IMPLICIT NONE |
---|
4 | |
---|
5 | C |
---|
6 | C**** *LW* - ORGANIZES THE LONGWAVE CALCULATIONS |
---|
7 | C |
---|
8 | C PURPOSE. |
---|
9 | C -------- |
---|
10 | C CALCULATES THE SOLAR ANGLE FOR ALL THE POINTS OF THE GRID |
---|
11 | C |
---|
12 | C** INTERFACE. |
---|
13 | C ---------- |
---|
14 | C SUBROUTINE SOLANG ( KGRID ) |
---|
15 | C |
---|
16 | C EXPLICIT ARGUMENTS : |
---|
17 | C -------------------- |
---|
18 | C ==== INPUTS === |
---|
19 | C |
---|
20 | C PSILON(KGRID) : SINUS OF THE LONGITUDE |
---|
21 | C PCOLON(KGRID) : COSINUS OF THE LONGITUDE |
---|
22 | C PSILAT(KGRID) : SINUS OF THE LATITUDE |
---|
23 | C PCOLAT(KGRID) : COSINUS OF THE LATITUDE |
---|
24 | C PTIM1 : SIN(DECLI) |
---|
25 | C PTIM2 : COS(DECLI)*COS(TIME) |
---|
26 | C PTIM3 : SIN(DECLI)*SIN(TIME) |
---|
27 | C |
---|
28 | C ==== OUTPUTS === |
---|
29 | C |
---|
30 | C PMU0 (KGRID) : SOLAR ANGLE |
---|
31 | C PFRACT(KGRID) : DAY FRACTION OF THE TIME INTERVAL |
---|
32 | C |
---|
33 | C IMPLICIT ARGUMENTS : NONE |
---|
34 | C -------------------- |
---|
35 | C |
---|
36 | C METHOD. |
---|
37 | C ------- |
---|
38 | C |
---|
39 | C EXTERNALS. |
---|
40 | C ---------- |
---|
41 | C |
---|
42 | C NONE |
---|
43 | C |
---|
44 | C REFERENCE. |
---|
45 | C ---------- |
---|
46 | C |
---|
47 | C RADIATIVE PROCESSES IN METEOROLOGIE AND CLIMATOLOGIE |
---|
48 | C PALTRIDGE AND PLATT |
---|
49 | C |
---|
50 | C AUTHOR. |
---|
51 | C ------- |
---|
52 | C FREDERIC HOURDIN |
---|
53 | C |
---|
54 | C MODIFICATIONS. |
---|
55 | C -------------- |
---|
56 | C ORIGINAL :90-01-14 |
---|
57 | C 92-02-14 CALCULATIONS DONE THE ENTIER GRID (J.Polcher) |
---|
58 | C----------------------------------------------------------------------- |
---|
59 | C |
---|
60 | C ------------------------------------------------------------------ |
---|
61 | |
---|
62 | C----------------------------------------------------------------------- |
---|
63 | C |
---|
64 | C* 0.1 ARGUMENTS |
---|
65 | C --------- |
---|
66 | C |
---|
67 | INTEGER kgrid |
---|
68 | REAL ptim1,ptim2,ptim3 |
---|
69 | REAL psilon(kgrid),pcolon(kgrid),pmu0(kgrid),pfract(kgrid) |
---|
70 | REAL psilat(kgrid), pcolat(kgrid) |
---|
71 | C |
---|
72 | INTEGER jl |
---|
73 | REAL ztim1,ztim2,ztim3 |
---|
74 | C------------------------------------------------------------------------ |
---|
75 | C------------------------------------------------------------------------ |
---|
76 | C------------------------------------------------------------------------ |
---|
77 | C |
---|
78 | C------------------------------------------------------------------------ |
---|
79 | C |
---|
80 | C* 1. INITIALISATION |
---|
81 | C -------------- |
---|
82 | C |
---|
83 | 100 CONTINUE |
---|
84 | C |
---|
85 | DO jl=1,kgrid |
---|
86 | pmu0(jl)=0. |
---|
87 | pfract(jl)=0. |
---|
88 | ENDDO |
---|
89 | C |
---|
90 | C* 1.1 COMPUTATION OF THE SOLAR ANGLE |
---|
91 | C ------------------------------ |
---|
92 | C |
---|
93 | DO jl=1,kgrid |
---|
94 | ztim1=psilat(jl)*ptim1 |
---|
95 | ztim2=pcolat(jl)*ptim2 |
---|
96 | ztim3=pcolat(jl)*ptim3 |
---|
97 | pmu0(jl)=ztim1+ztim2*pcolon(jl)+ztim3*psilon(jl) |
---|
98 | ENDDO |
---|
99 | C |
---|
100 | C* 1.2 DISTINCTION BETWEEN DAY AND NIGHT |
---|
101 | C --------------------------------- |
---|
102 | C |
---|
103 | DO jl=1,kgrid |
---|
104 | IF (pmu0(jl).gt.0.) THEN |
---|
105 | pfract(jl)=1. |
---|
106 | pmu0(jl)=sqrt(1224.*pmu0(jl)*pmu0(jl)+1.)/35. |
---|
107 | ELSE |
---|
108 | pmu0(jl)=0. |
---|
109 | pfract(jl)=0. |
---|
110 | ENDIF |
---|
111 | ENDDO |
---|
112 | C |
---|
113 | RETURN |
---|
114 | END |
---|