JGCRI / trackingC

Where does fossil fuel C end up, and how does that change with changing parameters?
MIT License
3 stars 0 forks source link

Airborne fraction #27

Closed leeyap closed 2 years ago

leeyap commented 2 years ago

Hi @bpbond,

Here is the beginning of airborne fraction code and plotting.

Currently, the code looks at two things: how much earth_c is in atmos_c in each year, and the change in the earth_c pool year to year.

First, I isolated the atmosphere pool with human emissions as the source and calculated the source quantity to get the amount of earth_c in atmos_c. I then computed the difference between each year, by run_number.

Separately, I isolated the earth_c pool. I computed the change in the pool_value between each year to find how much carbon left earth_c.

Then, I divided the amount of earth_c in the atmosphere in each year by the change in the earth_c pool to get airborne fraction in each year.

At least, this was my thought process. The year 2100 seems to be an inflection point. In every run, the change in earth_c is very small in the years surrounding 2100, and is negative in 2100 itself. This then gives negative airborne fractions and creates a weird dip in the graph. I'm really not sure where I'm going wrong.

I tried using a larger time step than one year to get more of a net change in hopes that it would get rid of the teeny changes around 2100, but that didn't work. I also tried looking at 1000 runs instead of 100 in case it was an anomaly, but I think something is wrong with the way I'm calculating AF.

Any ideas? Suggestions?

Thank you!

image

bpbond commented 2 years ago

Hello @leeyap !

Thanks for the complete description above. Making some notes here because I was surprised by a couple of these points:

Wikipedia:

The airborne fraction is a scaling factor defined as the ratio of the annual increase in atmospheric CO2 to the CO2 emissions from anthropogenic sources

Bennedsen et al. 2019:

The airborne fraction AF = Gt/Et is the ratio of the growth of atmospheric CO2 in period t to the amount of CO2 emitted in period t .

Sources everywhere describe AF as "what fraction of emissions remain in the atmosphere". But per the definitions above, that's not exactly right. Also, note that while Wikipedia says "annual", it is computed in reference to an explicit time window.

bpbond commented 2 years ago
pad <- function

Clever! Another option would be simply x_diff = c(NA, diff(x))

bpbond commented 2 years ago

OK, so what's going on?

In every run, the change in earth_c is very small in the years surrounding 2100, and is negative in 2100 itself. First, I isolated the atmosphere pool with human emissions as the source and calculated the source quantity to get the amount of earth_c in atmos_c. I then computed the difference between each year, by run_number.

These don't seem right. First, CO2 emissions don't turn negative in SSP 245; if delta earth_c < 0 there's a problem (or something unexpected).

I think we have two things we want to compute:

AF computed traditionally

I.e. as delta CO2atm / emissions. To do so annually it'd be something like

x %>% 
  mutate(atm_diff = c(NA, diff(atmos_c),
               af = atm_diff / ffi_emissions))` 

I think better to use the actual emissions number than to infer it from delta earth_c.

AF computed using tracking

How much of emissions remain in the atmosphere?

x %>%
  mutate(cum_emissions = cumsum(ffi_emissions),
               af = atm_source_earth_c / cum_emissions))

Hmm, you could also do this annually I guess...which is kind of like what your code is trying to do now I think.

bpbond commented 2 years ago

Ah okay, atmospheric CO2 declines during the run and so your AF computation goes negative. Got it. Here's how I would do the first AF computation above:

output_slice %>% 
  filter(pool_name %in% c("atmos_c", "earth_c")) %>% 
  group_by(run_number, year, pool_name) %>% 
  summarise(pool_value = sum(pool_value)) %>% 
  arrange(year) %>% 
  pivot_wider(names_from = "pool_name", values_from = "pool_value") %>% 
  group_by(run_number) %>% 
  mutate(atm_diff = c(NA, diff(atmos_c)), 
         earth_diff = c(NA, diff(earth_c)), 
         af = atm_diff / -earth_diff) %>% 
  ggplot(aes(year, af, group=run_number)) + geom_line() + ggtitle("Year-to-year AF")

af

Numerically different but basically the same as your graph above.

This is interesting! Let's discuss on Friday?