Skip to content

Commit

Permalink
Merge metadata check from branch '120-test-metadata' into develop-94-…
Browse files Browse the repository at this point in the history
…tuvx-height-grid
  • Loading branch information
mattldawson committed Oct 10, 2024
2 parents 45ef3b6 + 99d6dea commit aafd074
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
6 changes: 5 additions & 1 deletion schemes/musica/musica_ccpp.meta
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,11 @@
dimensions = (horizontal_loop_extent,vertical_layer_dimension,number_of_ccpp_constituents)
intent = inout
[ height ]
standard_name =
standard_name = ccpp_height
units = km
type = real | kind = kind_phys
dimensions = (horizontal_loop_extent,vertical_layer_dimension)
intent = in
[ errmsg ]
standard_name = ccpp_error_message
units = none
Expand Down
2 changes: 2 additions & 0 deletions test/docker/Dockerfile.musica
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,13 @@ RUN cd musica \
COPY . atmospheric_physics
RUN sudo chown -R test_user:test_user atmospheric_physics

# Must make ccpp-framework available before building test
RUN cd atmospheric_physics/test \
&& mkdir lib \
&& cd lib \
&& git clone -b add_const_interface --depth 1 https://github.com/peverwhee/ccpp-framework.git
ENV CCPP_SRC_PATH="lib/ccpp-framework/src"
ENV CCPP_FORTRAN_TOOLS_PATH="lib/ccpp-framework/scripts/fortran_tools"

RUN cd atmospheric_physics/test \
&& cmake -S . \
Expand Down
2 changes: 2 additions & 0 deletions test/docker/Dockerfile.musica.no_install
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ ENV MUSICA_GIT_TAG=${MUSICA_GIT_TAG}
COPY . atmospheric_physics
RUN sudo chown -R test_user:test_user atmospheric_physics

# Must make ccpp-framework available before building test
RUN cd atmospheric_physics/test \
&& mkdir lib \
&& cd lib \
&& git clone -b add_const_interface --depth 1 https://github.com/peverwhee/ccpp-framework.git
ENV CCPP_SRC_PATH="lib/ccpp-framework/src"
ENV CCPP_FORTRAN_TOOLS_PATH="lib/ccpp-framework/scripts/fortran_tools"

RUN cd atmospheric_physics/test \
&& cmake -S . \
Expand Down
17 changes: 17 additions & 0 deletions test/musica/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,20 @@ add_custom_target(

add_subdirectory(micm)
add_subdirectory(tuvx)

# Test metdadata
find_package(Python REQUIRED)

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/metadata_test)
add_custom_target(
copy_metadata_test_files ALL ${CMAKE_COMMAND} -E copy
${CMAKE_CURRENT_SOURCE_DIR}/../../musica/musica_ccpp.meta
${CMAKE_CURRENT_SOURCE_DIR}/../../musica/musica_ccpp.F90
${CMAKE_BINARY_DIR}/metadata_test
)

add_test(
NAME test_metadata
COMMAND ${Python_EXECUTABLE} ${CMAKE_BINARY_DIR}/../$ENV{CCPP_FORTRAN_TOOLS_PATH}/offline_check_fortran_vs_metadata.py
--directory ${CMAKE_BINARY_DIR}/metadata_test
)

0 comments on commit aafd074

Please sign in to comment.