pvlib-python icon indicating copy to clipboard operation
pvlib-python copied to clipboard

Suggestion to change the default solar constant in get_extra_radiation()

Open kurt-rhee opened this issue 1 year ago • 9 comments

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).

  • pvlib: https://pvlib-python.readthedocs.io/en/stable/_modules/pvlib/irradiance.html#get_extra_radiation
  • Spencer Reference: http://solardata.uoregon.edu/SolarRadiationBasics.html
  • Another Reference: https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2010GL045777

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

  • We could leave the current value as the default and provide some information in the docstring as to why the default value and the values assumed in the reference materials are different.

kurt-rhee avatar Jun 20 '24 21:06 kurt-rhee

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.

echedey-ls avatar Jun 20 '24 23:06 echedey-ls

Many (all?) models were developed with specific values, so it's probably best if they default to those.

adriesse avatar Jun 21 '24 15:06 adriesse

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.

kurt-rhee avatar Jun 21 '24 15:06 kurt-rhee

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?

kurt-rhee avatar Jun 21 '24 16:06 kurt-rhee

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?

cwhanse avatar Jun 21 '24 17:06 cwhanse

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:

  1. In the calculation of extraterrestrial DNI as expected.
  2. In the calculation of bird simple spectral model

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.

kurt-rhee avatar Jun 21 '24 18:06 kurt-rhee

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)

echedey-ls avatar Jun 24 '24 03:06 echedey-ls

It would make a nice student project to research this topic more deeply present a summary report.

adriesse avatar Jun 25 '24 17:06 adriesse

I have just seen this issue is a duplicate of #1566

echedey-ls avatar Jul 07 '24 23:07 echedey-ls

Closing as duplicate

kurt-rhee avatar Jul 01 '25 16:07 kurt-rhee