Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Feedback to Renewable Potential Validation Notebook #25

Open
asolavi opened this issue Apr 3, 2024 · 9 comments
Open

Implement Feedback to Renewable Potential Validation Notebook #25

asolavi opened this issue Apr 3, 2024 · 9 comments
Assignees

Comments

@asolavi
Copy link
Collaborator

asolavi commented Apr 3, 2024

The objective of this issue is to implement the feedback to the Renewable Potential Validation Notebook. Find feedback classified by section in the comments below.

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Objectives":

  1. Replace "Technical Resource Potential" for "Capacity Factor". As pointed out by Anas, this is a more standard metric in the literature. If then we need to compute the "Technical Resource Potential" to compare it with external sources, we can do that by multiplying the capacity factor at every hour with the technical installable potential, and adding up over all hours of the period of interest. This computation should appear in the validation notebook explicitely.

  2. The description in the item "2. Validate Technical Installable Potential" is not correct. The Technical Installable Potential has nothing to do with capacity factors, it just looks at the space available to install solar panels or wind turbines. The capacity factors should be in another item, which was called "Technical Resource Potential", but as pointed out by Anas (see point 1. in this section), it is more standard to look at "Capacity Factors".

  3. Switch the order of items "2. Validate Technical Installable Potential" and "3. Calculate Technical Installable Potential". It seems more natural to first compute, and then validate.

  4. As a summary, I suggest this section has the following items (which should be matched in the rest of the notebook):

a. Compute Technical Installable Potential (define what the Technical Installable Potential is, explain how it is computed in pypsa-earth, and explain how it can be obtained).

b. Validate Technical Installable Potential (compare the results obtained in c. with external sources).

c. Compute Capacity Factors (define what the capacity factor is, explain how it is computed in pypsa-earth and explain how it can be obtained from it).

d. Validate Capacity Factors (compare the results obtained in a. with external sources).

e. Create Maps

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Generate profiles (if not already available)"

After the last sentence, add what are the options for {technology}. Something like "The keyword {technology}" should be one of solar or onwind." (Note that offwind-ac, or offwind-dc is not an option for Zambia, althought it can be for other regions).

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Preparation":

  1. The second cell contains hard coded paths. This works on your computer, but does not necessarily work in someone else's.

The paths should be made relative to the pypsa-earth repository. See examples in other notebooks. We might need to specify what is the "default" structure of the repository pypsa-zm-data within pypsa-earth. This is done in the pypsa-kz-data repository for instance.

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Technical Resource Energy Potential":

  1. Are the points 1., 2., and 3. the computation of the Technical Installable Potential? If so, they should be moved to that section (and that section moved before the "Technical Resource Energy Potential Section", suggested to change to "Capacity Factor" as per above).

  2. What are the "Technical Constraints" in point 4.? The explanation "historical data on the performance and availability of renewable energy systems" sounds like a "capacity factor". However, they seem to be different things as per the formula in point 5. in that section.

Is it possible that the technical constraints account for the "Unsuitable Areas"? Otherwise, the unsuitable areas don't seem to enter the formula. It could also be that the starting point is "Suitable Areas" instead of "Total Available Land".

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Technical Installable Potential in GW":

  1. The first cell contains hard coded paths. Change them to relative paths with respect to the repository.

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Capacity Factor Validation for Solar and Wind":

  1. Replace definition of capacity factor "The capacity factor for solar and wind is the percentage of time that a solar or wind power plant is expected to generate electricity at its rated capacity." by "The capacity factor is the ratio of actual electrical energy output over a given period of time to the theoretical maximum electrical energy output over that period. The theoretical maximum energy output of a given installation is defined as that due to its continuous operation at full nameplate capacity over the relevant period." (taken from wikipedia).

The reason is that the percentage of time that solar or wind generate at nameplate capacity (or rated capacity) is very close to zero. They almost always produce somewhere in between 0 and nameplate capacity. Note that you used the second definition in the formula.

  1. Replace "Actual energy generated" by "Energy Generated" in the formula and the text description below.

  2. Replace "rated capacity" by "nameplate capacity".

  3. Similar to point 1 above, the sentence "For example, if a solar or wind power plant has a capacity factor of 30%, then it can be expected to generate electricity for 30% of the time. This means that other power sources, such as fossil fuel power plants, will need to be used to meet the electricity demand for the remaining 70% of the time." is inaccurate.

A capacity factor of 30% means that it would generate 30% of the maximum possible generation, not that it will be generating 30% of the time at maximum output, nor that "supporting" power plants will be needed 70% of the time. Re-shape the example.

  1. Specify that capacity factors in pypsa-earth can be up to hourly. This is important, as for instance, solar capacity factors change a lot during the day (0 during night hours, quite high during a sunny midday).

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In the section "Plotting solar and wind Capacity Factors":

  1. Specify that you compute monthly capacity factors to do the plot (write a sentence or two).

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In section "Renewable Ninja Data":

Very well presented! The argument is followed clearly, and the conclusion that the pypsa-earth capacity factors are good is clearly stated and justified.

  1. I'd remove the last point explaining why there is a (small) mismatch between PyPSA-Earth and Renewables Ninja. The reason is that "the other factors" described, namely "the size of the system, the location of the system, and the weather conditions" are either not relevant for the capacity factor or should be already taken into account by it.

In detail, "the size of the system" is irrelevant to the capacity factor, as the capacity factor is a unitless ratio of production. In other words, having 1 MW of solar panels or 1GW of solar doesn't change it. "The location of the system and the weather conditions" are already included in the capacity factor computations.

  1. It seems that Renewable Ninja also has monthly capacity factors available. Since you've already computed those to do the great plots, can you make a comparison on a monthly basis too? A plot or a table sound like good ideas.

@asolavi
Copy link
Collaborator Author

asolavi commented Apr 3, 2024

In section "Generating maps that illustrate the potential for wind and solar energy in different part of zambia":

  1. Try to shorten the title. Also, note the typos in "...different part of zambia", which should be "... different parts of Zambia".

  2. The functions "plot_map" and "plot_voronoi" have hard coded paths in their definition. This generates errors in its execution. A more consistent way using relative paths (or inputing paths!) should be used.

  3. Even after "fixing" the issues in 2. about the paths, the plot_map gives errors in my execution (only this one, "plot_voronoi" and "plot_raster" give the correct output). As a result, the plots don't appear. Do you have an idea of what might have gone wrong? I don't yet... Here's a copy of the error I get:

ValueError Traceback (most recent call last)
c:\Users\alsov\Documents\code\asolavi\pypsa-earth\zambia_renewable_potential_validation.ipynb Cell 34 line 1
----> 1 plot_map(
2 wind.potential / 1000,
3 "Blues",
4 ccrs.Orthographic(),
5 voronoi="onshore",
6 title="Onshore Wind Potential [GW]",
7 # filename="onwind-gridcell.pdf"
8 )

c:\Users\alsov\Documents\code\asolavi\pypsa-earth\zambia_renewable_potential_validation.ipynb Cell 34 line 4
2 plt.rcParams.update({"font.size": 12})
3 fig, ax = plt.subplots(figsize=(8, 4), subplot_kw={"projection": projection})
----> 4 data.plot.imshow(
5 ax=ax, transform=ccrs.PlateCarree(), cmap=cmap, label="potential [MW]"
6 )
7 # contourf
8 ax.coastlines()

File c:\Users\alsov\anaconda3\envs\pypsa-earth\lib\site-packages\xarray\plot\accessor.py:430, in DataArrayPlotAccessor.imshow(self, *args, **kwargs)
428 @functools.wraps(dataarray_plot.imshow)
429 def imshow(self, *args, **kwargs) -> AxesImage:
--> 430 return dataarray_plot.imshow(self._da, *args, **kwargs)
...
280 indices[mask] = 0

File _ckdtree.pyx:795, in scipy.spatial._ckdtree.cKDTree.query()

ValueError: 'x' must be finite, check for nan or inf values

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants