Skip to main content

CMAC: Corrected Precipitation Radar Moments in Antenna Coordinates

CMAC (Corrected Moments in Antenna Coordinates) is a set of algorithms and code that does corrections to Radar data, but also adds fields to the original data. Using fuzzy logic CMAC also calculates gate IDs such as rain, snow and second-trip. Some other examples of the corrections done are velocity dealiasing and attenuation-corrected reflectivity. Example of fields added are rain_rate_A, velocity_texture and filtered_corrected_differential_phase.

More information can be found at https://arm.gov/data/science-data-products/vaps/cmac

The Atmospheric Community Toolkit is installed in this binder and can be used to download data for CMAC from ARM Data Discovery. For an example on how to download ARM datastreams from Data Discovery, click here.

All ARM files are in the format that is needed by CMAC for processing.

Background

In 2010 the Atmospheric Radiation Measurement (ARM) program procured a number of 3 and 5 cm wavelength scanning radars for documenting the macrophysical, microphysical and dynamical structure of precipitating systems. In order to maximize the scientific impact of these instruments, the program supported the development of an application chain to correct for various propagation and measurement issues so that “point” values of the moments of the radar spectrum and polarimetric measurements could be retrieved.

Because these radars operate at shorter wavelengths than the more common 10 cm (S-band) radars, they are more strongly affected by two-way attenuation as the beam propagates through precipitation, and their shorter maximum unambiguous range leads to more frequent Doppler velocity aliasing. CMAC was built to robustly correct for these effects. Rather than have each processing step make its own conditional decision about where to run based on ad-hoc quality measurements, CMAC first performs a gate-by-gate identification of the dominant scattering process at each radar gate (e.g. rain, snow, melting layer, second-trip echo, or no significant scatterer). This gate ID is performed before any corrections are applied, and is used to construct Py-ART gate filters that determine which corrections and retrievals should be applied at each gate — for example, dealiasing is run on every class except “no significant return”, while attenuation correction is only applied to gates classified as rain.

The full application chain includes velocity dealiasing, extraction of propagation differential phase from the measured differential phase, calculation of specific differential phase, calculation and integration of specific attenuation to correct reflectivity, and calculation of rain rate. For the underlying science, motivation and implementation details, see the technical report in documents/technical_document/cmac2p0_technical_report.tex.

Install

CMAC and the required environment can be installed by using the instructions below:

git clone https://github.com/ARM-Development/cmac.git
cd cmac
conda env create -f environment.yml
conda activate cmac_env

If you wish to use the LP phase processing code instead of the CSU code, you will need to set an environment variable to point to the location of the COIN-OR libraries. This can be done by using the following command in the terminal:

export COIN_INSTALL_DIR=/Users/yourusername/youranacondadir/envs/cmac_env

If you are using the Bringi KDP retrieval, method then this is not needed. The Bringi method is the default method for KDP retrieval in CMAC. If you want to use the LP method, then you will need to set the environment variable as described above and then set the kdp_method argument in the config file to ‘lp’.

You will need to install Anaconda Compilers for the installation of CyLP. These compilers can be found here and differ between OS: https://docs.conda.io/projects/conda-build/en/latest/resources/compiler-tools.html

After the compilers are installed, you should be able to install CyLP with:

pip install git+https://github.com/coin-or/CyLP.git

Scripts such as cmac_animation and cmac_dask require additional dependencies:

source activate cmac_env
conda install -c menpo ffmpeg=version
conda install dask ipyparallel

Note: For ffmpeg, depending on the user’s operating system, the version will need to be replaced with corresponding version number found here:

https://anaconda.org/menpo/ffmpeg

Using CMAC

Once downloaded, CMAC can be used in the terminal. The required positional arguments are radar_file, sonde_file and radar_config (the name of a radar configuration, e.g. bnf_csapr2_ppi, that exists in cmac.default_config or in a YAML file passed via --config-file).

An example:

cmac /home/user/cmac2.0/data/radar_file.nc \
     /home/user/cmac2.0/data/sonde_file.cdf \
     bnf_csapr2_ppi

The script also accepts the following optional arguments:

-c, --config-file PATH

Optional YAML config file whose values override the built-in defaults for the given radar_config.

-cf, --clutter-file PATH

Clutter file to use for addition of the clutter gate id.

-o, --out-radar-directory PATH

Output directory for the CMAC radar file. Defaults to the user home directory.

-id, --image-directory PATH

Directory to save CMAC radar quicklook images. Defaults to the user home directory.

-ma, --meta-append SOURCE

Source of metadata for the output file. config (default) uses the per-radar metadata from cmac.default_config / the YAML override. Pass a path to a JSON file to use custom metadata, or default to use the generic global defaults.

--verbose / --no-verbose

Display debugging output. Defaults to off.

For backwards compatibility, the underscore forms of each long option (e.g. --config_file, --clutter_file, --out_radar_directory, --image_directory, --meta_append) are also accepted.

There is currently a default_config.py file with dictionaries for radars. Additional radars can be added there, or supplied through a YAML file passed via --config-file and selected with the radar_config positional argument. See documents/cmac_config_reference.md for a full description of every section and key in that YAML file.

Documentation

Lead Developers

  • Scott Collis

  • Robert Jackson

  • Zach Sherman

  • Max Grover

Credits

The Bringi KDP retrieval method is taken from CSU-RadarTools, which is a collection of radar processing tools developed by Colorado State University. The CSU-RadarTools can be found at https://github.com/CSU-Radarmet/CSU_RadarTools.

Metadata

Release files for cmac 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cmac 0.3.0
File Size Uploaded
cmac-0.3.0.tar.gz 64.0 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for cmac 0.3.0
File
cmac-0.3.0-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details
cmac-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
cmac-0.3.0-cp312-cp312-musllinux_1_2_x86_64.whl CPython 3.12 CPython 3.12 Linux musl 1.2+ x86-64 Details
cmac-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
cmac-0.3.0-cp311-cp311-musllinux_1_2_x86_64.whl CPython 3.11 CPython 3.11 Linux musl 1.2+ x86-64 Details
cmac-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details
cmac-0.3.0-cp310-cp310-musllinux_1_2_x86_64.whl CPython 3.10 CPython 3.10 Linux musl 1.2+ x86-64 Details
cmac-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 5.1 MB

Release files / cmac-0.3.0.tar.gz

Download URL cmac-0.3.0.tar.gz
Size 64.0 kB
Tags Source
SHA-256 checksum
How to use checksums
4b9a42cdaa8c264d77a5132101485144271962fae99f6b9d1b7c051014fba915
BLAKE2b-256 checksum
How to use checksums
736823a115dbc758a41dab5ef7dde4b58e138c27abad056db50a33dcfa49f2d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp313-cp313-musllinux_1_2_x86_64.whl

Download URL cmac-0.3.0-cp313-cp313-musllinux_1_2_x86_64.whl
Size 632.5 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
db031d36961eebaee9a9109e96ff7799da5397d6ab9b765a70abd5b8276e457c
BLAKE2b-256 checksum
How to use checksums
facc92732aa5e2751dbd18272c23379105beb50f263ea29cfaad38eb5479dde2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.3.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Size 626.6 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8097fa91f8c94d919b75ad15aa7bad065ec00711dd072d397f6330db53605c3b
BLAKE2b-256 checksum
How to use checksums
7a0c0b65487e4cf6dffa8c033193bf7b9fedae57272504af47ed76ac1c10a4b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp312-cp312-musllinux_1_2_x86_64.whl

Download URL cmac-0.3.0-cp312-cp312-musllinux_1_2_x86_64.whl
Size 639.5 kB
Tags CPython 3.12 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
6c5a123fbc8c6ab00c544f56affc75ab6ea192bb8f80f92e39c619c7b5648c95
BLAKE2b-256 checksum
How to use checksums
5636314f4f2315ce8d49eea52685cc2bb54799f5b49b3f07db6abf16b473dfbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.3.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Size 639.1 kB
Tags CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ebd7dc85fe5e159b9b34de072dc0ca2e1fa87cd6ac1a37d6f432486a95863ec3
BLAKE2b-256 checksum
How to use checksums
9e0e481ea23f4e725e444f4e513b6ea99387add60565f615eaed5fe3457f1fe8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp311-cp311-musllinux_1_2_x86_64.whl

Download URL cmac-0.3.0-cp311-cp311-musllinux_1_2_x86_64.whl
Size 650.6 kB
Tags CPython 3.11 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
4a70652dab469da2319a83632c69f7ab076b0207d7771137ea939eaf8ed7bfae
BLAKE2b-256 checksum
How to use checksums
3509d67bdad4b58403ef31150b3a80ba735ea7603e66b1be18ea581951b9da23
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Size 641.3 kB
Tags CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5673f57555d2e6d3e9b84059797466b045608acaa8fd55c84ec7711c508be210
BLAKE2b-256 checksum
How to use checksums
7eb96cec867ea2e19167235736c68cd221bd9572a60107ea0b1f18edd6bc2538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp310-cp310-musllinux_1_2_x86_64.whl

Download URL cmac-0.3.0-cp310-cp310-musllinux_1_2_x86_64.whl
Size 627.8 kB
Tags CPython 3.10 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
e75086ce2fbb4b43462b93a992ed49c81eadc7e8eaa8257e2349f4ee464f00fd
BLAKE2b-256 checksum
How to use checksums
2fd6b8d2889f690f5e293d424a18e28bcfa11ecf9589115617ae9f0a438a0ec6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release files / cmac-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.3.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl
Size 618.5 kB
Tags CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
b9b34ec5ded783f625a0447bbde3d3ed6b6a41a0cacda0aafc836c45a1bcac29
BLAKE2b-256 checksum
How to use checksums
8b2c263116603c7e4e84d15ad56ab527281a03e200a58de6eed45d16b922990f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 10, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

9 release files

0.2.0

9 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page