Skip to main content

PREMISE-hydroclim v2.0: an open-source Python framework for multi-source precipitation harmonization, indices, and evaluation

Project description

PREMISE v1.0

PREMISE (PREcipitation Multi-source Indices and Software Evaluation) is an open-source Python framework for basin-oriented hydroclimatic data preparation, comparative product evaluation, and climate-diagnostic workflows in environmental modelling applications.

The redesigned v1.0 architecture is organized around six application-oriented modules:

  1. Data acquisition for multi-source hydroclimatic products.
  2. Data conversion and harmonization for heterogeneous raw formats and metadata.
  3. Basin-oriented preprocessing for clipping, masking, aggregation, and forcing preparation.
  4. Product evaluation for benchmarking multi-source products against a reference dataset.
  5. Extreme climate and drought indices for precipitation and hydroclimatic diagnostics.
  6. Visualization and reporting for publication-ready figures and structured summaries.

Optional correction and fusion utilities are retained as legacy or experimental extensions. They are not part of the six-module core architecture described in the current manuscript revision.


Homepage module graphic placeholder

The repository root already includes a dedicated asset path for the module icon board you plan to add later.

PREMISE module icon board placeholder

When the final graphic is ready, replace the file at assets/module-icons/overview-placeholder.svg or update the image path in this section.


Software availability

  • Name of software: PREMISE v1.0
  • Description: An open-source Python framework for basin-oriented preprocessing, harmonization, index generation, and comparative evaluation of multi-source gridded hydroclimatic datasets in environmental modelling workflows.
  • Developer: Xinlong Le
  • Programming language: Python
  • System requirements: Linux, Windows, or macOS
  • Repository: https://github.com/theshyyi/PREMISE-v1.0
  • Version: 1.0.0
  • DOI: 10.5281/zenodo.18093220

A manuscript-ready note is provided in docs/software_availability.md.


Installation

Core installation

pip install -e .

Optional extras

pip install -e .[geo]
pip install -e .[tiff]
pip install -e .[grib]
pip install -e .[hdf]
pip install -e .[fusion]
pip install -e .[full]

Six-module architecture

Module Package path Primary role
Data acquisition premise.acquisition Register and query hydroclimatic data sources, build download plans
Data conversion and harmonization premise.conversion Convert heterogeneous raw files to standardized NetCDF-ready datasets
Basin-oriented preprocessing premise.basin Clip, mask, aggregate, and prepare basin-facing forcing products
Product evaluation premise.product_evaluation Evaluate candidate products against a reference and summarize ranking workflows
Extreme climate and drought indices premise.climate_indices Compute drought indices and precipitation-extreme indicators
Visualization and reporting premise.visualization Generate maps, performance diagrams, Taylor diagrams, and grouped summaries

Legacy modules such as premise.preprocess, premise.indices, premise.evaluation, and premise.plotting are still available for backward compatibility.


Quick start with the new module layout

1. Explore hydroclimatic source templates

from premise.acquisition import list_sources

for source in list_sources(variable="precipitation"):
    print(source.key, source.title, source.temporal_resolution)

2. Convert heterogeneous data to standardized NetCDF

from premise.conversion import convert_binary_to_nc

convert_binary_to_nc(
    meta_path="cpc_global_daily.meta",
    data_path="precip_20000101.bin",
    out_nc="precip_20000101.nc",
)

3. Prepare basin-oriented forcing summaries

from premise.basin import area_mean_by_region
from premise.climate_indices import calc_spi
import xarray as xr

pr = xr.open_dataset("precip_20000101.nc")["pr"]
spi3 = calc_spi(pr, scale=3)
regional = area_mean_by_region(spi3, "regions.shp")
print(regional)

4. Summarize evaluation or ranking workflow stages

from premise.product_evaluation import describe_ranking_workflow

print(describe_ranking_workflow())

Examples


Documentation


Testing

Minimal regression-oriented tests are provided under tests/:

pytest -q

Citation and license

Please cite the associated Zenodo archive when using PREMISE in research outputs. A machine-readable citation file is included as CITATION.cff.

This project is released under the MIT License. See LICENSE.

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

premise_hydroclim-2.1.0.tar.gz (199.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

premise_hydroclim-2.1.0-py3-none-any.whl (276.4 kB view details)

Uploaded Python 3

File details

Details for the file premise_hydroclim-2.1.0.tar.gz.

File metadata

  • Download URL: premise_hydroclim-2.1.0.tar.gz
  • Upload date:
  • Size: 199.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.19

File hashes

Hashes for premise_hydroclim-2.1.0.tar.gz
Algorithm Hash digest
SHA256 4d4e7bd42e84a2f4e96716388b1dc12205851b9b08048a8ed3d8f5037367a377
MD5 7893a75da9454da939764a531531b01a
BLAKE2b-256 6da4794724148c06f2ee921f5fb15222b243900fa37fee42978e35412ac61af4

See more details on using hashes here.

File details

Details for the file premise_hydroclim-2.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for premise_hydroclim-2.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f9ba80183368160eee0a4fa11a81c786c32bfec65e3edef458095eafacd80dd6
MD5 9f29e5a25633da341d7e7103b5fe24bb
BLAKE2b-256 a653097d679942b298eab4b47845063fb580604dd356862990b4a2fd0e12d6f5

See more details on using hashes here.

Supported by

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