We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40ff8d3 commit 48deab9Copy full SHA for 48deab9
earthkit/meteo/solar/__init__.py
@@ -211,8 +211,8 @@ def cos_solar_zenith_angle_integrated(
211
def incoming_solar_radiation(date):
212
# To be replaced with improved formula
213
(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
+ angle = julian_day(date) / DAYS_PER_YEAR * np.pi * 2
+ return np.cos(angle) * a + b
216
217
218
def toa_incident_solar_radiation(
0 commit comments