NCFTOOLS
A collection of Python tools for working with NetCDF files.
Installation
pip install -e .
Features
- meshinfo: Display mesh information from FlowFM NetCDF files (node/face/edge counts, element types, spatial extent)
- nc2shp: Convert a UGRID-compliant NetCDF mesh file to ESRI Shapefiles
- transzone1: Build a transition zone from triangle mesh faces and select all intersecting faces
- transzone2: Extract the core transition zone — faces fully within the shrunk zone
Usage
Check version
ncftools --version
List all available commands
ncftools-info
meshinfo
Display mesh information from a FlowFM NetCDF file.
meshinfo -i FlowFM_net.nc
meshinfo -h
nc2shp
Convert a NetCDF mesh file to ESRI Shapefiles. Outputs {stem}_faces.shp and {stem}_dissolved.shp in the output directory.
nc2shp -i FlowFM_net.nc
nc2shp -i mesh.nc -o output --crs EPSG:4326
nc2shp -i mesh.nc -q
transzone1
Buffer triangle mesh faces by +1 m to form a transition zone, then select all faces that intersect it.
Outputs trans_zone.shp and trans_zone_extend.shp.
Triangles are identified from the type attribute column when present; otherwise they are
detected automatically by vertex count (closed rings with 3 unique vertices).
transzone1 -i SHP_NC/FlowFM_net_faces.shp
transzone1 -i SHP_NC/FlowFM_net_faces.shp -o SHP_TRANS
transzone1 -i SHP_NC/FlowFM_net_faces.shp -q
transzone2
Shrink trans_zone_extend.shp (output of transzone1) by −1 m and select faces fully within the core zone.
Outputs trans_zone_core.shp.
transzone2 -i SHP_NC/FlowFM_net_faces.shp -z SHP_TRANS/trans_zone_extend.shp
transzone2 -i SHP_NC/FlowFM_net_faces.shp -z SHP_TRANS/trans_zone_extend.shp -o SHP_TRANS
transzone2 -i SHP_NC/FlowFM_net_faces.shp -z SHP_TRANS/trans_zone_extend.shp -q
Python API
from ncftools import meshinfo
meshinfo.show_mesh_info("FlowFM_net.nc")
Metadata
Release files for ncftools 0.6.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ncftools-0.6.2.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ncftools-0.6.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.0 kB
Release files / ncftools-0.6.2.tar.gz
| Download URL | ncftools-0.6.2.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c1bb9175d953cccf25a3356a21e1e8b45480919e0e8be838a9c81b12c7d99543
|
|
BLAKE2b-256 checksum How to use checksums |
68b4a032afc74d64c872d0ac6dba2ff3fec9816d6581a21f0168334b4cb3372b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 22, 2026.
Transparency logRelease files / ncftools-0.6.2-py3-none-any.whl
| Download URL | ncftools-0.6.2-py3-none-any.whl |
|---|---|
| Size | 12.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
07dfcd2d28c558f86784f3c14fccb7c1147eae28a49445668708ed12068c500b
|
|
BLAKE2b-256 checksum How to use checksums |
791696f96235a36259424cbab1cf8c90df2b8fa3e368570d146effc3f8aa5527
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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 Jul 22, 2026.
Transparency log