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

Experimenting with running PyPSA-USA #20

Open
SermishaNarayana opened this issue Jul 3, 2024 · 4 comments
Open

Experimenting with running PyPSA-USA #20

SermishaNarayana opened this issue Jul 3, 2024 · 4 comments

Comments

@SermishaNarayana
Copy link
Collaborator

No description provided.

@finozzifa
Copy link
Collaborator

finozzifa commented Jul 16, 2024

Recap of activities on July 16th 2024

  • Fork pypsa-usa
  • Installed the environment with conda env create -f environment.yaml
  • Executed pip install git+https://github.com/PyPSA/atlite.git@master git+https://github.com/PyPSA/powerplantmatching.git@master git+https://github.com/PyPSA/linopy.git@master as highlighted in main.yaml
  • Modified .test.sh such that snakemake -call all --configfile config/test/config.test_simple.yaml --rerun-triggers=mtime becomes snakemake -call all --configfile config/tests/config.test_simple.yaml --rerun-triggers=mtime. Without this change, the CI led to the error
(pypsa-usa) fabriziofinozzi@Fabrizios-MBP pypsa-usa % bash .test_sh 
Restricted license - for non-production use only - expires 2024-10-28
No parameters matching '_test' found
Traceback (most recent call last):
  File "/opt/anaconda3/envs/pypsa-usa/bin/snakemake", line 10, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/anaconda3/envs/pypsa-usa/lib/python3.11/site-packages/snakemake/__init__.py", line 3141, in main
    success = snakemake(
              ^^^^^^^^^^
  File "/opt/anaconda3/envs/pypsa-usa/lib/python3.11/site-packages/snakemake/__init__.py", line 570, in snakemake
    update_config(overwrite_config, load_configfile(f))
                                    ^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/pypsa-usa/lib/python3.11/site-packages/snakemake/io.py", line 1720, in load_configfile
    config = _load_configfile(configpath)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/pypsa-usa/lib/python3.11/site-packages/snakemake/io.py", line 1694, in _load_configfile
    obj = open(configpath_or_obj, encoding="utf-8")
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'config/test/config.test_simple.yaml'
  • Executed bash .test.sh

This resulted unfortunately in a failed run. The console output is available at pypsa_usa_log.txt

@finozzifa
Copy link
Collaborator

finozzifa commented Aug 23, 2024

There have been recent updates to the pypsa-usa repository. The model execution is still quite complex.

To perform a model run, please perform the following operations:

  • modify the Snakefile: modify the Snakefile available at ../pypsa-usa/workflow/Snakefile such that
configfile: "repo_data/config/config.validation.yaml"
configfile: "repo_data/config/config.cluster.yaml"
configfile: "repo_data/config/config.common.yaml"
configfile: "repo_data/config/config.plotting.yaml"
configfile: "repo_data/config/config.api.yaml"
  • modify the config.default.file: modifyt the config.default.yaml file at ../pypsa-usa/workflow/repo_data/config/config.default.yaml such that
scenario:
  interconnect: [usa] #"usa|texas|western|eastern"
  clusters: [10]
  opts: [REM-1000SEG]
  ll: [v1.0]
  scope: "total" # "urban", "rural", or "total"
  sector: "" # G
  planning_horizons:
  - 2030    #(2018-2023, 2030, 2040, 2050)
  • perform cd workflow and execute snakemake --configfile repo_data/config/config.default.yaml -j1 resources/Default/usa/elec_base_network.nc

@finozzifa
Copy link
Collaborator

The result for 10 clusters is available at https://drive.google.com/file/d/1vD85yZ89og2tOU4YN3oTeevpv_pALy_2/view?usp=drive_link

@finozzifa
Copy link
Collaborator

I raised an issue: PyPSA/pypsa-usa#390

@ekatef ekatef changed the title Running the model without errors - PyPSA-USA Experimenting with runningPyPSA-USA Nov 19, 2024
@ekatef ekatef added this to the Initial Exploration milestone Nov 19, 2024
@ekatef ekatef changed the title Experimenting with runningPyPSA-USA Experimenting with running PyPSA-USA Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants