Skip to content

Hammerling-Research-Group/dlq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dlq

Production code for DLQ Algorithm

Spell Check

Detection, localization, and quantification (DLQ)

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), https://doi.org/10.1525/elementa.2023.00110

Installation & Usage

Though the current code is still largely in "research code" form, users are still encouraged to engage with it.

The simplest approach is to ingest the full repo, and work from the packaged example and sample input_data.

To do so, follow these steps:

  1. Download the latest version of this repository, which includes the entire DLQ codebase, as a zipped/compressed file:
download.file(url = "https://github.com/Hammerling-Research-Group/dlq/archive/refs/heads/main.zip", 
              destfile = "Desktop/DLQ.zip") # change `Desktop` to anywhere you'd like
  1. Navigate to where the code is stored and uncompress/unzip.

  2. Go into the unzipped folder and open DLQ.Rproj by double clicking it. This should open a new RStudio session, with DLQ.Rproj set as the root.

  3. In the session, navigate to the Files tab and then open the R subdirectory. Start by opening and running the MAIN_1_simulate.R script. Note: For details on these scripts, see the Code Structure section below.

  4. Then, proceed to and run the MAIN_2_DLQ.R script.

Code Structure

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.txt file controls input for the MAIN_1_ script

  • DLQ_config.txt controls input for the MAIN_2_ script

The ../Example/MAIN_3_ script generates all results and figures for the accompanying manuscript (Daniels et al. 2024): https://doi.org/10.1525/elementa.2023.00110