def lookup_linke_turbidity(time, latitude, longitude, filepath=None,<EOL>interp_turbidity=True):
<EOL>try:<EOL><INDENT>import tables<EOL><DEDENT>except ImportError:<EOL><INDENT>raise ImportError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>if filepath is None:<EOL><INDENT>pvlib_path = os.path.dirname(os.path.abspath(__file__))<EOL>filepath = os.path.join(pvlib_path, '<STR_LIT:data>', '<STR_LIT>')<EOL><DEDENT>latitude_index = (<EOL>np.around(_linearly_scale(latitude, <NUM_LIT>, -<NUM_LIT>, <NUM_LIT:0>, <NUM_LIT>))<EOL>.astype(np.int64))<EOL>longitude_index = (<EOL>np.around(_linearly_scale(longitude, -<NUM_LIT>, <NUM_LIT>, <NUM_LIT:0>, <NUM_LIT>))<EOL>.astype(np.int64))<EOL>lt_h5_file = tables.open_file(filepath)<EOL>try:<EOL><INDENT>lts = lt_h5_file.root.LinkeTurbidity[latitude_index,<EOL>longitude_index, :]<EOL><DEDENT>except IndexError:<EOL><INDENT>raise IndexError('<STR_LIT>'<EOL>'<STR_LIT>')<EOL><DEDENT>finally:<EOL><INDENT>lt_h5_file.close()<EOL><DEDENT>if interp_turbidity:<EOL><INDENT>linke_turbidity = _interpolate_turbidity(lts, time)<EOL><DEDENT>else:<EOL><INDENT>months = time.month - <NUM_LIT:1><EOL>linke_turbidity = pd.Series(lts[months], index=time)<EOL><DEDENT>linke_turbidity /= <NUM_LIT><EOL>return linke_turbidity<EOL>
Look up the Linke Turibidity from the ``LinkeTurbidities.h5``
data file supplied with pvlib.

Parameters
----------
time : pandas.DatetimeIndex

latitude : float

longitude : float

filepath : None or string, default None
    The path to the ``.h5`` file.

interp_turbidity : bool, default True
    If ``True``, interpolates the monthly Linke turbidity values
    found in ``LinkeTurbidities.h5`` to daily values.

Returns
-------
turbidity : Series