remove ammonia demand script
This commit is contained in:
parent
0ec367ed7a
commit
2c7e30bb17
@ -429,7 +429,7 @@ rule build_salt_cavern_potentials:
|
||||
|
||||
rule build_ammonia_production:
|
||||
input:
|
||||
usgs="data/bundle/myb1-2022-nitro-ert.xlsx",
|
||||
usgs=storage("https://d9-wret.s3.us-west-2.amazonaws.com/assets/palladium/production/s3fs-public/media/files/myb1-2022-nitro-ert.xlsx"),
|
||||
output:
|
||||
ammonia_production=resources("ammonia_production.csv"),
|
||||
threads: 1
|
||||
|
@ -23,7 +23,6 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle",
|
||||
"corine/g250_clc06_V18_5.tif",
|
||||
"eea/UNFCCC_v23.csv",
|
||||
"nuts/NUTS_RG_10M_2013_4326_LEVL_2.geojson",
|
||||
"myb1-2017-nitro.xls",
|
||||
"emobility/KFZ__count",
|
||||
"emobility/Pkw__count",
|
||||
"h2_salt_caverns_GWh_per_sqkm.geojson",
|
||||
@ -65,14 +64,6 @@ if config["enable"]["retrieve"] and config["enable"].get("retrieve_databundle",
|
||||
script:
|
||||
"../scripts/retrieve_jrc_idees.py"
|
||||
|
||||
rule retrieve_ammonia_demand:
|
||||
output:
|
||||
"data/bundle/myb1-2022-nitro-ert.xlsx",
|
||||
log:
|
||||
"logs/retrieve_ammonia_demand.log",
|
||||
retries: 2
|
||||
script:
|
||||
"../scripts/retrieve_ammonia_demand.py"
|
||||
|
||||
rule retrieve_eurostat_household_data:
|
||||
output:
|
||||
|
@ -1,40 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# SPDX-FileCopyrightText: : 2024- The PyPSA-Eur Authors
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
"""
|
||||
Retrieve ammonia demand from https://www.usgs.gov/centers/national-minerals-information-center/nitrogen-statistics-and-information.
|
||||
"""
|
||||
|
||||
import logging
|
||||
import os
|
||||
import zipfile
|
||||
from pathlib import Path
|
||||
|
||||
from _helpers import configure_logging, progress_retrieve, set_scenario_config
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
# Define the base URL
|
||||
url = "https://d9-wret.s3.us-west-2.amazonaws.com/assets/palladium/production/s3fs-public/media/files/myb1-2022-nitro-ert.xlsx"
|
||||
|
||||
if __name__ == "__main__":
|
||||
if "snakemake" not in globals():
|
||||
from _helpers import mock_snakemake
|
||||
|
||||
snakemake = mock_snakemake("retrieve_ammonia_demand")
|
||||
rootpath = ".."
|
||||
else:
|
||||
rootpath = "."
|
||||
|
||||
configure_logging(snakemake)
|
||||
set_scenario_config(snakemake)
|
||||
disable_progress = snakemake.config["run"].get("disable_progressbar", False)
|
||||
|
||||
to_fn = snakemake.output[0]
|
||||
|
||||
# download .zip file
|
||||
logger.info(f"Downloading Ammonia demand from {url}.")
|
||||
progress_retrieve(url, to_fn, disable=disable_progress)
|
||||
|
||||
logger.info(f"Ammonia demand data available in '{to_fn}'.")
|
Loading…
Reference in New Issue
Block a user