musica 0.7.0__tar.gz → 0.7.1__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 (161) hide show
  1. {musica-0.7.0 → musica-0.7.1}/.dockerignore +1 -1
  2. musica-0.7.1/.github/workflows/release.yml +86 -0
  3. {musica-0.7.0 → musica-0.7.1}/.github/workflows/ubuntu.yml +1 -1
  4. {musica-0.7.0 → musica-0.7.1}/CMakeLists.txt +3 -1
  5. {musica-0.7.0 → musica-0.7.1}/PKG-INFO +3 -1
  6. {musica-0.7.0 → musica-0.7.1}/README.md +2 -0
  7. {musica-0.7.0 → musica-0.7.1}/cmake/dependencies.cmake +2 -1
  8. {musica-0.7.0 → musica-0.7.1}/cmake/test_util.cmake +1 -1
  9. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.fortran-gcc +1 -1
  10. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.fortran-gcc.integration +1 -0
  11. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.fortran-intel +4 -4
  12. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.fortran-nvhpc +1 -0
  13. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.memcheck +3 -1
  14. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.mpi +5 -3
  15. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.mpi_openmp +6 -4
  16. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.openmp +5 -3
  17. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.python +3 -1
  18. musica-0.7.1/docs/source/tutorial/chapter0.rst +40 -0
  19. musica-0.7.1/docs/source/tutorial/chapter2.rst +65 -0
  20. {musica-0.7.0 → musica-0.7.1}/docs/source/tutorial/tutorial.rst +2 -0
  21. {musica-0.7.0 → musica-0.7.1}/fortran/CMakeLists.txt +1 -4
  22. musica-0.7.1/fortran/micm.F90 +450 -0
  23. {musica-0.7.0 → musica-0.7.1}/fortran/packaging/CMakeLists.txt +6 -6
  24. {musica-0.7.0 → musica-0.7.1}/fortran/test/fetch_content_integration/CMakeLists.txt +17 -0
  25. musica-0.7.1/fortran/test/fetch_content_integration/test_get_micm_version.F90 +8 -0
  26. {musica-0.7.0 → musica-0.7.1}/fortran/test/fetch_content_integration/test_micm_api.F90 +8 -3
  27. musica-0.7.1/fortran/test/fetch_content_integration/test_micm_box_model.F90 +74 -0
  28. musica-0.7.1/fortran/test/fetch_content_integration/test_tuvx_api.F90 +325 -0
  29. musica-0.7.1/fortran/test/tutorial/CMakeLists.txt +23 -0
  30. {musica-0.7.0 → musica-0.7.1}/fortran/test/unit/CMakeLists.txt +2 -0
  31. musica-0.7.1/fortran/tuvx/CMakeLists.txt +8 -0
  32. musica-0.7.1/fortran/tuvx/grid.F90 +256 -0
  33. musica-0.7.1/fortran/tuvx/grid_map.F90 +179 -0
  34. musica-0.7.1/fortran/tuvx/profile.F90 +426 -0
  35. musica-0.7.1/fortran/tuvx/profile_map.F90 +182 -0
  36. musica-0.7.1/fortran/tuvx/tuvx.F90 +177 -0
  37. {musica-0.7.0 → musica-0.7.1}/fortran/util.F90 +8 -1
  38. {musica-0.7.0 → musica-0.7.1}/include/musica/micm.hpp +105 -14
  39. musica-0.7.1/include/musica/tuvx/grid.hpp +141 -0
  40. musica-0.7.1/include/musica/tuvx/grid_map.hpp +100 -0
  41. musica-0.7.1/include/musica/tuvx/profile.hpp +204 -0
  42. musica-0.7.1/include/musica/tuvx/profile_map.hpp +100 -0
  43. musica-0.7.1/include/musica/tuvx/tuvx.hpp +71 -0
  44. {musica-0.7.0 → musica-0.7.1}/include/musica/util.hpp +3 -2
  45. {musica-0.7.0 → musica-0.7.1}/python/test/test_analytical.py +5 -2
  46. {musica-0.7.0 → musica-0.7.1}/python/test/test_chapman.py +5 -1
  47. {musica-0.7.0 → musica-0.7.1}/python/wrapper.cpp +31 -7
  48. {musica-0.7.0 → musica-0.7.1}/src/CMakeLists.txt +2 -0
  49. {musica-0.7.0 → musica-0.7.1}/src/micm/micm.cpp +133 -67
  50. {musica-0.7.0 → musica-0.7.1}/src/packaging/CMakeLists.txt +5 -1
  51. {musica-0.7.0 → musica-0.7.1}/src/test/unit/micm/micm_c_api.cpp +95 -10
  52. musica-0.7.1/src/test/unit/tuvx/tuvx_c_api.cpp +387 -0
  53. musica-0.7.1/src/tuvx/CMakeLists.txt +14 -0
  54. musica-0.7.1/src/tuvx/grid.cpp +159 -0
  55. musica-0.7.1/src/tuvx/grid_map.cpp +180 -0
  56. musica-0.7.1/src/tuvx/interface.F90 +118 -0
  57. musica-0.7.1/src/tuvx/interface_grid.F90 +237 -0
  58. musica-0.7.1/src/tuvx/interface_grid_map.F90 +177 -0
  59. musica-0.7.1/src/tuvx/interface_profile.F90 +384 -0
  60. musica-0.7.1/src/tuvx/interface_profile_map.F90 +178 -0
  61. musica-0.7.1/src/tuvx/profile.cpp +276 -0
  62. musica-0.7.1/src/tuvx/profile_map.cpp +178 -0
  63. musica-0.7.1/src/tuvx/tuvx.cpp +134 -0
  64. musica-0.7.0/fortran/micm.F90 +0 -438
  65. musica-0.7.0/fortran/test/fetch_content_integration/test_tuvx_api.F90 +0 -92
  66. musica-0.7.0/fortran/tuvx.F90 +0 -337
  67. musica-0.7.0/include/musica/tuvx.hpp +0 -123
  68. musica-0.7.0/src/test/unit/tuvx/tuvx_c_api.cpp +0 -84
  69. musica-0.7.0/src/tuvx/CMakeLists.txt +0 -6
  70. musica-0.7.0/src/tuvx/interface.F90 +0 -201
  71. musica-0.7.0/src/tuvx/tuvx.cpp +0 -235
  72. {musica-0.7.0 → musica-0.7.1}/.clang-format +0 -0
  73. {musica-0.7.0 → musica-0.7.1}/.clang-tidy +0 -0
  74. {musica-0.7.0 → musica-0.7.1}/.github/workflows/clang_format.yml +0 -0
  75. {musica-0.7.0 → musica-0.7.1}/.github/workflows/clang_tidy.yml +0 -0
  76. {musica-0.7.0 → musica-0.7.1}/.github/workflows/docker.yml +0 -0
  77. {musica-0.7.0 → musica-0.7.1}/.github/workflows/fetch_content_integration.yml +0 -0
  78. {musica-0.7.0 → musica-0.7.1}/.github/workflows/gh_pages.yml +0 -0
  79. {musica-0.7.0 → musica-0.7.1}/.github/workflows/mac.yml +0 -0
  80. {musica-0.7.0 → musica-0.7.1}/.github/workflows/pep8.yml +0 -0
  81. {musica-0.7.0 → musica-0.7.1}/.github/workflows/pip.yml +0 -0
  82. {musica-0.7.0 → musica-0.7.1}/.github/workflows/windows.yml +0 -0
  83. {musica-0.7.0 → musica-0.7.1}/.gitignore +0 -0
  84. {musica-0.7.0 → musica-0.7.1}/.gitmodules +0 -0
  85. {musica-0.7.0 → musica-0.7.1}/CITATION.cff +0 -0
  86. {musica-0.7.0 → musica-0.7.1}/LICENSE +0 -0
  87. {musica-0.7.0 → musica-0.7.1}/cmake/FindSphinx.cmake +0 -0
  88. {musica-0.7.0 → musica-0.7.1}/cmake/SetDefaults.cmake +0 -0
  89. {musica-0.7.0 → musica-0.7.1}/cmake/cmake_uninstall.cmake.in +0 -0
  90. {musica-0.7.0 → musica-0.7.1}/cmake/musica.settings.in +0 -0
  91. {musica-0.7.0 → musica-0.7.1}/cmake/musicaConfig.cmake.in +0 -0
  92. {musica-0.7.0 → musica-0.7.1}/cmake/summary.cmake +0 -0
  93. {musica-0.7.0 → musica-0.7.1}/configs/TS1/config.json +0 -0
  94. {musica-0.7.0 → musica-0.7.1}/configs/TS1/initial_conditions.csv +0 -0
  95. {musica-0.7.0 → musica-0.7.1}/configs/TS1/reactions.json +0 -0
  96. {musica-0.7.0 → musica-0.7.1}/configs/TS1/species.json +0 -0
  97. {musica-0.7.0 → musica-0.7.1}/configs/analytical/config.json +0 -0
  98. {musica-0.7.0 → musica-0.7.1}/configs/analytical/reactions.json +0 -0
  99. {musica-0.7.0 → musica-0.7.1}/configs/analytical/species.json +0 -0
  100. {musica-0.7.0 → musica-0.7.1}/configs/carbon_bond_5/config.json +0 -0
  101. {musica-0.7.0 → musica-0.7.1}/configs/carbon_bond_5/initial_conditions.csv +0 -0
  102. {musica-0.7.0 → musica-0.7.1}/configs/carbon_bond_5/reactions.json +0 -0
  103. {musica-0.7.0 → musica-0.7.1}/configs/carbon_bond_5/species.json +0 -0
  104. {musica-0.7.0 → musica-0.7.1}/configs/chapman/config.json +0 -0
  105. {musica-0.7.0 → musica-0.7.1}/configs/chapman/initial_conditions.csv +0 -0
  106. {musica-0.7.0 → musica-0.7.1}/configs/chapman/reactions.json +0 -0
  107. {musica-0.7.0 → musica-0.7.1}/configs/chapman/species.json +0 -0
  108. {musica-0.7.0 → musica-0.7.1}/configs/robertson/config.json +0 -0
  109. {musica-0.7.0 → musica-0.7.1}/configs/robertson/initial_conditions.csv +0 -0
  110. {musica-0.7.0 → musica-0.7.1}/configs/robertson/reactions.json +0 -0
  111. {musica-0.7.0 → musica-0.7.1}/configs/robertson/species.json +0 -0
  112. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile +0 -0
  113. {musica-0.7.0 → musica-0.7.1}/docker/Dockerfile.docs +0 -0
  114. {musica-0.7.0 → musica-0.7.1}/docs/CMakeLists.txt +0 -0
  115. {musica-0.7.0 → musica-0.7.1}/docs/Makefile +0 -0
  116. {musica-0.7.0 → musica-0.7.1}/docs/Software Development Plan.pdf +0 -0
  117. {musica-0.7.0 → musica-0.7.1}/docs/make.bat +0 -0
  118. {musica-0.7.0 → musica-0.7.1}/docs/requirements.txt +0 -0
  119. {musica-0.7.0 → musica-0.7.1}/docs/source/_static/custom.css +0 -0
  120. {musica-0.7.0 → musica-0.7.1}/docs/source/_static/favicon/favicon.ico +0 -0
  121. {musica-0.7.0 → musica-0.7.1}/docs/source/_static/index_api.svg +0 -0
  122. {musica-0.7.0 → musica-0.7.1}/docs/source/_static/index_contribute.svg +0 -0
  123. {musica-0.7.0 → musica-0.7.1}/docs/source/_static/index_getting_started.svg +0 -0
  124. {musica-0.7.0 → musica-0.7.1}/docs/source/_static/index_user_guide.svg +0 -0
  125. {musica-0.7.0 → musica-0.7.1}/docs/source/api/index.rst +0 -0
  126. {musica-0.7.0 → musica-0.7.1}/docs/source/conf.py +0 -0
  127. {musica-0.7.0 → musica-0.7.1}/docs/source/contributing/index.rst +0 -0
  128. {musica-0.7.0 → musica-0.7.1}/docs/source/getting_started/getting_started.rst +0 -0
  129. {musica-0.7.0 → musica-0.7.1}/docs/source/getting_started/installation.rst +0 -0
  130. {musica-0.7.0 → musica-0.7.1}/docs/source/getting_started/overview.rst +0 -0
  131. {musica-0.7.0 → musica-0.7.1}/docs/source/index.rst +0 -0
  132. {musica-0.7.0 → musica-0.7.1}/docs/source/references.bib +0 -0
  133. {musica-0.7.0 → musica-0.7.1}/docs/source/tutorial/chapter1.rst +0 -0
  134. {musica-0.7.0 → musica-0.7.1}/docs/source/user_guide/fortran_c.rst +0 -0
  135. {musica-0.7.0 → musica-0.7.1}/docs/source/user_guide/model_interface.rst +0 -0
  136. {musica-0.7.0 → musica-0.7.1}/docs/source/user_guide/user_guide.rst +0 -0
  137. {musica-0.7.0 → musica-0.7.1}/fortran/test/CMakeLists.txt +0 -0
  138. /musica-0.7.0/fortran/test/fetch_content_integration/test_get_micm_version.F90 → /musica-0.7.1/fortran/test/tutorial/demo.f90 +0 -0
  139. {musica-0.7.0 → musica-0.7.1}/fortran/test/unit/tuvx.F90 +0 -0
  140. {musica-0.7.0 → musica-0.7.1}/fortran/test/unit/tuvx_mpi.F90 +0 -0
  141. {musica-0.7.0 → musica-0.7.1}/fortran/test/unit/tuvx_openmp.F90 +0 -0
  142. {musica-0.7.0 → musica-0.7.1}/fortran/test/unit/util.F90 +0 -0
  143. {musica-0.7.0 → musica-0.7.1}/include/musica/component_versions.hpp +0 -0
  144. {musica-0.7.0 → musica-0.7.1}/include/musica/version.hpp +0 -0
  145. {musica-0.7.0 → musica-0.7.1}/pyproject.toml +0 -0
  146. {musica-0.7.0 → musica-0.7.1}/python/CMakeLists.txt +0 -0
  147. {musica-0.7.0 → musica-0.7.1}/python/test/CMakeLists.txt +0 -0
  148. {musica-0.7.0 → musica-0.7.1}/python/test/tuvx.py +0 -0
  149. {musica-0.7.0 → musica-0.7.1}/src/component_versions.cpp +0 -0
  150. {musica-0.7.0 → musica-0.7.1}/src/micm/CMakeLists.txt +0 -0
  151. {musica-0.7.0 → musica-0.7.1}/src/packaging/modulefile.lua.in +0 -0
  152. {musica-0.7.0 → musica-0.7.1}/src/test/CMakeLists.txt +0 -0
  153. {musica-0.7.0 → musica-0.7.1}/src/test/unit/CMakeLists.txt +0 -0
  154. {musica-0.7.0 → musica-0.7.1}/src/test/unit/component_versions.cpp +0 -0
  155. {musica-0.7.0 → musica-0.7.1}/src/test/unit/micm/CMakeLists.txt +0 -0
  156. {musica-0.7.0 → musica-0.7.1}/src/test/unit/micm/micm.cpp +0 -0
  157. {musica-0.7.0 → musica-0.7.1}/src/test/unit/tuvx/CMakeLists.txt +0 -0
  158. {musica-0.7.0 → musica-0.7.1}/src/tuvx/tuvx_util.F90 +0 -0
  159. {musica-0.7.0 → musica-0.7.1}/src/util.cpp +0 -0
  160. {musica-0.7.0 → musica-0.7.1}/src/version.cpp.in +0 -0
  161. {musica-0.7.0 → musica-0.7.1}/valgrind.supp +0 -0
@@ -16,4 +16,4 @@
16
16
  !python/
17
17
  !pyproject.toml
18
18
  !LICENSE
19
- !README.md
19
+ !README.md
@@ -0,0 +1,86 @@
1
+ name: Publish Python Package
2
+
3
+ on:
4
+ workflow_dispatch:
5
+ push:
6
+ # release:
7
+ # types:
8
+ # - published
9
+
10
+ jobs:
11
+ build_sdist:
12
+ name: Build SDist
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ with:
17
+ submodules: true
18
+
19
+ - name: Build SDist
20
+ run: pipx run build --sdist
21
+
22
+ - name: Check metadata
23
+ run: pipx run twine check dist/*
24
+
25
+ - uses: actions/upload-artifact@v4
26
+ with:
27
+ name: cibw-sdist
28
+ path: dist/*.tar.gz
29
+
30
+ build_wheels:
31
+ name: Build wheels on ${{ matrix.os }} with Python ${{ matrix.python-version }}
32
+ runs-on: ${{ matrix.os }}
33
+ strategy:
34
+ fail-fast: false
35
+ matrix:
36
+ os: [ubuntu-latest, windows-latest, macos-latest]
37
+ python-version: ["3.12"]
38
+
39
+ steps:
40
+ - uses: actions/checkout@v4
41
+ with:
42
+ submodules: true
43
+
44
+ - uses: actions/setup-python@v5
45
+ with:
46
+ python-version: ${{ matrix.python-version }}
47
+
48
+ - uses: pypa/cibuildwheel@v2.17
49
+ env:
50
+ CIBW_ARCHS_MACOS: arm64
51
+ CIBW_SKIP: cp27-* cp34-* cp35-* cp36-* *musllinux*
52
+ CIBW_BUILD: cp37-* cp38-* cp39-* cp310-* cp311-* cp312-*
53
+
54
+ - name: Verify clean directory
55
+ run: git diff --exit-code
56
+ shell: bash
57
+
58
+ - name: Upload wheels
59
+ uses: actions/upload-artifact@v4
60
+ with:
61
+ name: cibw-wheels-${{ matrix.os }}-py${{ matrix.python-version }}
62
+ path: wheelhouse/*.whl
63
+
64
+ upload_all:
65
+ name: Upload release
66
+ needs: [build_wheels, build_sdist]
67
+ runs-on: ubuntu-latest
68
+ environment:
69
+ name: pypi
70
+ url: https://pypi.org/p/<your-pypi-project-name>
71
+ permissions:
72
+ id-token: write
73
+
74
+ steps:
75
+ - uses: actions/setup-python@v5
76
+ with:
77
+ python-version: "3.x"
78
+
79
+ - uses: actions/download-artifact@v4
80
+ with:
81
+ pattern: cibw-*
82
+ path: dist
83
+ merge-multiple: true
84
+
85
+ - name: Publish package distributions to PyPI
86
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -55,7 +55,7 @@ jobs:
55
55
  strategy:
56
56
  matrix:
57
57
  gcc_version: [12, 13, 14]
58
- build_type: [Release]
58
+ build_type: [Debug, Release]
59
59
  env:
60
60
  CXX: g++-${{ matrix.gcc_version }}
61
61
  CC: gcc-${{ matrix.gcc_version }}
@@ -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.7.0)
4
+ project(musica-distribution VERSION 0.7.1)
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,6 +30,8 @@ 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")
34
+
33
35
  cmake_dependent_option(
34
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)
35
37
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: musica
3
- Version: 0.7.0
3
+ Version: 0.7.1
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>
@@ -220,6 +220,8 @@ Description-Content-Type: text/markdown
220
220
  [![windows](https://github.com/NCAR/musica/actions/workflows/windows.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/windows.yml)
221
221
  [![pip](https://github.com/NCAR/musica/actions/workflows/pip.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/pip.yml)
222
222
  [![DOI](https://zenodo.org/badge/550370528.svg)](https://zenodo.org/doi/10.5281/zenodo.7458559)
223
+ [![PyPI version](https://badge.fury.io/py/musica.svg)](https://pypi.org/p/musica)
224
+ [![FAIR checklist badge](https://fairsoftwarechecklist.net/badge.svg)](https://fairsoftwarechecklist.net/v0.2?f=31&a=32113&i=22322&r=123)
223
225
 
224
226
  Multi-Scale Infrastructure for Chemistry and Aerosols
225
227
 
@@ -7,6 +7,8 @@
7
7
  [![windows](https://github.com/NCAR/musica/actions/workflows/windows.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/windows.yml)
8
8
  [![pip](https://github.com/NCAR/musica/actions/workflows/pip.yml/badge.svg)](https://github.com/NCAR/musica/actions/workflows/pip.yml)
9
9
  [![DOI](https://zenodo.org/badge/550370528.svg)](https://zenodo.org/doi/10.5281/zenodo.7458559)
10
+ [![PyPI version](https://badge.fury.io/py/musica.svg)](https://pypi.org/p/musica)
11
+ [![FAIR checklist badge](https://fairsoftwarechecklist.net/badge.svg)](https://fairsoftwarechecklist.net/v0.2?f=31&a=32113&i=22322&r=123)
10
12
 
11
13
  Multi-Scale Infrastructure for Chemistry and Aerosols
12
14
 
@@ -60,6 +60,7 @@ if (MUSICA_ENABLE_MICM AND MUSICA_BUILD_C_CXX_INTERFACE)
60
60
  )
61
61
  set(MICM_ENABLE_TESTS OFF)
62
62
  set(MICM_ENABLE_EXAMPLES OFF)
63
+ set(MICM_DEFAULT_VECTOR_MATRIX_SIZE ${MUSICA_SET_MICM_VECTOR_MATRIX_SIZE})
63
64
 
64
65
  FetchContent_MakeAvailable(micm)
65
66
  endif()
@@ -74,7 +75,7 @@ if (MUSICA_ENABLE_TUVX AND MUSICA_BUILD_C_CXX_INTERFACE)
74
75
  set(TUVX_INSTALL_INCLUDE_DIR ${MUSICA_INSTALL_INCLUDE_DIR} CACHE STRING "" FORCE)
75
76
 
76
77
  set_git_default(TUVX_GIT_REPOSITORY https://github.com/NCAR/tuv-x.git)
77
- set_git_default(TUVX_GIT_TAG v0.9.0)
78
+ set_git_default(TUVX_GIT_TAG 80f896a0fb591987c2a79209377bd6f599b4fb6f)
78
79
 
79
80
  FetchContent_Declare(tuvx
80
81
  GIT_REPOSITORY ${TUVX_GIT_REPOSITORY}
@@ -43,7 +43,7 @@ function(create_standard_test_cxx)
43
43
  add_executable(test_${TEST_NAME} ${TEST_SOURCES})
44
44
  target_link_libraries(test_${TEST_NAME} PUBLIC musica::musica GTest::gtest_main)
45
45
  if(MUSICA_ENABLE_OPENMP)
46
- target_link_libraries(test_${TEST_NAME} PUBLIC OpenMP::OpenMP_CXX OpenMP::OpenMP_Fortran)
46
+ target_link_libraries(test_${TEST_NAME} PUBLIC OpenMP::OpenMP_CXX)
47
47
  endif()
48
48
  if(NOT DEFINED TEST_WORKING_DIRECTORY)
49
49
  set(TEST_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}")
@@ -1,6 +1,6 @@
1
1
  FROM fedora:35
2
2
 
3
- ARG BUILD_TYPE=release
3
+ ARG BUILD_TYPE=Release
4
4
 
5
5
  RUN dnf -y update \
6
6
  && dnf -y install \
@@ -50,6 +50,7 @@ RUN cd musica/fortran/test/fetch_content_integration \
50
50
  -D MUSICA_GIT_TAG=${MUSICA_GIT_TAG} \
51
51
  -D MUSICA_ENABLE_MICM=ON \
52
52
  -D MUSICA_ENABLE_TUVX=OFF \
53
+ -D MUSICA_ENABLE_MEMCHECK=ON \
53
54
  && make -j
54
55
 
55
56
  WORKDIR musica/fortran/test/fetch_content_integration/build
@@ -12,6 +12,7 @@ ARG MUSICA_GIT_TAG=main
12
12
  RUN apt update \
13
13
  && apt -y install \
14
14
  cmake \
15
+ cmake-curses-gui \
15
16
  curl \
16
17
  gcc \
17
18
  gfortran \
@@ -50,7 +51,7 @@ COPY . musica
50
51
  RUN cd musica \
51
52
  && cmake -S . \
52
53
  -B build \
53
- -D CMAKE_BUILD_TYPE=Release \
54
+ -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
54
55
  && cd build \
55
56
  && make install -j
56
57
 
@@ -65,8 +66,7 @@ RUN cd musica/fortran/test/fetch_content_integration \
65
66
  -D CMAKE_BUILD_TYPE=Release \
66
67
  -D CMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" \
67
68
  -D MUSICA_GIT_TAG=${MUSICA_GIT_TAG} \
69
+ -D MUSICA_ENABLE_MEMCHECK=ON \
68
70
  && make -j
69
71
 
70
- WORKDIR musica/fortran/test/fetch_content_integration/build
71
- RUN cp -r /musica/build/_deps/tuvx-src/examples/ .
72
- RUN cp -r /musica/build/_deps/tuvx-src/data/ .
72
+ WORKDIR musica/fortran/test/fetch_content_integration/build
@@ -66,6 +66,7 @@ RUN cd musica/fortran/test/fetch_content_integration \
66
66
  -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
67
67
  -D CMAKE_EXE_LINKER_FLAGS="-Wl,--copy-dt-needed-entries" \
68
68
  -D MUSICA_GIT_TAG=${MUSICA_GIT_TAG} \
69
+ -D MUSICA_ENABLE_MEMCHECK=ON \
69
70
  && make -j
70
71
 
71
72
  WORKDIR musica/fortran/test/fetch_content_integration/build
@@ -1,5 +1,7 @@
1
1
  FROM fedora:35
2
2
 
3
+ ARG BUILD_TYPE=Debug
4
+
3
5
  RUN dnf -y update \
4
6
  && dnf -y install \
5
7
  cmake \
@@ -22,7 +24,7 @@ COPY . musica
22
24
  RUN cd musica \
23
25
  && cmake -S . \
24
26
  -B build \
25
- -D CMAKE_BUILD_TYPE=Debug \
27
+ -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
26
28
  -D MUSICA_ENABLE_MEMCHECK=ON \
27
29
  && cd build \
28
30
  && make install -j 8
@@ -1,5 +1,7 @@
1
1
  FROM fedora:35
2
2
 
3
+ ARG BUILD_TYPE=Debug
4
+
3
5
  RUN dnf -y update \
4
6
  && dnf install -y sudo \
5
7
  && adduser test_user \
@@ -38,9 +40,9 @@ RUN sudo chown -R test_user.test_user musica
38
40
  RUN cd musica \
39
41
  && cmake -S . \
40
42
  -B build \
41
- -D CMAKE_BUILD_TYPE=debug \
42
- -D ENABLE_TESTS=ON \
43
- -D ENABLE_MPI=ON \
43
+ -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
44
+ -D MUSICA_ENABLE_TESTS=ON \
45
+ -D MUSICA_ENABLE_MPI=ON \
44
46
  -D CMAKE_Fortran_COMPILER=/usr/lib64/openmpi/bin/mpif90 \
45
47
  -D CMAKE_C_COMPILER=/usr/lib64/openmpi/bin/mpicc \
46
48
  -D CMAKE_CXX_COMPILER=/usr/lib64/openmpi/bin/mpicxx \
@@ -1,5 +1,7 @@
1
1
  FROM fedora:35
2
2
 
3
+ ARG BUILD_TYPE=Debug
4
+
3
5
  RUN dnf -y update \
4
6
  && dnf install -y sudo \
5
7
  && adduser test_user \
@@ -38,10 +40,10 @@ RUN sudo chown -R test_user.test_user musica
38
40
  RUN cd musica \
39
41
  && cmake -S . \
40
42
  -B build \
41
- -D CMAKE_BUILD_TYPE=debug \
42
- -D ENABLE_MPI=ON \
43
- -D ENABLE_OPENMP=ON \
44
- -D ENABLE_TESTS=ON \
43
+ -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
44
+ -D MUSICA_ENABLE_MPI=ON \
45
+ -D MUSICA_ENABLE_OPENMP=ON \
46
+ -D MUSICA_ENABLE_TESTS=ON \
45
47
  -D CMAKE_Fortran_COMPILER=/usr/lib64/openmpi/bin/mpif90 \
46
48
  -D CMAKE_C_COMPILER=/usr/lib64/openmpi/bin/mpicc \
47
49
  -D CMAKE_CXX_COMPILER=/usr/lib64/openmpi/bin/mpicxx \
@@ -1,5 +1,7 @@
1
1
  FROM fedora:35
2
2
 
3
+ ARG BUILD_TYPE=Debug
4
+
3
5
  RUN dnf -y update \
4
6
  && dnf install -y sudo \
5
7
  && adduser test_user \
@@ -37,9 +39,9 @@ RUN sudo chown -R test_user.test_user musica
37
39
  RUN cd musica \
38
40
  && cmake -S . \
39
41
  -B build \
40
- -D CMAKE_BUILD_TYPE=debug \
41
- -D ENABLE_OPENMP:BOOL=TRUE \
42
- -D ENABLE_TESTS=ON \
42
+ -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
43
+ -D MUSICA_ENABLE_OPENMP=ON \
44
+ -D MUSICA_ENABLE_TESTS=ON \
43
45
  -D CMAKE_Fortran_COMPILER=/usr/lib64/openmpi/bin/mpif90 \
44
46
  -D CMAKE_C_COMPILER=/usr/lib64/openmpi/bin/mpicc \
45
47
  -D CMAKE_CXX_COMPILER=/usr/lib64/openmpi/bin/mpic++ \
@@ -1,5 +1,7 @@
1
1
  FROM fedora:latest
2
2
 
3
+ ARG BUILD_TYPE=Release
4
+
3
5
  RUN dnf -y update \
4
6
  && dnf -y install \
5
7
  cmake \
@@ -45,7 +47,7 @@ RUN pip install -r requirements.txt
45
47
  RUN cd musica \
46
48
  && cmake -S . \
47
49
  -B build \
48
- -D CMAKE_BUILD_TYPE=Release \
50
+ -D CMAKE_BUILD_TYPE=${BUILD_TYPE} \
49
51
  -D MUSICA_ENABLE_PYTHON_LIBRARY=ON \
50
52
  -D MUSICA_ENABLE_TUVX=OFF \
51
53
  && cd build \
@@ -0,0 +1,40 @@
1
+ Chapter 0
2
+ =========
3
+
4
+ The MUSICA CMake Package
5
+ ------------------------
6
+
7
+ The MUSICA library installs with `CMake` ``musica`` and ``musica_fortran``
8
+ packages to facilitate linking
9
+ to higher level libraries and host models that have CMake build systems.
10
+
11
+ A minimal ``CMakeLists.txt`` file designed to link the ``musica_fortran`` library
12
+ to a Fortran program ``demo_f.f90`` is exhibited below
13
+
14
+ .. literalinclude:: ../../../fortran/test/tutorial/CMakeLists.txt
15
+ :language: cmake
16
+
17
+ These `CMake` directives are essentially equivalent to compilation on the command line via
18
+
19
+ .. code-block:: bash
20
+
21
+ gfortran -o demo_f demo_f.f90 -I<MUSICA_DIR>/include -L<MUSICA_DIR>/lib -lmusica-fortran -lmusica -lstdc++
22
+
23
+ ``<MUSICA_DIR>`` is the full path of the MUSICA installation directory,
24
+ specified by the option ``CMAKE_INSTALL_PREFIX``
25
+ during the `cmake` configuration process.
26
+
27
+ Common practice is to create a ``build`` subdir (relative to the top level ``CMakeLists.txt`` file, say).
28
+
29
+ .. code-block:: bash
30
+
31
+ mkdir build
32
+ cd build
33
+
34
+ The ``cmake`` could then be invoked with:
35
+
36
+ .. code-block:: bash
37
+
38
+ cmake -DMUSICA_INSTALL_DIR <MUSICA_DIR> ..
39
+ cmake --build .
40
+
@@ -0,0 +1,65 @@
1
+ Chapter 2
2
+ =========
3
+
4
+ An MICM Box Model Fortran Example
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 MICM configuration is specified in a top-level ``config.json`` file,
12
+ which simply lists the chemical species configuration file followed by
13
+ the reactions configuration file.
14
+
15
+ .. literalinclude:: ../../../configs/analytical/config.json
16
+ :language: json
17
+
18
+ For this example, we will have a system of three chemical species
19
+ `A`, `B`, and `C`, defined in the JSON file ``species.json`` as follows:
20
+
21
+ .. literalinclude:: ../../../configs/analytical/species.json
22
+ :language: json
23
+
24
+ The ``reactions.json`` specifies a mechanism, or a set of reactions for the system.
25
+ Here, we will introduce two Arrhenius type reactions, the first
26
+ with `B` evolving to `C`, and specifying all five reaction parameters,
27
+ and the second reaction with `A` evolving to `B` and using only two reaction parameters.
28
+ The mechanism configuration might then be set up as:
29
+
30
+ .. literalinclude:: ../../../configs/analytical/reactions.json
31
+ :language: json
32
+
33
+ More information on MICM configurations and reactions can be found in the MICM documentation
34
+ at `https://ncar.github.io/micm/user_guide/`_
35
+
36
+ The Fortran example code is shown below in full:
37
+
38
+ .. literalinclude:: ../../../fortran/test/fetch_content_integration/test_micm_box_model.F90
39
+ :language: f90
40
+
41
+ From the ``musica_util`` module we need the Fortran types
42
+ ``error_t``, ``string_t``, and ``mapping_t``.
43
+ A pointer to a ``musica_micm::micm_t`` will serve as the interface to the MICM solver
44
+ (in the example the pointer name is ``micm``).
45
+ Note that the ``config_path`` in the code sample has been set to ``configs/analytical``,
46
+ so that subdir should be created relative to the main program and contain
47
+ the MICM JSON configuration files,
48
+ or otherwise the ``config_path`` should be modified appropriately.
49
+ The initial species concentrations are initialized in the ``concentrations`` array,
50
+ which is an argument to the MICM solver.
51
+
52
+ Finally, a single time step solution is obtained through a call to ``micm%solve``,
53
+ after which the updated concentrations may be displayed.
54
+
55
+ .. code-block:: bash
56
+
57
+ $ ./test_micm_box_model
58
+ Creating MICM solver...
59
+ Species Name:A, Index: 1
60
+ Species Name:B, Index: 2
61
+ Species Name:C, Index: 3
62
+ Solving starts...
63
+ After solving, concentrations 0.38 1.61E-009 2.62
64
+ $
65
+
@@ -6,4 +6,6 @@ Tutorial
6
6
  :maxdepth: 1
7
7
  :caption: Contents:
8
8
 
9
+ chapter0.rst
9
10
  chapter1.rst
11
+ chapter2.rst
@@ -63,10 +63,7 @@ if (MUSICA_ENABLE_MICM)
63
63
  )
64
64
  endif()
65
65
  if (MUSICA_ENABLE_TUVX)
66
- target_sources(musica-fortran
67
- PRIVATE
68
- tuvx.F90
69
- )
66
+ add_subdirectory(tuvx)
70
67
  endif()
71
68
 
72
69
  # Add flags for gfortran