diff --git a/notebooks/build_renewable_profiles.ipynb b/notebooks/build_renewable_profiles.ipynb index 5167333..390a37f 100644 --- a/notebooks/build_renewable_profiles.ipynb +++ b/notebooks/build_renewable_profiles.ipynb @@ -7,7 +7,7 @@ "source": [ "# Exploring the rule `build_renewable_profiles`\n", "\n", - "This jupyter notebook analyses the rule `build_renewable_profiles` and its **outputs**. Outputs are timeseries of wind or solar power plants as well as the resource potential. There are two types of **potentials**: \n", + "This jupyter notebook analyses the rule `build_renewable_profiles` and its **outputs**. Outputs are timeseries of wind, csp, or solar power plants as well as the resource potential. There are two types of **potentials**: \n", "- technical installable power potential [MW] which does not need hourly profiles (area demand per tech. MW/km^2 * general available area m^2 * availability factor) \n", "- technical 'resource' energy potential [MWh] which needs hourly per unit profiles and the above power potential\n", "\n", @@ -18,7 +18,7 @@ "```\n", "rule build_renewable_profiles:\n", " input:\n", - " natura=\"resources/\" + RDIR + \"natura.tiff\",\n", + " natura=\"resources/NG/NG/NG/NG/NG/NG/\" + RDIR + \"natura.tiff\",\n", " copernicus=\"data/copernicus/PROBAV_LC100_global_v3.0.1_2019-nrt_Discrete-Classification-map_EPSG-4326.tif\",\n", " gebco=\"data/gebco/GEBCO_2021_TID.nc\",\n", " country_shapes=\"resources/\" + RDIR + \"shapes/country_shapes.geojson\",\n", @@ -28,7 +28,7 @@ " powerplants=\"resources/\" + RDIR + \"powerplants.csv\",\n", " regions=lambda w: (\n", " \"resources/\" + RDIR + \"bus_regions/regions_onshore.geojson\"\n", - " if w.technology in (\"onwind\", \"solar\", \"hydro\")\n", + " if w.technology in (\"onwind\", \"solar\", \"hydro\", \"csp\")\n", " else \"resources/\" + RDIR + \"bus_regions/regions_offshore.geojson\"\n", " ),\n", " cutout=lambda w: \"cutouts/\"\n", @@ -60,7 +60,7 @@ "- regions, to identify the regions that correspond to each bus.\n", "- cutout, environmental data timeseries such as wind speed and irradiation.\n", "\n", - "and provides as ouptut `resources/renewable_profiles/profile_{technology}.nc`, where {technology} is the wildcard for which the rule is executed. It should be one of `solar`, `onwind`, `offwind-ac`, `offwind-dc`, or `hydro`." + "and provides as ouptut `resources/renewable_profiles/profile_{technology}.nc`, where {technology} is the wildcard for which the rule is executed. It should be one of `solar`, `csp`, `onwind`, `offwind-ac`, `offwind-dc`, or `hydro`." ] }, { @@ -85,7 +85,7 @@ "\n", "if not os.path.isdir(\"pypsa-earth\"):\n", " os.chdir(\"../..\")\n", - "sys.path.append(os.getcwd()+\"/pypsa-earth/scripts\")" + "sys.path.append(os.getcwd() + \"/pypsa-earth/scripts\")" ] }, { @@ -93,7 +93,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "A jupyter notebook requires the user to import all they need. So we need to import all the required dependencies from the `pypsa-africa` environment:" + "A jupyter notebook requires the user to import all they need. So we need to import all the required dependencies from the `pypsa-earth` environment:" ] }, { @@ -105,7 +105,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "c:\\Users\\alsov\\anaconda3\\envs\\pypsa-earth\\lib\\site-packages\\pypsa\\networkclustering.py:16: UserWarning: The namespace `pypsa.networkclustering` is deprecated and will be removed in PyPSA v0.24. Please use `pypsa.clustering.spatial instead`. \n", + "/Users/gbotemi/miniconda3/envs/pypsa-earth-updated/lib/python3.10/site-packages/pypsa/networkclustering.py:16: UserWarning: The namespace `pypsa.networkclustering` is deprecated and will be removed in PyPSA v0.24. Please use `pypsa.clustering.spatial instead`. \n", " warnings.warn(\n" ] } @@ -130,7 +130,10 @@ "import shapely\n", "import warnings\n", "from shapely.errors import ShapelyDeprecationWarning\n", - "warnings.filterwarnings(\"ignore\", category=ShapelyDeprecationWarning) # Ignore Shapely warnings\n", + "\n", + "warnings.filterwarnings(\n", + " \"ignore\", category=ShapelyDeprecationWarning\n", + ") # Ignore Shapely warnings\n", "\n", "plt.rcParams[\"figure.figsize\"] = [7, 7]\n", "%matplotlib inline" @@ -151,6 +154,7 @@ "source": [ "If you don't have the renewable profiles such as:\n", "- `resources/renewable_profiles/profile_solar.nc`\n", + "- `resources/renewable_profiles/profile_csp.nc`\n", "- `resources/renewable_profiles/profile_onwind.nc`\n", "- `resources/renewable_profiles/profile_offwind-ac.nc`\n", "\n", @@ -544,41 +548,40 @@ " fill: currentColor;\n", "}\n", "
<xarray.Dataset>\n", - "Dimensions: (time: 8760, bus: 168, y: 34, x: 48)\n", + "Dimensions: (time: 8760, bus: 159, y: 34, x: 42)\n", "Coordinates:\n", " * time (time) datetime64[ns] 2013-01-01 ... 2013-12-31T23:00:00\n", - " * bus (bus) object '0' '2' '4' '5' ... '112' '113' '114' '188'\n", + " * bus (bus) <U3 '0' '2' '4' '5' '7' ... '199' '200' '201' '202'\n", " * y (y) float64 4.2 4.5 4.8 5.1 5.4 ... 13.2 13.5 13.8 14.1\n", - " * x (x) float64 0.6 0.9 1.2 1.5 1.8 ... 13.8 14.1 14.4 14.7\n", + " * x (x) float64 2.4 2.7 3.0 3.3 3.6 ... 13.8 14.1 14.4 14.7\n", "Data variables:\n", " profile (time, bus) float64 ...\n", " weight (bus) float64 ...\n", " p_nom_max (bus) float64 ...\n", " potential (y, x) float64 ...\n", - " average_distance (bus) float64 ...
<xarray.Dataset>\n", - "Dimensions: (plant: 168, time: 8760)\n", + "Dimensions: (plant: 159, time: 8760)\n", "Coordinates:\n", - " * plant (plant) object '0' '2' '4' '5' '7' ... '112' '113' '114' '188'\n", + " * plant (plant) <U3 '0' '2' '4' '5' '7' ... '198' '199' '200' '201' '202'\n", " * time (time) datetime64[ns] 2013-01-01 ... 2013-12-31T23:00:00\n", "Data variables:\n", - " inflow (plant, time) float64 ...