Skip to content
5 changes: 5 additions & 0 deletions src/executables/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ set(ats_link_libs
)


set(ELM_LIBRARIES $ENV{ELM_DIR}/install/lib/libelm_kokkos.dylib)
set(ELM_INCLUDES_DIR $ENV{ELM_DIR}/install/include)
include_directories(${ELM_INCLUDES_DIR})

# note, we can be inclusive here, because if they aren't enabled,
# these won't be defined and will result in empty strings.
set(tpl_link_libs
Expand All @@ -135,6 +139,7 @@ set(tpl_link_libs
${HYPRE_LIBRARIES}
${HDF5_LIBRARIES}
${CLM_LIBRARIES}
${ELM_LIBRARIES}
)

add_amanzi_library(ats_executable
Expand Down
28 changes: 28 additions & 0 deletions src/pks/surface_balance/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# -*- mode: cmake -*-
# ATS Surface balance PKs describe Evaporation, energy fluxes from
# long/showtwave radiation, precip, etc etc etc

# temporary ELMKernels
set(ELM_LIBRARIES $ENV{ELM_DIR}/install/lib/libelm_kokkos.dylib)
set(ELM_INCLUDES_DIR $ENV{ELM_DIR}/install/include)
include_directories(${ELM_INCLUDES_DIR})


include_directories(${ATS_SOURCE_DIR}/src/pks)
include_directories(${ATS_SOURCE_DIR}/src/constitutive_relations/surface_subsurface_fluxes)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/constitutive_relations/land_cover)
Expand Down Expand Up @@ -52,6 +59,13 @@ if (ENABLE_CLM)
)
endif()

set(ENABLE_ELM true)
if (ENABLE_ELM)
list(APPEND ats_surface_balance_src_files
ELMKernels/surface_balance_ELMKernels.cc
)
endif()

set(ats_surface_balance_inc_files
constitutive_relations/land_cover/seb_physics_defs.hh
constitutive_relations/land_cover/seb_physics_funcs.hh
Expand Down Expand Up @@ -97,10 +111,17 @@ if (ENABLE_CLM)
)
endif()

if (ENABLE_ELM)
list(APPEND ats_surface_balance_inc_files
ELMKernels/surface_balance_ELMKernels.hh
)
endif()

set(ats_surface_balance_link_libs
${Teuchos_LIBRARIES}
${Epetra_LIBRARIES}
${CLM_LIBRARIES}
${ELM_LIBRARIES}
error_handling
atk
mesh
Expand Down Expand Up @@ -147,6 +168,13 @@ if (ENABLE_CLM)
)
endif()

if (ENABLE_ELM)
register_evaluator_with_factory(
HEADERFILE ELMKernels/surface_balance_ELMKernels_reg.hh
LISTNAME ATS_SURFACE_BALANCE_REG
)
endif()

register_evaluator_with_factory(
HEADERFILE surface_balance_base_reg.hh
LISTNAME ATS_SURFACE_BALANCE_REG
Expand Down
Loading