Open jh-deepmap opened 5 years ago
That does seem weird. To investigate more, I'd recommend looking at the elements of get_radiation_direct
, which can be found here: https://github.com/pingswept/pysolar/blob/master/pysolar/radiation.py#L43
winter_solstice = datetime.datetime(2018, 12, 21, 12, 0, tzinfo=datetime.timezone.utc) summer_solstice = datetime.datetime(2018, 6, 21, 12, 0, tzinfo=datetime.timezone.utc) radiation_direct = radiation.get_radiation_direct(winter_solstice, -80) print(radiation_direct) radiation_direct = radiation.get_radiation_direct(summer_solstice, -80) print(radiation_direct) radiation_direct = radiation.get_radiation_direct(winter_solstice, 80) print(radiation_direct) radiation_direct = radiation.get_radiation_direct(summer_solstice, 80) print(radiation_direct)
Yields:
0.0 0.0 1069.24796579 880.467313503
Adding debug prints to that function:
def get_radiation_direct(when, altitude_deg):
if int(altitude_deg) <= 0:
return 0.0
day = when.utctimetuple().tm_yday
print("Day:", day)
flux = get_apparent_extraterrestrial_flux(day)
print("Flux:", flux)
optical_depth = get_optical_depth(day)
print("Depth:", optical_depth)
air_mass_ratio = get_air_mass_ratio(altitude_deg)
print("Air mass ratio:", air_mass_ratio)
return flux * math.exp(-1 * optical_depth * air_mass_ratio)
Day: 355 Flux: 1233.59798527 Depth: 0.1408073447 Air mass ratio: 1.01542661189 1069.24796579 Day: 172 Flux: 1086.52897313 Depth: 0.20709587356 Air mass ratio: 1.01542661189 880.467313503
When I look at 80N 0E at the summer solstice vs 80S 0E at the winter solstice, I get 746 vs 955 W/m^2, which seems weird.
I iterated around those times and verified that the sun is at the same elevation and that it's the local maximum, and even checked the earth-sun distance. Neither of those seem like they should account for such a large difference in irradiance. Are you modeling the ozone hole or something?
Test code: