musica 0.12.2__cp39-cp39-manylinux_2_26_i686.manylinux_2_28_i686.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of musica might be problematic. Click here for more details.

Files changed (70) hide show
  1. musica/CMakeLists.txt +68 -0
  2. musica/__init__.py +11 -0
  3. musica/_musica.cpython-39-i386-linux-gnu.so +0 -0
  4. musica/_version.py +1 -0
  5. musica/backend.py +41 -0
  6. musica/binding_common.cpp +33 -0
  7. musica/binding_common.hpp +7 -0
  8. musica/carma.cpp +911 -0
  9. musica/carma.py +1729 -0
  10. musica/constants.py +3 -0
  11. musica/cpu_binding.cpp +11 -0
  12. musica/cuda.cpp +12 -0
  13. musica/cuda.py +13 -0
  14. musica/examples/__init__.py +1 -0
  15. musica/examples/carma_aluminum.py +124 -0
  16. musica/examples/carma_sulfate.py +246 -0
  17. musica/examples/examples.py +165 -0
  18. musica/examples/sulfate_box_model.py +439 -0
  19. musica/examples/ts1_latin_hypercube.py +245 -0
  20. musica/gpu_binding.cpp +11 -0
  21. musica/main.py +89 -0
  22. musica/mechanism_configuration/__init__.py +1 -0
  23. musica/mechanism_configuration/aqueous_equilibrium.py +274 -0
  24. musica/mechanism_configuration/arrhenius.py +307 -0
  25. musica/mechanism_configuration/branched.py +299 -0
  26. musica/mechanism_configuration/condensed_phase_arrhenius.py +309 -0
  27. musica/mechanism_configuration/condensed_phase_photolysis.py +88 -0
  28. musica/mechanism_configuration/emission.py +71 -0
  29. musica/mechanism_configuration/first_order_loss.py +174 -0
  30. musica/mechanism_configuration/henrys_law.py +44 -0
  31. musica/mechanism_configuration/mechanism_configuration.py +234 -0
  32. musica/mechanism_configuration/phase.py +47 -0
  33. musica/mechanism_configuration/photolysis.py +88 -0
  34. musica/mechanism_configuration/reactions.py +73 -0
  35. musica/mechanism_configuration/simpol_phase_transfer.py +217 -0
  36. musica/mechanism_configuration/species.py +91 -0
  37. musica/mechanism_configuration/surface.py +94 -0
  38. musica/mechanism_configuration/ternary_chemical_activation.py +352 -0
  39. musica/mechanism_configuration/troe.py +352 -0
  40. musica/mechanism_configuration/tunneling.py +250 -0
  41. musica/mechanism_configuration/user_defined.py +88 -0
  42. musica/mechanism_configuration/utils.py +10 -0
  43. musica/mechanism_configuration/wet_deposition.py +52 -0
  44. musica/mechanism_configuration.cpp +607 -0
  45. musica/musica.cpp +201 -0
  46. musica/test/examples/v1/full_configuration/full_configuration.json +466 -0
  47. musica/test/examples/v1/full_configuration/full_configuration.yaml +295 -0
  48. musica/test/integration/test_analytical.py +324 -0
  49. musica/test/integration/test_carma.py +227 -0
  50. musica/test/integration/test_carma_aluminum.py +12 -0
  51. musica/test/integration/test_carma_sulfate.py +17 -0
  52. musica/test/integration/test_chapman.py +139 -0
  53. musica/test/integration/test_sulfate_box_model.py +34 -0
  54. musica/test/integration/test_tuvx.py +62 -0
  55. musica/test/unit/test_parser.py +64 -0
  56. musica/test/unit/test_serializer.py +69 -0
  57. musica/test/unit/test_state.py +325 -0
  58. musica/test/unit/test_util_full_mechanism.py +698 -0
  59. musica/tools/prepare_build_environment_linux.sh +32 -0
  60. musica/tools/prepare_build_environment_macos.sh +1 -0
  61. musica/tools/repair_wheel_gpu.sh +40 -0
  62. musica/tuvx.cpp +93 -0
  63. musica/tuvx.py +199 -0
  64. musica/types.py +407 -0
  65. musica-0.12.2.dist-info/METADATA +473 -0
  66. musica-0.12.2.dist-info/RECORD +70 -0
  67. musica-0.12.2.dist-info/WHEEL +6 -0
  68. musica-0.12.2.dist-info/entry_points.txt +3 -0
  69. musica-0.12.2.dist-info/licenses/AUTHORS.md +59 -0
  70. musica-0.12.2.dist-info/licenses/LICENSE +201 -0
@@ -0,0 +1,473 @@
1
+ Metadata-Version: 2.2
2
+ Name: musica
3
+ Version: 0.12.2
4
+ Summary: MUSICA is a Python library for performing computational simulations in atmospheric chemistry.
5
+ Author-Email: Matthew Dawsom <mattdawson@ucar.edu>, Jiwon Gim <jiwongim@ucar.edu>, David Fillmore <fillmore@ucar.edu>, Kyle Shores <kshores@ucar.edu>, Montek Thind <mthind@ucar.edu>
6
+ Maintainer-Email: ACOM MUSICA Developers <musica-support@ucar.edu>
7
+ License: Apache License
8
+ Version 2.0, January 2004
9
+ http://www.apache.org/licenses/
10
+
11
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
12
+
13
+ 1. Definitions.
14
+
15
+ "License" shall mean the terms and conditions for use, reproduction,
16
+ and distribution as defined by Sections 1 through 9 of this document.
17
+
18
+ "Licensor" shall mean the copyright owner or entity authorized by
19
+ the copyright owner that is granting the License.
20
+
21
+ "Legal Entity" shall mean the union of the acting entity and all
22
+ other entities that control, are controlled by, or are under common
23
+ control with that entity. For the purposes of this definition,
24
+ "control" means (i) the power, direct or indirect, to cause the
25
+ direction or management of such entity, whether by contract or
26
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
27
+ outstanding shares, or (iii) beneficial ownership of such entity.
28
+
29
+ "You" (or "Your") shall mean an individual or Legal Entity
30
+ exercising permissions granted by this License.
31
+
32
+ "Source" form shall mean the preferred form for making modifications,
33
+ including but not limited to software source code, documentation
34
+ source, and configuration files.
35
+
36
+ "Object" form shall mean any form resulting from mechanical
37
+ transformation or translation of a Source form, including but
38
+ not limited to compiled object code, generated documentation,
39
+ and conversions to other media types.
40
+
41
+ "Work" shall mean the work of authorship, whether in Source or
42
+ Object form, made available under the License, as indicated by a
43
+ copyright notice that is included in or attached to the work
44
+ (an example is provided in the Appendix below).
45
+
46
+ "Derivative Works" shall mean any work, whether in Source or Object
47
+ form, that is based on (or derived from) the Work and for which the
48
+ editorial revisions, annotations, elaborations, or other modifications
49
+ represent, as a whole, an original work of authorship. For the purposes
50
+ of this License, Derivative Works shall not include works that remain
51
+ separable from, or merely link (or bind by name) to the interfaces of,
52
+ the Work and Derivative Works thereof.
53
+
54
+ "Contribution" shall mean any work of authorship, including
55
+ the original version of the Work and any modifications or additions
56
+ to that Work or Derivative Works thereof, that is intentionally
57
+ submitted to Licensor for inclusion in the Work by the copyright owner
58
+ or by an individual or Legal Entity authorized to submit on behalf of
59
+ the copyright owner. For the purposes of this definition, "submitted"
60
+ means any form of electronic, verbal, or written communication sent
61
+ to the Licensor or its representatives, including but not limited to
62
+ communication on electronic mailing lists, source code control systems,
63
+ and issue tracking systems that are managed by, or on behalf of, the
64
+ Licensor for the purpose of discussing and improving the Work, but
65
+ excluding communication that is conspicuously marked or otherwise
66
+ designated in writing by the copyright owner as "Not a Contribution."
67
+
68
+ "Contributor" shall mean Licensor and any individual or Legal Entity
69
+ on behalf of whom a Contribution has been received by Licensor and
70
+ subsequently incorporated within the Work.
71
+
72
+ 2. Grant of Copyright License. Subject to the terms and conditions of
73
+ this License, each Contributor hereby grants to You a perpetual,
74
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
75
+ copyright license to reproduce, prepare Derivative Works of,
76
+ publicly display, publicly perform, sublicense, and distribute the
77
+ Work and such Derivative Works in Source or Object form.
78
+
79
+ 3. Grant of Patent License. Subject to the terms and conditions of
80
+ this License, each Contributor hereby grants to You a perpetual,
81
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
82
+ (except as stated in this section) patent license to make, have made,
83
+ use, offer to sell, sell, import, and otherwise transfer the Work,
84
+ where such license applies only to those patent claims licensable
85
+ by such Contributor that are necessarily infringed by their
86
+ Contribution(s) alone or by combination of their Contribution(s)
87
+ with the Work to which such Contribution(s) was submitted. If You
88
+ institute patent litigation against any entity (including a
89
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
90
+ or a Contribution incorporated within the Work constitutes direct
91
+ or contributory patent infringement, then any patent licenses
92
+ granted to You under this License for that Work shall terminate
93
+ as of the date such litigation is filed.
94
+
95
+ 4. Redistribution. You may reproduce and distribute copies of the
96
+ Work or Derivative Works thereof in any medium, with or without
97
+ modifications, and in Source or Object form, provided that You
98
+ meet the following conditions:
99
+
100
+ (a) You must give any other recipients of the Work or
101
+ Derivative Works a copy of this License; and
102
+
103
+ (b) You must cause any modified files to carry prominent notices
104
+ stating that You changed the files; and
105
+
106
+ (c) You must retain, in the Source form of any Derivative Works
107
+ that You distribute, all copyright, patent, trademark, and
108
+ attribution notices from the Source form of the Work,
109
+ excluding those notices that do not pertain to any part of
110
+ the Derivative Works; and
111
+
112
+ (d) If the Work includes a "NOTICE" text file as part of its
113
+ distribution, then any Derivative Works that You distribute must
114
+ include a readable copy of the attribution notices contained
115
+ within such NOTICE file, excluding those notices that do not
116
+ pertain to any part of the Derivative Works, in at least one
117
+ of the following places: within a NOTICE text file distributed
118
+ as part of the Derivative Works; within the Source form or
119
+ documentation, if provided along with the Derivative Works; or,
120
+ within a display generated by the Derivative Works, if and
121
+ wherever such third-party notices normally appear. The contents
122
+ of the NOTICE file are for informational purposes only and
123
+ do not modify the License. You may add Your own attribution
124
+ notices within Derivative Works that You distribute, alongside
125
+ or as an addendum to the NOTICE text from the Work, provided
126
+ that such additional attribution notices cannot be construed
127
+ as modifying the License.
128
+
129
+ You may add Your own copyright statement to Your modifications and
130
+ may provide additional or different license terms and conditions
131
+ for use, reproduction, or distribution of Your modifications, or
132
+ for any such Derivative Works as a whole, provided Your use,
133
+ reproduction, and distribution of the Work otherwise complies with
134
+ the conditions stated in this License.
135
+
136
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
137
+ any Contribution intentionally submitted for inclusion in the Work
138
+ by You to the Licensor shall be under the terms and conditions of
139
+ this License, without any additional terms or conditions.
140
+ Notwithstanding the above, nothing herein shall supersede or modify
141
+ the terms of any separate license agreement you may have executed
142
+ with Licensor regarding such Contributions.
143
+
144
+ 6. Trademarks. This License does not grant permission to use the trade
145
+ names, trademarks, service marks, or product names of the Licensor,
146
+ except as required for reasonable and customary use in describing the
147
+ origin of the Work and reproducing the content of the NOTICE file.
148
+
149
+ 7. Disclaimer of Warranty. Unless required by applicable law or
150
+ agreed to in writing, Licensor provides the Work (and each
151
+ Contributor provides its Contributions) on an "AS IS" BASIS,
152
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
153
+ implied, including, without limitation, any warranties or conditions
154
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
155
+ PARTICULAR PURPOSE. You are solely responsible for determining the
156
+ appropriateness of using or redistributing the Work and assume any
157
+ risks associated with Your exercise of permissions under this License.
158
+
159
+ 8. Limitation of Liability. In no event and under no legal theory,
160
+ whether in tort (including negligence), contract, or otherwise,
161
+ unless required by applicable law (such as deliberate and grossly
162
+ negligent acts) or agreed to in writing, shall any Contributor be
163
+ liable to You for damages, including any direct, indirect, special,
164
+ incidental, or consequential damages of any character arising as a
165
+ result of this License or out of the use or inability to use the
166
+ Work (including but not limited to damages for loss of goodwill,
167
+ work stoppage, computer failure or malfunction, or any and all
168
+ other commercial damages or losses), even if such Contributor
169
+ has been advised of the possibility of such damages.
170
+
171
+ 9. Accepting Warranty or Additional Liability. While redistributing
172
+ the Work or Derivative Works thereof, You may choose to offer,
173
+ and charge a fee for, acceptance of support, warranty, indemnity,
174
+ or other liability obligations and/or rights consistent with this
175
+ License. However, in accepting such obligations, You may act only
176
+ on Your own behalf and on Your sole responsibility, not on behalf
177
+ of any other Contributor, and only if You agree to indemnify,
178
+ defend, and hold each Contributor harmless for any liability
179
+ incurred by, or claims asserted against, such Contributor by reason
180
+ of your accepting any such warranty or additional liability.
181
+
182
+ END OF TERMS AND CONDITIONS
183
+
184
+ APPENDIX: How to apply the Apache License to your work.
185
+
186
+ To apply the Apache License to your work, attach the following
187
+ boilerplate notice, with the fields enclosed by brackets "[]"
188
+ replaced with your own identifying information. (Don't include
189
+ the brackets!) The text should be enclosed in the appropriate
190
+ comment syntax for the file format. We also recommend that a
191
+ file or class name and description of purpose be included on the
192
+ same "printed page" as the copyright notice for easier
193
+ identification within third-party archives.
194
+
195
+ Copyright [yyyy] [name of copyright owner]
196
+
197
+ Licensed under the Apache License, Version 2.0 (the "License");
198
+ you may not use this file except in compliance with the License.
199
+ You may obtain a copy of the License at
200
+
201
+ http://www.apache.org/licenses/LICENSE-2.0
202
+
203
+ Unless required by applicable law or agreed to in writing, software
204
+ distributed under the License is distributed on an "AS IS" BASIS,
205
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
206
+ See the License for the specific language governing permissions and
207
+ limitations under the License.
208
+
209
+ Project-URL: homepage, https://wiki.ucar.edu/display/MUSICA/MUSICA+Home
210
+ Requires-Python: >=3.9
211
+ Requires-Dist: pyyaml>=6.0.2
212
+ Requires-Dist: xarray>=2022.3.0
213
+ Requires-Dist: ussa1976>=v0.3.4
214
+ Provides-Extra: test
215
+ Requires-Dist: numpy; extra == "test"
216
+ Requires-Dist: pytest; extra == "test"
217
+ Requires-Dist: matplotlib; extra == "test"
218
+ Provides-Extra: gpu
219
+ Requires-Dist: nvidia-cublas-cu12; extra == "gpu"
220
+ Requires-Dist: nvidia-cuda-runtime-cu12; extra == "gpu"
221
+ Provides-Extra: tutorial
222
+ Requires-Dist: pandas; extra == "tutorial"
223
+ Requires-Dist: matplotlib; extra == "tutorial"
224
+ Requires-Dist: numpy; extra == "tutorial"
225
+ Requires-Dist: scipy; extra == "tutorial"
226
+ Requires-Dist: seaborn; extra == "tutorial"
227
+ Requires-Dist: dask[distributed]; extra == "tutorial"
228
+ Requires-Dist: dask-jobqueue; extra == "tutorial"
229
+ Description-Content-Type: text/markdown
230
+
231
+ # MUSICA
232
+ [![GitHub Releases](https://img.shields.io/github/release/NCAR/musica.svg)](https://github.com/NCAR/musica/releases)
233
+ [![License](https://img.shields.io/github/license/NCAR/musica.svg)](https://github.com/NCAR/musica/blob/main/LICENSE)
234
+ [![docker](https://github.com/NCAR/musica/actions/workflows/docker.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/docker.yml)
235
+ [![macOS](https://github.com/NCAR/musica/actions/workflows/mac.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/mac.yml)
236
+ [![ubuntu](https://github.com/NCAR/musica/actions/workflows/ubuntu.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/ubuntu.yml)
237
+ [![windows](https://github.com/NCAR/musica/actions/workflows/windows.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/windows.yml)
238
+ [![Python tests](https://github.com/NCAR/musica/actions/workflows/python-tests.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/python-tests.yml)
239
+ [![DOI](https://zenodo.org/badge/550370528.svg)](https://zenodo.org/doi/10.5281/zenodo.7458559)
240
+ [![PyPI version](https://badge.fury.io/py/musica.svg)](https://pypi.org/p/musica)
241
+ [![FAIR checklist badge](https://fairsoftwarechecklist.net/badge.svg)](https://fairsoftwarechecklist.net/v0.2?f=31&a=32113&i=22322&r=123)
242
+ [![codecov](https://codecov.io/gh/NCAR/musica/branch/main/graph/badge.svg)](https://codecov.io/gh/NCAR/musica)
243
+ [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/NCAR/musica/HEAD?filepath=tutorials)
244
+
245
+
246
+ Multi-Scale Infrastructure for Chemistry and Aerosols
247
+
248
+ MUSICA is a collection of modeling software, tools, and grids, that
249
+ allow for robust modeling of chemistry in Earth's atmosphere.
250
+
251
+ At present the project encompasses these core components
252
+ - [TUV-x](https://github.com/NCAR/tuv-x)
253
+ - A photolysis rate calculator
254
+
255
+ - [MICM](https://github.com/NCAR/micm)
256
+ - Model Independent Chemical Module
257
+
258
+ - [CARMA](https://github.com/ESCOMP/CARMA)
259
+ - Community Aerosol and Radiation Model for Atmospheres (integration in development)
260
+
261
+ - [Mechanism Configuration](https://github.com/NCAR/MechanismConfiguration)
262
+ - The standardized format to describe atmospheric chemistry
263
+
264
+ These components are used to drive the MUSICA software ecosystem. This is a snapshot of how MUSICA can be used with different
265
+ models.
266
+
267
+ ![MUSICA Ecosystem](docs/source/_static/ecosystem.png)
268
+
269
+ # Installation
270
+ MUSICA is installable via pip for Python or CMake for C++.
271
+
272
+ ## Pip
273
+ ```
274
+ pip install musica
275
+ ```
276
+
277
+ If you would like GPU support, you must first [add the NVIDIA pypi index](https://docs.nvidia.com/cuda/cuda-quick-start-guide/#pip-wheels-linux) and then you can specify the gpu install option for MUSICA. Note that GPU support has only been tested on linux.
278
+
279
+ ```
280
+ pip install --upgrade setuptools pip wheel
281
+ pip install nvidia-pyindex
282
+ pip install musica[gpu]
283
+ ```
284
+
285
+ To build the package locally,
286
+
287
+ ```
288
+ pip install -e .
289
+ ```
290
+
291
+ If you have an NVIDIA GPU and cuda installed, you can enable a build of musica with GPU support by setting the environment
292
+ variable `BUILD_GPU`.
293
+
294
+ ```
295
+ BUILD_GPU=1 pip install -e .
296
+ ```
297
+
298
+ ## CMake
299
+ ```
300
+ $ git clone https://github.com/NCAR/musica.git
301
+ $ cd musica
302
+ $ mkdir build
303
+ $ cd build
304
+ $ ccmake ..
305
+ $ make
306
+ $ make install
307
+ ```
308
+
309
+ # Using the MUSICA Python API
310
+ MUSICA makes its chemical mechanism analysis and visualization available through a Python API. The following example works through solving a simple chemistry system. Please refer to the [official documentation](https://ncar.github.io/musica/index.html) for further tutorials and examples.
311
+ ```python
312
+ # --- Import Musica ---
313
+ import musica
314
+ import musica.mechanism_configuration as mc
315
+
316
+ # --- 1. Define the chemical system of interest ---
317
+ A = mc.Species(name="A")
318
+ B = mc.Species(name="B")
319
+ C = mc.Species(name="C")
320
+ species = [A, B, C]
321
+ gas = mc.Phase(name="gas", species=species)
322
+
323
+ # --- 2. Define a mechanism of interest ---
324
+ # Through Musica, several different mechanisms can be explored to define reaction rates. Here, we use the Arrhenius equation as a simple example.
325
+
326
+ r1 = mc.Arrhenius(name="A->B", A=4.0e-3, C=50, reactants=[A], products=[B], gas_phase=gas)
327
+ r2 = mc.Arrhenius(name="B->C", A=1.2e-4, B=2.5, C=75, D=50, E=0.5, reactants=[B], products=[C], gas_phase=gas)
328
+
329
+ mechanism = mc.Mechanism(name="musica_example", species=species, phases=[gas], reactions=[r1, r2])
330
+
331
+ # --- 3. Create MICM solver ---
332
+ # A solver must be initialized with either a configuration file or a mechanism:
333
+
334
+ solver = musica.MICM(mechanism=mechanism, solver_type=musica.SolverType.rosenbrock_standard_order)
335
+
336
+ # --- 4. Define environmental conditions ---
337
+ temperature=300.0
338
+ pressure=101000.0
339
+
340
+ # --- 5. Create and initialize State ---
341
+ # In the model, conditions represent the starting environment for the reactions and are assigned by modifying the state.
342
+
343
+ state = solver.create_state()
344
+ state.set_concentrations({"A": 1.0, "B": 3.0, "C": 5.0})
345
+ state.set_conditions(temperature, pressure)
346
+
347
+ # --- 6. Time parameters ---
348
+ time_step = 4 # stepping
349
+ sim_length = 20 # total simulation time
350
+
351
+ # --- (Optional) 7. Save initial state (t=0) for output visualization ---
352
+ initial_row = {"time.s": 0.0, "ENV.temperature.K": temperature, "ENV.pressure.Pa": pressure, "ENV.air number density.mol m-3": state.get_conditions()['air_density'][0]}
353
+ initial_row.update({f"CONC.{k}.mol m-3": v[0] for k, v in state.get_concentrations().items()})
354
+
355
+ # --- 8. Solve through time loop only ---
356
+ # The following loop simply solves the model per each time step:
357
+
358
+ curr_time = time_step
359
+ while curr_time <= sim_length:
360
+ solver.solve(state, time_step)
361
+ concentrations = state.get_concentrations()
362
+ curr_time += time_step
363
+
364
+ # --- 9. Solve and create DataFrame ---
365
+ # It is likely more useful to solve at each time step and store the associated data:
366
+ import pandas as pd
367
+
368
+ output_data = [] # prepare to store output per time step
369
+ output_data.append(initial_row) # save t=0 data
370
+
371
+ curr_time = time_step
372
+ while curr_time <= sim_length:
373
+ solver.solve(state, time_step)
374
+ row = {
375
+ "time.s": curr_time,
376
+ "ENV.temperature.K": state.get_conditions()['temperature'][0],
377
+ "ENV.pressure.Pa": state.get_conditions()['pressure'][0],
378
+ "ENV.air number density.mol m-3": state.get_conditions()['air_density'][0]
379
+ }
380
+ row.update({f"CONC.{k}.mol m-3": v[0] for k, v in state.get_concentrations().items()})
381
+ output_data.append(row)
382
+ curr_time += time_step
383
+
384
+ df = pd.DataFrame(output_data)
385
+ print(df)
386
+
387
+ # --- 10. Visualize Specific Results ---
388
+ import matplotlib.pyplot as plt
389
+
390
+ df.plot(x='time.s', y=['CONC.A.mol m-3', 'CONC.B.mol m-3', 'CONC.C.mol m-3'], title='Concentration over time', ylabel='Concentration (mol m-3)', xlabel='Time (s)')
391
+ plt.show()
392
+ ```
393
+
394
+ # Available grids
395
+ Pre-made grids for use in MUSICA are available [here](https://wiki.ucar.edu/display/MUSICA/Available+Grids).
396
+
397
+ ## Developer Options
398
+
399
+ ### Specifying dependency versions via parameterization at configure time
400
+
401
+ Introduced in [Pull Request #124](https://github.com/NCAR/musica/pull/124), it is possible for developers to specify which versions of various dependencies should be used. These options are currently limited to those dependencies managed via `FetchContent`. This change allows for more easily testing `musica` against changes committed in different repositories and branches. The environmental variables introduced are outlined in the following table.
402
+
403
+ #### CMake Dependency Variables
404
+
405
+ | Musica Dependency | Repository | Branch, Tag or Hash|
406
+ | ------------------------------------------------------ | --------------------------|--------------------|
407
+ | [Google Test](https://github.com/google/googletest.git)| GOOGLETEST_GIT_REPOSITORY | GOOGLETEST_GIT_TAG |
408
+ | [MICM](https://github.com/NCAR/micm.git) | MICM_GIT_REPOSITORY | MICM_GIT_TAG |
409
+ | [TUV-X](https://github.com/NCAR/tuv-x.git) | TUVX_GIT_REPOSITORY | TUVX_GIT_TAG |
410
+ | [PyBind11](https://github.com/pybind/pybind11) | PYBIND11_GIT_REPOSITORY | PYBIND11_GIT_TAG |
411
+ | [Mechanism Configuration](https://github.com/NCAR/MechanismConfiguration.git) | MECH_CONFIG_GIT_REPOSITORY | MECH_CONFIG_GIT_TAG |
412
+
413
+ #### Example Usage
414
+
415
+ > The following examples assume the working directory is a `build/` directory inside the `musica` source directory.
416
+
417
+ Specifying a different version of `tuv-x`, to ensure a change won't break anything.
418
+
419
+ $ cmake .. \
420
+ -DTUVX_GIT_REPOSITORY="https://github.com/WardF/tuv-x.git" \
421
+ -DTUVX_GIT_TAG=test-fix
422
+
423
+ Specifying a specific version of `tuv-x` by has, but using the official repository.
424
+
425
+ $ cmake .. \
426
+ -DTUVX_GIT_TAG=a6b2c4d8745
427
+
428
+ # Contributing
429
+
430
+ We welcome contributions from the community! Please see our [Contributing Guide](CONTRIBUTING.md) for information on how to get involved.
431
+
432
+ For a complete list of contributors and authors, see [AUTHORS.md](AUTHORS.md).
433
+
434
+ # Citations
435
+
436
+ MUSICA can be cited in at least two ways:
437
+
438
+ 1. **Cite the foundational paper** that defines the vision of the MUSICA software:
439
+ - [Pfister et al., 2020, Bulletin of the American Meteorological Society](https://doi.org/10.1175/BAMS-D-19-0331.1)
440
+ - Use the following BibTeX entry:
441
+ ```
442
+ @Article { acom.software.musica-vision,
443
+ 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",
444
+ title = "The Multi-Scale Infrastructure for Chemistry and Aerosols (MUSICA)",
445
+ journal = "Bulletin of the American Meteorological Society",
446
+ year = "2020",
447
+ publisher = "American Meteorological Society",
448
+ address = "Boston MA, USA",
449
+ volume = "101",
450
+ number = "10",
451
+ doi = "10.1175/BAMS-D-19-0331.1",
452
+ pages= "E1743 - E1760",
453
+ url = "https://journals.ametsoc.org/view/journals/bams/101/10/bamsD190331.xml"
454
+ }
455
+ ```
456
+
457
+ 2. **Cite the MUSICA software and its evaluation** (MUSICAv0):
458
+ - [Schwantes et al., 2022, Journal of Advances in Modeling Earth Systems](https://doi.org/10.1029/2021MS002889)
459
+ - Use the following BibTeX entry:
460
+ ```
461
+ @Article{acom.software.musica,
462
+ author = {Schwantes, Rebecca H. and Lacey, Forrest G. and Tilmes, Simone and Emmons, Louisa K. and Lauritzen, Peter H. and Walters, Stacy and Callaghan, Patrick and Zarzycki, Colin M. and Barth, Mary C. and Jo, Duseong S. and Bacmeister, Julio T. and Neale, Richard B. and Vitt, Francis and Kluzek, Erik and Roozitalab, Behrooz and Hall, Samuel R. and Ullmann, Kirk and Warneke, Carsten and Peischl, Jeff and Pollack, Ilana B. and Flocke, Frank and Wolfe, Glenn M. and Hanisco, Thomas F. and Keutsch, Frank N. and Kaiser, Jennifer and Bui, Thao Paul V. and Jimenez, Jose L. and Campuzano-Jost, Pedro and Apel, Eric C. and Hornbrook, Rebecca S. and Hills, Alan J. and Yuan, Bin and Wisthaler, Armin},
463
+ title = {Evaluating the Impact of Chemical Complexity and Horizontal Resolution on Tropospheric Ozone Over the Conterminous US With a Global Variable Resolution Chemistry Model},
464
+ journal = {Journal of Advances in Modeling Earth Systems},
465
+ volume = {14},
466
+ number = {6},
467
+ pages = {e2021MS002889},
468
+ doi = {https://doi.org/10.1029/2021MS002889},
469
+ url = {https://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2021MS002889},
470
+ eprint = {https://agupubs.onlinelibrary.wiley.com/doi/pdf/10.1029/2021MS002889},
471
+ year = {2022}
472
+ }
473
+ ```
@@ -0,0 +1,70 @@
1
+ musica/CMakeLists.txt,sha256=3b_ipe2i0ZwtLqmmX9-NgF7G4eoq7QN_cnb9eYQ9yqc,1749
2
+ musica/__init__.py,sha256=2xoebKVljHzrzupxtAbK3Wg05p38Lq0SFIbDjR0--bs,392
3
+ musica/_musica.cpython-39-i386-linux-gnu.so,sha256=Dv6Fw9DJa5zNq5L7OJBps4yBZLhoYYE5Wa0zdf3dwC4,3241464
4
+ musica/_version.py,sha256=hCVcx_5bAXLIccGTgYEYZL1ymSpFddakc6toGfEFtF8,19
5
+ musica/backend.py,sha256=Ed0vqpdem4a4sz5XOPiBdi1TPQy80qVDcmZUqI5lZvw,1040
6
+ musica/binding_common.cpp,sha256=CigfwqYcETNUe4Ct0P8QMauAFdxPs1iu6ddCqhlckNY,981
7
+ musica/binding_common.hpp,sha256=YVG7TS1JeVC4W_yisV4kL61qo3N6Dt6JdAh9bdr6z2w,102
8
+ musica/carma.cpp,sha256=K3LxfhzetHeZikSZ_mg1YchmCJ8Sr7eoo55Lu6MBqts,42334
9
+ musica/carma.py,sha256=fmM3K0Rm1hl2l8vGM9mIi0aKgnMhT0xsU3Xo2sP43Ug,66987
10
+ musica/constants.py,sha256=RsZrtjy8vlIcQxV9F9xzlSYFeGBQBHmhFWDPB7pRQH8,123
11
+ musica/cpu_binding.cpp,sha256=AZXO6EpL5HofGJ1s11fprrXYVG2U1ZrdUxe3M9j5kpw,225
12
+ musica/cuda.cpp,sha256=qQOLKTUOB83gE-963rT579Me-NrqMUWnXDKmpTPMVFg,346
13
+ musica/cuda.py,sha256=rtMNdmixfEsy5J4pfKOc6LfBuFECxCKsi8J0jAvtyHo,258
14
+ musica/gpu_binding.cpp,sha256=y9Fzgn9unoGz_Fqqlk_NBWy4jHOwTv8E82e3bq_phMg,229
15
+ musica/main.py,sha256=-TOa-WvGKY1aPewQ2WtzFV3myoEQI6-MYoQt2Hw5GXc,2708
16
+ musica/mechanism_configuration.cpp,sha256=iaD8zZvvMH4nt-tZ9dTBsFiqP28xHi5_wpsp07FJ3RM,29105
17
+ musica/musica.cpp,sha256=Krb2GSVHoXeHZI3cJLXZnQv7MlNlhzOuYV0N-9n3heo,8383
18
+ musica/tuvx.cpp,sha256=HnxxysJezO6U6sG9KibHHjfIuKD9KhqHU4Myn5JkmRY,3015
19
+ musica/tuvx.py,sha256=utrhxwHw1BsoMri9PxfY_I3ip50JzB5TYwFUZtGBr2I,6388
20
+ musica/types.py,sha256=huXgtEf28B13eygMs6TbLkXic9mAifDslY4ONQKpogg,17137
21
+ musica/examples/__init__.py,sha256=A4k3hoNAvcGzHlzJZ9yuy9H2n1jTSJzB6LsS7veUa_w,31
22
+ musica/examples/carma_aluminum.py,sha256=tYji_Gna2VoKVFxzNOymeIqRzLvGo0PRefeyqaK0N-k,3684
23
+ musica/examples/carma_sulfate.py,sha256=Jmm8CLyBtNDK06Hb94jsnR-hVGxZNES3HNxrIrHIW84,8119
24
+ musica/examples/examples.py,sha256=087VoazqnByZSjMEb_Vo1KoUNOO0xRw_fQ9XY7eitNc,5736
25
+ musica/examples/sulfate_box_model.py,sha256=cf0-_Z8rrTSxFrFPjIwYDYZcwNdiiYnk6IZ2zPH1cTo,16671
26
+ musica/examples/ts1_latin_hypercube.py,sha256=v6FhWxVQSZJvj55XblsIGVdq4f7CucttxDKjVlz6k1A,9623
27
+ musica/mechanism_configuration/__init__.py,sha256=LwedZpjLpPM5wUGzVx7mv9HreL8DCbzZQedtcp0OWYM,39
28
+ musica/mechanism_configuration/aqueous_equilibrium.py,sha256=QCWH6IfdpY_vQXEdwnWiXpkJEfpINAhPp9L8gRNnFjY,10996
29
+ musica/mechanism_configuration/arrhenius.py,sha256=0B0fT1mzajyJ68Ns-bdxjDsh7btBf4r1UYIgInZ9_FE,11172
30
+ musica/mechanism_configuration/branched.py,sha256=WWYVSRv2yTAvLe91zUsmqeTL0PAAKEIY7t9zujYRGgE,11762
31
+ musica/mechanism_configuration/condensed_phase_arrhenius.py,sha256=XX_t-54FFGFKJrorsGxS3MVBV5CMLIMpSBN6I3HMbho,11436
32
+ musica/mechanism_configuration/condensed_phase_photolysis.py,sha256=KxnCUvgvIidLWXsVdPkGFbcEuxyuQ_8PPubw3x05EBI,4115
33
+ musica/mechanism_configuration/emission.py,sha256=HS1QVJWYj4Omk2lK_NrxFFPeEu_HLXaSGAG0I0BXU4s,3044
34
+ musica/mechanism_configuration/first_order_loss.py,sha256=6IMOoX7ykECgPCVokcaVsJM1712P4bVjqvldk-chPQk,6641
35
+ musica/mechanism_configuration/henrys_law.py,sha256=aLgVAWROMxOfx0ng_FOovZeTWXXtfD8Kz-GwGn_2Fi8,1563
36
+ musica/mechanism_configuration/mechanism_configuration.py,sha256=6t3ulJpXZhXe-XNpjfKkhu5FlmjLOwg3a10cWC0gEjY,10437
37
+ musica/mechanism_configuration/phase.py,sha256=rOEExkNxrzHQSKwclrnQltXzanWnLA9vt5UFDnbQOi4,1633
38
+ musica/mechanism_configuration/photolysis.py,sha256=f6LQmsL9NmUyy7cp8PPU0zI2sExcyirJ62LmzcfFB_U,3883
39
+ musica/mechanism_configuration/reactions.py,sha256=R3uJwDXMtu1r2xijBmq1FsaMqzKQXqFqteho7leQ8hc,2367
40
+ musica/mechanism_configuration/simpol_phase_transfer.py,sha256=o-JPNwPVJtBpRsmiIzDJ-iNWU-L8lk8uCI9FvbC_FQY,9061
41
+ musica/mechanism_configuration/species.py,sha256=JyNPFVH9abznBb-pNLHVKynU6qx7s2PzGt2gXDcM-jI,5453
42
+ musica/mechanism_configuration/surface.py,sha256=2cFsIvFvL8lmxe0c8cB9LYDjg4qD6Y020ZziCjT6iaw,4346
43
+ musica/mechanism_configuration/ternary_chemical_activation.py,sha256=AlY9yFq0ZXgEnUaNd249wrgmYyW1TvkzOi2ZoK4B3gQ,14323
44
+ musica/mechanism_configuration/troe.py,sha256=1uj0vL4-Vzk1Ue2j-v1G3FrVsQ0bRpfOnMHzphUsL2U,13607
45
+ musica/mechanism_configuration/tunneling.py,sha256=zGEVG034ERLHgx9HW74SYlTbb-_LPSvEeIdKvrvc3qA,9378
46
+ musica/mechanism_configuration/user_defined.py,sha256=E5pioPg7UQVY6eUe7wvzwC_2ooCwliAPWl_9Do5EX_g,3892
47
+ musica/mechanism_configuration/utils.py,sha256=nR-ukwYsplFfnsjXtKQsXnryMPvtjkZkFQv7TjcSrnE,346
48
+ musica/mechanism_configuration/wet_deposition.py,sha256=ROc57JgXTxCCoGCSvNUZMXkAMLqcT9PVfuIDGNXT65U,2254
49
+ musica/test/examples/v1/full_configuration/full_configuration.json,sha256=WfJ2hw-XOhrM9RRAYrdW5C_9bc7ACB835xKWK5UWUhY,9437
50
+ musica/test/examples/v1/full_configuration/full_configuration.yaml,sha256=cLyG0HJP2Jxl44e52Z94R6_WGsGLBjXAWiOIfDk1yuY,5617
51
+ musica/test/integration/test_analytical.py,sha256=3P9pw7mRnXi7oXn_2vdEZSBFc4U5m0eRJgKEvX3esZ8,13805
52
+ musica/test/integration/test_carma.py,sha256=iR6FnhSfG6seta4K-C9IPtYdia9GlH8DzyVyP3w07zc,6865
53
+ musica/test/integration/test_carma_aluminum.py,sha256=B4xpfYEQxQIeUe5TcAXdtS4s1yD9cd6dQFZSUXY8ZLM,356
54
+ musica/test/integration/test_carma_sulfate.py,sha256=6SWcRjKY96uJhk4ifqiwTjFmH396j3i4bUfKXoJMtNI,742
55
+ musica/test/integration/test_chapman.py,sha256=gOISpApVIMLCEv6W0Hq1yNGF0xu2MlZMHQQhOGPmoQI,3512
56
+ musica/test/integration/test_sulfate_box_model.py,sha256=Ww6rI8_f4vgiYZ2_pt6hFu13abNaOm8i1TocISYET_s,1604
57
+ musica/test/integration/test_tuvx.py,sha256=9jQvE-LxTRPpoKXi3JponF1G4-xcAhhE1sLX1KV-EOQ,1918
58
+ musica/test/unit/test_parser.py,sha256=RhDWTmX2E9RiISFuKyqH3DJn38sxfaSfgzxPM-Rs1h0,2603
59
+ musica/test/unit/test_serializer.py,sha256=U0aQwXtOwdpFlfJH915rLikde7U97pJ1p0KiH2__jro,2458
60
+ musica/test/unit/test_state.py,sha256=JOoFKCQBYK93hRh5XWW5JBmHhgR9uPIsiGKmCBkpXzo,10369
61
+ musica/test/unit/test_util_full_mechanism.py,sha256=9_n8_RbG3X60YGV59mOpp_hvsh6-hMKhXZCijE5beRg,25217
62
+ musica/tools/prepare_build_environment_linux.sh,sha256=zqpqoI3hFYftBfj2MTpHz2Gg3TGVhcJ1U2z7IauSPug,986
63
+ musica/tools/prepare_build_environment_macos.sh,sha256=Yhhd-8W6YvR79NabEqixexU6BsClNf7DH_EYYlsmeMo,41
64
+ musica/tools/repair_wheel_gpu.sh,sha256=GJcKUJ2n9KMsj3QC5Shxt_ks9uFu2f9Than-4vVhG9U,1485
65
+ musica-0.12.2.dist-info/METADATA,sha256=FlXiev8ZTGt1gS9XbB3IKm4X5_jaDHB8dmMnUD29alg,26345
66
+ musica-0.12.2.dist-info/WHEEL,sha256=bSYgLd_odAai8NVKnn8TNX9NwxhbYwLlhemkzQLr3Mk,149
67
+ musica-0.12.2.dist-info/entry_points.txt,sha256=t9qRU9Ya63_yYMKJkTiVS5kCaW6dDDr0wuQ26lgXTH8,49
68
+ musica-0.12.2.dist-info/RECORD,,
69
+ musica-0.12.2.dist-info/licenses/AUTHORS.md,sha256=CYIlKZmXT9ngFk6d0MiD0A_Pt8BFoID4n-29OMrKkbM,2632
70
+ musica-0.12.2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
@@ -0,0 +1,6 @@
1
+ Wheel-Version: 1.0
2
+ Generator: scikit-build-core 0.11.6
3
+ Root-Is-Purelib: false
4
+ Tag: cp39-cp39-manylinux_2_26_i686
5
+ Tag: cp39-cp39-manylinux_2_28_i686
6
+
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ musica-cli = musica.main:main
3
+
@@ -0,0 +1,59 @@
1
+ # MUSICA Authors and Contributors
2
+
3
+ This file acknowledges all individuals who have contributed to the MUSICA project.
4
+
5
+ ## Core Development Team
6
+
7
+ The following individuals are the primary developers and maintainers of the MUSICA software:
8
+
9
+ - **Matthew Dawson** (mattdawson@ucar.edu) - Core Developer
10
+ - **Jiwon Gim** (jiwongim@ucar.edu) - Core Developer
11
+ - **David Fillmore** (fillmore@ucar.edu) - Core Developer
12
+ - **Kyle Shores** (kshores@ucar.edu) - Core Developer
13
+ - **Montek Thind** (mthind@ucar.edu) - Core Developer
14
+ - **Jian Sun** - Core Developer
15
+
16
+ ## Scientific Leadership and Vision
17
+
18
+ The scientific leadership and vision for MUSICA are provided by the authors of the [foundational paper](https://doi.org/10.1175/BAMS-D-19-0331.1).
19
+ This software implements that vision. For a full list of scientific authors,
20
+ please refer to our [CITATION.cff](CITATION.cff) file. To cite the software, use the Zenodo DOI from our latest release.
21
+
22
+ ## Additional Contributors
23
+
24
+ <!-- Contributors will be added here as they join the project -->
25
+ <!-- Format: -->
26
+ <!-- - **Name** (affiliation) - Brief description of contribution -->
27
+
28
+ - **Aidan Winney** - Documentation and Tutorials
29
+ - **Angela Pak** - Documentation and Tutorials
30
+ - **Dee Grant** - Improving the Python API
31
+ - **Qina Tan** - Implementing the CUDA-based Rosenbrock solver
32
+
33
+ ## Recognition Policy
34
+
35
+ We recognize contributors at different levels based on their involvement:
36
+
37
+ - **Core Development Team**: Listed in `pyproject.toml`, `.zenodo.json` (creators), and this file
38
+ - **Additional Contributors**: Listed in `.zenodo.json` (contributors) and this file
39
+ - **All Contributors**: Automatically tracked by GitHub's contributor statistics
40
+
41
+ See our [Contributing Guide](CONTRIBUTING.md) for more details on how contributions are recognized.
42
+
43
+ ## How to Contribute
44
+
45
+ We welcome contributions from the community! Please see our [Contributing Guide](CONTRIBUTING.md) for information on how to get involved.
46
+
47
+ ## Acknowledgments
48
+
49
+ We thank the broader atmospheric chemistry modeling community for their feedback, testing, and contributions to making MUSICA a robust and useful tool for scientific research.
50
+
51
+ ---
52
+
53
+ ## Citation Information
54
+
55
+ For citation purposes, please refer to our [CITATION.cff](CITATION.cff) file for the appropriate citations based on your use case. The main citations are:
56
+
57
+ 1. **For the MUSICA vision and scientific framework**: [Pfister et al., 2020](https://doi.org/10.1175/BAMS-D-19-0331.1)
58
+ 2. **For the MUSICA software evaluation**: [Schwantes et al., 2022](https://doi.org/10.1029/2021MS002889)
59
+ 3. **For the software itself**: Use the Zenodo DOI from our latest release