micm

A model-independent chemistry module for atmosphere models

https://github.com/ncar/micm

Science Score: 85.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    10 of 19 committers (52.6%) from academic institutions
  • Institutional organization owner
    Organization ncar has institutional domain (ncar.ucar.edu)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (16.8%) to scientific vocabulary

Keywords

atmospheric-chemistry atmospheric-modeling atmospheric-science cuda gpu gpu-acceleration hpc ode-solver

Keywords from Contributors

standardization interpretation correlation pde hack
Last synced: 6 months ago · JSON representation ·

Repository

A model-independent chemistry module for atmosphere models

Basic Info
Statistics
  • Stars: 6
  • Watchers: 10
  • Forks: 7
  • Open Issues: 21
  • Releases: 12
Topics
atmospheric-chemistry atmospheric-modeling atmospheric-science cuda gpu gpu-acceleration hpc ode-solver
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme License Citation

README.md

MICM Chemistry

Model Independent Chemical Module. MICM can be used to configure and solve atmospheric chemistry systems.

GitHub Releases License Docker builds Windows Mac Ubuntu codecov DOI FAIR checklist badge

Copyright (C) 2018-2025 University Corporation for Atmospheric Research

Note MICM 3.x.x is part of a refactor and may include breaking changes across minor revision numbers and partially implemented features

Getting Started

Installing MICM locally

To build and install MICM locally, you must have CMake installed on your machine.

Open a terminal window, navigate to a folder where you would like the MICM files to exist, and run the following commands:

git clone https://github.com/NCAR/micm.git cd micm mkdir build cd build ccmake .. sudo make install -j 8

To run the tests:

make test

If you would later like to uninstall MICM, you can run sudo make uninstall from the build/ directory.

Options

There are multiple options for running micm. You can use json to configure a solver, llvm to JIT-compile solvers on CPUs or cuda-based solvers to solve chemistry on GPUs. Please read our docs to learn how to enable these options.

Running a MICM Docker container

You must have Docker Desktop installed and running. With Docker Desktop running, open a terminal window. To build the latest MICM release, run the following command to start the MICM container:

docker run -it ghcr.io/ncar/micm:release bash

To build the latest pre-release version of MICM, instead run:

git clone https://github.com/NCAR/micm.git cd micm docker build -t micm -f docker/Dockerfile . docker run -it micm bash

Inside the container, you can run the MICM tests from the /build/ folder:

cd /build/ make test

Using the MICM API

The following example solves the fictitious chemical system:

foo --k1--> 0.8 bar + 0.2 baz foo + bar --k2--> baz The k1 and k2 rate constants are for Arrhenius reactions. See the MICM documentation for details on the types of reactions available in MICM and how to configure them.

To solve this system save the following code in a file named foo_chem.cpp:

```c++

include

include

include

include

include

using namespace micm;

int main(const int argc, const char *argv[]) { auto foo = Species{ "Foo" }; auto bar = Species{ "Bar" }; auto baz = Species{ "Baz" };

Phase gas_phase{ std::vector{ foo, bar, baz } };

System chemicalsystem{ SystemParameters{ .gasphase_ = gas_phase } };

Process r1 = Process::Create() .SetReactants({ foo }) .SetProducts({ Yield(bar, 0.8), Yield(baz, 0.2) }) .SetRateConstant(ArrheniusRateConstant({ .A_ = 1.0e-3 })) .SetPhase(gas_phase);

Process r2 = Process::Create() .SetReactants({ foo, bar }) .SetProducts({ Yield(baz, 1) }) .SetRateConstant(ArrheniusRateConstant({ .A_ = 1.0e-5, .C_ = 110.0 })) .SetPhase(gas_phase);

std::vector reactions{ r1, r2 };

auto solver = micm::CpuSolverBuildermicm::RosenbrockSolverParameters(micm::RosenbrockSolverParameters::ThreeStageRosenbrockParameters()) .SetSystem(chemical_system) .SetReactions(reactions) .Build();

State state = solver.GetState();

state.conditions[0].temperature = 287.45; // K state.conditions[0].pressure = 101319.9; // Pa state.conditions_[0].CalculateIdealAirDensity(); state.SetConcentration(foo, 20.0); // mol m-3

state.PrintHeader(); for (int i = 0; i < 10; ++i) { solver.CalculateRateConstants(state); auto result = solver.Solve(500.0, state); state.PrintState(i * 500); }

return 0; } ```

To build and run the example using GNU (assuming the default install location): g++ -o foo_chem foo_chem.cpp -I/usr/local/micm-3.9.0/include -std=c++20 ./foo_chem

Output: time, Bar, Baz, Foo 0, 5.90e+00, 1.91e+00, 1.18e+01 500, 9.05e+00, 3.32e+00, 6.79e+00 1000, 1.07e+01, 4.21e+00, 3.83e+00 1500, 1.17e+01, 4.74e+00, 2.14e+00 2000, 1.22e+01, 5.04e+00, 1.19e+00 2500, 1.24e+01, 5.21e+00, 6.58e-01 3000, 1.26e+01, 5.31e+00, 3.64e-01 3500, 1.27e+01, 5.36e+00, 2.01e-01 4000, 1.27e+01, 5.39e+00, 1.11e-01 4500, 1.28e+01, 5.41e+00, 6.13e-02

Citation

MICM is part of the MUSICA project and can be cited by reference to the MUSICA vision paper. The BibTeX entry below can be used to generate a citation for this.

@Article { acom.software.musica-vision, author = "Gabriele G. Pfister and Sebastian D. Eastham and Avelino F. Arellano and Bernard Aumont and Kelley C. Barsanti and Mary C. Barth and Andrew Conley and Nicholas A. Davis and Louisa K. Emmons and Jerome D. Fast and Arlene M. Fiore and Benjamin Gaubert and Steve Goldhaber and Claire Granier and Georg A. Grell and Marc Guevara and Daven K. Henze and Alma Hodzic and Xiaohong Liu and Daniel R. Marsh and John J. Orlando and John M. C. Plane and Lorenzo M. Polvani and Karen H. Rosenlof and Allison L. Steiner and Daniel J. Jacob and Guy P. Brasseur", title = "The Multi-Scale Infrastructure for Chemistry and Aerosols (MUSICA)", journal = "Bulletin of the American Meteorological Society", year = "2020", publisher = "American Meteorological Society", address = "Boston MA, USA", volume = "101", number = "10", doi = "10.1175/BAMS-D-19-0331.1", pages= "E1743 - E1760", url = "https://journals.ametsoc.org/view/journals/bams/101/10/bamsD190331.xml" }

Community and contributions

We welcome contributions and feedback from anyone, everything from updating the content or appearance of the documentation to new and cutting edge science.

  • Collaboration

  • Contributor's guide

    • Before submiitting a PR, please thouroughly read this to you understand our expectations. We reserve the right to reject any PR not meeting our guidelines.

Documentation

Please see the MICM documentation for detailed installation and usage instructions.

License

Copyright (C) 2018-2025 University Corporation for Atmospheric Research

Owner

  • Name: NSF National Center for Atmospheric Research
  • Login: NCAR
  • Kind: organization
  • Location: Boulder, CO

NSF NCAR is sponsored by the U.S. National Science Foundation and managed by the University Corporation for Atmospheric Research.

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software, please cite it as below.
title: Model Independent Chemistry Module (MICM)
version: v3.9.0
doi: "10.5281/zenodo.10472189"
authors:
  - family-names: Dawson
    given-names: Matthew
  - family-names: Sun
    given-names: Jian
  - family-names: Shores
    given-names: Kyle
  - family-names: Fillmore
    given-names: David
  - family-names: Tan
    given-names: Qina
  - family-names: Craig
    given-names: Cheryl
  - family-names: Gim
    given-names: Jiwon
  - family-names: Waxmonsky
    given-names: Michael
  - family-names: Vitt
    given-names: Francis
  - family-names: Conley
    given-names: Andrew
  - family-names: Karsenti
    given-names: Aharon
license: Apache-2.0
url: "https://github.com/NCAR/micm"

GitHub Events

Total
  • Create event: 107
  • Release event: 2
  • Issues event: 72
  • Watch event: 2
  • Delete event: 89
  • Member event: 2
  • Issue comment event: 110
  • Push event: 517
  • Pull request review comment event: 131
  • Pull request event: 181
  • Pull request review event: 251
  • Fork event: 2
Last Year
  • Create event: 107
  • Release event: 2
  • Issues event: 72
  • Watch event: 2
  • Delete event: 89
  • Member event: 2
  • Issue comment event: 110
  • Push event: 517
  • Pull request review comment event: 131
  • Pull request event: 181
  • Pull request review event: 251
  • Fork event: 2

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 1,341
  • Total Committers: 19
  • Avg Commits per committer: 70.579
  • Development Distribution Score (DDS): 0.699
Past Year
  • Commits: 125
  • Committers: 8
  • Avg Commits per committer: 15.625
  • Development Distribution Score (DDS): 0.64
Top Committers
Name Email Commits
Kyle Shores k****4@g****m 403
David Fillmore f****e@u****u 187
Matt Dawson m****n@u****u 181
Qina Tan q****n@h****m 147
github-actions[bot] 4****] 126
Jiwon Gim j****m@u****u 87
Cheryl Craig c****g@u****u 74
Jian Sun s****n@u****u 55
Francis Vitt f****t@u****u 22
GitHub Actions a****s@g****m 17
Andrew Conley a****y@m****u 11
AndrewJConley a****y@u****u 10
mwaxmonsky 1****y 10
Montek Thind m****d@u****u 5
Angela Pak 3****k 2
Copilot 1****t 1
David Fillmore f****w@g****m 1
Cheryl Craig c****g@m****u 1
aharon karsenti a****9@g****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 267
  • Total pull requests: 650
  • Average time to close issues: about 2 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 9
  • Total pull request authors: 11
  • Average comments per issue: 0.51
  • Average comments per pull request: 0.83
  • Merged pull requests: 579
  • Bot issues: 3
  • Bot pull requests: 214
Past Year
  • Issues: 56
  • Pull requests: 223
  • Average time to close issues: 9 days
  • Average time to close pull requests: 3 days
  • Issue authors: 8
  • Pull request authors: 8
  • Average comments per issue: 0.05
  • Average comments per pull request: 0.75
  • Merged pull requests: 187
  • Bot issues: 1
  • Bot pull requests: 77
Top Authors
Issue Authors
  • mattldawson (98)
  • K20shores (73)
  • sjsprecious (43)
  • boulderdaze (19)
  • dwfncar (15)
  • mwaxmonsky (14)
  • github-actions[bot] (3)
  • angelapak (1)
  • davidfillmore (1)
Pull Request Authors
  • github-actions[bot] (214)
  • K20shores (146)
  • mattldawson (93)
  • sjsprecious (87)
  • boulderdaze (59)
  • mwaxmonsky (20)
  • montythind (10)
  • dwfncar (10)
  • qinatan (6)
  • angelapak (4)
  • Copilot (1)
Top Labels
Issue Labels
enhancement (96) bug (25) good first issue (16) question (14) documentation (13) list issue (4) Stale (4) invalid (1) help wanted (1)
Pull Request Labels
enhancement (85) bug (21) documentation (2)

Packages

  • Total packages: 2
  • Total downloads: unknown
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 14
proxy.golang.org: github.com/ncar/micm
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/NCAR/micm
  • Versions: 7
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago

Dependencies

Dockerfile docker
  • fedora 29 build
.github/workflows/test.yml actions
  • actions/checkout v2 composite
.github/workflows/clang_format.yml actions
  • actions/checkout v3 composite
  • peter-evans/create-pull-request v3 composite
.github/workflows/gh_pages.yml actions
  • actions/checkout v3 composite
  • peaceiris/actions-gh-pages v3 composite
docs/requirements.txt pypi
  • breathe *
  • sphinx *
  • sphinx-book-theme *
  • sphinx-design *