@@ -290,25 +290,25 @@ Wrapping methods into a unified API
290290Readers may notice that the source code of the :py:meth: `~pvlib.modelchain.ModelChain.run_model `
291291method is model-agnostic. :py:meth: `~pvlib.modelchain.ModelChain.run_model ` calls generic methods
292292such as ``self.dc_model `` rather than a specific model such as
293- ``pvwatts_dc ``. So how does :py:meth: `~pvlib.modelchain.ModelChain.run_model ` know what models
293+ ``pvwattsv5_dc ``. So how does :py:meth: `~pvlib.modelchain.ModelChain.run_model ` know what models
294294it’s supposed to run? The answer comes in two parts, and allows us to
295295explore more of the ModelChain API along the way.
296296
297297First, ModelChain has a set of methods that wrap the PVSystem methods
298298that perform the calculations (or further wrap the pvsystem.py module’s
299299functions). Each of these methods takes the same arguments (``self ``)
300300and sets the same attributes, thus creating a uniform API. For example,
301- the :py:meth: `~pvlib.modelchain.ModelChain.pvwatts_dc ` method is shown below. Its only argument is
301+ the :py:meth: `~pvlib.modelchain.ModelChain.pvwattsv5_dc ` method is shown below. Its only argument is
302302``self ``, and it sets the ``dc `` attribute.
303303
304304.. ipython :: python
305305
306- mc.pvwatts_dc ??
306+ mc.pvwattsv5_dc ??
307307
308- The :py:meth: `~pvlib.modelchain.ModelChain.pvwatts_dc ` method calls the pvwatts_dc method of the
308+ The :py:meth: `~pvlib.modelchain.ModelChain.pvwattsv5_dc ` method calls the pvwattsv5_dc method of the
309309PVSystem object that we supplied when we created the ModelChain instance,
310310using data that is stored in the ModelChain ``effective_irradiance `` and
311- ``cell_temperature `` attributes. The :py:meth: `~pvlib.modelchain.ModelChain.pvwatts_dc ` method assigns its
311+ ``cell_temperature `` attributes. The :py:meth: `~pvlib.modelchain.ModelChain.pvwattsv5_dc ` method assigns its
312312result to the ``dc `` attribute of the ModelChain's ``results `` object. The code
313313below shows a simple example of this.
314314
@@ -322,21 +322,21 @@ below shows a simple example of this.
322322 mc = ModelChain(pvwatts_system, location,
323323 aoi_model = ' no_loss' , spectral_model = ' no_loss' )
324324
325- # manually assign data to the attributes that ModelChain.pvwatts_dc will need.
325+ # manually assign data to the attributes that ModelChain.pvwattsv5_dc will need.
326326 # for standard workflows, run_model would assign these attributes.
327327 mc.results.effective_irradiance = pd.Series(1000 , index = [pd.Timestamp(' 20170401 1200-0700' )])
328328 mc.results.cell_temperature = pd.Series(50 , index = [pd.Timestamp(' 20170401 1200-0700' )])
329329
330- # run ModelChain.pvwatts_dc and look at the result
331- mc.pvwatts_dc ();
330+ # run ModelChain.pvwattsv5_dc and look at the result
331+ mc.pvwattsv5_dc ();
332332 mc.results.dc
333333
334334 The :py:meth: `~pvlib.modelchain.ModelChain.sapm ` method works in a manner similar
335- to the :py:meth: `~pvlib.modelchain.ModelChain.pvwatts_dc `
335+ to the :py:meth: `~pvlib.modelchain.ModelChain.pvwattsv5_dc `
336336method. It calls the :py:meth: `~pvlib.pvsystem.PVSystem.sapm ` method using stored data, then
337337assigns the result to the ``dc `` attribute of ``ModelChain.results ``.
338338The :py:meth: `~pvlib.modelchain.ModelChain.sapm ` method differs from the
339- :py:meth: `~pvlib.modelchain.ModelChain.pvwatts_dc ` method in
339+ :py:meth: `~pvlib.modelchain.ModelChain.pvwattsv5_dc ` method in
340340a notable way: the PVSystem.sapm method returns a DataFrame with current,
341341voltage, and power results, rather than a simple Series
342342of power. The ModelChain methods for single diode models (e.g.,
@@ -370,7 +370,7 @@ DC quantities to the output of the full PVSystem.
370370 mc.sapm();
371371 mc.results.dc
372372
373- We’ve established that the ``ModelChain.pvwatts_dc `` and
373+ We’ve established that the ``ModelChain.pvwattsv5_dc `` and
374374``ModelChain.sapm `` have the same API: they take the same arugments
375375(``self ``) and they both set the ``dc `` attribute.\* Because the methods
376376have the same API, we can call them in the same way. ModelChain includes
@@ -381,7 +381,7 @@ Again, so how does :py:meth:`~pvlib.modelchain.ModelChain.run_model` know which
381381models it’s supposed to run?
382382
383383At object construction, ModelChain assigns the desired model’s method
384- (e.g. ``ModelChain.pvwatts_dc ``) to the corresponding generic attribute
384+ (e.g. ``ModelChain.pvwattsv5_dc ``) to the corresponding generic attribute
385385(e.g. ``ModelChain.dc_model ``) either with the value assigned to the ``dc_model ``
386386parameter at construction, or by inference as described in the next
387387section.
@@ -428,15 +428,15 @@ method.
428428 mc.infer_ac_model??
429429 pvlib.modelchain._snl_params??
430430 pvlib.modelchain._adr_params??
431- pvlib.modelchain._pvwatts_params ??
431+ pvlib.modelchain._pvwattsv5_params ??
432432
433433 ModelChain for a PVSystem with multiple Arrays
434434~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
435435
436436The PVSystem can represent a PV system with a single array of modules, or
437437with multiple arrays (see :ref: `multiarray `). The same models are applied to
438438all ``PVSystem.array `` objects, so each ``Array `` must contain the appropriate model
439- parameters. For example, if ``ModelChain.dc_model='pvwatts ' ``, then each
439+ parameters. For example, if ``ModelChain.dc_model='pvwattsv5 ' ``, then each
440440``Array.module_parameters `` must contain ``'pdc0' ``.
441441
442442When the PVSystem contains multiple arrays, ``ModelChain.results `` attributes
0 commit comments