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

Feature road transport #269

Merged

Conversation

SimonS898
Copy link
Contributor

@SimonS898 SimonS898 commented Sep 27, 2023

Fixes # .

Implements road transport demand and road bau transport demand in euro-calliope develop, by making use of some functionality out of sector-coupled-euro-calliope and euro-calliope(branch: feature-sector-coupling).

Checklist

Any checks which are not relevant to the PR can be pre-checked by the PR creator. All others should be checked by the reviewer. You can add extra checklist items here if required by the PR.

  • CHANGELOG updated
  • Minimal workflow tests pass
  • Tests added to cover contribution
  • Documentation updated
  • Configuration schema updated

brynpickering and others added 30 commits August 21, 2023 14:59
- get jrc_idees_zipped and jrc_idees_unzipped to run if called specifically: include jrc-idees.smk into Snakefile
…anch based on develop

- adjust transport.py file to only contain road transport
- add missing utils functions to utils.py
- adjust default.yaml env to contain styleframe,xarray,netcdf
…-road-transport-v2:

- create eurstat.smk file that only contains eurostat_data_tsv rule
- adjust config file to contain eurostat-base-url
TODO: move eurostat data files into develop data-repository on git! and then adjust config file accordingly
…o feature-road-transport-v2:

- complement annual_energy_balances rule to eurostat.smk
- add annual_energy_balance.py to scrips and adjust utils.py to contain all needed functions by it
- adjust snakefile to contain eurostat.smk rules
…road-transport-v2:

- create ch-stats.smk and add rule: ch_data_xlsx to it
- adjust config file to contain all ch-stats urls
- include newly added ch-stats.smk into snakefile
- remove all ch-stats download links not needed for transport demand: namely only leave  for ch-energy-balance.xlsx in
- left the wildcard.dataset syntax in for future downloads of futher ch-stats
…coupling into feature-road-transport-v2:

- add transport.py into ch-stats/scripts and adjust utils.py to contain remove digits needed by transport.py
…_annual_energy_balances rule from feature-sector-coupling into feature-road-transport-v2:

- transfered blend_and_rename_per_sector.py
- adjusted utils by adding merge_da, which is needed by blend_and_rename_per_sector.py
- adjusted config to contain eurostat mappings
- added carrier-names.csv which is also a mapping for eurostat data
…ot one using sectoral_annual_energy_balances:

- deleted the old two rules and wrote the sectoral_annual_energy_balances, to only create the data for the road-transport sector
-started adjusting the blend_and_rename_per_sector.py script (removing the industry sector case)
- TODO: could remove all cases except the first one conatining the other-road-transport, should we do that would also cause the helper functions to fall out, but they could potentially be used later
-TODO: Same question for eurostat-to-sectors in config file, would only need road-transport and other-road-transport
…ng into feature-road-transport-v2:

- added annual_road_rail_transport_demand.py script to transport scripts
- adjusted config to contain future-vehicle-efficiency-percentile
…use annual_road_transport_demand code provided by bryn pickering on sector-coupled-euro-calliope branch:

- jr-idees.smk: just had to adjust the outpath to be csv
- transport.py first tried to go from netcdf in the end back to csv, but resulted in almost all values being null -> realised after looking at data from sector-coupled branch, that the renaming isn't done there so could leave that out, yet i left the code changes in, in case it gets used later
…pe into feature-road-transport-v2:

--by bryn pickering!

- get annual_energy_balances rule + annual_energy_balance.py
- copy mappings into code
- adjust default.yaml to download also ch industry sector data, and adjust eurostat-energy-balances link to include only needed data
… into feature-road-transport-v2:

- adjust utils import, and add missing utils functions
- update rule, to have correct paths
… from sector-coupled-euro-calliope into feature-road-transport-v2:

- by bryn pickering
…nto feature-road-transport-v2:

- fix utils import
- remove all rail and other transportation related content
- remove unit dependency
- adjust annual_transport_demand rule to only output road transport related data
- add read_tdf to utils functions
- add new rule into transport.smk create_road_transport_demand_timeseries
- create script road_transport_timeseries.py: for creating a road transport demand timeseries
- creates timeseries for each vehicle_type for the temporal scope defined in the config
- uses the scaling factor out of config and temporary conversion factors for mio km to Mw(h) out of config
- creates the bau timeseries for the 3 respective vehicle types: passenger cars, coaches and buses, ldv
- make bau positive and other road transport demand negative
- clean up and comments
- clean up: remove debug prints and unnecessary comments
- clean up: change output paths so files are stored under build/data/transport/...
- remove malta out of countries for which jrc idees get downloaded, since malta is not included in spatial scope.
- clean up: remove dead code and unnecessary comments
- remove blend_and_rename_per_sector.py -> not needed in new version based on sector-coupled branch

- adjust eurostat.smk, remove old version of creating eurostat data
- remove not needed rule, processing of swiss data newly done in annual_energy_balance.py
- remove unused script
- remove mapping used for eurostat data creation before in blend and rename
- remove unnecessary comments
- use conversion factors out of sector-coupled branch
rename transport.py -> jrc_idees and move it into transport directory
start review annual_energy_balance.py
rename download rules
@timtroendle
Copy link
Member

Hi @SimonS898 , I fully understand that you may not have the time right now and that's fine. I can take over. Please finish as soon as possible and let me know what still needs to be done. This needs to be merged by end of week.

@SimonS898
Copy link
Contributor Author

Hi @SimonS898 , I fully understand that you may not have the time right now and that's fine. I can take over. Please finish as soon as possible and let me know what still needs to be done. This needs to be merged by end of week.

Hi @timtroendle, I pushed all the changes I have already done and marked the regarding comments, with either a comment itself or a reaction. I can also resolve the conversations of the requests I addressed?
Thanks so much for your understanding and sorry that I couldn't make all the changes.. work has been exhausting. I wish you the best of luck for your upcoming sprint and I am excited to see your progress! 🚀

@timtroendle
Copy link
Member

Fantastic, thanks. I will take care of the remainder.

@timtroendle
Copy link
Member

The current version works in the minimal workflow (when commenting regional resolution which is not implemented). There are still several TODOs to handle and the checklist above.

@timtroendle timtroendle linked an issue Mar 8, 2024 that may be closed by this pull request
Copy link
Member

@timtroendle timtroendle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After a second review (of partly my own changes) this looks now good to me. There are a few things missing or unclear and they are marked with TODOs and FIXMEs.

@timtroendle timtroendle merged commit 420ea48 into calliope-project:develop Mar 8, 2024
3 checks passed
@timtroendle
Copy link
Member

Awesome, this is now merged. 😮‍💨 Thanks a lot for your work @SimonS898 !

@SimonS898
Copy link
Contributor Author

Awesome, this is now merged. 😮‍💨 Thanks a lot for your work @SimonS898 !

Very exciting 🎉🎉, thank you so much for letting me be part of the project! And best of luck for the upcoming sprint! <3

jnnr pushed a commit to jnnr/euro-calliope that referenced this pull request Aug 27, 2024
jnnr pushed a commit to jnnr/euro-calliope that referenced this pull request Aug 27, 2024
jnnr pushed a commit to jnnr/euro-calliope that referenced this pull request Sep 3, 2024
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

Successfully merging this pull request may close these issues.

Add fully-electrified road transport
2 participants