-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the content for upcoming release (#141)
* ceated python script to fetch json files and generate statistics * rename all TM54Dvar to CT-CH4 * tm5 reports updated * gosat verification report updated * update ct-ch4 notebook * added draft content for goes ---------
- Loading branch information
1 parent
2509f13
commit 1151310
Showing
27 changed files
with
1,931 additions
and
2,209 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 |
---|---|---|
|
@@ -3,3 +3,5 @@ | |
.env | ||
/.quarto/ | ||
_site/ | ||
.yaml | ||
.json |
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
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
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 |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# CarbonTracker-CH₄ Isotopic Methane Inverse Fluxes | ||
|
||
![Data Flow Diagram Extending From Acquisition/Creation to User Delivery](./media/ct-ch4-monthgrid-v2023_Data_Flow.png) |
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 |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Geostationary Satellite Observations of Extreme and Transient Methane Emissions from Oil and Gas Infrastructure | ||
|
||
|
||
![Data Flow Diagram Extending From Acquisition/Creation to User Delivery](./media/goes-ch4plume-v1_Data_Flow.png) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file was deleted.
Oops, something went wrong.
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
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
58 changes: 58 additions & 0 deletions
58
generating_statistics_for_validation/generate_statistics.py
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 |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import numpy as np | ||
import boto3 | ||
import pandas as pd | ||
import json | ||
import yaml | ||
|
||
# Step 1: Connect to the S3 bucket | ||
s3 = boto3.client('s3') | ||
bucket_name = 'ghgc-data-store-develop' | ||
prefix = 'transformed_cogs/tm5-4dvar-update-noaa/' # optional: specify if files are in a specific folder within the bucket | ||
|
||
# Step 2: List all JSON files in the bucket | ||
response = s3.list_objects_v2(Bucket=bucket_name, Prefix=prefix) | ||
files = [file['Key'] for file in response.get('Contents', []) if file['Key'].endswith('.json') and 'fossil_emis_2015' in file['Key']] | ||
print(len(files)) | ||
# Step 3: Load each JSON file into a DataFrame and combine | ||
dataframes = [] | ||
for file_key in files: | ||
obj = s3.get_object(Bucket=bucket_name, Key=file_key) | ||
data = json.load(obj['Body']) # Load JSON content | ||
df = pd.json_normalize(data) # Normalize JSON to flatten nested structures if needed | ||
dataframes.append(df) | ||
# Combine all DataFrames into one | ||
all_data = pd.concat(dataframes, ignore_index=True) | ||
for name in all_data.columns[3:]: | ||
all_data[name] = all_data[name].astype(np.float32) | ||
|
||
# Step 4: Calculate mean, std, min, and max for overall data | ||
mean_values_netcdf = all_data["mean_value_netcdf"].mean() | ||
std_values_netcdf = all_data["std_value_netcdf"].std() | ||
min_values_netcdf = all_data["minimum_value_netcdf"].min() | ||
max_values_netcdf = all_data["maximum_value_netcdf"].max() | ||
mean_values_cog = all_data["mean_value_cog"].mean() | ||
std_values_cog = all_data["std_value_cog"].std() | ||
min_values_cog = all_data["minimum_value_cog"].min() | ||
max_values_cog = all_data["maximum_value_cog"].max() | ||
|
||
data_to_save = { | ||
"netcdf":{ | ||
"mean":mean_values_netcdf, | ||
"std":std_values_netcdf, | ||
"min":min_values_netcdf, | ||
"max":max_values_netcdf, | ||
}, | ||
"COG": { | ||
"mean":mean_values_cog, | ||
"std":std_values_cog, | ||
"min":min_values_cog, | ||
"max":max_values_cog, | ||
} | ||
|
||
} | ||
print(data_to_save) | ||
# # Write the data to a YAML file | ||
# output_yaml_path = "config.yaml" | ||
# with open(output_yaml_path, "w") as yaml_file: | ||
# yaml.dump(data_to_save, yaml_file, default_flow_style=False) | ||
|
9 changes: 9 additions & 0 deletions
9
...ng_and_verification_reports/ct-ch4-monthgrid-v2023_Processing and Verification Report.qmd
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: CarbonTracker-CH₄ Isotopic Methane Inverse Fluxes | ||
description: "Global, monthly 1 degree resolution methane emission estimates from microbial, fossil and pyrogenic sources derived using inverse modeling, version 2023" | ||
--- | ||
<object data="./reports/ct-ch4-monthgrid-v2023_Processing and Verification Report.pdf" type="application/pdf" width="1024px" height="1000px"> | ||
<embed src="./reports/ct-ch4-monthgrid-v2023_Processing and Verification Report.pdf"> | ||
<p>This browser does not support PDFs. Please download the PDF to view it: <a href="./reports/ct-ch4-monthgrid-v2023_Processing and Verification Report.pdf">Download PDF</a>.</p> | ||
</embed> | ||
</object> |
9 changes: 9 additions & 0 deletions
9
processing_and_verification_reports/goes-ch4plume-v1_Processing and Verification Report.qmd
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: Geostationary Satellite Observations of Extreme and Transient Methane Emissions from Oil and Gas Infrastructure | ||
description: "A sample of methane plumes from point sources observed since 2019 by the U.S. Geostationary Operational Environmental Satellites (GOES) over North and South America" | ||
--- | ||
<object data="./reports/goes-ch4plume-v1_Processing and Verification Report.pdf" type="application/pdf" width="1024px" height="1000px"> | ||
<embed src="./reports/goes-ch4plume-v1_Processing and Verification Report.pdf"> | ||
<p>This browser does not support PDFs. Please download the PDF to view it: <a href="./reports/goes-ch4plume-v1_Processing and Verification Report.pdf">Download PDF</a>.</p> | ||
</embed> | ||
</object> |
2 changes: 1 addition & 1 deletion
2
...fication_reports/gosat-based-ch4budget-yeargrid-v1_Processing and Verification Report.qmd
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
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
Binary file added
BIN
+87.3 KB
...erification_reports/reports/ct-ch4-monthgrid-v2023_Processing and Verification Report.pdf
Binary file not shown.
Binary file added
BIN
+80.6 KB
..._and_verification_reports/reports/goes-ch4plume-v1_Processing and Verification Report.pdf
Binary file not shown.
Binary file modified
BIN
-83.8 KB
(50%)
..._reports/reports/gosat-based-ch4budget-yeargrid-v1_Processing and Verification Report.pdf
Binary file not shown.
Binary file removed
BIN
-194 KB
...tion_reports/reports/tm54dvar-ch4flux-monthgrid-v1_Processing and Verification Report.pdf
Binary file not shown.
9 changes: 0 additions & 9 deletions
9
...verification_reports/tm54dvar-ch4flux-monthgrid-v1_Processing and Verification Report.qmd
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.