This release is a pre-release and may not be stable for production use.
SMODEX Package: A Python package for understanding the evolution of soil moisture anomalies.
SMODEX is a package developed to enhance performant computation and understanding of the evolution of soil moisture and soil moisture anomalies using climate datasets. It embraces the principles of FAIR and Open Science in the development of the computational workflow and the data sharing.
Package Usage
Soil moisture and soil moisture anomalies are critical markers of dryness and agricultural drought. The SMODEX package was designed to aid the performant of this metrics targeting the following categories of users:
- Researchers working on the topics of soil moisture, drought and soil hydrology,
- Students exploring tools for understanding the dynamics of soil moisture and soil hydrology,
- Open-source and Open-science scientists looking for a wrapper to compute these specific anomalies
Installation
The SMODEX package is compatible with Python 3.6+ and is distributed through the Python Package Index (PyPI) and can installed via:
pip install smodex
Usage examples
Currently, the main subpackages in SMODEX include:
- downloader: contains a request to the ERA5 Climate Datastore for downloading and saving soil water contents based on the specified timeline necessary for computing an anomaly,
- climates: contains functionalities for computing soil moisture climatology with a given reference, and rolling mean at a weekly rolling window, dekadal, monthly or annual scale,
- anomaly: contains functionalities for computing, saving soil moisture anomalies,
- share: contains functionalities for sharing computed datasets with other scientists using the STAC specification (coming soon),
- plots: contains different functionalities for visualizing the soil moisture and soil moisture anomalies across spatial and temporal dimensions (coming soon),
Downloader
To use the downloader module, see our quick start example here
Within a python script, this can serve as a quick guide:
from smodex.downloader import cds_downloader
start_date = '2020-12-15'
end_date = '2021-01-03'
conf_path = 'download.json'
download_path = 'moisture_data/'
cds_downloader(start_date,
end_date,
conf_path,
download_path)
However, this requires the installation of the ERA5 CDS API as well as a specification of your API keys in a .env file following this examples:
Run:
pip install cdsapi
And set the following values to those of your CDS API keys
# .env
CDSAPI_URL=https://cds.climate.copernicus.eu/api/v2
CDSAPI_KEY=XXXXXX:XXXXXX-XXXXXX-XXXX-XXXXX
Remember to change the CDSAPI_KEY to that of your personal or organization's account keys. You can find more specific details on how to access your personal CDS API key here
Contributing
Currently, the SMODEX package is under development and we solicit the contribution of other developers to make a Merge/Pull Request using the development version on GitLab. You can clone the repository and install the pakcage using:
python setup.py install
To make a merge/pull request for a major code change, open an issue to discuss what you'd like to change first. And tests your code changes locally with the pre-commit hooks specified before requesting a merge-request, which automatically triggers the execution of all the tests cases in the repo.
Contributors
License
External links
Metadata
Release files for smodex 1.0.1b0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| smodex-1.0.1b0.tar.gz | 28.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| smodex-1.0.1b0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 40.1 kB
Release files / smodex-1.0.1b0.tar.gz
| Download URL | smodex-1.0.1b0.tar.gz |
|---|---|
| Size | 28.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6bc5c2806b35eb660f1a9fd52cfada4d325afaaac38c14648347b743914dcab9
|
|
BLAKE2b-256 checksum How to use checksums |
8a84b8bcf5744a17cbe700b162db2c1ed46718fe688e328bec25e23504dd2ec7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.13
|
Release files / smodex-1.0.1b0-py3-none-any.whl
| Download URL | smodex-1.0.1b0-py3-none-any.whl |
|---|---|
| Size | 11.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
daa447d85d9f2565e05177d4aeb02ea43af1960a74b3153a70911b4d3b0b92ee
|
|
BLAKE2b-256 checksum How to use checksums |
299ee12f3f9448be475a2fc9cd5417be6557bae4f23e358d888208c2693d4993
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.13
|