Metadata-Version: 2.4
Name: mrrpropy
Version: 0.1.1
Summary: Python tools for MRR-PRO loading, RaProMPro processing, plotting, and analysis.
Project-URL: Homepage, https://github.com/jabravoaranda/mrrpropy
Project-URL: Source, https://github.com/jabravoaranda/mrrpropy
Project-URL: Issues, https://github.com/jabravoaranda/mrrpropy/issues
Project-URL: Changelog, https://github.com/jabravoaranda/mrrpropy/blob/main/CHANGELOG.md
Project-URL: Documentation, https://jabravoaranda.github.io/mrrpropy/
Author-email: Juan Antonio Bravo Aranda <jabravo@ugr.es>
License-Expression: BSD-3-Clause
License-File: LICENSE
Keywords: meteorology,mrr-pro,precipitation,radar,remote-sensing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: Atmospheric Science
Requires-Python: <3.12,>=3.11.11
Requires-Dist: dask<2025,>=2024.11.2
Requires-Dist: distributed>=2024.12.1
Requires-Dist: ipywidgets<9,>=7.7.1
Requires-Dist: loguru<1,>=0.7.0
Requires-Dist: matplotlib>=3.10.0
Requires-Dist: miepython>=3.0.5
Requires-Dist: netcdf4<2,>=1.7.2
Requires-Dist: notebook<7,>=6.5.5
Requires-Dist: numba<1,>=0.60.0
Requires-Dist: numpy<2.1,>=2.0.2
Requires-Dist: pandas>=2.1.2
Requires-Dist: pyarrow<19,>=18.1.0
Requires-Dist: pyyaml<7,>=6.0.2
Requires-Dist: requests<3,>=2.32.3
Requires-Dist: scipy<2,>=1.13.1
Requires-Dist: seaborn<0.14,>=0.13.2
Requires-Dist: statsmodels<0.15,>=0.14.4
Requires-Dist: typer<1,>=0.15.1
Requires-Dist: typing-extensions<5,>=4.12.0
Requires-Dist: xarray<2026,>=2025.1.2
Provides-Extra: docs
Requires-Dist: pdoc<16,>=15.0.1; extra == 'docs'
Provides-Extra: jupyter
Description-Content-Type: text/markdown

# mrrpropy

MRR PRO code for processing and analysis.

## Scientific references

The retained RaProMPro processing implementation used for MRR-PRO data is associated
with:

- Garcia-Benadi A, Bech J, Gonzalez S, Udina M, Codina B. A New Methodology to
  Characterise the Radar Bright Band Using Doppler Spectral Moments from Vertically
  Pointing Radar Observations. Remote Sensing. 2021;13(21):4323.
  https://doi.org/10.3390/rs13214323

The corresponding original code repository is:

- https://github.com/AlbertGBena/RaProM-Pro

For MRR-2 data, a related implementation is distributed separately as `RaProM.py`:

- Garcia-Benadi A, Bech J, Gonzalez S, Udina M, Codina B, Georgis JF.
  Precipitation Type Classification of Micro Rain Radar Data Using an Improved
  Doppler Spectral Processing Methodology. Remote Sensing. 2020;12(24):4113.
  https://doi.org/10.3390/rs12244113

## Repository workflow

This repository keeps the scientific processing code intact while standardizing the
developer workflow around it.

- Install the project in editable mode with `uv sync --group dev` or `pip install -e .`.
- Import the package as `mrrpropy`.
- Use the optional CLI entry point as `mrrpropy version`.
- Keep scientific algorithm changes confined to the processing modules and treat
  workflow, packaging, tests, and CI as separate concerns.

## Rain-process trends

The microphysical rain-process workflow now defaults to a non-parametric vertical
trend characterization:

- Kendall's tau describes the direction and consistency of monotonic change in a layer.
- Theil-Sen slope describes the robust magnitude of that change.
- Downstream RGB and classification consume canonical `trend_*` variables instead
  of method-specific names, so the trend method can be swapped without changing
  the rest of the pipeline.
- OLS trend fitting remains available only as a legacy or diagnostic comparison path.

## Development

Typical local commands:

```bash
uv sync --group dev
uv run python -c "import mrrpropy"
uv run pytest -m "not slow"
uv run pytest -m slow
uv run mypy
uv run black --check mrrpropy tests
uv run python scripts/benchmark_raprompro.py --quick --repeats 1
```

## Production

Before using the package in production, follow the release checklist in
`PRODUCTION.md`.

## Releasing

To build and publish the package, follow `RELEASING.md`. The repository includes
GitHub Actions workflows for release validation and Trusted Publishing to PyPI.

## Tests

The test suite is organized into:

- fast checks for import and basic data access,
- integration checks for end-to-end workflow behavior,
- slow plotting regressions that write figures under `tests/figures/`,
- generated NetCDF and other non-figure test outputs under `tests/generated/`.

Bundled NetCDF files under `tests/data/` remain the reference fixtures. Generated
outputs should go to ignored test output directories, not back into tracked fixture
paths.

## Benchmarking

For quick performance checks of the canonical processing path, use the bundled
10-minute RAW subset:

```bash
uv run python scripts/benchmark_raprompro.py --quick --repeats 1
```

For the full one-hour fixture, pass `--raw-path` explicitly or omit `--quick`.

## Documentation

The repository includes a static documentation site for GitHub Pages.

- Build locally with `python scripts/build_docs.py` after installing `.[docs]`.
- Preview locally with `python -m http.server 8000 --directory site` after the build.
- The landing pages live under `docs/`.
- The API reference is generated with `pdoc` from package docstrings and signatures.
