def get_clearsky(self, times, model='<STR_LIT>', solar_position=None,<EOL>dni_extra=None, **kwargs):
if dni_extra is None:<EOL><INDENT>dni_extra = irradiance.get_extra_radiation(times)<EOL><DEDENT>try:<EOL><INDENT>pressure = kwargs.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>pressure = atmosphere.alt2pres(self.altitude)<EOL><DEDENT>if solar_position is None:<EOL><INDENT>solar_position = self.get_solarposition(times, pressure=pressure,<EOL>**kwargs)<EOL><DEDENT>apparent_zenith = solar_position['<STR_LIT>']<EOL>apparent_elevation = solar_position['<STR_LIT>']<EOL>if model == '<STR_LIT>':<EOL><INDENT>try:<EOL><INDENT>linke_turbidity = kwargs.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>interp_turbidity = kwargs.pop('<STR_LIT>', True)<EOL>linke_turbidity = clearsky.lookup_linke_turbidity(<EOL>times, self.latitude, self.longitude,<EOL>interp_turbidity=interp_turbidity)<EOL><DEDENT>try:<EOL><INDENT>airmass_absolute = kwargs.pop('<STR_LIT>')<EOL><DEDENT>except KeyError:<EOL><INDENT>airmass_absolute = self.get_airmass(<EOL>times, solar_position=solar_position)['<STR_LIT>']<EOL><DEDENT>cs = clearsky.ineichen(apparent_zenith, airmass_absolute,<EOL>linke_turbidity, altitude=self.altitude,<EOL>dni_extra=dni_extra, **kwargs)<EOL><DEDENT>elif model == '<STR_LIT>':<EOL><INDENT>cs = clearsky.haurwitz(apparent_zenith)<EOL><DEDENT>elif model == '<STR_LIT>':<EOL><INDENT>cs = clearsky.simplified_solis(<EOL>apparent_elevation, pressure=pressure, dni_extra=dni_extra,<EOL>**kwargs)<EOL><DEDENT>else:<EOL><INDENT>raise ValueError('<STR_LIT>'<EOL>'<STR_LIT>'<EOL>.format(model))<EOL><DEDENT>return cs<EOL>
Calculate the clear sky estimates of GHI, DNI, and/or DHI
at this location.

Parameters
----------
times: DatetimeIndex
model: str, default 'ineichen'
    The clear sky model to use. Must be one of
    'ineichen', 'haurwitz', 'simplified_solis'.
solar_position : None or DataFrame, default None
    DataFrame with columns 'apparent_zenith', 'zenith',
    'apparent_elevation'.
dni_extra: None or numeric, default None
    If None, will be calculated from times.

kwargs
    Extra parameters passed to the relevant functions. Climatological
    values are assumed in many cases. See source code for details!

Returns
-------
clearsky : DataFrame
    Column names are: ``ghi, dni, dhi``.