Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pymfpatch-1.0.0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymfpatch-1.0.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

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

Hashes for pymfpatch-1.0.0.tar.gz
Algorithm Hash digest
SHA256 edaf4fd1afe55b8bec97966eb315a05002959b414d070bfc012788198364c6df
MD5 6869f41f006c34bde695a24a08eaf118
BLAKE2b-256 ce6536f909759e7f76c979e4c1404ff59cb263ac0bc47df49adbb8260c5955fd

See more details on using hashes here.

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

Hashes for pymfpatch-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efa73ff0ee367e1fd2971b6ab614e9d4a1259fdb621be574cb3a5749dbcda22f
MD5 01885fda8e257e672930277c6f347d80
BLAKE2b-256 9e6ff1699b2dfed5e90967329352733df9aa494e930d868d22451898feeb4237

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page