-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from Hammerling-Research-Group/Kirandkv-patch-3
Update step2_dlq.py
- Loading branch information
Showing
1 changed file
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
|
@@ -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') | ||
|
@@ -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, | ||
|