Skip to main content

windsaloft

Convert a vectorial raster field into streamlines. The output is in a convenient GeoJSON format.

streamlines

Installation

Install the latest version from the Python Package Index:

$ pip install windsaloft

Usage

To create the streamlines, a vectorial field is needed:

import numpy as np
import geojson
import pygrib
import windsaloft

grib = pygrib.open('data.grib2')

U/V Components

u = grib.select(shortName='u')[0].values
v = grib.select(shortName='v')[0].values

Convert GRIBs data to "standard" -180 to 180 extent global grids

u = np.roll(u, u.shape[1] // 2, axis=1)
v = np.roll(v, v.shape[1] // 2, axis=1)

Calculate streams

feature_collection = windsaloft.jet_streams(u, v, pixel_dist=5, min_value=10, smooth=2, zigzag_degrees=45)

Write output to a file

with open('streams.geojson', 'w') as fileout:
    geojson.dump(feature_collection, fileout, sort_keys=True, separators=(',', ':'))

Metadata

Release files for windsaloft 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for windsaloft 0.0.2
File Interpreter ABI Platform Actions
windsaloft-0.0.2-py3-none-any.whl Python 3 none any Details for windsaloft-0.0.2-py3-none-any.whl

Release files / windsaloft-0.0.2-py3-none-any.whl

Download URL windsaloft-0.0.2-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
51169f2e13af4acceb93ecb8aead5664623ddb80313ac54854f76d772c1853c5
BLAKE2b-256 checksum
How to use checksums
893889c000d3b1b41d3aea4497c96484675fe4c669ec04d83c447b5c6a022039
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

Security for windsaloft 0.0.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page