Skip to main content

PyVista-based 3D visualization for atmospheric data

Project description

skyvista

3D gridded atmospheric data visualization in Python

skyvista provides scientifically accurate 3D visualization of gridded atmospheric science data (but likely applicable in many other disciplines). Skyvista's visualizations are primarily built on top of the pyvista library, and with the appropriate setup can be rendered directly in jupyter notebooks or IDEs, or written to disk. Pyvista is capable of creating interactive visualizations in pure HTML, making these visualizations conveniently portable. Skyvista also contains simplified functionality for creating animations of 3D data using pyvista, in addition to single visualizations.

Skyvista also contains functionality for exporting meshes and volumes created with pyvista to a variety of file formats. One intended use of this functionality is to create visualizations in Blender, using the optional [blender] addon functionality. Skyvista can handle things like setting up animations from a set of single-timestep output files, assigning shaders, as well as more complicated logic.

Further documentation is forthcoming!

Features

  • Gridded data visualization: Create sets of isosurfaces, volumes, vectors, or planes (for things like land/ocean surfaces or cross-sections) from xarray datasets
  • Trajectory visualization: Visualize Lagrangian trajectory data, with options to show trajectories as continuous arrows or as particles at their instantaneous positions (among other visualization customizations)
  • Animation support: Generate animations of time-evolving gridded atmospheric data
  • Camera control: Advanced camera positioning and following for dynamic views
  • Blender functionality: Export meshes to Blender and setup scenes and animations
  • Convenience API: Simple functions for quick visualizations

Installation

First install Skyvista, which will install pyvista as a dependency:

pip install skyvista

From here, pyvista configuration may be complicated depending on your setup. We recommend following the pyvista installation documentation and ensuring that you can successfully create an interactive bunny visualization, following the documentation's example:

from pyvista import examples
dataset = examples.download_bunny()
dataset.plot(cpos='xy')

Quick Start

Gridded model or observation data

import skyvista as sv
import xarray as xr

# Create a plot of vertical velocity and condensate loading isosurfaces

# Load gridded data
storm_ds = xr.open_dataset("model_output.nc")
quick_plot(
    simulation_ds=storm_ds,
    contours={
        # Vertical velocity
        "W": {
            "isosurfaces": [1, 3, 5, 10],
            "cmap": "Greens",
            "opacity": 0.8,
        },
        # Condensate loading
        "RC": {
            # Isosurfaces will be calculated automatically if not specified
            "cmap": "Blues",
            "opacity": 0.4,
        }
    },

Data Format

Gridded data

Gridded data should be xarray Datasets with dimensions x, y, z, and optionally time if creating an animation:

import xarray as xr

# Example DataArray; this should be a data variable in an xr.Dataset,
# not passed directly into skyvista
cloud_field = xr.DataArray(
    data=3d_array,
    dims=['x', 'y', 'z'],
    coords={
        'x': x_coordinates,
        'y': y_coordinates,
        'z': z_coordinates,
    }
)

License

MIT License

Citation

If you use skyvista in your research, please cite:

@software{skyvista,
  author = {Davis, Charles},
  title = {skyvista: 3D gridded atmospheric data visualization in Python},
  year = {2026},
  url = {https://github.com/cmdavis4/skyvista}
}

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

skyvista-0.1.0.tar.gz (58.7 kB view details)

Uploaded Source

Built Distribution

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

skyvista-0.1.0-py3-none-any.whl (62.3 kB view details)

Uploaded Python 3

File details

Details for the file skyvista-0.1.0.tar.gz.

File metadata

  • Download URL: skyvista-0.1.0.tar.gz
  • Upload date:
  • Size: 58.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for skyvista-0.1.0.tar.gz
Algorithm Hash digest
SHA256 78c5f5a1cea070347180e5bcf5760ac621a7704501ed3b2dfde8e5b432cc975a
MD5 521671778bac871214eaec6f5581f330
BLAKE2b-256 5ed229bcb53a6e9614ac7ffcae28716fd8fdc631c98810dd4487e45af141e62a

See more details on using hashes here.

File details

Details for the file skyvista-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: skyvista-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 62.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for skyvista-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d82a889a9a83b702277345cbcc3a5b3eb4948d9f9d63f9481a9c97ee4c757851
MD5 5a84463d4adea394118c989cf5ca954a
BLAKE2b-256 6721533eda718fe237269b53faf7e8164a6fc5545e8e08c4c338b4f5230f44e0

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