#meteorology #weather #sounding

bufkit-data

A crate to manage an archive of bufkit files

41 unstable releases

new 0.22.0 May 13, 2022
0.21.0 Jun 19, 2021
0.20.0 Mar 20, 2021
0.18.1 Nov 20, 2020
0.7.1 Nov 16, 2018

#65 in Science

Download history 44/week @ 2022-02-21 7/week @ 2022-03-07 126/week @ 2022-03-14 126/week @ 2022-03-21 1/week @ 2022-03-28 1/week @ 2022-04-18 83/week @ 2022-04-25 281/week @ 2022-05-02 61/week @ 2022-05-09

426 downloads per month

MIT license

1MB
2.5K SLoC

Build Status Build Status

bufkit-data

Crate to manage and interface with an archive of bufkit files.

This supports a set of command line tools for utilizing the archive. In general, it may be useful to anyone interested in archiving bufkit files.

The current implementation uses an sqlite database to keep track of files stored in a common directory. The files are compressed, and so should only be accessed via the API provided by this crate.

Python integration

When compiled with the pylib feature it minimally supports access from Python. At this time it only supports reading files from the archive.

For use with python, I recommend using a virtualenv and maturin. Once the virtualenv is activated, pip install maturin and install the bufkit_data package by going into the directory bufkit-data is cloned into and running:

maturin develop --release --strip --cargo-extra-args="--features pylib"

After this installation, you should be able to use bufkit_data from python with:

import bufkit_data as bd

arch = bd.Archive("Path/to/my_archive")
ord = arch.id_to_station_num("kord", "nam4km")
most_recent_ord_nam = arch.most_recent(ord, "nam4km")

from datetime import datetime as dt
valid_time = dt(2020, 5, 5, 12, 0)

ord = arch.id_to_station_num("kord", "gfs")
old_ord_gfs = arch.retrieve_sounding(ord, "gfs", valid_time)

License: MIT

Dependencies

~30MB
~532K SLoC