We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents c2ae8af + d115063 commit 5455a9aCopy full SHA for 5455a9a
src/solposx/solarposition/noaa.py
@@ -68,6 +68,12 @@ def noaa(times, latitude, longitude, delta_t=67.0):
68
julian_date = times_utc.to_julian_date()
69
jc = (julian_date - 2451545) / 36525
70
71
+ # Allow for latitude of -90 and 90 on Ubunty and MacOS
72
+ if latitude == 90:
73
+ latitude += - 1e-6
74
+ elif latitude == - 90:
75
+ latitude += 1e-6
76
+
77
if delta_t is None:
78
delta_t = spa.calculate_deltat(times_utc.year, times_utc.month)
79
tests/test_solarposition.py
@@ -142,9 +142,9 @@ def expected_noaa():
142
[34.92392895, 34.94698595, 55.07607105, 55.05301405, 169.38094302],
143
[18.63438988, 18.68174893, 71.36561012, 71.31825107, 234.19290241],
144
[35.75618186, 35.77854313, 54.24381814, 54.22145687, 197.67357003],
145
- [-9.52911488, -9.49473872, 99.52911488, 99.49473872, 336.8166928],
+ [-9.52911488, -9.49473872, 99.52911488, 99.49473872, 201.19219097],
146
[66.85423515, 66.8611327, 23.14576485, 23.1388673, 245.09172279],
147
- [9.52911488, 9.62132546, 80.47088512, 80.37867454, np.nan],
+ [9.52911488, 9.62132546, 80.47088512, 80.37867454, 338.80780907],
148
[50.10765752, 50.12113671, 39.89234248, 39.87886329, 326.22893168],
149
[35.36265374, 35.38534047, 54.63734626, 54.61465953, 175.39359304],
150
[-53.23987161, -53.23556094, 143.23987161, 143.23556094, 18.65415239],
0 commit comments