{"id":297392,"name":"GEOH2","description":"Calculates the locational cost of green hydrogen production, storage, transport, and conversion to meet demand in a specified location.","url":"https://github.com/climatecompatiblegrowth/geoh2","last_synced_at":"2026-04-21T05:00:33.474Z","repository":{"id":221683153,"uuid":"616162333","full_name":"ClimateCompatibleGrowth/GeoH2","owner":"ClimateCompatibleGrowth","description":"Geospatial analysis of green hydrogen production costs.","archived":false,"fork":false,"pushed_at":"2025-03-14T10:30:57.000Z","size":3357,"stargazers_count":19,"open_issues_count":5,"forks_count":7,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-03-21T04:40:36.838Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ClimateCompatibleGrowth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-03-19T19:33:31.000Z","updated_at":"2025-11-06T01:36:38.000Z","dependencies_parsed_at":"2024-06-10T16:45:12.351Z","dependency_job_id":"5bb47886-e95d-4a4e-88ae-6e4e1af34508","html_url":"https://github.com/ClimateCompatibleGrowth/GeoH2","commit_stats":{"total_commits":126,"total_committers":7,"mean_commits":18.0,"dds":"0.38095238095238093","last_synced_commit":"3a43b5669eee272018a7be7526915b450b01b386"},"previous_names":["climatecompatiblegrowth/geoh2"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/ClimateCompatibleGrowth/GeoH2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateCompatibleGrowth%2FGeoH2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateCompatibleGrowth%2FGeoH2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateCompatibleGrowth%2FGeoH2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateCompatibleGrowth%2FGeoH2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClimateCompatibleGrowth","download_url":"https://codeload.github.com/ClimateCompatibleGrowth/GeoH2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ClimateCompatibleGrowth%2FGeoH2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30897823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-24T08:58:18.477Z","status":"ssl_error","status_checked_at":"2026-03-24T08:57:59.595Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"owner":{"login":"ClimateCompatibleGrowth","name":"Climate Compatible Growth","uuid":"62061836","kind":"organization","description":"","email":null,"website":"www.climatecompatiblegrowth.com","location":"United Kingdom","twitter":"ResearchCcg","company":null,"icon_url":"https://avatars.githubusercontent.com/u/62061836?v=4","repositories_count":41,"last_synced_at":"2024-05-12T00:45:27.743Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/ClimateCompatibleGrowth","funding_links":[],"total_stars":20,"followers":19,"following":0,"created_at":"2022-11-14T19:07:31.666Z","updated_at":"2024-05-12T00:45:32.890Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClimateCompatibleGrowth","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ClimateCompatibleGrowth/repositories"},"packages":[],"commits":{"id":1641528,"full_name":"climatecompatiblegrowth/geoh2","default_branch":"main","total_commits":128,"total_committers":6,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":21.333333333333332,"dds":0.390625,"past_year_total_commits":0,"past_year_total_committers":0,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":0.0,"past_year_dds":0.0,"last_synced_at":"2026-04-18T12:36:39.098Z","last_synced_commit":"b2d2c3299265c065d6ea9a0b63323c962da5b155","created_at":"2024-07-30T00:26:12.889Z","updated_at":"2026-04-18T12:36:37.122Z","committers":[{"name":"Claire Halloran","email":"73223403+clairehalloran","login":"clairehalloran","count":78},{"name":"samiyhanaqvi","email":"samiyha.naqvi@tss.ox.ac.uk","login":"samiyhanaqvi","count":29},{"name":"alycialeonard","email":"alycia.leonard17@gmail.com","login":"alycialeonard","count":12},{"name":"leandermue","email":"103034918+leandermue","login":"leandermue","count":6},{"name":"Flurina Schneider","email":"schneiderflu@gmail.com","login":"flurinaschneider","count":2},{"name":"Scot Wheeler","email":"68278279+scotiow","login":"scotiow","count":1}],"past_year_committers":[],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/climatecompatiblegrowth%2Fgeoh2/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-19T00:00:13.908Z","repositories_count":6214335,"commits_count":900179952,"contributors_count":34917572,"owners_count":1143627,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"climatecompatiblegrowth/geoh2","html_url":"https://github.com/climatecompatiblegrowth/geoh2","last_synced_at":"2026-04-11T00:01:55.022Z","status":"error","issues_count":12,"pull_requests_count":10,"avg_time_to_close_issue":2570904.75,"avg_time_to_close_pull_request":1246502.7777777778,"issues_closed_count":8,"pull_requests_closed_count":9,"pull_request_authors_count":4,"issue_authors_count":5,"avg_comments_per_issue":2.0,"avg_comments_per_pull_request":0.5,"merged_pull_requests_count":8,"bot_issues_count":0,"bot_pull_requests_count":0,"past_year_issues_count":3,"past_year_pull_requests_count":2,"past_year_avg_time_to_close_issue":2121187.3333333335,"past_year_avg_time_to_close_pull_request":28.5,"past_year_issues_closed_count":3,"past_year_pull_requests_closed_count":2,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":2,"past_year_avg_comments_per_issue":7.333333333333333,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":0,"past_year_merged_pull_requests_count":2,"created_at":"2024-08-09T05:04:26.548Z","updated_at":"2026-04-11T00:01:55.022Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/climatecompatiblegrowth%2Fgeoh2","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/climatecompatiblegrowth%2Fgeoh2/issues","issue_labels_count":{"bug":2,"enhancement":1},"pull_request_labels_count":{},"issue_author_associations_count":{"NONE":6,"COLLABORATOR":5,"CONTRIBUTOR":1},"pull_request_author_associations_count":{"COLLABORATOR":15,"NONE":3,"CONTRIBUTOR":1},"issue_authors":{"clairehalloran":5,"Bachirou06":2,"willu47":2,"scotiow":2,"paulapreuss":1},"pull_request_authors":{"clairehalloran":11,"samiyhanaqvi":4,"lukasschirren":2,"scotiow":2},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-15T00:00:09.535Z","repositories_count":14264609,"issues_count":34620384,"pull_requests_count":113211879,"authors_count":11234759,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{},"past_year_pull_request_author_associations_count":{},"past_year_issue_authors":{},"past_year_pull_request_authors":{},"maintainers":[{"login":"clairehalloran","count":16,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/clairehalloran"},{"login":"samiyhanaqvi","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/samiyhanaqvi"}],"active_maintainers":[]},"events":{"total":{"DeleteEvent":1,"ForkEvent":3,"IssuesEvent":5,"WatchEvent":8,"IssueCommentEvent":18,"PushEvent":36,"CreateEvent":1},"last_year":{"ForkEvent":1,"WatchEvent":4}},"keywords":[],"dependencies":[{"ecosystem":"pypi","filepath":"environment.yaml","sha":null,"kind":"manifest","created_at":"2024-06-10T16:45:11.179Z","updated_at":"2024-06-10T16:45:11.179Z","repository_link":"https://github.com/ClimateCompatibleGrowth/GeoH2/blob/main/environment.yaml","dependencies":[{"id":18524045328,"package_name":"cdsapi","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":18524045357,"package_name":"fiona","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":18524045358,"package_name":"pyproj","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":18524045359,"package_name":"rasterio","ecosystem":"pypi","requirements":"*","direct":true,"kind":"runtime","optional":false},{"id":18524045360,"package_name":"pillow","ecosystem":"pypi","requirements":"==9.2.0","direct":true,"kind":"runtime","optional":false}]}],"score":4.969813299576001,"created_at":"2024-07-30T00:01:06.301Z","updated_at":"2026-04-21T05:00:33.476Z","avatar_url":"https://github.com/ClimateCompatibleGrowth.png","language":"Python","category":"Energy Storage","sub_category":"Hydrogen","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"\u003e[!NOTE]\n\u003eWe now have a new repository for you to use! The new [GeoX](https://github.com/ClimateCompatibleGrowth/GeoX.git) repository contains both this repository and the [GeoNH3](https://github.com/ClimateCompatibleGrowth/GeoNH3.git) repository.\n\n\n# GEOH2\n**Geospatial analysis of hydrogen production costs**\n\nGEOH2 calculates the locational cost of green hydrogen production, storage, transport, and conversion to meet demand in a specified location. These costs can be compared to current or projected prices for energy and chemical feedstocks in the region to assess the competitiveness of green hydrogen. Currently, different end-uses, such as fertilizer production, export shipping, and steel production, are not modeled.\n\nThe model outputs the levelized cost of hydrogen (LCOH) at the demand location including production, storage, transport, and conversion costs. \n\nIn the code provided, the specific use case of Namibia is investigated. \nParameter references for this case are attached.\nHowever, as the code is written in a generalized way, it is possible to analyse all sorts of regions.\n\nGeoH2 builds upon a preliminary code iteration produced by Leander Müller, available under a CC-BY-4.0 licence: [https://github.com/leandermue/GEOH2](https://github.com/leandermue/GEOH2).\nIt also integrates code produced by Nick Salmon under an MIT licence: \n[https://github.com/nsalmon11/LCOH_Optimisation](https://github.com/nsalmon11/LCOH_Optimisation)\n___\n\n# Setup instructions\n\n## Clone the repository\nFirst, clone the GeoH2 repository using `git`. \n\n`... % git clone https://github.com/ClimateCompatibleGrowth/GeoH2.git`\n\n## Environment setup\nThe python package requirements are in the `environment.yaml` file. You can install these requirements in a new environment using `mamba` package and environment manager (installation instructions [here](https://mamba.readthedocs.io/en/latest/installation/mamba-installation.html)): \n\n` .../GEOH2 % mamba env create -f environment.yaml`\n\nThen activate this new environment using\n\n`.../GEOH2 % mamba activate geoh2`\n\n## CDS API setup\nThe `get_weather_data` rule downloads the relevant historical weather data from the ERA-5 reanalysis dataset using [Atlite](https://atlite.readthedocs.io/en/latest/) to create a cutout. For this process to work, you need to register and set up your CDS API key as described on the [Climate Data Store website](https://cds.climate.copernicus.eu/api-how-to).\n\n**Note:** Ensure the API key and URL are affiliated with CDS-Beta.\n\n## Solver setup\nFor the `optimize_hydrogen_plant` rule to work, you will need a solver installed on your computer. You can use any solver that works with [PyPSA](https://pypsa.readthedocs.io/en/latest/installation.html), such as [Cbc](https://github.com/coin-or/Cbc), a free, open-source solver, or [Gurobi](https://www.gurobi.com/), a commerical solver with free academic licenses available. Install your solver of choice following the instructions for use with Python and your operating system in the solver's documentation. \n\nIn `Scripts/optimize_hydrogen_plant.py` line 160, the solver is set to `gurobi`. This must be changed if you choose to use a different solver.\n\n**Note**: Snakemake uses Cbc, which will be installed upon environment setup. To check, activate your environment and enter `mamba list` in your terminal for the environment's list of packages.\n___\n\n# Preparing input data\n\n## Hexagons \nTo analyse a different area of interest, the input hexagon file needs to be changed, but needs to follow the logic of the one provided. \n\nA full walkthrough on all the tools to create these hexagons are in the [GeoH2-data-prep](https://github.com/ClimateCompatibleGrowth/GeoH2-data-prep) repo.\n\nAn explanation of how to create a H3-Hexagon file can be found in the following repo:\n\nhttps://github.com/carderne/ccg-spider\n\nThe hexagon file needs to filled with the following attributes:\n\n  - waterbody_dist: Distance to selected waterbodies in area of interest\n  - waterway_dist: Distance to selected waterways in area of interest\n  - ocean_dist: Distance to ocean coastline\n  - grid_dist: Distance to transmission network\n  - road_dist: Distance to road network\n  - theo_pv: Theoretical PV potential --\u003e Possible to investigate with: https://github.com/FZJ-IEK3-VSA/glaes. Note that this value should be in MW.\n  - theo_wind: Theoretical wind turbine potential --\u003e Possible to investigate with: https://github.com/FZJ-IEK3-VSA/glaes. Note that this value should be in MW.\n  \nOnce you have created a hexagon file with these features, save it in the `Data` folder as `hex_final_[COUNTRY ISO CODE].geojson`. \n\n**Note:** `COUNTRY ISO CODE` is the country's ISO standard 2-letter abbreviation.\n  \n## Input parameter Excel files\n\nRequired input parameters include the spatial area of interest, total annual demand for hydrogen, and prices and cost of capital for infrastructure investments. These values can be either current values or projected values for a single snapshot in time. The parameter values for running the model can be specified in a set of Excel files in the Parameters folder.\n\n- **Basic H2 plant:** In this folder, there are several csv files containing the global parameters for optimizing the plant design. All power units are MW and all energy units are MWh. For more information on these parameters, refer to the [PyPSA documentation](https://pypsa.readthedocs.io/en/latest/components.html).\n\n**Note:** The excel files must be kept in a folder with the title matching the Country ISO Code. From the use case of Namibia, we have them in a folder titled \"NA\"\n\n- **Conversion parameters:** `conversion_parameters.xlsx` includes parameters related to converting between states of hydrogen.\n\n- **Country parameters:** `country_parameters.xlsx` includes country- and technology-specific interest rates, heat and electricity costs, and asset lifetimes.\n    - Interest rates should be expressed as a decimal, e.g. 5% as 0.05.\n    - Asset lifetimes should be in years.\n\n- **Demand parameters:** `demand_parameters.xlsx` includes a list of demand centers. For each demand center, its lat-lon location, annual demand, and hydrogen state for that demand must be specified. If multiple forms of hydrogen are demanded in one location, differentiate the demand center name (e.g. Nairobi LH2 and Nairobi NH3) to avoid problems from duplicate demand center names.\n\n- **Pipeline parameters:** `pipeline_parameters.xlsx` includes the price, capacity, and lifetime data for different sizes of hydrogen pipeline.\n\n- **Technology parameters:** ` technology_parameters.xlsx` includes water parameters, road infrastructure parameters, and whether road and hydrogen pipeline construction is allowed.\n\n- **Transport parameters:** `transport_parameters.xlsx` includes the parameters related to road transport of hydrogen, including truck speed, cost, lifetime, and capacity.\n___\n\n# Snakemake\n\nThis repository uses [Snakemake](https://snakemake.readthedocs.io/en/stable/) to automate its workflow (for a gentle introduction to Snakemake, see [Getting Started with Snakemake](https://carpentries-incubator.github.io/workflows-snakemake/) on The Carpentries Incubator).\n\n## Wildcards\nWildcards specify the data used in the workflow. This workflow uses two wildcards: `country` (an ISO standard 2-letter abbreviation) and `weather_year` (a 4-digit year between 1940 and 2023 included in the ERA5 dataset).\n\n## Config file\n\nHigh-level workflow settings are controlled in the config file: `config.yaml`. \n\nMultiple wildcard values are specified in the `scenario` section. These can be changed to match the `country` and `weather_year` you are analysing.\n\nRenewable generators considered for hydrogen plant construction are included in the `generators` section.\n\nIn the `transport` section, `pipeline_construction` and `road_construction` can be switched from `True` to `False`, as needed.\n\n **Note:** `country` and `weather_year` can be a list of more than one, depending on how many countries and years you are analysing. You must ensure all other files that need for each country run are where they should be.\n\n## Rules\n\nRules can be run multiple ways using Snakemake. Below, you will be able to run rules by entering the rule name or their output in the terminal. Snakemake will run all necessary rules and their corresponding scripts to create an output. While all rules are discussed here for completeness, **you do not need to enter each rule one-by-one and can simply enter the output you're interested in or one of the run all rules.** Rules are defined in the `Snakefile`.\n\nSnakemake requires a specification of the `number of cores to be used`; this can be up to 4.\n\n### Run time\n\nThe `get_weather_data` rule, depending on country size and your internet connection, could take from a few minutes to several hours to run. Ensure that you have space on your computer to store the data, which can be several GB.\n\nThe `optimize_hydrogen_plant` rule, depending on country size and the number of demand centers, could take from several minutes to several hours to run.\n\nThe `optimize_transport_and_conversion` rule, depending on country size, should take a few minutes to run.\n\nAll other rules take a few seconds to run.\n\n### Rule to remove all files\n\n**Note:** This rule does not work on Windows, as of yet. Please manually remove the files you need to.\n\nThis rule is important to know first, as it will remove all the files that the below rules will create as well as the file you initially saved into the `Data` folder as `hex_final_[COUNTRY ISO CODE].geojson`.\n\nThis is to allow for a quicker transition to analyse more data and to clear up space. Make sure you save the created files that you need elsewhere before running the following rule into the terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] clean\n```\n\n### Run optimisation and mapping rules\n\nThis section can be used to run most rules, without having to run exact output files. If any files are changed after a completed run, the same command can be used again and Snakemake will only run the necessary scripts to ensure the results are up to date.\n\nThe total hydrogen cost for all scenarios can be run by entering the following rule into the terminal (make sure you have the necessary weather file in the Cutouts folder before running, you might have to run the get_weather_data rule):\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] optimise_all\n```\nSimilarly, you can map hydrogen costs for all scenarios with the following rule:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] map_all\n```\n\n### `assign_country` rule\n\nAssign country-specific interest rates, technology lifetimes, and heat and electricity prices from `country_parameters.xlsx` to different hexagons based on their country.\n\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Data/hexagons_with_country_[COUNTRY ISO CODE].geojson\n```\n\n### `get_weather_data` rule\n\n**Note:** This rule will also create the assign_country rule's output, as it uses that file.\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Cutouts/[COUNTRY ISO CODE]_[WEATHER YEAR].nc\n```\n\n### `optimize_transport_and_conversion` rule\n\nCalculate the cost of the optimal hydrogen transportation and conversion strategy from each hexagon to each demand center, using both pipelines and road transport, using parameters from `technology_parameters.xlsx`, `demand_parameters.xlsx`, and `country_parameters.xlsx`.\n\nYou can run this rule by entering the following command in your terminal: \n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Resources/hex_transport_[COUNTRY ISO CODE].geojson\n```\n\n### `calculate_water_costs` rule\n\nCalculate water costs from the ocean and freshwater bodies for hydrogen production in each hexagon using `Parameters/technology_parameters.xlsx` and `Parameters/country_parameters.xlsx`.\n\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Resources/hex_water_[COUNTRY ISO CODE].geojson\n```\n\n### `optimize_hydrogen_plant` rule\n\nDesign green hydrogen plant to meet the hydrogen demand profile for each demand center for each transportation method to each demand center using the `optimize_hydrogen_plant.py` script. Ensure that you have specified your hydrogen plant parameters in the CSV files in the `Parameters/Basic_H2_plant` folder, your investment parameters in `Parameters/investment_parameters.xlsx`, and your demand centers in `Parameters/demand_parameters.xlsx`.\n\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Resources/hex_lcoh_[COUNTRY ISO CODE]_[WEATHER YEAR].geojson\n```\n\n### `calculate_total_hydrogen_cost` rule\nCombine results to find the lowest-cost method of producing, transporting, and converting hydrogen for each demand center.\n\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Results/hex_total_cost_[COUNTRY ISO CODE]_[WEATHER YEAR].geojson\n```\n\n### `calculate_cost_components` rule\n\nCalculate the cost for each type of equipment in each polygon. \n\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Results/hex_cost_components_[COUNTRY ISO CODE]_[WEATHER YEAR].geojson\n```\n\n### `map_costs` rule\n\nVisualize the spatial variation in different costs per kilogram of hydrogen.\n\nYou can run this rule by entering the following command in your terminal:\n```\nsnakemake -j [NUMBER OF CORES TO BE USED] Plots/[COUNTRY ISO CODE]_[WEATHER YEAR]\n```\n___\n\n# Limitations\n\nThis model considers only greenfield wind and solar plants for hydrogen production. Therefore it does not consider using grid electricity or existing generation for hydrogen production. The model further assumes that all excess electricity is curtailed.\n\nWhile the design of the green hydrogen plant is convex and therefore guarenteed to find the global optimum solution if it exists, the selection of the trucking strategy is greedy to avoid the long computation times and potential computational intractability associated with a mixed-integer optimization problem.\n\nCurrently, only land transport is considered in the model. To calculate the cost of hydrogen production for export, any additional costs for conversion and transport via ship or undersea pipeline must be added in post-processing.\n\nTransport costs are calculated from the center of the hexagon to the demand center. When using large hexagon sizes, this assumption may over- or underestimate transportation costs significantly. Additionally, only path length is considered when calculating the cost of road and pipeline construction. Additional costs due to terrain are not considered.\n\nThe availability of water for electrolysis is not limited in regions that could potentially face drought, and a single prices for freshwater and ocean water are used throughout the modeled area.\n___\n\n# Citation\n\nIf you decide to use GeoH2, please kindly cite us using the following: \n\n*Halloran, C., Leonard, A., Salmon, N., Müller, L., \u0026 Hirmer, S. (2024). \nGeoH2 model: Geospatial cost optimization of green hydrogen production including storage and transportation. \nMethodsX, 12, 102660. https://doi.org/10.1016/j.mex.2024.102660.*\n\n```commandline\n@article{Halloran_GeoH2_model_Geospatial_2024,\nauthor = {Halloran, Claire and Leonard, Alycia and Salmon, Nicholas and Müller, Leander and Hirmer, Stephanie},\ndoi = {10.1016/j.mex.2024.102660},\njournal = {MethodsX},\nmonth = jun,\npages = {102660},\ntitle = {{GeoH2 model: Geospatial cost optimization of green hydrogen production including storage and transportation}},\nvolume = {12},\nyear = {2024}\n}\n```\n___\n\n# Case study parameters\n\nThis repository includes sample parameters for a hydrogen production case in Namibia.\nReferences for these parameters are included in the tables below for reference.\nFor the results of this case, please refer to the model MethodsX article: https://doi.org/10.1016/j.mex.2024.102660. \n\n**Green hydrogen plant parameters:**\n\n| Hardware                   | Parameter             | Value     | Units                | Ref.                                                                                                                            |\n|----------------------------|-----------------------|-----------|----------------------|---------------------------------------------------------------------------------------------------------------------------------|\n| Solar photovoltaic         | Capex                 | 1,470,000 | €/MW                 | [Allington et al., 2021](https://doi.org/10.1016/j.dib.2022.108021)                                                             |\n| Wind turbines              | Capex                 | 1,580,000 | €/MW                 | [Allington et al., 2021](https://doi.org/10.1016/j.dib.2022.108021)                                                             |\n| Hydrogen electrolysis      | Capex                 | 1,250,000 | €/MW                 | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                           |\n| Hydrogen electrolysis      | Efficiency            | 0.59      | MWh H2/MWh el        | [Taibi et al., 2020](https://www.irena.org/-/media/Files/IRENA/Agency/Publication/2020/Dec/IRENA_Green_hydrogen_cost_2020.pdf)  |\n| Hydrogen compression       | Isentropic efficiency | 0.051     | MWh el/MWh H2        | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                           |\n| Hydrogen storage unloading | Efficiency            | 1         | MWh H2/MWh H2-stored | Assumption                                                                                                                      |\n| Battery                    | Capex                 | 95,000    | €/MW                 | [BloombergNEF, 2022](https://about.bnef.com/blog/lithium-ion-battery-pack-prices-rise-for-first-time-to-an-average-of-151-kwh/) |\n| Hydrogen storage           | Capex                 | 21,700    | €/MWh                | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                           |\n\n**Conversion parameters:**\n\n| Process                | Parameter                    | Value       | Units             | Ref.                                                                                                                                             |\n|------------------------|------------------------------|-------------|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| 500 bar compression    | Heat capacity                | 0.0039444   | kWh/kg/K          | Kurzweil and Dietlmeier, 2016                                                                                                                    |\n| 500 bar compression    | Input temperature            | 298.15      | K                 | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| 500 bar compression    | Input pressure               | 25          | bar               | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| 500 bar compression    | Isentropic exponent          | 1.402       |                   | Kurzweil and Dietlmeier, 2016                                                                                                                    |\n| 500 bar compression    | Isentropic efficiency        | 0.8         |                   | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| 500 bar compression    | Compressor lifetime          | 15          | years             | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| 500 bar compression    | Compressor capex coefficient | 40,035      | €/kg H2/day       | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| 500 bar compression    | Compressor opex              | 4           | % capex/year      | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| Hydrogen liquification | Electricity demand           | 9.93        | kWh/kg H2         | [Ausfelder and Dura](https://dechema.de/dechema_media/Downloads/Positionspapiere/2021_DEC_P2X_III_Technischer_Anhang.pdf)                        |\n| Hydrogen liquification | Capex quadratic coefficient  | -0.0002     | €/(kg H2)^2       | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| Hydrogen liquification | Capex linear coefficient     | 1,781.9     | €/kg  H2          | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| Hydrogen liquification | Capex constant               | 300,000,000 | €                 | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| Hydrogen liquification | Opex                         | 8           | % capex/year      | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| Hydrogen liquification | Plant lifetime               | 20          | years             | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| LOHC hydrogenation     | Electricity demand           | 0.35        | kWh/kg H2         | [Andersson and Grönkvist, 2019](https://doi.org/10.1016/j.ijhydene.2019.03.063)                                                                  |\n| LOHC hydrogenation     | Heat demand                  | -9          | kWh/kg H2         | [Hydrogenious, 2022](https://hydrogenious.net/how/)                                                                                              |\n| LOHC hydrogenation     | Capex coefficient            | 0.84        | kWh/kg H2/year    | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| LOHC hydrogenation     | Opex                         | 4           | % capex/year      | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| LOHC hydrogenation     | Plant lifetime               | 25          | years             | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| LOHC hydrogenation     | Carrier costs                | 2           | €/kg carrier      | [Clark, 2020](https://hydrogenious.net/lohc-global-hydrogen-opportunity/)                                                                        |\n| LOHC hydrogenation     | Carrier ratio                | 16.1        | kg carrier/kg  H2 | [Arlt and Obermeier, 2017](https://www.encn.de/fileadmin/user_upload/Studie_Wasserstoff_und_Schwerlastverkehr_WEB.pdf)                           |\n| LOHC dehydrogenation   | Electricity demand           | 0.35        | kWh/kg H2         | [Andersson and Grönkvist, 2019](https://doi.org/10.1016/j.ijhydene.2019.03.063)                                                                  |\n| LOHC dehydrogenation   | Heat demand                  | 12          | kWh/kg H2         | [Hydrogenious, 2022](https://hydrogenious.net/how/)                                                                                              |\n| LOHC dehydrogenation   | Capex coefficient            | 2.46        | kWh/kg H2         | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| LOHC dehydrogenation   | Opex                         | 4           | % capex/year      | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| LOHC dehydrogenation   | Plant lifetime               | 25          | years             | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| Ammonia synthesis      | Electricity demand           | 2.809       | kWh/kg H2         | [IEA, 2021](https://www.iea.org/reports/ammonia-technology-roadmap)                                                                              |\n| Ammonia synthesis      | Capex coefficient            | 0.75717     | kWh/g H2/year     | [IEA, 2021](https://www.iea.org/reports/ammonia-technology-roadmap)                                                                              |\n| Ammonia synthesis      | Opex                         | 1.5         | % capex/year      | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| Ammonia synthesis      | Plant lifetime               | 25          | years             | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| Ammonia cracking       | Heat demand                  | 4.2         | kWh/kg H2         | [Andersson and Grönkvist, 2019](https://doi.org/10.1016/j.ijhydene.2019.03.063)                                                                  |\n| Ammonia cracking       | Capex coefficient            | 17,262,450  | kWh/g H2/hour     | [Cesaro et al., 2021](https://doi.org/10.1016/j.apenergy.2020.116009)                                                                            |\n| Ammonia cracking       | Opex                         | 2           | % capex/year      | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| Ammonia cracking       | Plant lifetime               | 25          | years             | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n\n**Trucking parameters:**\n\n| Hardware                 | Parameter                  | Value   | Units        | Ref.                                                                                                                                             |\n|--------------------------|----------------------------|---------|--------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n| All trucks               | Average truck speed        | 70      | km/h         | Assumption                                                                                                                                       |\n| All trucks               | Working hours              | 24      | h/day        | Assumption                                                                                                                                       |\n| All trucks               | Diesel price               | 1.5     | €/L          | Assumption                                                                                                                                       |\n| All trucks               | Driver wage                | 2.85    | €/h          | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| All trucks               | Working days               | 365     | days/year    | Assumption                                                                                                                                       |\n| All trucks               | Max driving distance       | 160,000 | km/year      | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                                                                            |\n| All trucks               | Truck capex                | 160,000 | €            | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| All trucks               | Truck Opex                 | 12      | % capex/year | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| All trucks               | Diesel consumption         | 35      | L/100 km     | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| All trucks               | Truck lifetime             | 8       | years        | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| All trucks               | Trailer lifetime           | 12      | years        | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| 500 bar hydrogen trailer | Trailer capex              | 660,000 | €            | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| 500 bar hydrogen trailer | Trailer opex               | 2       | % capex/year | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| 500 bar hydrogen trailer | Trailer capacity           | 1,100   | kg\tH2        | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| 500 bar hydrogen trailer | Loading and unloading time | 1.5     | hours        | [Cerniauskas, 2021](https://juser.fz-juelich.de/record/906356)                                                                                   |\n| Liquid hydrogen trailer  | Trailer capex              | 860,000 | €            | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| Liquid hydrogen trailer  | Trailer opex               | 2       | % capex/year | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| Liquid hydrogen trailer  | Trailer capacity           | 4,300   | kg H2        | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| Liquid hydrogen trailer  | Loading and unloading time | 3       | hours        | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| LOHC trailer             | Trailer capex              | 660,000 | €            | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| LOHC trailer             | Trailer opex               | 2       | % capex/year | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| LOHC trailer             | Trailer capacity           | 1,800   | kg H2        | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| LOHC trailer             | Loading and unloading time | 1.5     | hours        | [Reuss et al., 2017](https://doi.org/10.1016/j.apenergy.2017.05.050)                                                                             |\n| Ammonia trailer          | Trailer capex              | 210,000 | €            | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| Ammonia trailer          | Trailer opex               | 2       | % capex/year | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| Ammonia trailer          | Trailer capacity           | 2,600   | kg H2        | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n| Ammonia trailer          | Loading and unloading time | 1.5     | hours        | [IEA, 2020](https://iea.blob.core.windows.net/assets/29b027e5-fefc-47df-aed0-456b1bb38844/IEA-The-Future-of-Hydrogen-Assumptions-Annex_CORR.pdf) |\n\n**Road parameters:**\n\n| Road length         | Parameter | Value      | Units     | Ref.                                                                  |\n|---------------------|-----------|------------|-----------|-----------------------------------------------------------------------|\n| Short road (\u003c10 km) | Capex     | 626,478.45 | €/km      | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219) |\n| Long road (\u003e10 km)  | Capex     | 481,866.6  | €/km      | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219) |\n| All roads           | Opex      | 7,149.7    | €/km/year | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219) |\n\n**Pipeline parameters:**\n\n| Pipeline size   | Parameter           | Value     | Units        | Ref.                                                                                             |\n|-----------------|---------------------|-----------|--------------|--------------------------------------------------------------------------------------------------|\n| All pipelines   | Opex                | 1.25      | % capex/year | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| All pipelines   | Availability        | 95        | %            | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)                            |\n| All pipelines   | Pipeline lifetime   | 42.5      | years        | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| All pipelines   | Compressor lifetime | 24        | years        | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| All pipelines   | Electricity demand  | 0.000614  | kWh/kg H2/km | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Large pipeline  | Maximum capacity    | 13        | GW           | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Large pipeline  | Pipeline capex      | 2,800,000 | €/km         | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Large pipeline  | Compressor capex    | 620,000   | €/km         | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Medium pipeline | Maximum capacity    | 4.7       | GW           | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Medium pipeline | Pipeline capex      | 2,200,000 | €/km         | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Medium pipeline | Compressor capex    | 310,000   | €/km         | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Small pipeline  | Maximum capacity    | 1.2       | GW           | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Small pipeline  | Pipeline capex      | 90,000    | €/km         | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n| Small pipeline  | Compressor capex    | 90,000    | €/km         | [Jens et al., 2021](https://ehb.eu/files/downloads/European-Hydrogen-Backbone-April-2021-V3.pdf) |\n\n**Water parameters:**\n\n| Type        | Parameter                    | Value | Units              | Ref.                                                                                                                                                                              |\n|-------------|------------------------------|-------|--------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Freshwater  | Treatment electricity demand | 0.4   | kWh/m^3 water      | [US Dept. of Energy, 2016](https://betterbuildingssolutioncenter.energy.gov/sites/default/files/Primer%20on%20energy%20efficiency%20in%20water%20and%20wastewater%20plants_0.pdf) |\n| Ocean water | Treatment electricity demand | 3.7   | kWh/m^3 water      | [Patterson et al., 2019](https://doi.org/10.1073/pnas.1902335116)                                                                                                                 |\n| All water   | Transport cost               | 0.1   | €/100 km/m^3 water | [Zhou and Tol, 2005](https://doi.org/10.1029/2004WR003749)                                                                                                                        |\n| All water   | Water specific cost          | 1.25  | €/m^3 water        | [Wasreb, 2019](https://wasreb.go.ke/wasrebsystems/tariffs/about-us.html)                                                                                                          |\n| All water   | Water demand                 | 21    | L water/kg H2      | [Taibi et al., 2020](https://www.irena.org/-/media/Files/IRENA/Agency/Publication/2020/Dec/IRENA_Green_hydrogen_cost_2020.pdf)                                                    |\n\n**Country-specific parameters:**\n\n| Country | Parameter                    | Value   | Units | Ref.                                                                               |\n|---------|------------------------------|---------|-------|------------------------------------------------------------------------------------|\n| Namibia | Electricity price            | 0.10465 | €/kWh | [GlobalPetrolPrices.com]({https://www.globalpetrolprices.com/electricity_prices/}) |\n| Namibia | Heat price                   | 0.02    | €/kWh | Assumption                                                                         |\n| Namibia | Solar interest rate          | 6       | %     | Assumption                                                                         |\n| Namibia | Solar lifetime               | 20      | years | Assumption                                                                         |\n| Namibia | Wind interest rate           | 6       | %     | Assumption                                                                         |\n| Namibia | Wind lifetime                | 20      | years | Assumption                                                                         |\n| Namibia | Plant interest rate          | 6       | %     | Assumption                                                                         |\n| Namibia | Plant lifetime               | 20      | years | Assumption                                                                         |\n| Namibia | Infrastructure interest rate | 6       | %     | Assumption                                                                         |\n| Namibia | Infrastructure lifetime      | 50      | years | [Müller et al., 2022](https://doi.org/10.1016/j.apenergy.2023.121219)              |\n","funding_links":[],"readme_doi_urls":["https://doi.org/10.1016/j.mex.2024.102660","https://doi.org/10.1016/j.dib.2022.108021","https://doi.org/10.1016/j.apenergy.2023.121219","https://doi.org/10.1016/j.ijhydene.2019.03.063","https://doi.org/10.1016/j.apenergy.2020.116009","https://doi.org/10.1016/j.apenergy.2017.05.050","https://doi.org/10.1073/pnas.1902335116","https://doi.org/10.1029/2004WR003749"],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/297392","html_url":"https://ost.ecosyste.ms/projects/297392"}