diff --git a/pvlib/clearsky.py b/pvlib/clearsky.py index 8cc867e020..be0056b165 100644 --- a/pvlib/clearsky.py +++ b/pvlib/clearsky.py @@ -28,7 +28,9 @@ def ineichen(apparent_zenith, airmass_absolute, linke_turbidity, report on clear sky models found the Ineichen/Perez model to have excellent performance with a minimal input data set [3]_. - Default values for monthly Linke turbidity provided by SoDa [4]_, [5]_. + Default monthly Linke turbidity values are available via + :py:func:`pvlib.clearsky.lookup_linke_turbidity`, which uses data + provided by SoDa [4]_, [5]_. Parameters ----------- @@ -84,6 +86,22 @@ def ineichen(apparent_zenith, airmass_absolute, linke_turbidity, .. [5] J. Remund, et. al., "Worldwide Linke Turbidity Information", Proc. ISES Solar World Congress, June 2003. Goteborg, Sweden. + + Examples + -------- + >>> from pvlib.clearsky import lookup_linke_turbidity, ineichen + >>> from pvlib.location import Location + >>> import pandas as pd + >>> + >>> times = pd.date_range('2024-06-01', freq='1H', periods=24, tz='UTC') + >>> loc = Location(35, -110) + >>> + >>> tl = lookup_linke_turbidity(times, loc.latitude, loc.longitude) + >>> cs = ineichen( + ... times, loc.latitude, loc.longitude, + ... linke_turbidity=tl + ... ) + ''' # noqa: E501 # ghi is calculated using either the equations in [1] by setting @@ -150,6 +168,10 @@ def lookup_linke_turbidity(time, latitude, longitude, filepath=None, Look up the Linke Turibidity from the ``LinkeTurbidities.h5`` data file supplied with pvlib. + The Linke turbidity climatology used by this function is sourced from + SoDa (Solar Radiation Data) and corresponds to the references cited in + :py:func:`pvlib.clearsky.ineichen`. + Parameters ---------- time : pandas.DatetimeIndex @@ -175,6 +197,7 @@ def lookup_linke_turbidity(time, latitude, longitude, filepath=None, The returned value for each time is either the monthly value or an interpolated value to smooth the transition between months. Interpolation is done on the day of year as determined by UTC. + """ # The .h5 file 'LinkeTurbidities.h5' contains a single 2160 x 4320 x 12