No project description provided
Project description
inspectds
A CLI utility to print metadata of datasets in various formats (e.g. NetCDF, zarr, GRIB etc)
powered by xarray
Prerequisites
You need the following binary dependencies:
- Python >= 3.9
- Optionally, eccodes, which is necessary for GRIB support.
Installation
The recommended way of installation is pipx:
pipx install inspectds
or if you want support for GRIB, SELAFIN or both:
pipx install 'inspectds[grib]'
pipx install 'inspectds[selafin]'
pipx install 'inspectds[all]'
If you want to install the latest development version from git, then use:
pipx install 'git+https://github.com/pmav99/inspectds.git#egg=inspectds[all]'
Usage
Netcdf
$ inspectds tests/data/example_1.nc
Dimensions: (lat: 5, level: 4, lon: 10, time: 1)
Coordinates:
* lat (lat) int32 20 30 40 50 60
* lon (lon) int32 -160 -140 -118 -96 -84 -52 -45 -35 -25 -15
* level (level) int32 1000 850 700 500
* time (time) datetime64[ns] 1996-01-01T12:00:00
Data variables:
temp (time, level, lat, lon) float32 ...
rh (time, lat, lon) float32 ...
Zarr
$ inspectds tests/data/store.zarr
Dimensions: (lat: 19, lon: 36, time: 12)
Coordinates:
* lat (lat) int64 -90 -80 -70 -60 -50 -40 -30 ... 30 40 50 60 70 80 90
* lon (lon) int64 -180 -170 -160 -150 -140 -130 ... 130 140 150 160 170
* time (time) datetime64[ns] 2001-01-31 2001-02-28 ... 2001-12-31
Data variables:
aaa (lon, lat, time) int64 ...
GRIB
$ inspectds tests/data/example.grib
Dimensions: (number: 2, time: 3, isobaricInhPa: 2, latitude: 3, longitude: 4)
Coordinates:
* number (number) int64 0 1
* time (time) datetime64[ns] 2017-01-01 ... 2017-01-02
step timedelta64[ns] ...
* isobaricInhPa (isobaricInhPa) float64 850.0 500.0
* latitude (latitude) float64 90.0 0.0 -90.0
* longitude (longitude) float64 0.0 90.0 180.0 270.0
valid_time (time) datetime64[ns] ...
Data variables:
z (number, time, isobaricInhPa, latitude, longitude) float32 ...
t (number, time, isobaricInhPa, latitude, longitude) float32 ...
SELAFIN
$ inspectds tests/data/iceland.slf
Dimensions: (time: 13, node: 3526)
Coordinates:
x (node) float32 14kB -13.99 -14.97 -15.89 ... -13.52 -16.31 -12.28
y (node) float32 14kB 57.38 60.19 69.79 63.11 ... 66.37 69.34 63.52
* time (time) datetime64[ns] 104B 2017-10-01 ... 2017-10-01T12:00:00
Data variables:
S (time, node) float32 183kB ...
More info:
$ inspectds --help
Usage: inspectds [OPTIONS] PATH
╭─ Arguments ─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ * path PATH The path to the dataset [default: None] [required] │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Options ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --dataset-type [auto|netcdf|zarr|grib|selafin] The dataset type. If 'auto', then it gets inferred from PATH [default: auto] │
│ --mask-and-scale --no-mask-and-scale Whether to mask and scale the dataset [default: no-mask-and-scale] │
│ --dimensions --no-dimensions Whether to include 'Dimensions' in the output [default: dimensions] │
│ --coordinates --no-coordinates Whether to include 'Coordinates' in the output [default: coordinates] │
│ --variables --no-variables Whether to include 'Variables' in the output [default: variables] │
│ --variable-attributes --no-variable-attributes Whether to include the variable attributes in the output [default: no-variable-attributes] │
│ --global-attributes --no-global-attributes Whether to include the global attributes in the output [default: no-global-attributes] │
│ --full --no-full Display full output. Overrides any other option [default: no-full] │
│ --version Display the version │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
Development
mamba env create --file ci/py3.11.yml --name inspectds_dev
conda activate inspectds_dev
make init
make test
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
inspectds-0.4.0.tar.gz
(6.6 kB
view details)
Built Distribution
File details
Details for the file inspectds-0.4.0.tar.gz
.
File metadata
- Download URL: inspectds-0.4.0.tar.gz
- Upload date:
- Size: 6.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.10.10-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f300b89d02bb7e628b14df9bbea5b7e57f838b32cc0a5c30e9a2b172f65a5e5d |
|
MD5 | 3c728fc301230b22faac57b72abb814c |
|
BLAKE2b-256 | 5651bc5eef3dfb6151ce11262e0667983e273cc6aaf7168d6390cf99cd472049 |
Provenance
File details
Details for the file inspectds-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: inspectds-0.4.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.6 Linux/6.10.10-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca51812cd40848eb2d9f022b1d9f4ca959c721ebca1f38ab158e952e3642a1fd |
|
MD5 | 677d1037e10fc75cd8031e315eca1580 |
|
BLAKE2b-256 | 6c58faba38f2f2696bdc600158c0e683c3f91a9c2462c732c7ff85252bb200ad |