openENTRANCE / openentrance

Definitions of common terms (variables, regions, etc.) for the openENTRANCE project
http://openentrance.eu
Apache License 2.0
30 stars 49 forks source link

OnSSET variables #320

Open mvittorio-unh opened 5 months ago

mvittorio-unh commented 5 months ago

New variables for OnSSET

phackstock commented 4 months ago

@mvittorio-unh, I fixed some of the issues and now we're getting close to finishing this PR. Couple of issues to get through but then we should be done

Re-defined variables

Currently you re-defined 8 variables. This is an issue since a variable must only be defined once. These are the 8 in question:

ValueError: Collected 8 errors:
  1. Duplicate item in variable codelist: Population|Electricity access|Share
  2. Duplicate item in variable codelist: Network|Electricity|Expansion Cost
  3. Duplicate item in variable codelist: Population|Connected|Grid|Existing
  4. Duplicate item in variable codelist: Population|Connected|Grid|New
  5. Duplicate item in variable codelist: Population|Connected|PV
  6. Duplicate item in variable codelist: Population|Connected|Hybrid|PV
  7. Duplicate item in variable codelist: Population|Connected|Hybrid|Wind
  8. Duplicate item in variable codelist: Population|Connected|Hydro

I could just remove the ones that you added but at least for some of them you use different units to what was already there. Please take a look to make sure that your model outputs conform to the variables and remove your variables accordingly.

End Year variables

There are still a number of variables that contain End Year. From my understanding that would just be the last value in the time series. If that's correct please remove these variables. If my assumption is not correct, just let me know.

skip-region-aggregation: true

There are a number of variables that you introduced where you put skip-region-aggregation: true. Is that on purpose? What this attributes means that this variable will be skipped for region aggregation. As we're currently implementing African regions (West Africa, North Africa, etc...) we would want to aggregated as many variables as we can. So if you remove this line our processing will attempt to aggregate the variable.

Non-sum aggregations

There are a number of variables that are maximum or minimum values. These need special aggregation as the default is to just sum values. I'd be happy to help with that if you provide me with a list of variables that you'd like to add where you would say that a summation is not the right way to compute a meaningful aggregate.

Open comments

I have closed all the comments that you addressed from my last review. However, there's still a few open ones left. Please have a look, you can answer them in the comments directly.

phackstock commented 2 months ago

@mvittorio-unh, thanks for your answers via email. I've addressed all the open points mentioned above. For the duplicate variable of Network|Electricity|Expansion Cost, I've taken the liberty and renamed it to Network|Electricity|Total Expansion Cost. I hope that's fine with you. Unfortunately, we have a new (hopefully final) set of errors:

The following variables are used as 'weight' for aggregation but are not defined in the variable codelist:
'Final Energy|Diesel' used for 'Price|Final Energy|Diesel|Low' in: variable/energy/energy-prices.yaml
'Final Energy|Diesel' used for 'Price|Final Energy|Diesel|High' in: variable/energy/energy-prices.yaml
'Primary Energy|Electricity' used for 'Price|Primary Energy|Electricity' in: variable/energy/energy-prices.yaml
'Primary Energy|Electricity' used for 'Price|Primary Energy|Electricity|Expansion' in: variable/energy/energy-prices.yaml

these errors mean that as an aggregation weight you've used a variable that does currently not exist. There are two possible fixes for this solution:

  1. You take a look at the current list of variables and find one that most closely matches the weight that you would want to use
  2. You add the missing variables to the codelists

Option 1. is preferable for me since it does not introduce new variables. If you can't find a good fit though adding new variables is totally fine as well.