PyPSA / pypsa-usa

PyPSA-USA: An Open-Source Energy System Optimization Model for the United States
https://pypsa-usa.readthedocs.io
MIT License
55 stars 23 forks source link

Can not locate EEZ offshore wind shape file #139

Closed trevorb1 closed 11 months ago

trevorb1 commented 11 months ago

Checklist

The Issue

When I try to run the workflow with default configuration I get the following error:

MissingInputException in rule build_shapes in file /home/trevor/repos/pypsa-usa/workflow/Snakefile, line 243:
Missing input files for rule build_shapes:
    output: resources/texas/country_shapes.geojson, resources/texas/onshore_shapes.geojson, resources/texas/offshore_shapes.geojson, resources/texas/state_boundaries.geojson
    wildcards: interconnect=texas
    affected files:
        data/gis/conus_eez.shp

As the CA_OSW shapes are still in the repo_data/ folder, did the EEZ shapefile just got missed being commited, @ktehranchi? However, the snakefile says it should be under the data/ folder (which should pull from Zenodo), but I don't see gis/conus_eez.shp in the deposit either?

Steps To Reproduce

  1. Clone the repo
  2. Run snakemake -j6

Expected Behavior

The workflow should run

Error Message

No response

Anything else?

Would it be worth moving the following configuration option to the config.osw.yaml file?

offshore_shape:
  use: eez #options are ca_osw, eez
trevorb1 commented 11 months ago

Also, the final else statement where the offshore_config is used I believe should read

    else:
        logger.error(f"source {offshore_config} is invalid offshore data source")
        offshore = None

(ie. replace the {source} with {offshore_config} in the f string)

https://github.com/PyPSA/pypsa-usa/blob/2c1833191619828847824ddc43b596c249e08cc9/workflow/scripts/build_shapes.py#L253-L262

trevorb1 commented 11 months ago

The f string issue has been fixed in PR #141