Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run GCAM with 1 year time steps #504

Open
Lance-bot opened this issue Jan 5, 2025 · 2 comments
Open

Run GCAM with 1 year time steps #504

Lance-bot opened this issue Jan 5, 2025 · 2 comments

Comments

@Lance-bot
Copy link

Lance-bot commented Jan 5, 2025

Hi everybody,

I am trying to run the model using the below time settings (namely with 1 year time steps), and I have already generated the corresponding XML files. However, some of these files contain missing values for certain years.

Thanks so much for any help!

Image

And when I used interpolation to fill in the missing data, I encountered warnings during run-gcam. Is there currently a solution to this?
Image

@pkyle
Copy link
Contributor

pkyle commented Jan 6, 2025

Ambitious! The model has been run with one year time steps, though the last time I am aware of was about 3 years ago (GCAM 5), and maintaining the capability to run with one year time steps is not a tested or enforced condition of core model proposals. So unfortunately any core model proposal from the last few years could have broken this capability. At a glance it looks like global detailed industry and natural gas trade are the ones responsible for these highlighted errors. What probably happened is that assumptions data tables specified values in all necessary years, running with 5-year timesteps, and then the processing code did not bother to complete to all model years. Working backwards from the XML files where you find incomplete data for 2021, here is an example of what the processing code should look like to properly assign values to all years:

A22.globaltech_coef %>%
      gather_years(value_col = "coefficient") %>%
      complete(nesting(supplysector, subsector, technology, minicam.energy.input), year = c(year, MODEL_BASE_YEARS, MODEL_FUTURE_YEARS)) %>%
      arrange(supplysector, year) %>%
      group_by(supplysector, subsector, technology, minicam.energy.input) %>%
      mutate(coefficient = approx_fun(year, coefficient, rule = 1)) %>%
      ungroup() %>%
      filter(year %in% MODEL_YEARS) %>%

@Lance-bot
Copy link
Author

Really appreciate the quick feedback and suggestions. I will try them out ASAP, and report back to you on what happens. Super grateful for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants