Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=60", "setuptools-scm>=8.0", "wheel"]

[project]
name = "sun-angles"
version = "1.5.0"
version = "1.6.0"
description = "calculates solar zenith and azimuth and daylight hours"
readme = "README.md"
authors = [
Expand All @@ -16,7 +16,7 @@ classifiers = [
dependencies = [
"numpy",
"rasters",
"solar-apparent-time>=1.4.0"
"solar-apparent-time>=1.5.3"
]

requires-python = ">=3.10"
Expand Down
6 changes: 4 additions & 2 deletions sun_angles/calculate_daylight.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from dateutil import parser
import pandas as pd

from solar_apparent_time import solar_day_of_year_for_longitude
from solar_apparent_time import calculate_solar_day_of_year

from .SHA_deg_from_DOY_lat import SHA_deg_from_DOY_lat
from .daylight_from_SHA import daylight_from_SHA
Expand Down Expand Up @@ -95,8 +95,10 @@ def calculate_daylight(
if lon is None:
raise ValueError("Longitude (lon) must be provided when using time_UTC to infer day_of_year.")

day_of_year = solar_day_of_year_for_longitude(
day_of_year = calculate_solar_day_of_year(
time_UTC=time_UTC,
geometry=geometry,
lat=lat,
lon=lon
)

Expand Down