musica 0.8.0__tar.gz → 0.9.0__tar.gz

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 (187) hide show
  1. {musica-0.8.0 → musica-0.9.0}/.github/workflows/pip.yml +1 -1
  2. {musica-0.8.0 → musica-0.9.0}/CITATION.cff +1 -1
  3. {musica-0.8.0 → musica-0.9.0}/CMakeLists.txt +2 -2
  4. {musica-0.8.0 → musica-0.9.0}/PKG-INFO +1 -1
  5. {musica-0.8.0 → musica-0.9.0}/cmake/dependencies.cmake +5 -2
  6. musica-0.9.0/configs/analytical/reactions.json +71 -0
  7. musica-0.9.0/configs/analytical/species.json +28 -0
  8. musica-0.9.0/configs/chapman/config.json +6 -0
  9. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.fortran-intel +1 -1
  10. musica-0.9.0/docs/source/tutorial/chapter0.rst +86 -0
  11. musica-0.9.0/docs/source/tutorial/chapter1.rst +75 -0
  12. musica-0.9.0/docs/source/tutorial/chapter2.rst +86 -0
  13. {musica-0.8.0 → musica-0.9.0}/fortran/micm.F90 +129 -51
  14. {musica-0.8.0 → musica-0.9.0}/fortran/test/fetch_content_integration/CMakeLists.txt +2 -0
  15. {musica-0.8.0 → musica-0.9.0}/fortran/test/fetch_content_integration/test_get_micm_version.F90 +4 -0
  16. musica-0.9.0/fortran/test/fetch_content_integration/test_micm_api.F90 +524 -0
  17. musica-0.9.0/fortran/test/fetch_content_integration/test_micm_box_model.F90 +126 -0
  18. musica-0.9.0/fortran/test/fetch_content_integration/test_tuvx_api.F90 +511 -0
  19. {musica-0.8.0 → musica-0.9.0}/fortran/test/tutorial/CMakeLists.txt +3 -7
  20. musica-0.8.0/fortran/test/tutorial/demo.f90 → musica-0.9.0/fortran/test/tutorial/demo.F90 +4 -0
  21. {musica-0.8.0 → musica-0.9.0}/fortran/test/unit/CMakeLists.txt +1 -1
  22. musica-0.9.0/fortran/test/unit/tuvx.F90 +357 -0
  23. {musica-0.8.0 → musica-0.9.0}/fortran/test/unit/util.F90 +14 -8
  24. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/grid.F90 +13 -13
  25. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/profile.F90 +19 -19
  26. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/radiator.F90 +18 -18
  27. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/tuvx.F90 +110 -0
  28. {musica-0.8.0 → musica-0.9.0}/fortran/util.F90 +27 -8
  29. {musica-0.8.0 → musica-0.9.0}/include/musica/micm.hpp +11 -64
  30. {musica-0.8.0 → musica-0.9.0}/include/musica/tuvx/grid_map.hpp +2 -0
  31. {musica-0.8.0 → musica-0.9.0}/include/musica/tuvx/profile_map.hpp +2 -0
  32. {musica-0.8.0 → musica-0.9.0}/include/musica/tuvx/radiator_map.hpp +2 -0
  33. musica-0.9.0/include/musica/tuvx/tuvx.hpp +177 -0
  34. {musica-0.8.0 → musica-0.9.0}/include/musica/util.hpp +6 -1
  35. {musica-0.8.0 → musica-0.9.0}/pyproject.toml +1 -0
  36. {musica-0.8.0 → musica-0.9.0}/python/test/test_analytical.py +158 -26
  37. {musica-0.8.0 → musica-0.9.0}/python/test/test_chapman.py +1 -1
  38. {musica-0.8.0 → musica-0.9.0}/python/wrapper.cpp +37 -19
  39. {musica-0.8.0 → musica-0.9.0}/src/micm/micm.cpp +44 -42
  40. musica-0.9.0/src/test/data/tuvx/fixed/O2_cross_section.nc +0 -0
  41. musica-0.9.0/src/test/data/tuvx/fixed/O2_parameters.txt +44 -0
  42. musica-0.9.0/src/test/data/tuvx/fixed/bar_cross_section.nc +0 -0
  43. musica-0.9.0/src/test/data/tuvx/fixed/config.json +164 -0
  44. musica-0.9.0/src/test/data/tuvx/fixed/foo_cross_section.nc +0 -0
  45. musica-0.9.0/src/test/data/tuvx/fixed/stand_alone_tuvx_config.json +175 -0
  46. musica-0.9.0/src/test/data/tuvx/from_host/O2_cross_section.nc +0 -0
  47. musica-0.9.0/src/test/data/tuvx/from_host/O2_parameters.txt +44 -0
  48. musica-0.9.0/src/test/data/tuvx/from_host/bar_cross_section.nc +0 -0
  49. musica-0.9.0/src/test/data/tuvx/from_host/config.json +142 -0
  50. musica-0.9.0/src/test/data/tuvx/from_host/foo_cross_section.nc +0 -0
  51. {musica-0.8.0 → musica-0.9.0}/src/test/unit/micm/micm_c_api.cpp +170 -34
  52. {musica-0.8.0 → musica-0.9.0}/src/test/unit/tuvx/CMakeLists.txt +1 -0
  53. {musica-0.8.0 → musica-0.9.0}/src/test/unit/tuvx/tuvx_c_api.cpp +45 -0
  54. musica-0.9.0/src/test/unit/tuvx/tuvx_run_from_config.cpp +331 -0
  55. {musica-0.8.0 → musica-0.9.0}/src/tuvx/CMakeLists.txt +1 -1
  56. {musica-0.8.0 → musica-0.9.0}/src/tuvx/grid.cpp +1 -1
  57. musica-0.9.0/src/tuvx/interface.F90 +276 -0
  58. {musica-0.8.0 → musica-0.9.0}/src/tuvx/interface_grid.F90 +7 -7
  59. {musica-0.8.0 → musica-0.9.0}/src/tuvx/interface_grid_map.F90 +0 -1
  60. {musica-0.8.0 → musica-0.9.0}/src/tuvx/interface_profile.F90 +2 -1
  61. {musica-0.8.0 → musica-0.9.0}/src/tuvx/interface_profile_map.F90 +0 -1
  62. {musica-0.8.0 → musica-0.9.0}/src/tuvx/interface_radiator_map.F90 +0 -1
  63. musica-0.8.0/src/tuvx/tuvx_util.F90 → musica-0.9.0/src/tuvx/interface_util.F90 +47 -3
  64. {musica-0.8.0 → musica-0.9.0}/src/tuvx/tuvx.cpp +82 -1
  65. {musica-0.8.0 → musica-0.9.0}/src/util.cpp +5 -0
  66. musica-0.9.0/valgrind.supp +15 -0
  67. musica-0.8.0/configs/analytical/config.json +0 -1
  68. musica-0.8.0/configs/analytical/reactions.json +0 -34
  69. musica-0.8.0/configs/analytical/species.json +0 -23
  70. musica-0.8.0/docs/source/tutorial/chapter0.rst +0 -40
  71. musica-0.8.0/docs/source/tutorial/chapter1.rst +0 -43
  72. musica-0.8.0/docs/source/tutorial/chapter2.rst +0 -65
  73. musica-0.8.0/fortran/test/fetch_content_integration/test_micm_api.F90 +0 -357
  74. musica-0.8.0/fortran/test/fetch_content_integration/test_micm_box_model.F90 +0 -68
  75. musica-0.8.0/fortran/test/fetch_content_integration/test_tuvx_api.F90 +0 -509
  76. musica-0.8.0/fortran/test/unit/tuvx.F90 +0 -46
  77. musica-0.8.0/include/musica/tuvx/tuvx.hpp +0 -83
  78. musica-0.8.0/src/tuvx/interface.F90 +0 -147
  79. musica-0.8.0/valgrind.supp +0 -23
  80. {musica-0.8.0 → musica-0.9.0}/.clang-format +0 -0
  81. {musica-0.8.0 → musica-0.9.0}/.clang-tidy +0 -0
  82. {musica-0.8.0 → musica-0.9.0}/.dockerignore +0 -0
  83. {musica-0.8.0 → musica-0.9.0}/.github/workflows/clang_format.yml +0 -0
  84. {musica-0.8.0 → musica-0.9.0}/.github/workflows/clang_tidy.yml +0 -0
  85. {musica-0.8.0 → musica-0.9.0}/.github/workflows/docker.yml +0 -0
  86. {musica-0.8.0 → musica-0.9.0}/.github/workflows/fetch_content_integration.yml +0 -0
  87. {musica-0.8.0 → musica-0.9.0}/.github/workflows/gh_pages.yml +0 -0
  88. {musica-0.8.0 → musica-0.9.0}/.github/workflows/mac.yml +0 -0
  89. {musica-0.8.0 → musica-0.9.0}/.github/workflows/pep8.yml +0 -0
  90. {musica-0.8.0 → musica-0.9.0}/.github/workflows/release.yml +0 -0
  91. {musica-0.8.0 → musica-0.9.0}/.github/workflows/ubuntu.yml +0 -0
  92. {musica-0.8.0 → musica-0.9.0}/.github/workflows/windows.yml +0 -0
  93. {musica-0.8.0 → musica-0.9.0}/.gitignore +0 -0
  94. {musica-0.8.0 → musica-0.9.0}/LICENSE +0 -0
  95. {musica-0.8.0 → musica-0.9.0}/README.md +0 -0
  96. {musica-0.8.0 → musica-0.9.0}/cmake/FindSphinx.cmake +0 -0
  97. {musica-0.8.0 → musica-0.9.0}/cmake/SetDefaults.cmake +0 -0
  98. {musica-0.8.0 → musica-0.9.0}/cmake/cmake_uninstall.cmake.in +0 -0
  99. {musica-0.8.0 → musica-0.9.0}/cmake/musica.settings.in +0 -0
  100. {musica-0.8.0 → musica-0.9.0}/cmake/musicaConfig.cmake.in +0 -0
  101. {musica-0.8.0 → musica-0.9.0}/cmake/summary.cmake +0 -0
  102. {musica-0.8.0 → musica-0.9.0}/cmake/test_util.cmake +0 -0
  103. {musica-0.8.0 → musica-0.9.0}/configs/TS1/config.json +0 -0
  104. {musica-0.8.0 → musica-0.9.0}/configs/TS1/initial_conditions.csv +0 -0
  105. {musica-0.8.0 → musica-0.9.0}/configs/TS1/reactions.json +0 -0
  106. {musica-0.8.0 → musica-0.9.0}/configs/TS1/species.json +0 -0
  107. {musica-0.8.0/configs/chapman → musica-0.9.0/configs/analytical}/config.json +0 -0
  108. {musica-0.8.0 → musica-0.9.0}/configs/carbon_bond_5/config.json +0 -0
  109. {musica-0.8.0 → musica-0.9.0}/configs/carbon_bond_5/initial_conditions.csv +0 -0
  110. {musica-0.8.0 → musica-0.9.0}/configs/carbon_bond_5/reactions.json +0 -0
  111. {musica-0.8.0 → musica-0.9.0}/configs/carbon_bond_5/species.json +0 -0
  112. {musica-0.8.0 → musica-0.9.0}/configs/chapman/initial_conditions.csv +0 -0
  113. {musica-0.8.0 → musica-0.9.0}/configs/chapman/reactions.json +0 -0
  114. {musica-0.8.0 → musica-0.9.0}/configs/chapman/species.json +0 -0
  115. {musica-0.8.0 → musica-0.9.0}/configs/robertson/config.json +0 -0
  116. {musica-0.8.0 → musica-0.9.0}/configs/robertson/initial_conditions.csv +0 -0
  117. {musica-0.8.0 → musica-0.9.0}/configs/robertson/reactions.json +0 -0
  118. {musica-0.8.0 → musica-0.9.0}/configs/robertson/species.json +0 -0
  119. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile +0 -0
  120. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.docs +0 -0
  121. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.fortran-gcc +0 -0
  122. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.fortran-gcc.integration +0 -0
  123. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.fortran-nvhpc +0 -0
  124. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.memcheck +0 -0
  125. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.mpi +0 -0
  126. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.mpi_openmp +0 -0
  127. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.openmp +0 -0
  128. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.pip +0 -0
  129. {musica-0.8.0 → musica-0.9.0}/docker/Dockerfile.python +0 -0
  130. {musica-0.8.0 → musica-0.9.0}/docs/CMakeLists.txt +0 -0
  131. {musica-0.8.0 → musica-0.9.0}/docs/Makefile +0 -0
  132. {musica-0.8.0 → musica-0.9.0}/docs/Software Development Plan.pdf +0 -0
  133. {musica-0.8.0 → musica-0.9.0}/docs/make.bat +0 -0
  134. {musica-0.8.0 → musica-0.9.0}/docs/requirements.txt +0 -0
  135. {musica-0.8.0 → musica-0.9.0}/docs/source/_static/custom.css +0 -0
  136. {musica-0.8.0 → musica-0.9.0}/docs/source/_static/favicon/favicon.ico +0 -0
  137. {musica-0.8.0 → musica-0.9.0}/docs/source/_static/index_api.svg +0 -0
  138. {musica-0.8.0 → musica-0.9.0}/docs/source/_static/index_contribute.svg +0 -0
  139. {musica-0.8.0 → musica-0.9.0}/docs/source/_static/index_getting_started.svg +0 -0
  140. {musica-0.8.0 → musica-0.9.0}/docs/source/_static/index_user_guide.svg +0 -0
  141. {musica-0.8.0 → musica-0.9.0}/docs/source/api/index.rst +0 -0
  142. {musica-0.8.0 → musica-0.9.0}/docs/source/conf.py +0 -0
  143. {musica-0.8.0 → musica-0.9.0}/docs/source/contributing/index.rst +0 -0
  144. {musica-0.8.0 → musica-0.9.0}/docs/source/getting_started/getting_started.rst +0 -0
  145. {musica-0.8.0 → musica-0.9.0}/docs/source/getting_started/installation.rst +0 -0
  146. {musica-0.8.0 → musica-0.9.0}/docs/source/getting_started/overview.rst +0 -0
  147. {musica-0.8.0 → musica-0.9.0}/docs/source/index.rst +0 -0
  148. {musica-0.8.0 → musica-0.9.0}/docs/source/references.bib +0 -0
  149. {musica-0.8.0 → musica-0.9.0}/docs/source/tutorial/tutorial.rst +0 -0
  150. {musica-0.8.0 → musica-0.9.0}/docs/source/user_guide/fortran_c.rst +0 -0
  151. {musica-0.8.0 → musica-0.9.0}/docs/source/user_guide/model_interface.rst +0 -0
  152. {musica-0.8.0 → musica-0.9.0}/docs/source/user_guide/user_guide.rst +0 -0
  153. {musica-0.8.0 → musica-0.9.0}/fortran/CMakeLists.txt +0 -0
  154. {musica-0.8.0 → musica-0.9.0}/fortran/packaging/CMakeLists.txt +0 -0
  155. {musica-0.8.0 → musica-0.9.0}/fortran/test/CMakeLists.txt +0 -0
  156. {musica-0.8.0 → musica-0.9.0}/fortran/test/unit/tuvx_mpi.F90 +0 -0
  157. {musica-0.8.0 → musica-0.9.0}/fortran/test/unit/tuvx_openmp.F90 +0 -0
  158. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/CMakeLists.txt +0 -0
  159. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/grid_map.F90 +0 -0
  160. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/profile_map.F90 +0 -0
  161. {musica-0.8.0 → musica-0.9.0}/fortran/tuvx/radiator_map.F90 +0 -0
  162. {musica-0.8.0 → musica-0.9.0}/include/musica/component_versions.hpp +0 -0
  163. {musica-0.8.0 → musica-0.9.0}/include/musica/tuvx/grid.hpp +0 -0
  164. {musica-0.8.0 → musica-0.9.0}/include/musica/tuvx/profile.hpp +0 -0
  165. {musica-0.8.0 → musica-0.9.0}/include/musica/tuvx/radiator.hpp +0 -0
  166. {musica-0.8.0 → musica-0.9.0}/include/musica/version.hpp +0 -0
  167. {musica-0.8.0 → musica-0.9.0}/python/CMakeLists.txt +0 -0
  168. {musica-0.8.0 → musica-0.9.0}/python/test/tuvx.py +0 -0
  169. {musica-0.8.0 → musica-0.9.0}/src/CMakeLists.txt +0 -0
  170. {musica-0.8.0 → musica-0.9.0}/src/component_versions.cpp +0 -0
  171. {musica-0.8.0 → musica-0.9.0}/src/micm/CMakeLists.txt +0 -0
  172. {musica-0.8.0 → musica-0.9.0}/src/packaging/CMakeLists.txt +0 -0
  173. {musica-0.8.0 → musica-0.9.0}/src/packaging/modulefile.lua.in +0 -0
  174. {musica-0.8.0 → musica-0.9.0}/src/test/CMakeLists.txt +0 -0
  175. {musica-0.8.0 → musica-0.9.0}/src/test/data/util_index_mapping_from_file.json +0 -0
  176. {musica-0.8.0 → musica-0.9.0}/src/test/unit/CMakeLists.txt +0 -0
  177. {musica-0.8.0 → musica-0.9.0}/src/test/unit/component_versions.cpp +0 -0
  178. {musica-0.8.0 → musica-0.9.0}/src/test/unit/micm/CMakeLists.txt +0 -0
  179. {musica-0.8.0 → musica-0.9.0}/src/test/unit/micm/micm.cpp +0 -0
  180. {musica-0.8.0 → musica-0.9.0}/src/test/unit/util.cpp +0 -0
  181. {musica-0.8.0 → musica-0.9.0}/src/tuvx/grid_map.cpp +0 -0
  182. {musica-0.8.0 → musica-0.9.0}/src/tuvx/interface_radiator.F90 +0 -0
  183. {musica-0.8.0 → musica-0.9.0}/src/tuvx/profile.cpp +0 -0
  184. {musica-0.8.0 → musica-0.9.0}/src/tuvx/profile_map.cpp +0 -0
  185. {musica-0.8.0 → musica-0.9.0}/src/tuvx/radiator.cpp +0 -0
  186. {musica-0.8.0 → musica-0.9.0}/src/tuvx/radiator_map.cpp +0 -0
  187. {musica-0.8.0 → musica-0.9.0}/src/version.cpp.in +0 -0
@@ -13,7 +13,7 @@ jobs:
13
13
  fail-fast: false
14
14
  matrix:
15
15
  platform: [windows-latest, macos-13, ubuntu-latest]
16
- python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
16
+ python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
17
17
  # python versions: https://devguide.python.org/versions/
18
18
 
19
19
  runs-on: ${{ matrix.platform }}
@@ -64,4 +64,4 @@ number: 10
64
64
  page: "E1743 - E1760"
65
65
  doi: "10.1175/BAMS-D-19-0331.1"
66
66
  url: "https://journals.ametsoc.org/view/journals/bams/101/10/bamsD190331.xml"
67
- version: 0.8.0
67
+ version: 0.9.0
@@ -1,7 +1,7 @@
1
1
  cmake_minimum_required(VERSION 3.21)
2
2
 
3
3
  # must be on the same line so that pyproject.toml can correctly identify the version
4
- project(musica-distribution VERSION 0.8.0)
4
+ project(musica-distribution VERSION 0.9.0)
5
5
 
6
6
  set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH};${PROJECT_SOURCE_DIR}/cmake)
7
7
  set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_MODULE_PATH}/SetDefaults.cmake)
@@ -30,7 +30,7 @@ option(MUSICA_BUILD_DOCS "Build the documentation" OFF)
30
30
  option(MUSICA_ENABLE_MICM "Enable MICM" ON)
31
31
  option(MUSICA_ENABLE_TUVX "Enable TUV-x" ON)
32
32
 
33
- set(MUSICA_SET_MICM_VECTOR_MATRIX_SIZE "1" CACHE STRING "Set MICM vector-ordered matrix dimension")
33
+ set(MUSICA_SET_MICM_VECTOR_MATRIX_SIZE "4" CACHE STRING "Set MICM vector-ordered matrix dimension")
34
34
 
35
35
  cmake_dependent_option(
36
36
  MUSICA_ENABLE_PYTHON_LIBRARY "Adds pybind11, a lightweight header-only library that exposes C++ types in Python and vice versa" OFF "MUSICA_BUILD_C_CXX_INTERFACE" OFF)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: musica
3
- Version: 0.8.0
3
+ Version: 0.9.0
4
4
  Summary: MUSICA is a Python library for performing computational simulations in atmospheric chemistry.
5
5
  Home-page: https://wiki.ucar.edu/display/MUSICA/MUSICA+Home
6
6
  Author-Email: Matthew Dawsom <mattdawson@ucar.edu>, Jiwon Gim <jiwongim@ucar.edu>, David Fillmore <fillmore@ucar.edu>, Kyle Shores <kshores@ucar.edu>
@@ -62,7 +62,7 @@ endif()
62
62
  if (MUSICA_ENABLE_MICM AND MUSICA_BUILD_C_CXX_INTERFACE)
63
63
 
64
64
  set_git_default(MICM_GIT_REPOSITORY https://github.com/NCAR/micm.git)
65
- set_git_default(MICM_GIT_TAG v3.6.0)
65
+ set_git_default(MICM_GIT_TAG v.3.7.0)
66
66
 
67
67
  FetchContent_Declare(micm
68
68
  GIT_REPOSITORY ${MICM_GIT_REPOSITORY}
@@ -86,7 +86,7 @@ if (MUSICA_ENABLE_TUVX AND MUSICA_BUILD_C_CXX_INTERFACE)
86
86
  set(TUVX_INSTALL_INCLUDE_DIR ${MUSICA_INSTALL_INCLUDE_DIR} CACHE STRING "" FORCE)
87
87
 
88
88
  set_git_default(TUVX_GIT_REPOSITORY https://github.com/NCAR/tuv-x.git)
89
- set_git_default(TUVX_GIT_TAG v0.10.0)
89
+ set_git_default(TUVX_GIT_TAG v0.10.1)
90
90
 
91
91
  FetchContent_Declare(tuvx
92
92
  GIT_REPOSITORY ${TUVX_GIT_REPOSITORY}
@@ -94,6 +94,9 @@ if (MUSICA_ENABLE_TUVX AND MUSICA_BUILD_C_CXX_INTERFACE)
94
94
  GIT_PROGRESS NOT ${FETCHCONTENT_QUIET}
95
95
  )
96
96
 
97
+ set(TUVX_ENABLE_TESTS OFF)
98
+ set(TUVX_ENABLE_REGRESSION_TESTS OFF)
99
+
97
100
  FetchContent_MakeAvailable(tuvx)
98
101
  endif()
99
102
 
@@ -0,0 +1,71 @@
1
+ {
2
+ "camp-data": [
3
+ {
4
+ "type": "MECHANISM",
5
+ "name": "music box interactive configuration",
6
+ "reactions": [
7
+ {
8
+ "type": "ARRHENIUS",
9
+ "A": 0.004,
10
+ "C": 50,
11
+ "reactants": {
12
+ "A": {
13
+ "qty": 1
14
+ }
15
+ },
16
+ "products": {
17
+ "B": {
18
+ "yield": 1
19
+ }
20
+ }
21
+ },
22
+ {
23
+ "type": "ARRHENIUS",
24
+ "A": 0.012,
25
+ "B": -2,
26
+ "C": 75,
27
+ "D": 50,
28
+ "E": 1.0e-6,
29
+ "reactants": {
30
+ "B": {
31
+ "qty": 1
32
+ }
33
+ },
34
+ "products": {
35
+ "C": {
36
+ "yield": 1
37
+ }
38
+ }
39
+ },
40
+ {
41
+ "type": "USER_DEFINED",
42
+ "MUSICA name": "reaction 1",
43
+ "reactants": {
44
+ "D": {
45
+ "qty": 1
46
+ }
47
+ },
48
+ "products": {
49
+ "E": {
50
+ "yield": 1
51
+ }
52
+ }
53
+ },
54
+ {
55
+ "type": "USER_DEFINED",
56
+ "MUSICA name": "reaction 2",
57
+ "reactants": {
58
+ "E": {
59
+ "qty": 1
60
+ }
61
+ },
62
+ "products": {
63
+ "F": {
64
+ "yield": 1
65
+ }
66
+ }
67
+ }
68
+ ]
69
+ }
70
+ ]
71
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "camp-data": [
3
+ {
4
+ "name": "A",
5
+ "type": "CHEM_SPEC"
6
+ },
7
+ {
8
+ "name": "B",
9
+ "type": "CHEM_SPEC"
10
+ },
11
+ {
12
+ "name": "C",
13
+ "type": "CHEM_SPEC"
14
+ },
15
+ {
16
+ "name": "D",
17
+ "type": "CHEM_SPEC"
18
+ },
19
+ {
20
+ "name": "E",
21
+ "type": "CHEM_SPEC"
22
+ },
23
+ {
24
+ "name": "F",
25
+ "type": "CHEM_SPEC"
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,6 @@
1
+ {
2
+ "camp-files": [
3
+ "species.json",
4
+ "reactions.json"
5
+ ]
6
+ }
@@ -1,5 +1,5 @@
1
1
  # versions and sizes from here: https://hub.docker.com/r/intel/oneapi-hpckit/tags
2
- FROM intel/oneapi-hpckit:latest
2
+ FROM intel/oneapi-hpckit:2024.0.1-devel-ubuntu22.04
3
3
 
4
4
  # Based off of this: https://dgpu-docs.intel.com/driver/installation.html#repository-public-key-used-for-package-and-repository-signing
5
5
  # however those docs (at the time of this writing are incorrect) and this is the correct url
@@ -0,0 +1,86 @@
1
+ Chapter 0
2
+ =========
3
+
4
+ .. _installing_musica:
5
+
6
+ Installing MUSICA
7
+ -----------------
8
+
9
+ This tutorial will guide you through the installation and use of MUSICA and
10
+ the MUSICA-Fortran interface. The MUSICA library is a C++ library that
11
+ provides a set of tools and solvers for the simulation of atmospheric
12
+ chemistry and aerosols. The MUSICA-Fortran interface provides a
13
+ Fortran API to the MUSICA library.
14
+
15
+ The MUSICA library and the MUSICA-Fortran interface can be installed
16
+ together or separately. The MUSICA library is required to build the
17
+ MUSICA-Fortran interface.
18
+
19
+ The MUSICA library and the MUSICA-Fortran interface can be installed
20
+ using the CMake build system.
21
+
22
+
23
+ Local Installation
24
+ ~~~~~~~~~~~~~~~~~~
25
+
26
+ First, ensure that you have the required dependencies installed. On
27
+ Fedora, you can install the required dependencies with the following:
28
+
29
+ .. code-block:: bash
30
+
31
+ sudo dnf install -y cmake git gcc-c++ gcc-gfortran netcdf-devel netcdf-fortran-devel
32
+
33
+ On other distributions or operating systems, you may need to install the dependencies
34
+ using the package manager for your system.
35
+
36
+ Next, clone the MUSICA repository from GitHub:
37
+
38
+ .. code-block:: bash
39
+
40
+ git clone https://github.com/NCAR/musica.git
41
+
42
+ Next, create a build directory and run CMake:
43
+
44
+ .. code-block:: bash
45
+
46
+ mkdir build
47
+ cd build
48
+ cmake -D CMAKE_INSTALL_PREFIX=<INSTALL_DIR> -D MUSICA_BUILD_FORTRAN_INTERFACE=ON ../musica
49
+
50
+ where ``<INSTALL_DIR>`` is the directory where you want to install MUSICA.
51
+ We use the ``MUSICA_BUILD_FORTRAN_INTERFACE`` option to build the MUSICA-Fortran
52
+ interface, which is not built by default.
53
+
54
+ Finally, build and install MUSICA:
55
+
56
+ .. code-block:: bash
57
+
58
+ make
59
+ make install
60
+
61
+ Docker Installation
62
+ ~~~~~~~~~~~~~~~~~~~
63
+
64
+ Alternatively, you can build and install MUSICA using Docker. First, ensure
65
+ that you have
66
+ `Docker Desktop <https://www.docker.com/products/docker-desktop/>`_
67
+ installed and running on your system.
68
+
69
+ Then, clone the MUSICA GitHub repository and use the provided Dockerfile to
70
+ build the MUSICA Docker image:
71
+
72
+ .. code-block:: bash
73
+
74
+ git clone https://github.com/NCAR/musica.git
75
+ cd musica
76
+ docker build -t musica-fortran -f docker/Dockerfile.fortran-gcc .
77
+ docker run -it musica-fortran bash
78
+
79
+ You can then perform the remainder of the tutorial inside the Docker container.
80
+ The ``<MUSICA_DIR>`` directory used throughout the tutorial will be located at ``/musica/build``
81
+
82
+ Once you are finished, you can exit the container by typing ``exit``. (Note that
83
+ the container will be deleted along with any files you created or modified when
84
+ you exit.)
85
+
86
+
@@ -0,0 +1,75 @@
1
+ .. _chapter1:
2
+
3
+ Chapter 1
4
+ =========
5
+
6
+ First Fortran MUSICA Program
7
+ ----------------------------
8
+ The MUSICA-Fortran API provides access to the MUSICA library within a fortran program.
9
+ To get started, let us create a simple program that links
10
+ to MUSICA and prints the version of MICM.
11
+
12
+ Save the following code to a file named `demo.F90`:
13
+
14
+ .. literalinclude:: ../../../fortran/test/fetch_content_integration/test_get_micm_version.F90
15
+ :language: F90
16
+
17
+ From the ``musica_micm`` module, we only need the function ``get_micm_version``,
18
+ which returns a derived string type from the ``musica_util`` module, ``string_t``.
19
+ (The ``string_t`` type will be discussed in more detail in later chapters.)
20
+ To print the version string we just want the fortran character array,
21
+ accessed by the ``get_char_array`` function.
22
+
23
+ Now, to build this simple program,
24
+ invoke the `gfortran` compiler and link to ``libmusica-fortran``, ``libmusica``, ``yaml-cpp``,
25
+ and the standard C++ library ``libstdc++``.
26
+ The full command is
27
+
28
+ .. code-block:: bash
29
+
30
+ gfortran -o demo demo.F90 -I<MUSICA_DIR>/include -L<MUSICA_DIR>/lib64 -lmusica-fortran -lmusica -lstdc++ -lyaml-cpp
31
+
32
+ ``<MUSICA_DIR>`` is the full path of the MUSICA installation directory,
33
+ specified by the option ``CMAKE_INSTALL_PREFIX``
34
+ during installation (see :ref:`installing_musica`).
35
+ Note that the include path allows the linker to find the ``musica_micm.mod`` and ``musica_util.mod``
36
+ module definition files.
37
+
38
+ When the `demo` program is run it should display the MICM version:
39
+
40
+ .. code-block:: bash
41
+
42
+ $ ./demo
43
+ MICM version 3.6.0
44
+ $
45
+
46
+ Building a MUSICA Fortran Program with CMake
47
+ --------------------------------------------
48
+
49
+ A minimal ``CMakeLists.txt`` file designed to link the ``musica_fortran`` library
50
+ to the ``demo_f.F90`` file described above is exhibited below
51
+
52
+ .. literalinclude:: ../../../fortran/test/tutorial/CMakeLists.txt
53
+ :language: cmake
54
+
55
+ Common practice is to create a ``build`` subdirectory (relative to the top level ``CMakeLists.txt`` file shown above).
56
+
57
+ .. code-block:: bash
58
+
59
+ mkdir build
60
+ cd build
61
+
62
+ Then, ``cmake`` can then be invoked with:
63
+
64
+ .. code-block:: bash
65
+
66
+ cmake -DMUSICA_INSTALL_DIR=<MUSICA_DIR> ..
67
+ make
68
+
69
+ Then, the ``demo_f`` executable can be run:
70
+
71
+ .. code-block:: bash
72
+
73
+ $ ./demo_f
74
+ MICM version 3.6.0
75
+ $
@@ -0,0 +1,86 @@
1
+ Chapter 2
2
+ =========
3
+
4
+ An MICM Box Model Example in Fortran
5
+ --------------------------------------
6
+
7
+ In this next MUSICA Fortran example,
8
+ we will setup a MICM solver, starting with a set of MICM configuration files,
9
+ and run the solver for a single integration time step.
10
+
11
+ The following three configuration files (``config.json``, ``species.json``, and ``reactions.json``)
12
+ should be saved in a subdirectory named ``configs/analytical`` relative directory
13
+ from which you plan to call the box model executable.
14
+
15
+ (You can find a copy of these files in the MUSICA repository at ``configs/analytical``.)
16
+
17
+ The top-level MICM configuration ``config.json`` file
18
+ simply lists the configuration files to parse. In this case, these are the
19
+ chemical species configuration file ``species.json`` and
20
+ the reactions configuration file ``reactions.json``.
21
+
22
+ The contents of the ``config.json`` file for this example are:
23
+
24
+ .. literalinclude:: ../../../configs/analytical/config.json
25
+ :language: json
26
+
27
+ For this example, we will have a system of three chemical species
28
+ `A`, `B`, and `C`, defined in the JSON file ``species.json`` as follows:
29
+
30
+ .. literalinclude:: ../../../configs/analytical/species.json
31
+ :language: json
32
+
33
+ The ``reactions.json`` specifies a mechanism, or a set of reactions for the system.
34
+ Here, we will introduce two Arrhenius type reactions, the first
35
+ with `B` evolving to `C`, and specifying all five reaction parameters,
36
+ and the second reaction with `A` evolving to `B` and using only two reaction parameters.
37
+
38
+ We also include two reactions with rate constants that are provided by the host
39
+ application at runtime. These types of reactions are useful when outside calculations
40
+ are needed to determine the rate constants, such as in the case of photolysis reactions.
41
+
42
+ The ``reactions.json`` file for this example should look like this:
43
+
44
+ .. literalinclude:: ../../../configs/analytical/reactions.json
45
+ :language: json
46
+
47
+ More information on MICM configurations and reactions can be found in the `MICM documentation
48
+ <https://ncar.github.io/micm/user_guide/>`_
49
+
50
+ To create a simple box model, save the following Fortran code to a file named ``micm_box_model.F90``:
51
+
52
+ .. literalinclude:: ../../../fortran/test/fetch_content_integration/test_micm_box_model.F90
53
+ :language: f90
54
+
55
+ From the ``musica_util`` module we need the Fortran types
56
+ ``error_t``, ``string_t``, and ``mapping_t``.
57
+ A pointer to a ``musica_micm::micm_t`` will serve as the interface to the MICM solver
58
+ (in the example the pointer name is ``micm``).
59
+ Note that the ``config_path`` in the code sample has been set to ``configs/analytical``,
60
+ so that subdirectory should be created relative to the main program and contain
61
+ the MICM JSON configuration files,
62
+ otherwise the ``config_path`` should be modified appropriately.
63
+ The initial species concentrations are initialized in the ``concentrations`` array,
64
+ which is an argument to the MICM solver.
65
+
66
+ Finally, a single time step solution is obtained through a call to ``micm%solve``,
67
+ after which the updated concentrations may be displayed.
68
+
69
+ To build the example, follow the instructions in :ref:`chapter1`.
70
+
71
+ Assuming you name the executable ``micm_box_model``, you can run the program as follows:
72
+
73
+ .. code-block:: bash
74
+
75
+ $ ./micm_box_model
76
+ Creating MICM solver...
77
+ Species Name:A, Index: 1
78
+ Species Name:B, Index: 2
79
+ Species Name:C, Index: 5
80
+ Species Name:D, Index: 3
81
+ Species Name:E, Index: 4
82
+ Species Name:F, Index: 6
83
+ Solving starts...
84
+ After solving, concentrations 0.38236272259073301 1.4676807523204496 0.67030703490468713 1.1155750798779909 1.1499565250888166 1.2141178852173222
85
+ $
86
+