Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

28% difference in irradiance, shouldn't poles be symmetric? #96

Open
jh-deepmap opened this issue Oct 30, 2018 · 3 comments
Open

28% difference in irradiance, shouldn't poles be symmetric? #96

jh-deepmap opened this issue Oct 30, 2018 · 3 comments

Comments

@jh-deepmap
Copy link

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.

Fri Dec 21 12:00:00 2018 +0000 Winter solstice at 80S: 33.4563051296 deg 955.544296665 W/m^2 distance= 0.983705043957
Thu Jun 21 12:00:00 2018 +0000 Summer solstice at 80N: 33.4587699932 deg 746.293140683 W/m^2 distance= 1.01623557581

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:

from pysolar import solar
from pysolar import solartime
import datetime

def get_jme(when):
  jde = solartime.get_julian_ephemeris_day(when)
  jce = solartime.get_julian_ephemeris_century(jde)
  jme = solartime.get_julian_ephemeris_millennium(jce)
  return jme

winter_solstice = datetime.datetime(2018, 12, 21, 12, 0, tzinfo=datetime.timezone.utc)
solar_angle = solar.get_altitude(-80, 0.0, winter_solstice)
irradiance = solar.radiation.get_radiation_direct(winter_solstice, solar_angle)
distance = solar.get_sun_earth_distance(get_jme(winter_solstice))

print(winter_solstice.strftime("%c %z"), "Winter solstice at 80S:", solar_angle, "deg", irradiance, "W/m^2", "distance=", distance)

summer_solstice = datetime.datetime(2018, 6, 21, 12, 0, tzinfo=datetime.timezone.utc)
solar_angle = solar.get_altitude(80, 0.0, summer_solstice)
irradiance = solar.radiation.get_radiation_direct(summer_solstice, solar_angle)
distance = solar.get_sun_earth_distance(get_jme(summer_solstice))

print(summer_solstice.strftime("%c %z"), "Summer solstice at 80N:", solar_angle, "deg", irradiance, "W/m^2", "distance=", distance)
@pingswept
Copy link
Owner

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

@jh-deepmap
Copy link
Author

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

@jh-deepmap
Copy link
Author

Adding debug prints to that function:

def get_radiation_direct(when, altitude_deg):
# from Masters, p. 412
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants