Open kurt-rhee opened 1 week ago
We could also make the solar constant optional, then default to the one recommended by each model? A bit of over-engineering for such small differences, but possibly the best approach to be as accurate as possible with the references.
Many (all?) models were developed with specific values, so it's probably best if they default to those.
Agreed with @echedey-ls and @adriesse that each model should default to the values that they were developed with.
Reading through the provided references in the docstring here are the provided values for solar constant. Note that some of the references do not agree with each other.
[1] pg. 13, 1366.1 for Spencer model [1] pg. 13, 1367.7 for ASCE model [2] pg. 1, 1361.0 for Spencer model [3] pg. 11, 136mW/cm^2 = 1360 for Unknown model [4] unable to find a free version of this reference [5] 4.92 MJ/m^2h = 1366.67 (PG 23)
I was unable to match references for pyephem and NREL methods, but I also didn't look very hard.
I would also like to propose that we note which reference corresponds with which model choice. Does anybody know if there are similar patterns elsewhere in the project that I can copy?
Before we get too far, which modeling steps involve the solar constant? And, is it a problem if different values are used at each step?
I wouldn't say that I am an expert on all of the modeling steps, but my understanding is that solar_constant
only gets used to calculate the extraterrestrial DNI and then the models further down the model chain use extraterrestrial DNI as an input.
A quick search of pvlib though shows that there are two places where the term solar_constant
is used:
Reference for 2: https://pvlib-python.readthedocs.io/en/stable/_modules/pvlib/irradiance.html?highlight=solar_constant
# ET spectral irradiance correction for earth-sun distance seasonality.
# Note that we only want the distance correction coefficient, so set
# solar_constant=1:
earth_sun_distance_correction = \
pvlib.irradiance.get_extra_radiation(dayofyear, method='spencer',
solar_constant=1) # Eq 2-2, 2-3
My thinking is that since, we are proposing only to change the default by model, these explicit over-rides will still be available for people to use.
Ref. [4], pp. 5-6 states:
A value of Gsc of 1367 W/m2 (1.960 cal/cm2 min, 433 Btu/ft2 h, or 4.921 MJ/m2 h) is used in this book.
https://breadl.org/d/275235 use mirror link no. 1 (IDK how much uptime do this pages have)
It would make a nice student project to research this topic more deeply present a summary report.
Is your feature request related to a problem? Please describe. The default solar constant in pvlib's
get_extra_radiation
function is 1366.1. This default contradicts with the recommended solar constant in the default model's reference (Spencer).Describe the solution you'd like I would like to propose changing the default to 1360.8 per the references provided above.
Describe alternatives you've considered