Skip to content

Commit

Permalink
fix tisr
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Aug 30, 2023
1 parent 40ff8d3 commit 48deab9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions earthkit/meteo/solar/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,8 @@ def cos_solar_zenith_angle_integrated(
def incoming_solar_radiation(date):
# To be replaced with improved formula
(a, b) = (165120.0, 4892416.0)
time_delta = (date - datetime.datetime(2020, 1, 1)).total_seconds() / 3600
return np.cos(time_delta / (24 * DAYS_PER_YEAR) * 2 * np.pi) * a + b
angle = julian_day(date) / DAYS_PER_YEAR * np.pi * 2
return np.cos(angle) * a + b


def toa_incident_solar_radiation(
Expand Down

0 comments on commit 48deab9

Please sign in to comment.