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

Modify scripts to include all SSPs #38

Closed leeyap closed 2 years ago

leeyap commented 2 years ago

Hi @bpbond,

This initial code (work in progress!) reworks my existing scripts so that Hector can be run in multiple scenarios. This might not be the most efficient way to do this, but it works and does not majorly increase computation time.

There are quite a few little tweaks that I made to get this to work, but the major changes are as follows:

I started to tackle redoing some figures. I was able to run the CMIP6 temperature comparison diagnostic and filter out bad runs by scenario. Which figures would be most useful to modify to include all the SSPs? I think definitely the airborne fraction and the destination fraction graphs, and the relative importance one.

Comments and feedback appreciated, as always. Happy to go over the changes, too. Thanks!

leeyap commented 2 years ago

Small comment on new method - previously, each run had a run number of 1-100 (or whatever) and only SSP245 had 101-1000. The reason that I did it like that was so that across each run number (1-100), the parameter values were the same, so it was easy to compare outputs across scenarios, holding the parameters constant. I'm not sure if this is something we want to preserve.

(I'm only realizing this as I look at the graphs)

leeyap commented 2 years ago

@bpbond I don't know why the Rmarkdown check is failing...? The line of code that it is saying is problematic doesn't fail on my machine, or when I knit locally.

bpbond commented 2 years ago

@leeyap A couple of problems — one 100% MY FAULT 😬 and the other due to Kalyn's output-renaming changes. Pushed a fix!

leeyap commented 2 years ago

@bpbond thank you!

bpbond commented 2 years ago

@leeyap It looks like your last commit a0ed50d broke a lot of things—there now are duplicate chunk labels, incorrect figure captions, and a broken facet_wrap in line 227. FYI!

bpbond commented 2 years ago

Also I see

# Just looking at 5 random runs across scenarios
### THIS NO LONGER WORKS
dest_runs <- ffi_destinations %>%
  group_by(ssp) %>%
  filter(year == min(year)) %>%
  slice_sample(n = 5) %>%

😕

Let me know if I can help.

leeyap commented 2 years ago

@bpbond I think this should be just about ready to go!

bpbond commented 2 years ago

Woo hoo! Great end to the week. I'm happy to look over if useful, but go for it if you'd like immediate satisfaction :)