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, zoom_center_lat, zoom_center_lon, cmap, vmin, vmax, designer_mode, designer_show_map_contours, 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; optionally center on a latitude/longitude

🔧 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, -z Zoom factor for cropping domain 1.0
--zoom-lat Latitude to center zoom on (use with --zoom-lon and --zoom > 1) None
--zoom-lon Longitude to center zoom on (use with --zoom-lat and --zoom > 1) None

🧪 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.6.tar.gz (50.9 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.6-py3-none-any.whl (57.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: animate_netcdf-1.7.6.tar.gz
  • Upload date:
  • Size: 50.9 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.6.tar.gz
Algorithm Hash digest
SHA256 abde752de1aceab7505ffc5422537ddb27568de7df26ef684b8a7722df04c084
MD5 23203a025532ea94cd976383f5fa0b4d
BLAKE2b-256 189657e4dc11b61ef5d6a41fd0d34b723e668362bd47eb50316ff40de28b8e8d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: animate_netcdf-1.7.6-py3-none-any.whl
  • Upload date:
  • Size: 57.9 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 80b3deac0fbd8f8f3d053e41042a95c78befd05fa3a0a96c5611965c6538ef3c
MD5 49cf8f96ee73de1ab2baa94153c53bd1
BLAKE2b-256 156365a48606f825e2573c4fa74fcf0fd75e3fd7fc49936ffcd548eb48d8a990

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