Skip to main content

A Python package for understanding the evolution of soil moisture and soil moisture anomalies

Project description

SMODEX Package: A Python package for understanding the evolution of soil moisture anomalies.

License: MIT 0 Coverage Python

Code style: black Documentation PRs Welcome

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:

  1. Researchers working on the topics of soil moisture, drought and soil hydrology,
  2. Students exploring tools for understanding the dynamics of soil moisture and soil hydrology,
  3. 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

MIT

External links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smodex-1.0.1b0.tar.gz (28.3 kB view details)

Uploaded Source

Built Distribution

smodex-1.0.1b0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file smodex-1.0.1b0.tar.gz.

File metadata

  • Download URL: smodex-1.0.1b0.tar.gz
  • Upload date:
  • Size: 28.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for smodex-1.0.1b0.tar.gz
Algorithm Hash digest
SHA256 6bc5c2806b35eb660f1a9fd52cfada4d325afaaac38c14648347b743914dcab9
MD5 bd39515beff6069f26eb9ec00cb0fb88
BLAKE2b-256 8a84b8bcf5744a17cbe700b162db2c1ed46718fe688e328bec25e23504dd2ec7

See more details on using hashes here.

File details

Details for the file smodex-1.0.1b0-py3-none-any.whl.

File metadata

  • Download URL: smodex-1.0.1b0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for smodex-1.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 daa447d85d9f2565e05177d4aeb02ea43af1960a74b3153a70911b4d3b0b92ee
MD5 0fa9426721e4e62743d59a8a8426f3a8
BLAKE2b-256 299ee12f3f9448be475a2fc9cd5417be6557bae4f23e358d888208c2693d4993

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page