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")
Release files for pymfpatch 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pymfpatch-1.0.0.tar.gz | 15.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pymfpatch-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.6 kB
Release files / pymfpatch-1.0.0.tar.gz
| Download URL | pymfpatch-1.0.0.tar.gz |
|---|---|
| Size | 15.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
edaf4fd1afe55b8bec97966eb315a05002959b414d070bfc012788198364c6df
|
|
BLAKE2b-256 checksum How to use checksums |
ce6536f909759e7f76c979e4c1404ff59cb263ac0bc47df49adbb8260c5955fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|
Release files / pymfpatch-1.0.0-py3-none-any.whl
| Download URL | pymfpatch-1.0.0-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
efa73ff0ee367e1fd2971b6ab614e9d4a1259fdb621be574cb3a5749dbcda22f
|
|
BLAKE2b-256 checksum How to use checksums |
9e6ff1699b2dfed5e90967329352733df9aa494e930d868d22451898feeb4237
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.2
|