quintel / etsource

Data source for the Energy Transition Model
https://energytransitionmodel.com/
MIT License
12 stars 8 forks source link

Sankey should show biomass and not 'aardgas' when all network gas is green gas #2999

Open MartLubben opened 5 months ago

MartLubben commented 5 months ago
image

In a scenario with only green gas The Sankey shows 'aardgas'.

kaskranenburgQ commented 4 months ago

I think it will be difficult to change the label to a conditional format. Would it be better to change the label to "netwerkgas"? @mabijkerk What do you think?

kaskranenburgQ commented 3 months ago

I have delved at this issue a bit further: We could add biogas to biomass products. We would then need to remove network_gas from the network_gas flow. I will investigate if this is a possible and wishful solution.

mabijkerk commented 3 months ago

Issue I would have thought that green gas would be part of the biomass products anyway, or specifically the share of green gas in the gas network. When I go to the query underlying the flow from biomass products to agriculture (biommas_products_to_agriculture_in_sankey), this appears to be the case:

- query =
    DIVIDE(
        SUM(
            V(INTERSECTION(INTERSECTION(SECTOR(agriculture),G(final_demand_group)),USE(energetic)),"input_of_wood_pellets + input_of_biodiesel + input_of_bio_ethanol + input_of_bio_lng + input_of_bio_kerosene"),
            SUM(V(INTERSECTION(INTERSECTION(SECTOR(agriculture),G(final_demand_group)),USE(energetic)), input_of(network_gas, compressed_network_gas))) * Q(share_of_sustainable_gas_in_gas_network)
        ),
    BILLIONS)

However, looking at the flow from natural gas to agriculture (final_demand_of_natural_gas_and_derivatives_in_agriculture_energetic), this approach is not mirrored:

- query =
    SUM(
      V(
          FILTER(
            FILTER(
              FILTER(
            EG(final_demand),"sector == :agriculture"), "network_gas? || compressed_network_gas? || natural_gas? || lng? || propane?"
          ),
          "energetic?"
        ),
        value
      )
    )
     / BILLIONS

Conclusion It seems that for biomass products we have taken the approach of the green gas share into biomass products, while for natural gas we have taken the approach of using network gas as a whole. This means that we double count some flows in the Sankey.

Solution Both approach are valid. However, for the Sankey I believe we chose the first approach: splitting network gas into its green and fossil shares. Therefore we should add queries to the Sankey that only take the fossil share into account for natural gas. We should not remove the existing final demand queries where the second approach is used, as they are still used in a number of charts.

Would be great if you could pick this up @kaskranenburgQ.

kaskranenburgQ commented 3 months ago

Thanks for the clarification @mabijkerk ! As far as I can see the query biomass_products_to_agriculture_in_sankey is not referred to in the query for biomass to agriculture, final_demand_of_biomass_products_in_agriculture_energetic is used instead.

In this query greengas is not used:

# Final demand of the 'biomass_products' carrier group

- unit = PJ
- query =
    SUM(
      V(
        FILTER(
          FILTER(
            FILTER(
              EG(final_demand),"sector == :agriculture"
            ),
            energetic?
          ),
          biodiesel?
        ),
        value
      ),
      V(
        FILTER(
          FILTER(
            FILTER(
              EG(final_demand),"sector == :agriculture"
            ),
            energetic?
          ),
          bio_ethanol?
        ),
        value
      ),
      V(
        FILTER(
          FILTER(
            FILTER(
              EG(final_demand),"sector == :agriculture"
            ),
            energetic?
          ),
          wood_pellets?
        ),
        value
      ),
      V(
        FILTER(
          FILTER(
            FILTER(
              EG(final_demand),"sector == :agriculture"
            ),
            energetic?
          ),
          bio_lng?
        ),
        value
      )
    ) / BILLIONS

This would mean that greengas is not counted double in the current state of the sankey but fully attributed to natural gas instead.
I will use the biomass_products_to_x_in_sankey queries instead and use your approach to rewrite the natural gas queries.

github-actions[bot] commented 1 month ago

This issue has had no activity for 60 days and will be closed in 7 days. Removing the "Stale" label or posting a comment will prevent it from being closed automatically. You can also add the "Pinned" label to ensure it isn't marked as stale in the future.