musica 0.8.0__tar.gz → 0.8.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.
- {musica-0.8.0 → musica-0.8.1}/CMakeLists.txt +1 -1
- {musica-0.8.0 → musica-0.8.1}/PKG-INFO +1 -1
- {musica-0.8.0 → musica-0.8.1}/cmake/dependencies.cmake +1 -1
- musica-0.8.1/configs/analytical/reactions.json +71 -0
- musica-0.8.1/configs/analytical/species.json +28 -0
- musica-0.8.1/configs/chapman/config.json +6 -0
- musica-0.8.1/docs/source/tutorial/chapter0.rst +86 -0
- musica-0.8.1/docs/source/tutorial/chapter1.rst +75 -0
- musica-0.8.1/docs/source/tutorial/chapter2.rst +86 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/micm.F90 +0 -14
- {musica-0.8.0 → musica-0.8.1}/fortran/test/fetch_content_integration/test_get_micm_version.F90 +4 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/fetch_content_integration/test_micm_api.F90 +0 -1
- {musica-0.8.0 → musica-0.8.1}/fortran/test/tutorial/CMakeLists.txt +3 -7
- musica-0.8.0/fortran/test/tutorial/demo.f90 → musica-0.8.1/fortran/test/tutorial/demo.F90 +4 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/unit/CMakeLists.txt +1 -1
- musica-0.8.1/fortran/test/unit/tuvx.F90 +267 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/tuvx.F90 +44 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/micm.hpp +8 -62
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/grid_map.hpp +2 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/profile_map.hpp +2 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/radiator_map.hpp +2 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/tuvx.hpp +37 -1
- {musica-0.8.0 → musica-0.8.1}/pyproject.toml +1 -0
- {musica-0.8.0 → musica-0.8.1}/python/wrapper.cpp +18 -18
- {musica-0.8.0 → musica-0.8.1}/src/micm/micm.cpp +26 -16
- musica-0.8.1/src/test/data/tuvx/fixed/O2_cross_section.nc +0 -0
- musica-0.8.1/src/test/data/tuvx/fixed/O2_parameters.txt +44 -0
- musica-0.8.1/src/test/data/tuvx/fixed/bar_cross_section.nc +0 -0
- musica-0.8.1/src/test/data/tuvx/fixed/config.json +149 -0
- musica-0.8.1/src/test/data/tuvx/fixed/foo_cross_section.nc +0 -0
- musica-0.8.1/src/test/data/tuvx/fixed/stand_alone_tuvx_config.json +175 -0
- musica-0.8.1/src/test/data/tuvx/from_host/O2_cross_section.nc +0 -0
- musica-0.8.1/src/test/data/tuvx/from_host/O2_parameters.txt +44 -0
- musica-0.8.1/src/test/data/tuvx/from_host/bar_cross_section.nc +0 -0
- musica-0.8.1/src/test/data/tuvx/from_host/config.json +127 -0
- musica-0.8.1/src/test/data/tuvx/from_host/foo_cross_section.nc +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/micm/micm_c_api.cpp +0 -1
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/tuvx/CMakeLists.txt +1 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/tuvx/tuvx_c_api.cpp +45 -0
- musica-0.8.1/src/test/unit/tuvx/tuvx_run_from_config.cpp +278 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface.F90 +58 -8
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface_grid.F90 +1 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface_profile.F90 +2 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/tuvx.cpp +45 -1
- musica-0.8.1/valgrind.supp +15 -0
- musica-0.8.0/configs/analytical/config.json +0 -1
- musica-0.8.0/configs/analytical/reactions.json +0 -34
- musica-0.8.0/configs/analytical/species.json +0 -23
- musica-0.8.0/docs/source/tutorial/chapter0.rst +0 -40
- musica-0.8.0/docs/source/tutorial/chapter1.rst +0 -43
- musica-0.8.0/docs/source/tutorial/chapter2.rst +0 -65
- musica-0.8.0/fortran/test/unit/tuvx.F90 +0 -46
- musica-0.8.0/valgrind.supp +0 -23
- {musica-0.8.0 → musica-0.8.1}/.clang-format +0 -0
- {musica-0.8.0 → musica-0.8.1}/.clang-tidy +0 -0
- {musica-0.8.0 → musica-0.8.1}/.dockerignore +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/clang_format.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/clang_tidy.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/docker.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/fetch_content_integration.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/gh_pages.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/mac.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/pep8.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/pip.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/release.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/ubuntu.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.github/workflows/windows.yml +0 -0
- {musica-0.8.0 → musica-0.8.1}/.gitignore +0 -0
- {musica-0.8.0 → musica-0.8.1}/CITATION.cff +0 -0
- {musica-0.8.0 → musica-0.8.1}/LICENSE +0 -0
- {musica-0.8.0 → musica-0.8.1}/README.md +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/FindSphinx.cmake +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/SetDefaults.cmake +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/cmake_uninstall.cmake.in +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/musica.settings.in +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/musicaConfig.cmake.in +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/summary.cmake +0 -0
- {musica-0.8.0 → musica-0.8.1}/cmake/test_util.cmake +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/TS1/config.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/TS1/initial_conditions.csv +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/TS1/reactions.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/TS1/species.json +0 -0
- {musica-0.8.0/configs/chapman → musica-0.8.1/configs/analytical}/config.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/carbon_bond_5/config.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/carbon_bond_5/initial_conditions.csv +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/carbon_bond_5/reactions.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/carbon_bond_5/species.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/chapman/initial_conditions.csv +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/chapman/reactions.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/chapman/species.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/robertson/config.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/robertson/initial_conditions.csv +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/robertson/reactions.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/configs/robertson/species.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.docs +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.fortran-gcc +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.fortran-gcc.integration +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.fortran-intel +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.fortran-nvhpc +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.memcheck +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.mpi +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.mpi_openmp +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.openmp +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.pip +0 -0
- {musica-0.8.0 → musica-0.8.1}/docker/Dockerfile.python +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/Makefile +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/Software Development Plan.pdf +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/make.bat +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/requirements.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/_static/custom.css +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/_static/favicon/favicon.ico +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/_static/index_api.svg +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/_static/index_contribute.svg +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/_static/index_getting_started.svg +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/_static/index_user_guide.svg +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/api/index.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/conf.py +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/contributing/index.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/getting_started/getting_started.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/getting_started/installation.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/getting_started/overview.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/index.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/references.bib +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/tutorial/tutorial.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/user_guide/fortran_c.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/user_guide/model_interface.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/docs/source/user_guide/user_guide.rst +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/packaging/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/fetch_content_integration/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/fetch_content_integration/test_micm_box_model.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/fetch_content_integration/test_tuvx_api.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/unit/tuvx_mpi.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/unit/tuvx_openmp.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/test/unit/util.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/grid.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/grid_map.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/profile.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/profile_map.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/radiator.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/tuvx/radiator_map.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/fortran/util.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/component_versions.hpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/grid.hpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/profile.hpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/tuvx/radiator.hpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/util.hpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/include/musica/version.hpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/python/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/python/test/test_analytical.py +0 -0
- {musica-0.8.0 → musica-0.8.1}/python/test/test_chapman.py +0 -0
- {musica-0.8.0 → musica-0.8.1}/python/test/tuvx.py +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/component_versions.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/micm/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/packaging/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/packaging/modulefile.lua.in +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/data/util_index_mapping_from_file.json +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/component_versions.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/micm/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/micm/micm.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/test/unit/util.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/CMakeLists.txt +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/grid.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/grid_map.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface_grid_map.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface_profile_map.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface_radiator.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/interface_radiator_map.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/profile.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/profile_map.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/radiator.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/radiator_map.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/tuvx/tuvx_util.F90 +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/util.cpp +0 -0
- {musica-0.8.0 → musica-0.8.1}/src/version.cpp.in +0 -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.
|
|
4
|
+
project(musica-distribution VERSION 0.8.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)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: musica
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.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>
|
|
@@ -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
|
|
65
|
+
set_git_default(MICM_GIT_TAG b3c462a)
|
|
66
66
|
|
|
67
67
|
FetchContent_Declare(micm
|
|
68
68
|
GIT_REPOSITORY ${MICM_GIT_REPOSITORY}
|
|
@@ -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,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
|
+
|
|
@@ -22,7 +22,6 @@ module musica_micm
|
|
|
22
22
|
integer(c_int64_t) :: rejected_ = 0_c_int64_t
|
|
23
23
|
integer(c_int64_t) :: decompositions_ = 0_c_int64_t
|
|
24
24
|
integer(c_int64_t) :: solves_ = 0_c_int64_t
|
|
25
|
-
integer(c_int64_t) :: singular_ = 0_c_int64_t
|
|
26
25
|
real(c_double) :: final_time_ = 0._c_double
|
|
27
26
|
end type solver_stats_t_c
|
|
28
27
|
|
|
@@ -162,7 +161,6 @@ module musica_micm
|
|
|
162
161
|
integer(int64) :: rejected_
|
|
163
162
|
integer(int64) :: decompositions_
|
|
164
163
|
integer(int64) :: solves_
|
|
165
|
-
integer(int64) :: singular_
|
|
166
164
|
real :: final_time_
|
|
167
165
|
contains
|
|
168
166
|
procedure :: function_calls => solver_stats_t_function_calls
|
|
@@ -172,7 +170,6 @@ module musica_micm
|
|
|
172
170
|
procedure :: rejected => solver_stats_t_rejected
|
|
173
171
|
procedure :: decompositions => solver_stats_t_decompositions
|
|
174
172
|
procedure :: solves => solver_stats_t_solves
|
|
175
|
-
procedure :: singular => solver_stats_t_singular
|
|
176
173
|
procedure :: final_time => solver_stats_t_final_time
|
|
177
174
|
end type solver_stats_t
|
|
178
175
|
|
|
@@ -286,7 +283,6 @@ contains
|
|
|
286
283
|
new_solver_stats%rejected_ = c_solver_stats%rejected_
|
|
287
284
|
new_solver_stats%decompositions_ = c_solver_stats%decompositions_
|
|
288
285
|
new_solver_stats%solves_ = c_solver_stats%solves_
|
|
289
|
-
new_solver_stats%singular_ = c_solver_stats%singular_
|
|
290
286
|
new_solver_stats%final_time_ = real( c_solver_stats%final_time_ )
|
|
291
287
|
|
|
292
288
|
end function solver_stats_t_constructor
|
|
@@ -361,16 +357,6 @@ contains
|
|
|
361
357
|
|
|
362
358
|
end function solver_stats_t_solves
|
|
363
359
|
|
|
364
|
-
!> Get the number of times a singular matrix is detected
|
|
365
|
-
function solver_stats_t_singular( this ) result( singular )
|
|
366
|
-
use iso_fortran_env, only: int64
|
|
367
|
-
class(solver_stats_t), intent(in) :: this
|
|
368
|
-
integer(int64) :: singular
|
|
369
|
-
|
|
370
|
-
singular = this%function_calls_
|
|
371
|
-
|
|
372
|
-
end function solver_stats_t_singular
|
|
373
|
-
|
|
374
360
|
!> Get the final time the solver iterated to
|
|
375
361
|
function solver_stats_t_final_time( this ) result( final_time )
|
|
376
362
|
class(solver_stats_t), intent(in) :: this
|
{musica-0.8.0 → musica-0.8.1}/fortran/test/fetch_content_integration/test_get_micm_version.F90
RENAMED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
program demo
|
|
2
|
+
|
|
2
3
|
use musica_util, only: string_t
|
|
3
4
|
use musica_micm, only: get_micm_version
|
|
4
5
|
implicit none
|
|
6
|
+
|
|
5
7
|
type(string_t) :: micm_version
|
|
8
|
+
|
|
6
9
|
micm_version = get_micm_version()
|
|
7
10
|
print *, "MICM version ", micm_version%get_char_array()
|
|
11
|
+
|
|
8
12
|
end program demo
|
|
@@ -135,7 +135,6 @@ contains
|
|
|
135
135
|
write(*,*) "[test micm fort api] Rejected: ", solver_stats%rejected()
|
|
136
136
|
write(*,*) "[test micm fort api] Decompositions: ", solver_stats%decompositions()
|
|
137
137
|
write(*,*) "[test micm fort api] Solves: ", solver_stats%solves()
|
|
138
|
-
write(*,*) "[test micm fort api] Singular: ", solver_stats%singular()
|
|
139
138
|
write(*,*) "[test micm fort api] Final time: ", solver_stats%final_time()
|
|
140
139
|
|
|
141
140
|
string_value = micm%get_species_property_string( "O3", "__long name", error )
|
|
@@ -6,18 +6,14 @@ project(
|
|
|
6
6
|
LANGUAGES CXX C Fortran
|
|
7
7
|
)
|
|
8
8
|
|
|
9
|
-
# mkdir build
|
|
10
|
-
# cd build
|
|
11
|
-
# cmake -DMUSICA_INSTALL_DIR=<musica_install_dir> ..
|
|
12
|
-
|
|
13
9
|
set(MUSICA_INCLUDE_DIR "${MUSICA_INSTALL_DIR}/include")
|
|
14
|
-
set(MUSICA_LIB_DIR "${MUSICA_INSTALL_DIR}/
|
|
10
|
+
set(MUSICA_LIB_DIR "${MUSICA_INSTALL_DIR}/lib64")
|
|
15
11
|
|
|
16
12
|
message(STATUS "${MUSICA_INCLUDE_DIR}")
|
|
17
13
|
message(STATUS "${MUSICA_LIB_DIR}")
|
|
18
14
|
|
|
19
|
-
add_executable(demo_f demo.
|
|
15
|
+
add_executable(demo_f demo.F90)
|
|
20
16
|
|
|
21
17
|
target_include_directories(demo_f PUBLIC ${MUSICA_INCLUDE_DIR})
|
|
22
18
|
target_link_directories(demo_f PUBLIC ${MUSICA_LIB_DIR})
|
|
23
|
-
target_link_libraries(demo_f musica-fortran musica stdc++)
|
|
19
|
+
target_link_libraries(demo_f musica-fortran musica stdc++ yaml-cpp)
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
program demo
|
|
2
|
+
|
|
2
3
|
use musica_util, only: string_t
|
|
3
4
|
use musica_micm, only: get_micm_version
|
|
4
5
|
implicit none
|
|
6
|
+
|
|
5
7
|
type(string_t) :: micm_version
|
|
8
|
+
|
|
6
9
|
micm_version = get_micm_version()
|
|
7
10
|
print *, "MICM version ", micm_version%get_char_array()
|
|
11
|
+
|
|
8
12
|
end program demo
|
|
@@ -4,7 +4,7 @@ if (MUSICA_ENABLE_MICM)
|
|
|
4
4
|
create_standard_test_fortran(NAME micm_fortran_api SOURCES ../fetch_content_integration/test_micm_api.F90)
|
|
5
5
|
create_standard_test_fortran(NAME get_micm_version SOURCES ../fetch_content_integration/test_get_micm_version.F90)
|
|
6
6
|
create_standard_test_fortran(NAME micm_box_model SOURCES ../fetch_content_integration/test_micm_box_model.F90)
|
|
7
|
-
create_standard_test_fortran(NAME demo_fortran SOURCES ../tutorial/demo.
|
|
7
|
+
create_standard_test_fortran(NAME demo_fortran SOURCES ../tutorial/demo.F90)
|
|
8
8
|
endif()
|
|
9
9
|
|
|
10
10
|
if (MUSICA_ENABLE_TUVX)
|