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

centrally defined abbreviations for units with special formatting #2209

Closed
wants to merge 17 commits into from
Closed
10 changes: 10 additions & 0 deletions docs/sphinx/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -494,3 +494,13 @@ def make_github_url(file_name):
'make_github_url': make_github_url,
'edit_page_url_template': '{{ make_github_url(file_name) }}',
}

# list of abbreviations for typing out units with nonstandard formatting
rst_prolog = """
.. |wm2| replace:: Wm⁻²
.. |wm2nm1| replace:: Wm⁻²nm⁻¹
.. |degc| replace:: °C
.. |deg| replace:: °
.. |^-1| replace:: ⁻¹
.. |^-2| replace:: ⁻²
"""
6 changes: 3 additions & 3 deletions pvlib/irradiance.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,15 @@ def get_total_irradiance(surface_tilt, surface_azimuth,
solar_zenith : numeric
Solar zenith angle. [degree]
solar_azimuth : numeric
Solar azimuth angle. [degree]
Solar azimuth angle. [|deg|]
dni : numeric
Direct Normal Irradiance. [W/m2]
ghi : numeric
Global horizontal irradiance. [W/m2]
dhi : numeric
Diffuse horizontal irradiance. [W/m2]
Diffuse horizontal irradiance. [|wm2|]
dni_extra : numeric, optional
Extraterrestrial direct normal irradiance. [W/m2]
Extraterrestrial direct normal irradiance. [|wm2|]
airmass : numeric, optional
Relative airmass (not adjusted for pressure). [unitless]
albedo : numeric, default 0.25
Expand Down
Loading