Fill missing weather measurements using user-provided ERA5 data and a hybrid GRU + XGBoost approach
Project description
pymfpatch
A modular, end-to-end pipeline for gap-filling EnergyPlus EPW weather files using high-resolution ERA reanalysis (or other reference series) and a hybrid GRU + XGBoost approach.
It automatically parses, cleans, feature-engineers, imputes missing meteorological variables, and writes out a fully compliant EPW-ready for building simulations.
Features
- Dual-stage imputation
- GRU for sequential, multi-output regression on variables with temporal patterns (temperature, humidity, wind, radiation...)
- XGBoost for the remaining scalar variables (visibility, ceiling height, albedo, precipitation...)\
- Flexible configuration of
- which variables to impute with GRU vs XGB\
- model hyperparameters (learning rate, depth, batch size, early stopping, ...)\
- EnergyPlus EPW input/output with native header preservation\
- Utility functions for parsing, cleaning, feature-engineering and final EPW formatting
Installation
1. Editable install from local source
# clone & install in editable mode
git clone https://your-repo.org/your-org/pymfpatch.git
cd pymfpatch
pip install -e .
2. Install from PyPI
pip install pymfpatch
3. GPU enabling
For fastest training/inference, run on a CUDA-enabled GPU. By default pip install pymfpatch will pull in the CPU-only torch wheel. If you have Python 3.12 and a compatible GPU, for example, you can upgrade to the GPU build with:
pip install torch==2.7.1+cu128 --index-url https://download.pytorch.org/whl/cu128
Quickstart
from pymfpatch import WeatherImputer
# 1) Instantiate the imputer with your reference (ERA) and target station EPWs:
imputer = WeatherImputer(
path_to_ref = 'Data/ERA/marignane-era.epw',
path_to_stn = 'Data/MF/marignane-mf.epw',
)
# 2) Run the imputation pipeline:
imputer.process()
# 3) Write out a fully-imputed EPW:
imputer.write("marignane-imputed.epw")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymfpatch-1.0.0.tar.gz.
File metadata
- Download URL: pymfpatch-1.0.0.tar.gz
- Upload date:
- Size: 15.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edaf4fd1afe55b8bec97966eb315a05002959b414d070bfc012788198364c6df
|
|
| MD5 |
6869f41f006c34bde695a24a08eaf118
|
|
| BLAKE2b-256 |
ce6536f909759e7f76c979e4c1404ff59cb263ac0bc47df49adbb8260c5955fd
|
File details
Details for the file pymfpatch-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pymfpatch-1.0.0-py3-none-any.whl
- Upload date:
- Size: 16.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
efa73ff0ee367e1fd2971b6ab614e9d4a1259fdb621be574cb3a5749dbcda22f
|
|
| MD5 |
01885fda8e257e672930277c6f347d80
|
|
| BLAKE2b-256 |
9e6ff1699b2dfed5e90967329352733df9aa494e930d868d22451898feeb4237
|