@@ -810,19 +810,20 @@ def prepare_inputs(self, times=None, weather=None):
810810 Times at which to evaluate the model. Can be None if
811811 attribute `times` is already set.
812812 weather : None or DataFrame, default None
813- If ``None``, the weather attribute is used. If the weather
814- attribute is also ``None`` assumes air temperature is 20 C, wind
815- speed is 0 m/s and irradiation calculated from clear sky
816- data. Column names must be ``'wind_speed'``, ``'temp_air'``,
817- ``'dni'``, ``'ghi'``, ``'dhi'``. Do not pass incomplete irradiation
818- data. Use method
819- :py:meth:`~pvlib.modelchain.ModelChain.complete_irradiance`
820- instead.
813+ If ``None``, the weather attribute is used. Column names
814+ must be ``'dni'``, ``'ghi'``, ``'dhi'``, ``'wind_speed'``,
815+ ``'temp_air'``. All irradiance components are required.
816+ Assumes air temperature is 20 C and wind speed is 0 m/s if
817+ not provided.
821818
822819 Notes
823820 -----
824821 Assigns attributes: ``times``, ``solar_position``, ``airmass``,
825822 ``total_irrad``, `aoi`
823+
824+ See also
825+ --------
826+ ModelChain.complete_irradiance
826827 """
827828 if weather is not None :
828829 self .weather = weather
@@ -839,15 +840,19 @@ def prepare_inputs(self, times=None, weather=None):
839840 solar_position = self .solar_position , model = self .airmass_model )
840841
841842 if not any ([x in ['ghi' , 'dni' , 'dhi' ] for x in self .weather .columns ]):
843+ warnings .warn ('Clear sky assumption for no input irradiance is '
844+ 'deprecated and will be removed in v0.7.0. Use '
845+ 'location.get_clearsky instead' ,
846+ pvlibDeprecationWarning )
842847 self .weather [['ghi' , 'dni' , 'dhi' ]] = self .location .get_clearsky (
843848 self .solar_position .index , self .clearsky_model ,
844849 solar_position = self .solar_position ,
845850 airmass_absolute = self .airmass ['airmass_absolute' ])
846851
847852 if not {'ghi' , 'dni' , 'dhi' } <= set (self .weather .columns ):
848853 raise ValueError (
849- "Uncompleted irradiance data set. Please check you input " +
850- "data.\n Data set needs to have 'dni', 'dhi' and 'ghi'.\n " +
854+ "Uncompleted irradiance data set. Please check your input "
855+ "data.\n Data set needs to have 'dni', 'dhi' and 'ghi'.\n "
851856 "Detected data: {0}" .format (list (self .weather .columns )))
852857
853858 # PVSystem.get_irradiance and SingleAxisTracker.get_irradiance
@@ -903,12 +908,11 @@ def run_model(self, times=None, weather=None):
903908 Times at which to evaluate the model. Can be None if
904909 attribute `times` is already set.
905910 weather : None or DataFrame, default None
906- If None, assumes air temperature is 20 C, wind speed is 0
907- m/s and irradiation calculated from clear sky data. Column
908- names must be 'wind_speed', 'temp_air', 'dni', 'ghi', 'dhi'.
909- Do not pass incomplete irradiation data. Use method
910- :py:meth:`~pvlib.modelchain.ModelChain.complete_irradiance`
911- instead.
911+ If ``None``, the weather attribute is used. Column names
912+ must be ``'dni'``, ``'ghi'``, ``'dhi'``, ``'wind_speed'``,
913+ ``'temp_air'``. All irradiance components are required.
914+ Assumes air temperature is 20 C and wind speed is 0 m/s if
915+ not provided.
912916
913917 Returns
914918 -------
0 commit comments