Skip to content

Commit

Permalink
Add local execution instructions to sr_util.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ctessum authored Apr 18, 2022
1 parent 7b66574 commit 3f71c6b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions website/static/blog/2019-04-20-sr/sr_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ def run_sr(emis, model, output_variables, emis_units="tons/year"):
"--OutputVariables=%s"%json.dumps(output_variables),
"--SR.OutputFile=%s"%model_path])

# You can also run the simulation locally by replacing the above command with the below command:
# subprocess.check_output([_inmap_exe, "srpredict",
# "--EmissionUnits=%s"%emis_units,
# "--EmissionsShapefiles=%s"%emis_file,
# "--OutputVariables=%s"%json.dumps(output_variables),
# "--SR.OutputFile=/path/to/isrm/file/you/downloaded.ncf"])
# You can download the ISRM source receptor matrix itself from here: https://zenodo.org/record/3590127#.Yl2SSvPMKWA

while True:
try:
status = subprocess.check_output([_inmap_exe, "cloud", "status", "--job_name=%s"%job_name]).decode("utf-8").strip()
Expand Down

0 comments on commit 3f71c6b

Please sign in to comment.