quintel / etmodel

Professional interface of the Energy Transition model.
https://energytransitionmodel.com/
MIT License
33 stars 14 forks source link

Weather conditions slide should not freeze for Sweden (and maybe more countries) #4000

Closed marliekeverweij closed 2 years ago

marliekeverweij commented 2 years ago

A client just called me about this issue. When starting a new Sweden scenario and going to the "Weather conditions slide" the model crashes: the slide freezes and you cannot click on anything anymore.

Maybe this has to do with the FLH sliders for Sweden? The flh for inland wind are 4189.6761 and this is higher than the max value for that slider 3500

Screenshot 2022-08-25 at 09 50 25

antw commented 2 years ago

A code fix is on the way to staging and will be sent to production shortly.

Ultimately, the cause is that the FLH for inland wind turbines has the following:

- max_value = 3500.0
- min_value_gql = present:V(energy_power_wind_turbine_inland, full_load_hours)

The maximum value is set to a maximum of 3500. However, in Sweden, the min value (the present value for inland turbine FLH) returns 4189.6761.

The code change will fix the page locking up, but the slider will be disabled so long as min > max.

@marliekeverweij Can you decide what you'd like to do about the slider values? Of course, reassign this as you see fit.

marliekeverweij commented 2 years ago

We have two options for fixing this:

  1. Increasing slider max to 4500
  2. Changing inland wind flh for Sweden (All other countries have flh lower than 3000 for inland wind)

We used the same approach for calculating the flh for all EU datasets based on hourly profiles of Renewables Ninja. I prefer not to change this approach for one country. So I prefer to change the slider max. What do you think? Notifying @DorinevanderVlies as she calculated these flh. But everybody else is welcome to give their opinion! @quintel/core

DorinevanderVlies commented 2 years ago

I am ok with option 1

DorinevanderVlies commented 2 years ago

Hmmm, Renewables.ninja shows a capacity factor of ~25% for onshore wind. That would mean ~2200 flh. Let's see if I can track where the 4500 comes from

image
marliekeverweij commented 2 years ago

Thanks @DorinevanderVlies !

DorinevanderVlies commented 2 years ago

When I run the script I get inland flh of 2223 en offshore flh of 4189

image

It seems to me that the flh of onshore wind is currently incorrect in The Swedish dataset. It should be 2223.

image

Script: Projects/etdataset/curves/supply/wind/script/process_wind_renewables_ninja.py Command: python3 process_wind_renewables_ninja.py se 2019

AlexanderWirtz commented 2 years ago

@DorinevanderVlies that seems more realistic. I would not want to live in a country with onshore FLH of > 4500. :-)

marliekeverweij commented 2 years ago

Thanks for the answer to this issue! I checked alll countries and found that also in the UK the flh are different:

AlexanderWirtz commented 2 years ago

IF we fix this, it may affect the Guidehouse scenarios for NSPWH.