Repository navigation
Closed
Labels
Milestone
Description
The current _liujordan function description mentions pressure but uses air mass. This internal function isn't used; maybe the intended use was to make it public like the other function in the irradiance.py
pvlib-python/pvlib/irradiance.py
Lines 3090 to 3145 in 6fd4b07
| def _liujordan(zenith, transmittance, airmass, dni_extra=1367.0): | |
| ''' | |
| Determine DNI, DHI, GHI from extraterrestrial flux, transmittance, | |
| and optical air mass number. | |
| Liu and Jordan, 1960, developed a simplified direct radiation model. | |
| DHI is from an empirical equation for diffuse radiation from Liu and | |
| Jordan, 1960. | |
| Parameters | |
| ---------- | |
| zenith: pd.Series | |
| True (not refraction-corrected) zenith angles in decimal | |
| degrees. If Z is a vector it must be of the same size as all | |
| other vector inputs. [°] | |
| transmittance: float | |
| Atmospheric transmittance between 0 and 1. | |
| pressure: float, default 101325.0 | |
| Air pressure | |
| dni_extra: float, default 1367.0 | |
| Direct irradiance incident at the top of the atmosphere. | |
| Returns | |
| ------- | |
| irradiance: DataFrame | |
| Modeled direct normal irradiance, direct horizontal irradiance, | |
| and global horizontal irradiance in Wm⁻² | |
| References | |
| ---------- | |
| .. [1] Campbell, G. S., J. M. Norman (1998) An Introduction to | |
| Environmental Biophysics. 2nd Ed. New York: Springer. | |
| .. [2] Liu, B. Y., R. C. Jordan, (1960). "The interrelationship and | |
| characteristic distribution of direct, diffuse, and total solar | |
| radiation". Solar Energy 4:1-19 | |
| ''' | |
| tau = transmittance | |
| dni = dni_extra*tau**airmass | |
| dhi = 0.3 * (1.0 - tau**airmass) * dni_extra * np.cos(np.radians(zenith)) | |
| ghi = dhi + dni * np.cos(np.radians(zenith)) | |
| irrads = OrderedDict() | |
| irrads['ghi'] = ghi | |
| irrads['dni'] = dni | |
| irrads['dhi'] = dhi | |
| if isinstance(ghi, pd.Series): | |
| irrads = pd.DataFrame(irrads) | |
| return irrads |
Activity
echedey-ls commentedon May 29, 2026
It's better to link to code here in GitHub instead of copy-pasting it.
Here is a permalink to it:
pvlib-python/pvlib/irradiance.py
Lines 3090 to 3145 in 6fd4b07
It seems it was deprecated in v0.8.1 and claimed to be removed in v0.9.0:
pvlib-python/docs/sphinx/source/whatsnew/v0.8.1.rst
Lines 8 to 9 in 6fd4b07
pvlib-python/docs/sphinx/source/whatsnew/v0.9.0.rst
Lines 36 to 37 in 6fd4b07
It was forgotten to be removed in #1136 - exactly at this commit in the pull request:
c1ad827(#1136)Feel free to open a PR. I don't have a strong opinion, but I suggest to remove it in v0.16.0. NB it has existed without a deprecation warning for quite some time.
kandersolar commentedon Jun 10, 2026
No need to deprecate private functions, and no need to wait for a .0 release to delete them, either.
I suggest skipping the deprecation and going straight to deletion for
_liujordan. It can happen in the next release, or 0.16.0.