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

Fix the Snakemake plotting script #108

Open
samgdotson opened this issue Dec 1, 2020 · 1 comment
Open

Fix the Snakemake plotting script #108

samgdotson opened this issue Dec 1, 2020 · 1 comment
Assignees
Labels
Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:2-Challenging This issue may be complex or require specialized skills. Priority:2-Normal This work is important and should be completed ASAP. Status:1-New No one has claimed this issue yet. It is in need of solving. Type:Feature New feature or feature request

Comments

@samgdotson
Copy link
Collaborator

Currently the snakemake executes

rule make_plots:
    input:
        expand(r"data_files/{db}_{scenario}_model/{scenario}_OutputLog.log",
               zip,
               db=DBS, scenario=SCENARIOS)
    output:
        "figures/{scenario}_{sector}_capacity.png",
        "figures/{scenario}_{sector}_generation.png",
        "figures/{scenario}_{sector}_emissions_co2eq.png",
        "figures/{scenario}_{sector}_emissions_spent-fuel.png",
        "figures/{scenario}_{sector}_emissions_ewaste.png"
    script:
        "data_parser.py"

data_parser.py makes all plots by itself. This works but it's much slower than it needs to be because it makes ALL the plots for EACH input file. So much of the work is repeated numerous times. A single scenario run takes ~40 seconds to make all of the plots. With 5 scenarios in total, snakemake should take ~3.5 minutes. Instead it takes ~13 minutes (because it is repeating work).

This issue can be closed when...

When a new script has been added to snakemake that produces plots for a single Temoa output file to remove this repetition of work.

@samgdotson samgdotson added Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:2-Challenging This issue may be complex or require specialized skills. Priority:2-Normal This work is important and should be completed ASAP. Status:1-New No one has claimed this issue yet. It is in need of solving. Type:Feature New feature or feature request labels Dec 1, 2020
@samgdotson samgdotson self-assigned this Dec 1, 2020
@robfairh
Copy link
Contributor

@samgdotson Has this feature been implemented already?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Comp:Build This issue has to do with the build system of the code/doc (makefiles, cmake, install errors) Difficulty:2-Challenging This issue may be complex or require specialized skills. Priority:2-Normal This work is important and should be completed ASAP. Status:1-New No one has claimed this issue yet. It is in need of solving. Type:Feature New feature or feature request
Projects
None yet
Development

No branches or pull requests

2 participants