Last change
on this file since 2938 was
2696,
checked in by kanani, 7 years ago
|
Merge of branch palm4u into trunk
|
File size:
690 bytes
|
Line | |
---|
1 | SUBROUTINE Update_SUN() |
---|
2 | |
---|
3 | IMPLICIT NONE |
---|
4 | INCLUDE 'KPP_ROOT_Parameters.h' |
---|
5 | INCLUDE 'KPP_ROOT_Global.h' |
---|
6 | |
---|
7 | KPP_REAL SunRise, SunSet |
---|
8 | KPP_REAL Thour, Tlocal, Ttmp, PI |
---|
9 | PARAMETER (PI = 3.14159265358979d0) |
---|
10 | |
---|
11 | SunRise = 4.5 |
---|
12 | SunSet = 19.5 |
---|
13 | Thour = TIME/3600. |
---|
14 | Tlocal = Thour - (INT(Thour)/24)*24 |
---|
15 | |
---|
16 | IF ((Tlocal.GE.SunRise).AND.(Tlocal.LE.SunSet)) THEN |
---|
17 | Ttmp = (2.0*Tlocal-SunRise-SunSet)/(SunSet-SunRise) |
---|
18 | IF (Ttmp.GT.0) THEN |
---|
19 | Ttmp = Ttmp*Ttmp |
---|
20 | ELSE |
---|
21 | Ttmp = -Ttmp*Ttmp |
---|
22 | END IF |
---|
23 | SUN = ( 1.0 + COS(PI*Ttmp) )/2.0 |
---|
24 | ELSE |
---|
25 | SUN = 0.0 |
---|
26 | END IF |
---|
27 | |
---|
28 | RETURN |
---|
29 | END |
---|
30 | |
---|
Note: See
TracBrowser
for help on using the repository browser.