From 3417f1e14466431c3cf7779f4f86e931cfd3dbd0 Mon Sep 17 00:00:00 2001 From: Jiwon Gim Date: Thu, 14 Mar 2024 15:45:11 -0600 Subject: [PATCH 1/2] removed test code for debugging and formatted spacing --- fortran/micm_core.F90 | 24 +++++++++---------- .../fetch_content_integration/CMakeLists.txt | 2 +- .../test_micm_fort_api.F90 | 8 ------- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/fortran/micm_core.F90 b/fortran/micm_core.F90 index 27b2f564..80d3cc18 100644 --- a/fortran/micm_core.F90 +++ b/fortran/micm_core.F90 @@ -10,8 +10,8 @@ module micm_core function create_micm_c(config_path, error_code) bind(C, name="create_micm") import c_ptr, c_int, c_char character(kind=c_char), intent(in) :: config_path(*) - integer(kind=c_int), intent(out) :: error_code - type(c_ptr) :: create_micm_c + integer(kind=c_int), intent(out) :: error_code + type(c_ptr) :: create_micm_c end function create_micm_c subroutine delete_micm_c(micm) bind(C, name="delete_micm") @@ -21,12 +21,12 @@ end subroutine delete_micm_c subroutine micm_solve_c(micm, time_step, temperature, pressure, num_concentrations, concentrations) bind(C, name="micm_solve") import c_ptr, c_double, c_int - type(c_ptr), value, intent(in) :: micm + type(c_ptr), value, intent(in) :: micm real(kind=c_double), value, intent(in) :: time_step real(kind=c_double), value, intent(in) :: temperature real(kind=c_double), value, intent(in) :: pressure integer(kind=c_int), value, intent(in) :: num_concentrations - real(kind=c_double), intent(inout) :: concentrations(num_concentrations) + real(kind=c_double), intent(inout) :: concentrations(num_concentrations) end subroutine micm_solve_c end interface @@ -47,7 +47,7 @@ end subroutine micm_solve_c contains function constructor(config_path, errcode) result( this ) - type(micm_t), pointer :: this + type(micm_t), pointer :: this character(len=*), intent(in) :: config_path integer, intent(out) :: errcode character(len=1, kind=c_char) :: c_config_path(len_trim(config_path)+1) @@ -69,17 +69,17 @@ function constructor(config_path, errcode) result( this ) end function constructor subroutine solve(this, time_step, temperature, pressure, num_concentrations, concentrations) - class(micm_t) :: this - real(c_double), intent(in) :: time_step - real(c_double), intent(in) :: temperature - real(c_double), intent(in) :: pressure - integer(c_int), intent(in) :: num_concentrations - real(c_double), intent(inout) :: concentrations(*) + class(micm_t) :: this + real(c_double), intent(in) :: time_step + real(c_double), intent(in) :: temperature + real(c_double), intent(in) :: pressure + integer(c_int), intent(in) :: num_concentrations + real(c_double), intent(inout) :: concentrations(*) call micm_solve_c(this%ptr, time_step, temperature, pressure, num_concentrations, concentrations) end subroutine solve subroutine finalize(this) - type(micm_t), intent(inout) :: this + type(micm_t), intent(inout) :: this call delete_micm_c(this%ptr) end subroutine finalize diff --git a/fortran/test/fetch_content_integration/CMakeLists.txt b/fortran/test/fetch_content_integration/CMakeLists.txt index f85e8e06..8ca09407 100644 --- a/fortran/test/fetch_content_integration/CMakeLists.txt +++ b/fortran/test/fetch_content_integration/CMakeLists.txt @@ -11,7 +11,7 @@ include(FetchContent) FetchContent_Declare(musica-fortran GIT_REPOSITORY https://github.com/NCAR/musica.git - GIT_TAG reorganize + GIT_TAG main ) set(MUSICA_BUILD_C_CXX_INTERFACE OFF) diff --git a/fortran/test/fetch_content_integration/test_micm_fort_api.F90 b/fortran/test/fetch_content_integration/test_micm_fort_api.F90 index d8cf8fe9..2dc1cf89 100644 --- a/fortran/test/fetch_content_integration/test_micm_fort_api.F90 +++ b/fortran/test/fetch_content_integration/test_micm_fort_api.F90 @@ -35,14 +35,6 @@ program test_micm_fort_api write(*,*) "[test micm fort api] After solving, concentrations", concentrations - call micm%solve(time_step, temperature, pressure, num_concentrations, concentrations) - - write(*,*) "[test micm fort api] After solving, concentrations222", concentrations - - call micm%solve(time_step, temperature, pressure, num_concentrations, concentrations) - - write(*,*) "[test micm fort api] After solving, concentrations333", concentrations - write(*,*) "[test micm fort api] Finished." end program From 82cf0aa2c401457ee8fec3b19bfec41c568849cd Mon Sep 17 00:00:00 2001 From: Kyle Shores Date: Mon, 18 Mar 2024 17:15:59 -0500 Subject: [PATCH 2/2] adding citation file (#71) * adding citation file * making tests pass --- CITATION.cff | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 00000000..76eee6b3 --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,66 @@ +cff-version: 1.2.0 +message: "This Citation File Format (CFF) record describes a software paper." +authors: + - family-names: Pfister + given-names: Gabriele G. + - family-names: Eastham + given-names: Sebastian D. + - family-names: Arellano + given-names: Avelino F. + - family-names: Aumont + given-names: Bernard + - family-names: Barsanti + given-names: Kelley C. + - family-names: Barth + given-names: Mary C. + - family-names: Conley + given-names: Andrew + - family-names: Davis + given-names: Nicholas A. + - family-names: Emmons + given-names: Louisa K. + - family-names: Fast + given-names: Jerome D. + - family-names: Fiore + given-names: Arlene M. + - family-names: Gaubert + given-names: Benjamin + - family-names: Goldhaber + given-names: Steve + - family-names: Granier + given-names: Claire + - family-names: Grell + given-names: Georg A. + - family-names: Guevara + given-names: Marc + - family-names: Henze + given-names: Daven K. + - family-names: Hodzic + given-names: Alma + - family-names: Liu + given-names: Xiaohong + - family-names: Marsh + given-names: Daniel R. + - family-names: Orlando + given-names: John J. + - family-names: Plane + given-names: John M. C. + - family-names: Polvani + given-names: Lorenzo M. + - family-names: Rosenlof + given-names: Karen H. + - family-names: Steiner + given-names: Allison L. + - family-names: Jacob + given-names: Daniel J. + - family-names: Brasseur + given-names: Guy P. +title: "The Multi-Scale Infrastructure for Chemistry and Aerosols (MUSICA)" +journal: "Bulletin of the American Meteorological Society" +year: 2020 +publisher: "American Meteorological Society" +volume: 101 +number: 10 +page: "E1743 - E1760" +doi: "10.1175/BAMS-D-19-0331.1" +url: "https://journals.ametsoc.org/view/journals/bams/101/10/bamsD190331.xml"