Skip to content

Commit 4ab212c

Browse files
changing function name to UTC_offset_hours_for_longitude
1 parent db15764 commit 4ab212c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

solar_apparent_time/solar_apparent_time.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def solar_to_UTC(time_solar: datetime, lon: float) -> datetime:
3030
"""
3131
return time_solar - timedelta(hours=(np.radians(lon) / np.pi * 12))
3232

33-
def UTC_offset_hours(lon: Union[float, np.ndarray]) -> Union[float, np.ndarray]:
33+
def UTC_offset_hours_for_longitude(lon: Union[float, np.ndarray]) -> Union[float, np.ndarray]:
3434
"""
3535
Calculates the offset in hours from UTC based on the given longitude.
3636
@@ -90,7 +90,7 @@ def solar_day_of_year_for_longitude(time_UTC: datetime, lon: Union[float, np.nda
9090
# Calculate the day of year at the given longitude
9191
DOY_UTC = time_UTC.timetuple().tm_yday
9292
hour_UTC = time_UTC.hour + time_UTC.minute / 60 + time_UTC.second / 3600
93-
offset = UTC_offset_hours(lon)
93+
offset = UTC_offset_hours_for_longitude(lon)
9494
hour_of_day = hour_UTC + offset
9595
DOY = DOY_UTC
9696
# Adjust the day of year if the hour of day is outside the range [0, 24]

0 commit comments

Comments
 (0)