Frequently Asked Questions (FAQ)¶
Where do I get an API key and how do I use it?¶
Your API key is required for:
run_energy_calculation()- Running energy calculationsabout()- Querying API informationservice()- Accessing service endpoints
Getting your API key: See the API Key documentation or contact solarfarmer@dnv.com for further support.
Why do SolarFarmer Desktop and PVSystem produce different results?¶
SolarFarmer Desktop has detailed spatial information about row positions and can identify which strings are in front/back rows (fixed-tilt) or left/right rows (trackers). This allows more accurate shading calculations for edge-positioned strings.
The PVSystem class, used as part of Workflow 2: Design Plants with high-level metadata, takes a conservative approach and treats all the strings as if these were positioned in middle-position rows (i.e. always subject to row-to-row or mutual shading), resulting in more uniform (but slightly different) shading estimates.
Can I import SDK-generated JSON into SolarFarmer Desktop?¶
Yes! Use the "Import from API JSON" feature in SolarFarmer Desktop. See the Import from API JSON documentation for details.
What are the current limitations?¶
PVSystem Class:
- Supports only one PV module type (defined by a single PAN file)
- Supports only one inverter type (defined by a single OND file)
- Uses simplified row positioning (all strings in middle-row assumption)
For information about upcoming features or requests, contact solarfarmer@dnv.com.
Why do I get an ImportError when calling from_dataframe() or from_pvlib()?¶
These weather conversion functions require pandas, which is an optional dependency. Install it with:
pip install "dnv-solarfarmer[all]"
The core SDK (payload construction, API calls, annual/monthly summary data) works without pandas. Only the weather file conversion utilities and timeseries result parsing need it. See the Weather Utilities reference for details.
My TMY weather file gives a 400 error with no useful message. What's wrong?¶
TMY (Typical Meteorological Year) datasets from NSRDB, PVGIS, or similar sources contain timestamps drawn from different source years, causing them to go backwards in time when sorted as a full year. SolarFarmer requires timestamps in a TSV file to be chronologically ordered (non-decreasing years). Multi-year and sub-year files with continuous, ordered timestamps are fully supported; only shuffled years are rejected.
Use sf.from_pvlib() or sf.from_dataframe(year=1990) to remap all timestamps to a single year before export. The SDK also calls check_sequential_year_timestamps() before upload to catch this early.