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

stop download_GEGIS_dataset/era5 #17

Open
MurkyTheMurloc opened this issue Jul 10, 2022 · 1 comment
Open

stop download_GEGIS_dataset/era5 #17

MurkyTheMurloc opened this issue Jul 10, 2022 · 1 comment

Comments

@MurkyTheMurloc
Copy link

Is there a way too skip following steps in the model by placing the files already created with GlobalEnergyGIS in Trace?

[Sun Jul 10 15:19:05 2022]
rule download_GEGIS_era5:
output: resources/GEGIS/era5wind2013.h5, resources/GEGIS/era5solar2013.h5, resources/GEGIS/era5temp2013.h5
jobid: 5
reason: Missing output files: resources/GEGIS/era5temp2013.h5, resources/GEGIS/era5solar2013.h5, resources/GEGIS/era5wind2013.h5
wildcards: year=2013
resources: tmpdir=/tmp

[Sun Jul 10 15:19:05 2022]
rule download_GEGIS_dataset:
output: resources/GEGIS/protected.jld, resources/GEGIS/gadm.tif
jobid: 7
reason: Missing output files: resources/GEGIS/gadm.tif
resources: tmpdir=/tmp
@euronion
Copy link
Owner

In the config.default.yaml you can set the value

GlobalEnergyGIS:
# Download GEGIS data files and set home dir for workflow
init_gegis: false

to false , then the rules are not executed. (But requires the files to be present).

If you already have the files you can place them in the appropriate locations in resources/GEGIS/...:

trace/rules/gegis.smk

Lines 26 to 30 in f429a81

rule download_GEGIS_era5:
output:
Path(config["GlobalEnergyGIS"]["base_dir"]) / "era5wind{year}.h5",
Path(config["GlobalEnergyGIS"]["base_dir"]) / "era5solar{year}.h5",
Path(config["GlobalEnergyGIS"]["base_dir"]) / "era5temp{year}.h5",

and

trace/rules/gegis.smk

Lines 18 to 21 in f429a81

rule download_GEGIS_dataset:
output:
Path(config["GlobalEnergyGIS"]["base_dir"]) / "protected.jld", # not full list, only dependencies for rules below (proxy all others)
Path(config["GlobalEnergyGIS"]["base_dir"]) / "gadm.tif",

That should prevent the rules from running.

Note that the second list (rule download_GEGIS_dataset) is not complete (due to lazyness on my end), there are a lot of datasets being downloaded by GlobalEnergyGIS if you call that rule. You need all the files, not just the ones explicitly specified.

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

No branches or pull requests

2 participants