Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
METRo projects
metro
Commits
0e75a23d
Commit
0e75a23d
authored
Dec 11, 2007
by
Miguel Tremblay
Browse files
Cosmetic changes.
parent
914ec259
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/frontend/executable_module/metro_preprocess_fsint2.py
View file @
0e75a23d
...
...
@@ -135,9 +135,10 @@ class Metro_preprocess_fsint2(Metro_preprocess):
wf_interpolated_data
):
"""
Name: __set_theoretical_flux
Parameters:[I] metro_data wf_controlled_data : controlled data. Read-only
[I] metro_data wf_interpolated_data : container of the interpolated
data.
Parameters:[I] metro_data wf_controlled_data : controlled data.
Read-only
[I] metro_data wf_interpolated_data : container of the
interpolated data.
Returns: None
Functions Called: wf_controlled_data.get_matrix_col
...
...
@@ -145,7 +146,6 @@ class Metro_preprocess_fsint2(Metro_preprocess):
wf_controlled_data.append_matrix_col
metro_util.interpolate
Description: The flux value of the forecast are calculated from the
position of the earth around the sun.
...
...
@@ -205,11 +205,12 @@ class Metro_preprocess_fsint2(Metro_preprocess):
nCurrentHour
=
(
naTimeHour
[
i
])
%
24
# atmospheric forecast is before the sunrise
# or after the sunset
if
self
.
__in_the_dark
(
nCurrentHour
,
fSunriseTimeUTC
,
fSunsetTimeUTC
,):
if
self
.
__in_the_dark
(
nCurrentHour
,
fSunriseTimeUTC
,
\
fSunsetTimeUTC
,):
naSft
[
i
]
=
0
else
:
fDh
=
nCurrentHour
*
pi
/
12.0
+
\
self
.
fLon
*
pi
/
180
.
-
pi
+
self
.
fEot
# Position of the sun around the earth, in radian
fDh
=
pi
*
(
nCurrentHour
/
12.0
+
self
.
fLon
/
180
-
1
)
+
self
.
fEot
fCosz
=
self
.
tDeclsc
[
0
]
+
\
self
.
tDeclsc
[
1
]
*
cos
(
fDh
)
naSft
[
i
]
=
max
(
0.0
,
fCosz
)
*
self
.
fR0r
...
...
@@ -273,7 +274,7 @@ class Metro_preprocess_fsint2(Metro_preprocess):
Returns: tuple (double fEot, double fR0r, tuple tDeclsc)
dEot: Correction for the equation of time
dEot: Correction for the equation of time
dR0r: Corrected solar constant for the equation of time
tDeclsc: Declinaison
...
...
@@ -297,7 +298,7 @@ class Metro_preprocess_fsint2(Metro_preprocess):
# see http://www.python.org/doc/current/lib/module-time.html
tDate
=
time
.
gmtime
(
nTime
)
# Julian date is the 7th argument
fJulianDate
=
tDate
[
7
]
+
tDate
[
3
]
/
24.0
fJulianDate
=
tDate
[
7
]
+
tDate
[
3
]
/
24.0
# Check if it is a leap year
if
(
calendar
.
isleap
(
tDate
[
0
])):
fDivide
=
366.0
...
...
@@ -331,7 +332,8 @@ class Metro_preprocess_fsint2(Metro_preprocess):
Functions Called: cos, sin
Description:
Description: Statement function that calculates the variation of the
solar constant as a function of the julian day. (dAlf, in radians)
Notes: <other information, if any>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment