Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/eamxx/docs/developer/io.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Input-Output

In EAMxx, I/O is handled through the SCORPIO library, currently a submodule of
E3SM. The `scream_io` library within eamxx allows to interface the EAMxx
E3SM. The `eamxx_io` library within eamxx allows to interface the EAMxx
infrastructure classes with the SCORPIO library.
1 change: 0 additions & 1 deletion components/eamxx/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ add_subdirectory(share)

add_subdirectory(dynamics)
add_subdirectory(physics)
add_subdirectory(diagnostics)
add_subdirectory(control)
if (PROJECT_NAME STREQUAL "E3SM")
add_subdirectory(mct_coupling)
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ set(SCREAM_CONTROL_HEADERS
)

add_library(scream_control ${SCREAM_CONTROL_SOURCES})
target_link_libraries(scream_control PUBLIC scream_share scream_io ekat::YamlParser)
target_link_libraries(scream_control PUBLIC scream_share eamxx_io ekat::YamlParser)

if (Kokkos_ENABLE_CUDA)
# This is to silence some nvcc warning that is a CUDA compiler bug
Expand Down
94 changes: 0 additions & 94 deletions components/eamxx/src/diagnostics/tests/CMakeLists.txt

This file was deleted.

2 changes: 1 addition & 1 deletion components/eamxx/src/dynamics/homme/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ macro (CreateDynamicsLib HOMME_TARGET NP PLEV QSIZE)
set (dynLibName scream_${hommeLibName})
add_library(${dynLibName} ${SCREAM_DYNAMICS_SOURCES})
target_compile_definitions(${dynLibName} PUBLIC EAMXX_HAS_HOMME)
target_link_libraries(${dynLibName} PUBLIC scream_share scream_io ${hommeLibName})
target_link_libraries(${dynLibName} PUBLIC scream_share eamxx_io ${hommeLibName})
get_target_property(modulesDir ${hommeLibName} Fortran_MODULE_DIRECTORY)
set_target_properties(${dynLibName} PROPERTIES Fortran_MODULE_DIRECTORY ${modulesDir})
target_include_directories(${dynLibName} PUBLIC ${modulesDir})
Expand Down
2 changes: 1 addition & 1 deletion components/eamxx/src/dynamics/homme/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if (NOT SCREAM_ONLY_GENERATE_BASELINES)
# Test I/O on dyn grid
CreateUnitTest(dyn_grid_io
"dyn_grid_io.cpp;test_helper_mod.F90"
LIBS scream_io ${dynLibName}
LIBS eamxx_io ${dynLibName}
MPI_RANKS 1 ${SCREAM_TEST_MAX_RANKS}
LABELS dynamics io)
endif()
3 changes: 1 addition & 2 deletions components/eamxx/src/mct_coupling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,8 @@ set (SCREAM_LIBS
spa
iop_forcing
nudging
diagnostics
tms
)
)

# ZM is not always on yet
if (TARGET zm)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

#include "dynamics/register_dynamics.hpp"
#include "physics/register_physics.hpp"
#include "diagnostics/register_diagnostics.hpp"
#include "share/diagnostics/register_diagnostics.hpp"
#include "control/register_surface_coupling.hpp"

#include "mct_coupling/ScreamContext.hpp"
Expand Down
3 changes: 2 additions & 1 deletion components/eamxx/src/physics/gw/impl/gw_gw_ediff_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define GW_GW_EDIFF_IMPL_HPP

#include "gw_functions.hpp" // for ETI only but harmless for GPU
#include "util/eamxx_utils.hpp"
#include "share/util/eamxx_utils.hpp"

#include <ekat_math_utils.hpp>
#include <ekat_subview_utils.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define GW_GW_STORM_SPEED_IMPL_HPP

#include "gw_functions.hpp" // for ETI only but harmless for GPU
#include "util/eamxx_utils.hpp"
#include "share/util/eamxx_utils.hpp"

namespace scream {
namespace gw {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
#define GW_GWD_COMPUTE_STRESS_PROFILES_AND_DIFFUSIVITIES_IMPL_HPP

#include "gw_functions.hpp" // for ETI only but harmless for GPU
#include "util/eamxx_utils.hpp"
#include "share/util/eamxx_utils.hpp"

#include <ekat_math_utils.hpp>

namespace scream {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@
#define GW_GWD_COMPUTE_TENDENCIES_FROM_STRESS_DIVERGENCE_IMPL_HPP

#include "gw_functions.hpp" // for ETI only but harmless for GPU
#include "util/eamxx_utils.hpp"
#include <cmath>
#include "share/util/eamxx_utils.hpp"

#include <ekat_math_utils.hpp>
#include <cmath>

namespace scream {
namespace gw {
Expand Down
6 changes: 3 additions & 3 deletions components/eamxx/src/physics/nudging/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ if (NOT SCREAM_ONLY_GENERATE_BASELINES)
include(ScreamUtils)

CreateUnitTest (nudging_data "create_nudging_data.cpp"
LIBS scream_io
LIBS eamxx_io
FIXTURES_SETUP nudging_data
)
CreateUnitTest (nudging_map_files "create_map_file.cpp"
LIBS scream_io
LIBS eamxx_io
FIXTURES_SETUP nudging_map_files
)
CreateUnitTest(nudging_tests "nudging_tests.cpp"
LIBS nudging scream_io
LIBS nudging eamxx_io
MPI_RANKS 1 ${SCREAM_TEST_MAX_RANKS}
LABELS physics nudging
FIXTURES_REQUIRED "nudging_map_files;nudging_data"
Expand Down
4 changes: 2 additions & 2 deletions components/eamxx/src/python/libpyeamxx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ nanobind_add_module(pyeamxx_ext pyeamxx_ext.cpp)
target_link_libraries(pyeamxx_ext PUBLIC
mpi4py
scream_share
scream_io
diagnostics
eamxx_io
eamxx_diagnostics
eamxx_physics
eamxx_test_support
)
33 changes: 11 additions & 22 deletions components/eamxx/src/share/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,18 @@ add_subdirectory(data_managers)
# Atm process
add_subdirectory(atm_process)

# Diagnostic classes
add_subdirectory(diagnostics)

# IO library
add_subdirectory(io)

set(SHARE_SRC
algorithm/eamxx_data_interpolation.cpp
algorithm/eamxx_fv_phys_rrtmgp_active_gases_workaround.cpp
algorithm/eamxx_time_interpolation.cpp
)

add_library(scream_share ${SHARE_SRC})

target_include_directories(scream_share PUBLIC
${SCREAM_SRC_DIR}
${SCREAM_BIN_DIR}/src
${CMAKE_CURRENT_SOURCE_DIR}
)
# Algorithm library
add_subdirectory(algorithm)

target_link_libraries(scream_share PUBLIC
# For bwd compatibility: a "catch" all interface lib of all the stuff in the share folder
add_library(scream_share INTERFACE)
target_link_libraries(scream_share INTERFACE
eamxx_core
eamxx_scorpio_interface
eamxx_utils
Expand All @@ -55,14 +49,9 @@ target_link_libraries(scream_share PUBLIC
eamxx_property_checks
eamxx_data_managers
eamxx_atm_process
scream_io)

# Used in the data interpolation
target_link_libraries(scream_share PUBLIC stdc++fs)

if (NOT SCREAM_LIB_ONLY)
add_subdirectory(tests)
endif()
eamxx_diagnostics
eamxx_io
eamxx_algorithm)

# The "build_cf_dictionary" target downloads an XML file containing valid field
# names and aliases based on the CF conventions, and transforms it into a YAML
Expand Down
17 changes: 17 additions & 0 deletions components/eamxx/src/share/algorithm/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
add_library(eamxx_algorithm
eamxx_data_interpolation.cpp
eamxx_time_interpolation.cpp
eamxx_fv_phys_rrtmgp_active_gases_workaround.cpp
)

target_link_libraries(eamxx_algorithm PUBLIC
eamxx_core
eamxx_utils
eamxx_field
eamxx_remap
eamxx_data_managers
eamxx_io)

if (NOT SCREAM_LIB_ONLY)
add_subdirectory(tests)
endif()
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ if (NOT SCREAM_ONLY_GENERATE_BASELINES)

# Generate data for data interpolation test
CreateUnitTest(data_interpolation_setup "data_interpolation_setup.cpp"
LIBS scream_share
LIBS eamxx_algorithm
FIXTURES_SETUP data_interpolation_setup)

# Test data interpolation
CreateUnitTest(data_interpolation "data_interpolation_tests.cpp"
LIBS scream_share
LIBS eamxx_algorithm
MPI_RANKS 1 ${SCREAM_TEST_MAX_RANKS}
FIXTURES_REQUIRED data_interpolation_setup)

# Time interpolation
CreateUnitTest(time_interpolation "time_interpolation_tests.cpp"
LIBS scream_share
LIBS eamxx_algorithm
MPI_RANKS 1 ${SCREAM_TEST_MAX_RANKS})
endif()
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
set(DIAGNOSTIC_SRCS
add_library (eamxx_diagnostics
aerocom_cld.cpp
aodvis.cpp
atm_backtend.cpp
Expand Down Expand Up @@ -30,8 +30,7 @@ set(DIAGNOSTIC_SRCS
conditional_sampling.cpp
)

add_library(diagnostics ${DIAGNOSTIC_SRCS})
target_link_libraries(diagnostics PUBLIC eamxx_atm_process)
target_link_libraries(eamxx_diagnostics PUBLIC eamxx_atm_process)

if (NOT SCREAM_LIB_ONLY AND NOT SCREAM_ONLY_GENERATE_BASELINES)
add_subdirectory(tests)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "diagnostics/aerocom_cld.hpp"
#include "aerocom_cld.hpp"

#include "diagnostics/aerocom_cld_util.hpp"
#include "aerocom_cld_util.hpp"
#include "share/physics/eamxx_common_physics_functions.hpp"

#include <ekat_team_policy_utils.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/aodvis.hpp"
#include "aodvis.hpp"

#include "share/util/eamxx_universal_constants.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/atm_backtend.hpp"
#include "atm_backtend.hpp"

#include "share/util/eamxx_universal_constants.hpp"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/atm_density.hpp"
#include "atm_density.hpp"
#include "share/physics/eamxx_common_physics_functions.hpp"

namespace scream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/binary_ops.hpp"
#include "binary_ops.hpp"

namespace scream {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/conditional_sampling.hpp"
#include "conditional_sampling.hpp"
#include "share/util/eamxx_universal_constants.hpp"
#include <ekat_team_policy_utils.hpp>
#include <string>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/dry_static_energy.hpp"
#include "dry_static_energy.hpp"
#include "share/physics/eamxx_common_physics_functions.hpp"

#include <ekat_team_policy_utils.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/exner.hpp"
#include "exner.hpp"
#include "share/physics/eamxx_common_physics_functions.hpp"

namespace scream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/field_at_height.hpp"
#include "field_at_height.hpp"

#include <ekat_std_utils.hpp>
#include <ekat_units.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "diagnostics/field_at_level.hpp"
#include "field_at_level.hpp"

#include <ekat_std_utils.hpp>

Expand Down
Loading