Skip to content

Commit 48deab9

Browse files
committed
fix tisr
1 parent 40ff8d3 commit 48deab9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

earthkit/meteo/solar/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ def cos_solar_zenith_angle_integrated(
211211
def incoming_solar_radiation(date):
212212
# To be replaced with improved formula
213213
(a, b) = (165120.0, 4892416.0)
214-
time_delta = (date - datetime.datetime(2020, 1, 1)).total_seconds() / 3600
215-
return np.cos(time_delta / (24 * DAYS_PER_YEAR) * 2 * np.pi) * a + b
214+
angle = julian_day(date) / DAYS_PER_YEAR * np.pi * 2
215+
return np.cos(angle) * a + b
216216

217217

218218
def toa_incident_solar_radiation(

0 commit comments

Comments
 (0)