Production code for DLQ Algorithm
This repository contains code used to estimate methane emission start and end time (detection), source location (localization), and emission rate (quantification) using concentration observations from a network of point-in-space continuous monitoring systems.
For more on this work, see Daniels et al. (2024).
Though the current code is still largely in "research code" form, users are still encouraged to engage with it.
To do so, the simplest approach is to clone the repo and work from the dlq directory.
- Set your desired directory from which to work. E.g., for your Desktop:
cd Desktop- Clone and store
dlqat the desired location:
git clone https://github.com/Hammerling-Research-Group/dlq.git- Move into the cloned
dlqdirectory:
cd dlq-
Once cloned, go into the
dlqfolder and openDLQ.Rprojby double clicking it. This should open a new RStudio session, withDLQ.Rprojset as the root. -
In the session, navigate to the
Filestab and then open theRsubdirectory.- Start by opening and running the
MAIN_1_simulate.Rscript (For details on these scripts, see theCode Structuresection below). - Then, proceed to and run the
MAIN_2_DLQ.Rscript
- Start by opening and running the
The code is separated into two main scripts: 1) MAIN_1_simulate runs the Gaussian puff atmospheric dispersion model, and 2) MAIN_2_DLQ uses output from the Gaussian puff model to perform DLQ. The /helpers/HELPER_* scripts contain auxiliary functions used in the MAIN_1_ and MAIN_2_ scripts.
Inputs to the MAIN_1_ and MAIN_2_ files are controlled using two configuration files found in the input_data directory:
-
simulation_config.txtfile controls input for theMAIN_1_script -
DLQ_config.txtcontrols input for theMAIN_2_script