Skip to content

Commit

Permalink
Merge pull request #7 from Hammerling-Research-Group/Kirandkv-patch-3
Browse files Browse the repository at this point in the history
Update step2_dlq.py
  • Loading branch information
pdwaggoner authored Nov 19, 2024
2 parents c8455e2 + 9eafbe3 commit d823f44
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions code/step2_dlq.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# Description:
# Runs the Gaussian puff atmospheric dispersion model to simulate methane
# concentrations at CMS sensor locations given wind data and potential source locations.
# Author: Kiran Damodaran ([email protected])
# Last Updated: Nov 2024
import os
import pandas as pd
import numpy as np
Expand All @@ -6,6 +11,7 @@
import pickle
import logging
import traceback
import zipfile

# Configure logging
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
Expand Down Expand Up @@ -392,6 +398,18 @@ def safe_float(series):
plt.close()

def main():
# Unzip input data files
input_zip_path = "./code/Input_data_step2.zip" # Adjust this path to your zip file
extract_path = "./code/input_data_step2"

# Create extraction directory if it doesn't exist
os.makedirs(extract_path, exist_ok=True)

# Unzip the input files
with zipfile.ZipFile(input_zip_path, 'r') as zip_ref:
zip_ref.extractall(extract_path)
print(f"Input files extracted to: {extract_path}")

# Configuration
config = {
'gap_time': 5,
Expand Down

0 comments on commit d823f44

Please sign in to comment.