Skip to main content

A collection of tools for working with NetCDF files

Project description

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.

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")

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

ncftools-0.6.0.tar.gz (8.5 kB view details)

Uploaded Source

Built Distribution

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

ncftools-0.6.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file ncftools-0.6.0.tar.gz.

File metadata

  • Download URL: ncftools-0.6.0.tar.gz
  • Upload date:
  • Size: 8.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ncftools-0.6.0.tar.gz
Algorithm Hash digest
SHA256 8fe615ac5601bf7d1d3b7b0b386c8d7c4599ee327bdb52086d1295d3079be151
MD5 850b0059488a6cb10310515a970f351e
BLAKE2b-256 ef52c64197444534baef84827100578995c0500e6c7fe3d3804e217ad87a8f0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncftools-0.6.0.tar.gz:

Publisher: publish.yml on AaronOET/ncftools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ncftools-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: ncftools-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 11.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for ncftools-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2679b56a2feaece0143e204418eb5c65a6c2605587f08fa55110d2552d0226b1
MD5 5ced6cdd76e5ae9c69872eed6baa1c5a
BLAKE2b-256 852ed282db1e7e7474acedd49afe29c1872212c9fa5774679b65703532d02996

See more details on using hashes here.

Provenance

The following attestation bundles were made for ncftools-0.6.0-py3-none-any.whl:

Publisher: publish.yml on AaronOET/ncftools

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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