JGCRI / gcam-core

GCAM -- The Global Change Analysis Model
http://jgcri.github.io/gcam-doc/
Other
275 stars 162 forks source link

Bug in the primary energy consumption by region (direct equivalent) query in GCAM-USA? #452

Open Silviameteoro opened 1 month ago

Silviameteoro commented 1 month ago

Hello,

I am wondering if there is a bug in the query 'primary energy consumption by region (direct equivalent)' under GCAM-USA.

I have been exploring several states and I do NOT see fossil fuels consumption in any state. If the answer is yes, how could this be solved?

Thanks for any help on that.

pkyle commented 1 month ago

The reason why the query is coming up empty is that the primary energy commodities consumed by energy transformation sectors and end use sectors within the states are actually being supplied from outside of the state. For example, regional coal does not exist as a sector within the state regions; it is in the grid regions. regional biomass is contained within in the USA region. The renewables are state markets, but the electric generation technologies might not be tagged with the keywords being used by the primary energy queries. I don't know how one would write a query to compile all of the information; what I would do instead is just to query “inputs by sector” and then perform the necessary mappings and aggregations either in a spreadsheet or a short R script. A separate query for hydropower production will be necessary.

Silviameteoro commented 1 month ago

Hi @pkyle,

Thanks for the very useful clarification.

I am assuming that we should NOT use any info from the 'primary energy consumption' query ... I am mentioning that because if I compare one source (e.g., nuclear) from the primary energy query with the sum of nuclearFuelGenII and III from the 'Inputs by Sector' query, the numbers are VERY different ...

Probably, it is wise to move forward using only the 'Inputs by Sector' query ...

Admittedly, I am somewhat struggling to identify all primary energy commodities ... Nuclear, solar and wind seem OK, but I am not totally confident about the fossil fuel ones.

I am wondering if may have an additional hint and thanks again for your time,

pkyle commented 1 month ago

Yeah I'm realizing this is a little bit complicated even for fossil fuels because of the upstream fuel blending. If you just assign, for example, wholesale gas and delivered gas to natural gas, then a state's consumption of natural gas is just equal to the sum of those two. But that misses any bio gas and coal to gas blending, which might be trivial, depending on the scenario. That blending happens in the USA region. Estimating oil demand at the state level would be more difficult, because again the blending between the different liquid fuel refining technologies happens in the USA region, and in this case it is not trivial. I guess you would just estimate the oil consumption as the sum of refined liquids industrial and refined liquids enduse, multiplied by the petroleum share of refining in the USA region in the given time period and scenario. Coal is just the sum of regional coal and delivered coal. Biomass is the sum of regional biomass and delivered biomass. You may also want to add in biomass liquids, which is basically the same calculation as described above for petroleum. Wind and solar should be simple enough, as the supply curves are indicated in terms of electrical energy. So the inputs of e.g. “onshore wind” to all technologies that consume it can be added up and that is the primary energy consumption of wind. I don't recommend querying electric generation output for wind and solar, as the reported totals will include any backup electricity that is produced from natural gas combustion turbines. Also, querying the inputs will pick up any wind and solar that is used for direct hydrogen production, which would not show up in a query of electricity generation. Geothermal supply curves are indicated in heat, so to get the correct reported number you'll divide the input by 10. That is, if the electric sector consumes 0.1 EJ of geothermal, then it produces 0.01 EJ of electricity, and the correct number to report for primary energy consumption is 0.01. This one could be queried from the electric sector output as there are not currently other uses of geothermal energy modeled. For nuclear, the inputs of nuclearFuelGen* should be divided by three, in order to get the electricity generation output, which is the correct number to be using. You can also just query the output of the electricity technologies here. Hydro will need to be queried from electricity generation by subsector or technology, as it does not consume an input and will not show up in a query of inputs.

Silviameteoro commented 3 weeks ago

Hi @pkyle

Thanks again for the clarification. This has been very useful. I got to a 'proxy' plot for primary energy consumption based on the prior comments. I am just wondering from which query within the USA region I could estimate the bio gas and coal to gas blending that is not being accounted for yet in the suggested approach.

A more general question: to examine outputs at the state level, can I use the other queries outside the GCAM USA queries? I am particularly interested in GHG emissions and water-sector queries ...

Thanks

pkyle commented 3 weeks ago

There are queries for the inputs to gas processing in the “other energy transformation” section of the queries; the issue is that you have to query the USA region. There is no information available at the state level, as the gas processing sector was never set up in the states. Re: querying more generally, unfortunately there is no substitute for familiarity with the model. The GCAM-USA specific queries at the end of the queries file were made because the structural changes of selected parts of the GCAM-USA energy system made it so that the regular queries were not working correctly. For example, in the power sector, the names of every relevant sector, subsector, and technology are different, so the corresponding queries that work in the 32 regions do not work in the states. Still, for the sectors that you don't see specific queries for in the GCAM-USA section of the queries file, the normal queries work, or at least don't return bad information. If you try to query chemicals industry energy consumption by state, the query will return no results because this industry is not represented at the state level in GCAM-USA. One thing to be aware of, relevant for primary energy consumption, is that even simple cross cutting queries like “inputs by technology” do not get the whole energy system in GCAM-USA, as this query does not return information in cases where multiple nesting subsectors are used (the electric power sector in GCAM-USA has multiple subsector levels). “inputs by sector” will work fine.