AtmoTools : A toolkit for atmospheric sounding data visualization.
Overview
AtmoTools is an open-source Python package that provides a wrapper for HDF4, HDF5 and NetCDF files and visualization tools for atmospheric sounding data.
Contacts
Antonin ZABUKOVEC : antonin.zabukove@cnes.fr
Sarah GUIBERT : sarah.guibert@cnes.fr
Features
- Reader for HDF5, HDF4 and NetCDF files
- Writer for NetCDF
- Atmospheric sounding data visualizations
Quick Start
Installation
Requirements: Python >= 3.11.10
It is strongly recommended to create a virtual environment. In the directory that will hold the virtual environment, run:
virtualenv atmotools_env
source atmotools_env/bin/activate
You can install AtmoTools by running the following command :
pip install atmotools
If you have difficulties using the previous command, run the following command :
pip install atmotools==<VERSION> --index-url https://pypi.org/simple
Requirements
- Python >= 3.10.11
Developer installation
For an installation from the git repository follow this documentation
Then you can install AtmoTools in "editable" mode :
If it hasn't already been done, navigate to the project folder and then run the following command:
pip install --editable .
NOTE : The "editable" mode allows to imediatly update files modifications
Please read this guide for developer best practices and specific AtmoTools practices.
Run AtmoTools
Reader
Atmotools includes the possibility to create a reader from any HDF5, NetCDF or HDF4 file path.
import atmotools.utils.hdf_netcdf_tools as hdfu
filepath = <YOUR_FILE_PATH>.nc / .h5 / .hdf
rdr = hdfu.createReader(filepath)
Describe a file
rdr.describe_file()
rdr.describe_all_vars()
- describe_file() : describes the file as a whole, as a table (without the variables attributes) or as a tree (with the variables attributes)
- describe_all_vars() : describes all of the variables of a file (or of a group if its path is given as an argument), as a json-like dictionary.
Get a variable
var = rdr.get_var(<VAR_PATH>)
NOTE : VAR_PATH is accesible with reader.describe_file().
VAR_PATH example : group/subgroup/var_name
Get information on a variable
var.describe()
var.get_data()
var.get_mean(axis)
- describe() : describe the variable
- get_data() : get the data of a variable
- get_mean(axis) : returns the mean of a variable data along the specified axis
For more information on what this reader can do and how it works, please refer to the documentation and the example.
Writer
Create a file
It is also possible to create a file thanks to the writer. For example, to write a nc file_path:
import atmotools.utils.hdf_netcdf_tools as hdfu
filepath = <YOUR_FILE_PATH>.nc
nc_writer = hdfu.Hdf5Netcdf4Writer(file_path = file_path,
mode = "w",
extension = ".nc")
The writer has all the same features as the reader, with some added features, like creating groups, variables, attributes, etc.
To find more detail on the writer and what it can be used for, please refer to the example and the documentation
Modify the content of a NetCDF/HDF5/HDF4 file
With the writer, it is also possible to modify the data of an already existing file. For example for a nc file_path:
import atmotools.utils.hdf_netcdf_tools as hdfu
filepath = <YOUR_FILE_PATH>.nc
nc_writer = hdfu.Hdf5Netcdf4Writer(file_path = file_path,
mode = "a",
extension = ".nc")
To find more detail on the writer and what it can be used for, please refer to the example and the documentation
Interactive Visualization tools
Atmotools includes visualization tools for MicroCarb and IASI-NG , which can be launched respectively with the commands :
atmotools.microcarb.app -l1b <file_path_l1b>.nc -l1c <file_path_l1c>.nc -isrf <file_path_isrf>.nc -eng <file_path_eng>.nc -l2 <file_path_l2>.nc
NOTE : It is completely possible to select multiple files for each type (L1B, L1C, ISRF, ENG, L2), or to provide a path for only one of the types. Some products have restricted access. Consequently, some features of the tool may be disabled.
You can now use the tool by navigating to http://127.0.0.1:8051/ via your preferred browser.
atmotools.iasi_ng.app -rad <path_to_rad_file>.nc -eng <path_to_eng_file>.nc -ods <path_to_ods_file>.nc
NOTE : It is entirely possible to select multiple files for each type (ENG, RAD, ODS), or to provide a path for only one of the types. Some products have restricted access. Consequently, some features of the tool may be disabled.
You can now use the tool by navigating to http://127.0.0.1:8052/ via your preferred browser.
If you need to change de port number then acces to the config parameters with the following commands :
atmotools.iasi_ng.config
atmotools.microcarb.config
These commands open the config file with vim. Press i to editate the file, :w to save it and :q to quit.
These commands launch the following apps.
IASI-NG visualization tool :
MicroCarb visualization tool :
For more information on what these apps can do, how to launch them, and how they work, please refer to the documentation.
License
AtmoTools is licensed under permissive Apache License 2.0. Please refer to the LICENSE file for more details.
Support
Contributing
We welcome contributions! Please read our Contributing Guidelines for details on how to get involved, including coding standards and submission processes.
Metadata
Release files for atmotools 1.2.16.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| atmotools-1.2.16.post1.tar.gz | 921.1 kB | Without provenance | Details for atmotools-1.2.16.post1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| atmotools-1.2.16.post1-py3-none-any.whl | Python 3 | none | any | Details for atmotools-1.2.16.post1-py3-none-any.whl |
Total release size: 1.9 MB
Release files / atmotools-1.2.16.post1.tar.gz
| Download URL | atmotools-1.2.16.post1.tar.gz |
|---|---|
| Size | 921.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6cdc7756988e0d18bb01ce004d8d9af9b4812900a3bd77249f368ce2dc1baa2a
|
|
BLAKE2b-256 checksum How to use checksums |
fcfdea0686b5c2991404c62161e77b50d59825dfab0f7b36a6282d02aec7d60f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.10
|
Release files / atmotools-1.2.16.post1-py3-none-any.whl
| Download URL | atmotools-1.2.16.post1-py3-none-any.whl |
|---|---|
| Size | 954.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a7be60561304fccc4067b67b15bfbb7ec1f011dd9c93a5883c92280cdbb76ec
|
|
BLAKE2b-256 checksum How to use checksums |
4657eff0f60f3835841857dab6c6bdc21d13cdfeafb121acbdd7e7e1d6f77437
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.10
|
Security for atmotools 1.2.16.post1
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.