Skip to main content

ffmtools

ffmgen

Builds 3Di subgrid .mdu input files (plus a _run_<name>.bat launcher) from an mdu_prep.xlsx-style workbook or an existing .mdu. Packaged from prototype/Singapore_003/mdugen_gui_v3_tk.py.

Install

cd D:\GITHUB_OET\ffmtools
pip install -e .

GUI

ffmgen                    :: loads .\mdu_prep.xlsx if present, else the built-in template
ffmgen gui STAMFORD_basis.mdu
python -m ffmgen

Each tab is one parameter group (= one sheet of the workbook). The On checkbox decides whether a line is active or written commented out with #. EndDate / EndTime in the time tab are used on Preview/Generate to compute NTimesteps = (End - Start) / Dt (rounded up if it does not divide evenly).

Command line

ffmgen generate mdu_prep.xlsx -o runs -n STAMFORD_basis -t 4
ffmgen generate STAMFORD_basis.mdu --dry-run
ffmgen convert STAMFORD_basis.mdu mdu_prep.xlsx
ffmgen template STAMFORD_template.mdu

Python

import ffmgen

data = ffmgen.ensure_end_rows(ffmgen.read_any("mdu_prep.xlsx"))
ffmgen.update_ntimesteps(data)
ffmgen.write_mdu(data, out_dir="runs", name="STAMFORD_basis", threads=4)

Layout

module contents
ffmgen.core parse/read/write .mdu and .xlsx, to_mdu_text, write_mdu
ffmgen.timecalc ensure_end_rows, update_ntimesteps
ffmgen.gui tkinter GUI (App, run)
ffmgen.cli ffmgen console command
ffmgen/templates/STAMFORD_basis.mdu built-in template

ffmclr

Removes the files a 3Di (subgrid) run leaves in a model folder. Packaged from prototype/Singapore_003/clean_3di_outputs.py. Dry run by default.

ffmclr                              :: list what would be removed in the current folder
ffmclr D:\models\STAMFORD --yes     :: delete
ffmclr --yes --keep-table           :: keep the TableDataFile (faster restart)
ffmclr --move-to _old_run --yes     :: move into <model>\_old_run instead of deleting
ffmclr -r                           :: also scan sub-folders

Removed: *_his.nc, *_map.nc, *_rst.nc, *.rst, *.dia, *_numlimdt.xyz, *_timings.txt, .test, and the TableDataFile named in the .mdu. Never removed: anything referenced as input in an .mdu/.ext, and input extensions (.mdu .ini .ext .pli .pol .xyn .tim .tif .asc .rgb ...).

import ffmclr
res = ffmclr.clean("D:/models/STAMFORD", dry_run=False, move_to="_old_run")
print(len(res.removed), res.failed)

Tests

pip install -e .[test]
pytest

Metadata

Release files for ffmtools 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ffmtools 0.1.0
File Size Uploaded Provenance Actions
ffmtools-0.1.0.tar.gz 22.5 kB With provenance Details for ffmtools-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ffmtools 0.1.0
File Interpreter ABI Platform Actions
ffmtools-0.1.0-py3-none-any.whl Python 3 none any Details for ffmtools-0.1.0-py3-none-any.whl

Total release size: 45.2 kB

Release files / ffmtools-0.1.0.tar.gz

Download URL ffmtools-0.1.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5933980499d13b86c47da434ee9747e92ffb853b7611f8fd8748edb27ddcebd4
BLAKE2b-256 checksum
How to use checksums
475b8ecd0fd9c63591f0e5a4bd14eb494d9297f66ac790d9c1732058b2f963c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / ffmtools-0.1.0-py3-none-any.whl

Download URL ffmtools-0.1.0-py3-none-any.whl
Size 22.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a024df6bd7c51d8d1c972beae3bbe8377d7da064b90d9606dac889d7f538f1e7
BLAKE2b-256 checksum
How to use checksums
d11e749c659ea9f5823ba508baa632ae1c0e7709a3ee46e0b95b0a6b6032aeb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for ffmtools 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ffmtools-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page