-
Jeremy Feinstein authoredJeremy Feinstein authored
______ ______ __ __ _____ ____ _____
/ \ / \ | ____| \/ | __ \| _ \ / ____|
/ /\ \ | |__ | \ / | | | | |_) | |
/ / \ \ | __| | |\/| | | | | _ <| |
\--/----\--/ | |____| | | | |__| | |_) | |____
\/______\/ |______|_| |_|_____/|____/ \_____|
EMDBC - Empirical Mode Based Bias Correction
This repository contains the Python implementation for Empirical Mode Decomposition Based Bias Correction (EMDBC).
Please refer to the manuscript (citation below) for detailed methodology and theoretical background.
File Structure
├── emdbc.py
├── analysis.ipynb
└── validation_regions/
├── Midwest.nc
├── Northeast.nc
├── Northern.nc
├── Northwest.nc
├── Southeast.nc
├── Southern.nc
└── Southwest.nc
Requirements
To run this code, ensure the following Python packages are installed:
- numpy
- scipy
- pandas
- matplotlib
- PyEMD
- pygam
- sklearn
- psutil
- scipy
- bottleneck
- cartopy
Usage
To apply bias correction using EMDBC, apply the Bias_Correction_EMD_disjoint
method in emdbc.py
.
Bias_Correction_EMD_disjoint(original_series, hist_series, fut_series, noise, filter_configs)
Perform bias correction on historical and future modeled time series using Empirical Mode Decomposition (EMD) and adaptive disjoint IMF selection.
Parameters:
-
original_series (
array-like
):
The observed time series to be used as the historical reference for bias correction. -
hist_series (
array-like
):
The historical modeled time series to be used as the historical reference for bias correction. -
fut_series (
array-like
):
The future modeled time series to be corrected. -
noise (
float
):
The initial noise level to use for the ensemble EMD. -
filter_configs (
dict
):
A dictionary that maps timescales (biweekly, seasonal, annual) to frequency bands (low and high cutoff values) for bandpass filtering:
filter_configs = {
'Biweekly': (1/30, 1/3),
'Seasonal': (1/180, 1/30),
'Annual': (1/(365*2.5), 1/180)
}