# 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
``` bash
# clone & install in editable mode
git clone https://your-repo.org/your-org/pymfpatch.git
cd pymfpatch
pip install -e .
```
### 2. Install from PyPI
``` bash
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:
``` bash
pip install torch==2.7.1+cu128 --index-url https://download.pytorch.org/whl/cu128
```
## Quickstart
``` python
from pymfpatch import WeatherImputer
# 1) Instantiate the imputer with your reference (ERA) and target station EPWs:
imputer = WeatherImputer(
epw_reference_path = 'Data/ERA/marignane-era.epw',
epw_station_path = 'Data/MF/marignane-mf.epw',
)
# 2) Run the imputation pipeline:
imputer.process()
# 3) Write out a fully-imputed EPW:
imputer.write("marignane-imputed.epw")
```
Raw data
{
"_id": null,
"home_page": "https://gitlab.com/arep-dev/pymfpatch.git",
"name": "pymfpatch",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "weather, M\u00e9t\u00e9o-France, ERA5, encoder-decoder, machine learning",
"author": "Alexis SAUVAGEON",
"author_email": "Your Name <your.email@example.com>",
"download_url": "https://files.pythonhosted.org/packages/ed/46/4e9d90db8b7b605449ff121c5b6d86ae62da96b4f5a9fb416969485b2e4f/pymfpatch-0.1.0.tar.gz",
"platform": null,
"description": "# pymfpatch\n\nA 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. \nIt automatically parses, cleans, feature-engineers, imputes missing meteorological variables, and writes out a fully compliant EPW-ready for building simulations.\n\n------------------------------------------------------------------------\n\n## Features\n\n- **Dual-stage imputation**\n - **GRU** for sequential, multi-output regression on variables with temporal patterns (temperature, humidity, wind, radiation...)\n - **XGBoost** for the remaining scalar variables (visibility, ceiling height, albedo, precipitation...)\\\n- **Flexible configuration** of\n - which variables to impute with GRU vs XGB\\\n - model hyperparameters (learning rate, depth, batch size, early stopping, ...)\\\n- **EnergyPlus EPW input/output** with native header preservation\\\n- **Utility functions** for parsing, cleaning, feature-engineering and final EPW formatting\n\n------------------------------------------------------------------------\n\n## Installation\n\n### 1. Editable install from local source\n``` bash\n# clone & install in editable mode\ngit clone https://your-repo.org/your-org/pymfpatch.git\ncd pymfpatch\npip install -e .\n```\n\n### 2. Install from PyPI\n``` bash\npip install pymfpatch\n```\n\n### 3. GPU enabling\nFor fastest training/inference, run on a CUDA-enabled GPU.\nBy default pip install pymfpatch will pull in the CPU-only torch wheel.\nIf you have Python 3.12 and a compatible GPU, for example, you can upgrade to the GPU build with:\n``` bash\npip install torch==2.7.1+cu128 --index-url https://download.pytorch.org/whl/cu128\n```\n\n## Quickstart\n\n``` python\nfrom pymfpatch import WeatherImputer\n# 1) Instantiate the imputer with your reference (ERA) and target station EPWs:\nimputer = WeatherImputer(\n epw_reference_path = 'Data/ERA/marignane-era.epw',\n epw_station_path = 'Data/MF/marignane-mf.epw',\n)\n\n# 2) Run the imputation pipeline:\nimputer.process()\n\n# 3) Write out a fully-imputed EPW:\nimputer.write(\"marignane-imputed.epw\")\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Fill missing weather measurements using user-provided ERA5 data and a TensorFlow encoder-decoder model",
"version": "0.1.0",
"project_urls": {
"Homepage": "https://gitlab.com/arep-dev/pymfpatch.git"
},
"split_keywords": [
"weather",
" m\u00e9t\u00e9o-france",
" era5",
" encoder-decoder",
" machine learning"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "49d10110ff0ad43ddf458a6d10585ed25bfbafb48a81bbb4b417e4cef5c88086",
"md5": "4586a89bf8df365f24643b36621ca88b",
"sha256": "2dd19b3c38106484c4db4a115826d0ef3daf798c9d22aeba9184586a446bee67"
},
"downloads": -1,
"filename": "pymfpatch-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4586a89bf8df365f24643b36621ca88b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 15569,
"upload_time": "2025-07-15T11:52:39",
"upload_time_iso_8601": "2025-07-15T11:52:39.917958Z",
"url": "https://files.pythonhosted.org/packages/49/d1/0110ff0ad43ddf458a6d10585ed25bfbafb48a81bbb4b417e4cef5c88086/pymfpatch-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ed464e9d90db8b7b605449ff121c5b6d86ae62da96b4f5a9fb416969485b2e4f",
"md5": "a5371d113a60fdde34b0115dd21696b6",
"sha256": "67c6a7717e4f94972304a3ef45f3027ffe2330bd91b4b3ffb1b282d737381cad"
},
"downloads": -1,
"filename": "pymfpatch-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "a5371d113a60fdde34b0115dd21696b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 15218,
"upload_time": "2025-07-15T11:52:42",
"upload_time_iso_8601": "2025-07-15T11:52:42.915870Z",
"url": "https://files.pythonhosted.org/packages/ed/46/4e9d90db8b7b605449ff121c5b6d86ae62da96b4f5a9fb416969485b2e4f/pymfpatch-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-15 11:52:42",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "arep-dev",
"gitlab_project": "pymfpatch",
"lcname": "pymfpatch"
}