{ "cells": [ { "cell_type": "markdown", "source": [ "# PV Watts V6\n", "\n", "> Estimate the energy production of grid-connected photovoltaic (PV) energy systems using NREL's PVWatts API based on a few simple inputs." ], "metadata": {} }, { "cell_type": "markdown", "source": [ "Let's set our NREL API KEY" ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "import os\n", "from nrel_dev_api import set_nrel_api_key\n", "from nrel_dev_api.solar import PVWattsV6\n", "\n", "# get and set the NREL developer API key\n", "NREL_API_KEY = os.environ[\"DEMO_NREL_API_KEY\"]\n", "\n", "set_nrel_api_key(NREL_API_KEY)" ], "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": [ "Example to use PVWattsV6 for a given set of location and system inputs." ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "pvwatts_v6 = PVWattsV6(system_capacity=4,\n", " lat=40,\n", " lon=-105,\n", " azimuth=180,\n", " tilt=40,\n", " array_type=1,\n", " module_type=1,\n", " losses=10\n", " )" ], "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": [ "Monthly and annual outputs from PVWatts are available under the `outputs` attribute." ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "pvwatts_v6.outputs" ], "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": [ "Station info for the specified latitude/longitude" ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "pvwatts_v6.station_info" ], "outputs": [], "metadata": {} }, { "cell_type": "markdown", "source": [ "Complete response with inputs, outputs, errors, version, etc." ], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [ "pvwatts_v6.response" ], "outputs": [], "metadata": {} }, { "cell_type": "code", "execution_count": null, "source": [], "outputs": [], "metadata": {} } ], "metadata": { "kernelspec": { "display_name": "Python [conda env:nrel-dev-api]", "language": "python", "name": "conda-env-nrel-dev-api-py" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.8.8" } }, "nbformat": 4, "nbformat_minor": 4 }