Skip to main content

CMAC

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.4.4

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.4.4
File Size Uploaded Provenance Actions
cmac-0.4.4.tar.gz 104.5 kB With provenance Details for cmac-0.4.4.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for cmac 0.4.4
File Actions
cmac-0.4.4-cp315-cp315t-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64 Details for cmac-0.4.4-cp315-cp315t-musllinux_1_2_x86_64.whl
cmac-0.4.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 free-threading Linux glibc 2.28+ x86-64, Linux glibc 2.17+ x86-64 Details for cmac-0.4.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
cmac-0.4.4-cp315-cp315-musllinux_1_2_x86_64.whl CPython 3.15 CPython 3.15 Linux musl 1.2+ x86-64 Details for cmac-0.4.4-cp315-cp315-musllinux_1_2_x86_64.whl
cmac-0.4.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.15 CPython 3.15 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for cmac-0.4.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
cmac-0.4.4-cp314-cp314t-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64 Details for cmac-0.4.4-cp314-cp314t-musllinux_1_2_x86_64.whl
cmac-0.4.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for cmac-0.4.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
cmac-0.4.4-cp314-cp314-musllinux_1_2_x86_64.whl CPython 3.14 CPython 3.14 Linux musl 1.2+ x86-64 Details for cmac-0.4.4-cp314-cp314-musllinux_1_2_x86_64.whl
cmac-0.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.17+ x86-64, Linux glibc 2.28+ x86-64 Details for cmac-0.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
cmac-0.4.4-cp313-cp313-musllinux_1_2_x86_64.whl CPython 3.13 CPython 3.13 Linux musl 1.2+ x86-64 Details for cmac-0.4.4-cp313-cp313-musllinux_1_2_x86_64.whl
cmac-0.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_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 for cmac-0.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Total release size: 7.1 MB

Release files / cmac-0.4.4.tar.gz

Download URL cmac-0.4.4.tar.gz
Size 104.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a5739ac14793ca65ae51db48caa933b574b974c7140117de45b1ff81ccdf3de4
BLAKE2b-256 checksum
How to use checksums
88753a959df838e82d280b566e6e42d98f8921429582bd7372a2500abf382f97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp315-cp315t-musllinux_1_2_x86_64.whl

Download URL cmac-0.4.4-cp315-cp315t-musllinux_1_2_x86_64.whl
Size 691.5 kB
Tags CPython 3.15 CPython 3.15 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
7ae81a0dfc61f62c26af247bb1ac13c5fcb271e832331740cb5f4d87653d782f
BLAKE2b-256 checksum
How to use checksums
b8a229f514b64f8404fbcb53f5c49dea2715212ca8433f5cc3af46d533c0f29f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.4.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 696.6 kB
Tags CPython 3.15 CPython 3.15 free-threading Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5726827161d05af7dfff9a641499f9939c60878c2ed853cbd911dde1a7546eb8
BLAKE2b-256 checksum
How to use checksums
2c527420dcd5e099f326fa0f3c5762e0096050e7fc3109761298fa501a910499
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp315-cp315-musllinux_1_2_x86_64.whl

Download URL cmac-0.4.4-cp315-cp315-musllinux_1_2_x86_64.whl
Size 693.3 kB
Tags CPython 3.15 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
9d741c9c765f89a50a90f048a233f459109c6e0794cc24dfcb6905486e011b0b
BLAKE2b-256 checksum
How to use checksums
166489ba8e4c8554fc4cfee2e5927aa73e5a74719fa3906a3bf03764207f87b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.4.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 693.7 kB
Tags CPython 3.15 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6ed1a0f1ef511b486b5d84e044328b202313f0baffeff0f6e7ed8905a528fc3f
BLAKE2b-256 checksum
How to use checksums
8d389b642d6be0d1b7428132f78f98276b4761492d8361fb0f83d212a98e5777
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp314-cp314t-musllinux_1_2_x86_64.whl

Download URL cmac-0.4.4-cp314-cp314t-musllinux_1_2_x86_64.whl
Size 694.1 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
887266ec0067f3ce4d73ad58581daea3850f6fd23d42c9db3f07e894cd553238
BLAKE2b-256 checksum
How to use checksums
36f8e79db40c5e79c021c1ef091ef69a381685963b98bc36bd003f49de2f6435
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.4.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 700.9 kB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2c17725b0cca356ecfa906e12ffffe161c80b98a921a9d97df8944ca870e6d6f
BLAKE2b-256 checksum
How to use checksums
d385fb44e3997de9e2fb394a8f90ad64e94562156b6187c870d11d91600d410f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp314-cp314-musllinux_1_2_x86_64.whl

Download URL cmac-0.4.4-cp314-cp314-musllinux_1_2_x86_64.whl
Size 691.8 kB
Tags CPython 3.14 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
2f350d3b7a92041506a28bc435cb87c36740b1fe23becab2b2944bc9553db506
BLAKE2b-256 checksum
How to use checksums
ad3e70fda3f6a7a5a99cd967aaafc823d2250f50705131ffb8232b0613ffe823
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Release files / cmac-0.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl

Download URL cmac-0.4.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 692.1 kB
Tags CPython 3.14 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6cc64c247c7fb93a28fd63c69bfa784002aaf4e504afebf42419823215a38cbb
BLAKE2b-256 checksum
How to use checksums
d72da6d3ce2a29c560b2737be2c2f5216a5dfbfd01f7cef9ede52d599e0b1128
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

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

Download URL cmac-0.4.4-cp313-cp313-musllinux_1_2_x86_64.whl
Size 698.2 kB
Tags CPython 3.13 Linux musl 1.2+ x86-64
SHA-256 checksum
How to use checksums
5833d95c1237ddb4b604584c0f2eb56ff5add76e3c93a4496abc842a4a72cbd9
BLAKE2b-256 checksum
How to use checksums
3dbd260cfcbc20f8ef56330456e01f7d50dc08163c6a983e9eb1cd1fe73238ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

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

Download URL cmac-0.4.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
Size 698.2 kB
Tags CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
a597225fbdb5d483552f79662b8a1ad87e1c34ca43a825e30e98a2f738f750e5
BLAKE2b-256 checksum
How to use checksums
d6094486a1de585b2418ca8b36b1671e9ba280488780416d1d0a85f1289c3989
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 15, 2026.

Transparency log

Security for cmac 0.4.4

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.

Full provenance

All 11 files in this release have been uploaded with provenance metadata.

Select from 11 files

Attestation for cmac-0.4.4.tar.gz

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 Nov 15, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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