Potential Figures

56 views
Skip to first unread message

Felix Delgado Elizundia

unread,
Apr 5, 2022, 8:03:14 AM4/5/22
to pypsa
Hello Pypsa!

I have been playing around with the library and I am impressed.
I did want to make a quick question regarding how to call and plot the potentials for each technology? calculated int he rule_buildrenewable profiles with atlite! as seen in the figures in your docs.

thank you in advance!
Screenshot 2022-04-05 140235.png

Johannes Hampp

unread,
Apr 6, 2022, 2:16:39 AM4/6/22
to Felix Delgado Elizundia, pypsa
Hi Felix,

Welcome to the club! :)

The figures are based on the files:

```
<pypsa-eur>/resources/profile_[solar|onwind|offwind-ac|offwind-dc].nc
```

Load each file using xarray

```
ds = xr.open_dataset(<filename>)
```

and plot the "potential" variable of each dataset

```
ds["potential"].plot()
```

Best,
Johannes

Am 05/04/2022 um 14:03 schrieb Felix Delgado Elizundia:
> Hello Pypsa!
>
> I have been playing around with the library and I am impressed.
> I did want to make a quick question regarding how to call and plot the
> potentials for each technology? calculated int he rule_buildrenewable
> profiles with atlite! as seen in the figures in your docs.
>
> thank you in advance!
> Screenshot 2022-04-05 140235.png
>
> --
> You received this message because you are subscribed to the Google
> Groups "pypsa" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to pypsa+un...@googlegroups.com
> <mailto:pypsa+un...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/pypsa/edfa8b46-3a48-4f52-b044-06a61773280en%40googlegroups.com
> <https://groups.google.com/d/msgid/pypsa/edfa8b46-3a48-4f52-b044-06a61773280en%40googlegroups.com?utm_medium=email&utm_source=footer>.

Felix Delgado Elizundia

unread,
Apr 6, 2022, 2:29:27 PM4/6/22
to Johannes Hampp, pypsa
Thank you a lot Johannes!

I am very impressed with the library! and using it for my thesis!
I have been getting the following warning in the add_electricty rule: 

WARNING:__main__:Capital costs for conventional generators put to 0 EUR/MW 

I have not modified the resources/costs.csv and running tests with the config.default.yaml
Why is this error raised?  I just want to be sure that conventional generator are accounted for!

Thank you again for your  support and helpfulness!
Felix Delgado



Johannes Hampp

unread,
Apr 7, 2022, 1:11:21 AM4/7/22
to Felix Delgado Elizundia, pypsa
Hi Felix,

Nice, we want to make our models as accessible as possible, so if you
have suggestions on what to improve feel free to raise them as issues on
GitHub [1] !

Reg. your Q:

This line in the code raises your warning: [2]
In add_electricity existing conventional_carriers are added to the
network, see [3] and [4]. As these capacities already exist today and
are non-extendable generators in PyPSA-EUR, no additional investment is
needed or possible. capital_cost for these generators are thus hard
coded to 0 and the warning is raised.

You can check the outputs of add_electricity by loading them in a Python
shell to see if and how your conventional carriers are accounted for:

```
import pypsa

n = pypsa.Network(<your network path>)
```

[1] https://github.com/PyPSA/pypsa-eur/
[2]
https://github.com/PyPSA/pypsa-eur/blob/5fd99628c97ac2f174259d890fa6999449ea8a23/scripts/add_electricity.py#L311
[3]
https://pypsa-eur.readthedocs.io/en/latest/preparation/add_electricity.html#description
[4] https://github.com/PyPSA/pypsa-eur/blob/master/config.default.yaml#L58


Best,
Johannes


Am 06/04/2022 um 20:29 schrieb Felix Delgado Elizundia:
> Thank you a lot Johannes!
>
> I am very impressed with the library! and using it for my thesis!
> I have been getting the following warning in the add_electricty rule:
>
> WARNING:__main__:Capital costs for conventional generators put to 0 EUR/MW
>
> I have not modified the resources/costs.csv and running tests with the
> config.default.yaml
> Why is this error raised?  I just want to be sure that conventional
> generator are accounted for!
>
> Thank you again for your  support and helpfulness!
> Felix Delgado
>
>
>
>
> On Wed, Apr 6, 2022 at 8:16 AM Johannes Hampp
> <johanne...@zeu.uni-giessen.de
> <mailto:pypsa%2Bunsu...@googlegroups.com>
> > <mailto:pypsa+un...@googlegroups.com
> <mailto:pypsa%2Bunsu...@googlegroups.com>>.
> <https://groups.google.com/d/msgid/pypsa/edfa8b46-3a48-4f52-b044-06a61773280en%40googlegroups.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/pypsa/edfa8b46-3a48-4f52-b044-06a61773280en%40googlegroups.com?utm_medium=email&utm_source=footer>>.
>

Felix Delgado Elizundia

unread,
Apr 7, 2022, 9:35:51 AM4/7/22
to pypsa
Johannes, 

Apologies to keep pestering you with small questions. Your answers have really helped to understand the library and are very much appreciated. Please feel free to answer them at your own time and discretion

I do have another small question regarding the potential intermediate output.
I am having a bit trouble grasping what this potential actually means.

I see in rule build_renewable_profiles that potential is:
           potential = capacity_per_sqkm * availability.sum('bus') * area
and availability is the avilability.matrix of the cutout excluding the determined areas (natura, depth, shore distance), an atlite function that computes the eligible share within cutout cells in the overlap with shapes.

So in a sense, it basically is the config parameter capacity/sqkm times the available shape? It does not consider the available resources(wind/solar) and locations with more of them yet, right? It is just the available space where turbines could be placed, without taking into account where to place them?

It is only after when the capacity factors of each grid cell are computed and then used as a layout to calculate the profiles and capacities where available resources are taken into account, correct?
    capacity_factor = correction_factor * func(capacity_factor=True, **resource)
    layout = capacity_factor * area * capacity_per_sqkm
    profile, capacities = func(matrix=availability.stack(spatial=['y','x']),
                                layout=layout, index=buses,
                                per_unit=True, return_capacity=True, **resource)


Thank you again!
Warm regards
Felix Delgado




Reply all
Reply to author
Forward
0 new messages