Skip to main content

A comprehensive tool for creating animations from NetCDF data files

Project description

NetCDF Animation Creator

Create beautiful animations from NetCDF files with support for both single files and multiple files without concatenation. 75-87% faster than traditional concatenation methods.

🚀 Quick Start

Installation

pip install -e .

Basic Usage

# Interactive mode (recommended)
anc

# Single file
anc your_file.nc
# or
anc your_file.nc --variable InstantaneousRainRate --type efficient --fps 15


# Multiple files
anc *.nc
# or
anc F4C_00.2.SEG01.OUT.*.nc --variable InstantaneousRainRate --type efficient --fps 15

# Visualize using a config file (skips interactive menu)
anc *.nc --config viz.yaml
# or
anc *.nc -c example_config.json

Config file

You can store visualization parameters in a JSON or YAML file and pass it with --config / -c. The app then skips the interactive menu; CLI options override values from the file.

  • JSON: supported by default (see example_config.json).
  • YAML: supported if PyYAML is installed: pip install pyyaml or pip install animate-netcdf[yaml] (see example_config.yaml).

Config keys match the CLI and interactive options (e.g. variable, output_format, fps, zoom_factor, cmap, vmin, vmax, designer_mode, transparent, ignore_values). The NetCDF file or pattern is always given on the command line: anc *.nc --config viz.yaml.

✅ Key Features

  • Multi-File Support: Process multiple NetCDF files directly (no concatenation needed)
  • Smart Dimension Handling: Auto-detects animation dimension (time, level, etc.)
  • Efficient plotting: Fast imshow with Cartopy
  • Configuration Management: Interactive setup and JSON-based configuration
  • Zoom Functionality: Crop domain by specified zoom factor

🔧 Command Line Options

Option Description Default
--variable Variable name to animate Required
--fps Frames per second 10
--output Output filename Auto-generated
--config, -c Load config from JSON or YAML file (skips interactive menu) None
--zoom Zoom factor for cropping domain 1.0

🧪 Testing

# Validate setup
anc validate

# Run tests
anc test --full

🚀 Deployment

This project uses automated deployment to PyPI via GitHub Actions. To release a new version:

Automatic Deployment

  1. Create a new version tag:

    python scripts/release.py patch    # for bug fixes
    python scripts/release.py minor    # for new features
    python scripts/release.py major    # for breaking changes
    
  2. Manual tag creation (alternative):

    # Update version in pyproject.toml
    git add pyproject.toml
    git commit -m "Bump version to X.Y.Z"
    git tag vX.Y.Z
    git push origin main
    git push origin vX.Y.Z
    

Setup Requirements

  1. PyPI API Token: Create a PyPI API token at https://pypi.org/manage/account/token/
  2. GitHub Secrets: Add your PyPI token as a GitHub secret named PYPI_API_TOKEN
    • Go to your GitHub repository → Settings → Secrets and variables → Actions
    • Add new repository secret with name PYPI_API_TOKEN and your token as the value

The GitHub Actions workflow will automatically:

  • Build the package when you push a version tag (e.g., v1.0.3)
  • Run tests on every push to main/develop branches
  • Publish to PyPI when tests pass

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

animate_netcdf-1.7.4.tar.gz (48.6 kB view details)

Uploaded Source

Built Distribution

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

animate_netcdf-1.7.4-py3-none-any.whl (55.7 kB view details)

Uploaded Python 3

File details

Details for the file animate_netcdf-1.7.4.tar.gz.

File metadata

  • Download URL: animate_netcdf-1.7.4.tar.gz
  • Upload date:
  • Size: 48.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for animate_netcdf-1.7.4.tar.gz
Algorithm Hash digest
SHA256 ddcc03c0cdab84e33efabc005a14b53da61cbf3e04ef3943631e0b2a4779b6c2
MD5 03b53d615b8bdc9f39800653b4614400
BLAKE2b-256 a900ef7d7019766f9e9bdb562fa18f4c78a79ee0f973e2c744a756ddddc2fd39

See more details on using hashes here.

File details

Details for the file animate_netcdf-1.7.4-py3-none-any.whl.

File metadata

  • Download URL: animate_netcdf-1.7.4-py3-none-any.whl
  • Upload date:
  • Size: 55.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for animate_netcdf-1.7.4-py3-none-any.whl
Algorithm Hash digest
SHA256 ca63403bd9e6e2c70ab1bb58f9bcc2b748f7469c302c97347fa9d25f990479f3
MD5 decf4824b43ea6d764abd65381d8afb4
BLAKE2b-256 83ea6ff2f35fb4d96bb1bfc113b7b93a3efc165da225768959e56295bb22732f

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