|
| 1 | +.. _faq: |
| 2 | + |
| 3 | +Frequently Asked Questions |
| 4 | +========================== |
| 5 | + |
| 6 | +General Questions |
| 7 | +***************** |
| 8 | + |
| 9 | +What is pvlib? |
| 10 | +-------------- |
| 11 | + |
| 12 | +pvlib is a free and open-source python software library for modeling |
| 13 | +the electrical performance of solar photovoltaic (PV) systems. It provides |
| 14 | +implementations of scientific models for many topics relevant for PV modeling. |
| 15 | + |
| 16 | +For additional details about the project, see :ref:`package_overview`. |
| 17 | +For examples of using pvlib, see :ref:`example_gallery`. |
| 18 | + |
| 19 | + |
| 20 | +How does pvlib compare to other PV modeling tools like PVsyst or SAM? |
| 21 | +--------------------------------------------------------------------- |
| 22 | + |
| 23 | +pvlib is similar to tools like PVsyst and SAM in that it can be used |
| 24 | +for "weather-to-power" modeling to model system energy production |
| 25 | +based on system configuration and a weather dataset. However, pvlib |
| 26 | +is also very different in that you use pvlib via python code instead |
| 27 | +of via a GUI, which makes pvlib ideal for automating tasks. pvlib |
| 28 | +is also more of a toolbox or a framework to use |
| 29 | +to build your own modeling process (although some pre-built workflows |
| 30 | +are available as well). |
| 31 | + |
| 32 | + |
| 33 | +Usage Questions |
| 34 | +*************** |
| 35 | + |
| 36 | +All I have is GHI, how do I get to POA? |
| 37 | +--------------------------------------- |
| 38 | + |
| 39 | +Going from GHI to plane of array (POA) irradiance is a two-step process. |
| 40 | +The first step is to |
| 41 | +use a decomposition model (also called a separation model) to estimate the |
| 42 | +DNI and DHI corresponding to your GHI. For a list of decomposition |
| 43 | +models available in pvlib, see :ref:`dniestmodels`. |
| 44 | + |
| 45 | +The second step is to transpose those estimated DNI and DHI components into |
| 46 | +POA components. This is most easily done with the |
| 47 | +:py:func:`pvlib.irradiance.get_total_irradiance` function. |
| 48 | + |
| 49 | + |
| 50 | +Where can I get irradiance data for my simulation? |
| 51 | +-------------------------------------------------- |
| 52 | + |
| 53 | +pvlib has a module called iotools which has several functions for |
| 54 | +retrieving irradiance data as well as reading standard file formats |
| 55 | +such as EPW, TMY2, and TMY3. For free irradiance data, you may |
| 56 | +consider NREL's NSRDB which can be accessed using the |
| 57 | +:py:func:`pvlib.iotools.get_psm3` function and is available for |
| 58 | +North America. For Europe and Africa, you may consider looking into |
| 59 | +CAMS (:py:func:`pvlib.iotools.get_cams`). |
| 60 | +PVGIS (:py:func:`pvlib.iotools.get_pvgis_hourly`) is another option, which |
| 61 | +provides irradiance from several different databases with near global coverage. |
| 62 | +pvlib also has functions for accessing a plethora of ground-measured |
| 63 | +irradiance datasets, including the BSRN, SURFRAD, SRML, and NREL's MIDC. |
| 64 | + |
| 65 | + |
| 66 | +Can I use PVsyst (PAN/OND) files with pvlib? |
| 67 | +-------------------------------------------- |
| 68 | + |
| 69 | +Currently, pvlib does not have the ability to import any PVsyst file formats. |
| 70 | +Certain formats of particular interest (e.g. PAN files) may be added in a future |
| 71 | +version. Until then, these Google Group threads |
| 72 | +(`one <https://groups.google.com/g/pvlib-python/c/PDDic0SS6ao/m/Z-WKj7C6BwAJ>`_ |
| 73 | +and `two <https://groups.google.com/g/pvlib-python/c/b1mf4Y1qHBY/m/tK2FBCJyBgAJ>`_) |
| 74 | +may be useful for some users. |
| 75 | + |
| 76 | + |
| 77 | +Why don't my simulation results make sense? |
| 78 | +------------------------------------------- |
| 79 | + |
| 80 | +pvlib does not prevent you from using models improperly and generating |
| 81 | +invalid results. It is on you as the user to understand the models you |
| 82 | +are using and to supply appropriate, correctly-formatted data. One modeling error that beginners sometimes |
| 83 | +make is improper time zone localization. Calculating solar |
| 84 | +positions is often the first step of a modeling process |
| 85 | +and this step relies on timestamps being localized to the correct time zone. |
| 86 | +A telltale sign of improper time zones is a time shift between solar |
| 87 | +position and the irradiance data (for example, ``solar_elevation`` |
| 88 | +peaks at a different time from clear-sky ``ghi``). |
| 89 | +For more information on handling timezone correctly, see :ref:`timetimezones`. |
| 90 | + |
| 91 | +More generally, inspecting the simulation results visually is a good first |
| 92 | +step when investigating strange results. |
| 93 | +Matplotlib and pandas have very powerful plotting capabilities that are great |
| 94 | +for tracking down where things went wrong in a modeling process. Try plotting |
| 95 | +a few days of intermediate time series results in a single plot, looking for |
| 96 | +inconsistencies like nonzero irradiance when the sun is below the horizon. |
| 97 | +This will give you a clue of where to look for errors in your code. |
| 98 | + |
| 99 | + |
| 100 | +I got a warning like ``RuntimeWarning: invalid value encountered in arccos``, what does it mean? |
| 101 | +------------------------------------------------------------------------------------------------ |
| 102 | + |
| 103 | +It is fairly common to use pvlib models in conditions where they are not |
| 104 | +applicable, for example attempting to calculate an IV curve at night. |
| 105 | +In such cases the model failure doesn't really matter (nighttime values are |
| 106 | +irrelevant), but the numerical packages that pvlib is built on |
| 107 | +(e.g. `numpy <https://numpy.org>`_) emit warnings complaining about |
| 108 | +`invalid value`, `divide by zero`, etc. In these cases the warnings can |
| 109 | +often be ignored without issue. |
| 110 | + |
| 111 | +However, that's not always the case: sometimes these warnings are caused |
| 112 | +by an error in your code, for example by giving a function inappropriate inputs. |
| 113 | +So, these warnings don't necessarily indicate a problem, but you shouldn't |
| 114 | +get in the habit of immediately discounting them either. |
| 115 | + |
| 116 | + |
| 117 | +I got an error like ``X has no attribute Y``, what does it mean? |
| 118 | +---------------------------------------------------------------- |
| 119 | + |
| 120 | +If you see a function in the pvlib documentation that doesn't seem to exist |
| 121 | +in your pvlib installation, the documentation is likely for a different version |
| 122 | +of pvlib. You can check your installed pvlib version by running |
| 123 | +``print(pvlib.__version__)`` in python. To switch documentation versions, use |
| 124 | +the `v:` version switcher widget in the bottom right corner of this page. |
| 125 | + |
| 126 | +You can also upgrade your installed pvlib to the latest compatible version |
| 127 | +with ``pip install -U pvlib``, but be sure to check the :ref:`whatsnew` |
| 128 | +page to see the differences between versions. |
| 129 | + |
| 130 | + |
| 131 | +The CEC table doesn't include my module or inverter, what should I do? |
| 132 | +---------------------------------------------------------------------- |
| 133 | + |
| 134 | +The CEC tables for module and inverter parameters included in pvlib are periodically |
| 135 | +copied from `SAM <https://github.com/NREL/SAM/tree/develop/deploy/libraries>`_, |
| 136 | +so you can check the tables there for more up-to-date tables. |
| 137 | + |
| 138 | +For modules, if even the SAM files don't include the module you're looking for |
| 139 | +either, you can calculate CEC module model parameters from |
| 140 | +datasheet information using :py:func:`pvlib.ivtools.sdm.fit_cec_sam`. |
0 commit comments