Skip to content

Commit

Permalink
Allow setting ndims
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarusz committed Nov 24, 2023
1 parent 8fca5a6 commit ea9e485
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions dynamics/spam/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ target_include_directories(dycore INTERFACE src/grids)
target_include_directories(dycore INTERFACE src/io)
target_include_directories(dycore INTERFACE src/core)

set(PAMC_NDIMS "1" CACHE STRING "PAM-C ndims")
target_compile_definitions(dycore INTERFACE -DPAMC_NDIMS=${PAMC_NDIMS})

if ("${PAMC_MODEL}" STREQUAL "layermodel")
target_compile_definitions(dycore INTERFACE -DPAMC_LAYER)
endif()
Expand Down
2 changes: 1 addition & 1 deletion dynamics/spam/src/extrudedmodel-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ uint constexpr ntracers_dycore = 0;
//////////////////////////////////////////////////////////////////////////////

// Number of Dimensions
uint constexpr ndims = 2;
uint constexpr ndims = PAMC_NDIMS;
} // namespace pamc

#include "params.h"
Expand Down
2 changes: 2 additions & 0 deletions standalone/mmf_simplified/build/cmakescript_pamc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

PAM_MICRO="p3"
PAM_SGS="none"
PAMC_NDIMS="1"
PAMC_MODEL="extrudedmodel"
PAMC_HAMIL="man"
PAMC_THERMO="constkappavirpottemp"
Expand Down Expand Up @@ -36,6 +37,7 @@ cmake \
-DPAM_MICRO=${PAM_MICRO} \
-DPAM_SGS=${PAM_SGS} \
-DPAM_RAD="none" \
-DPAMC_NDIMS=${PAMC_NDIMS} \
-DPAMC_MODEL=${PAMC_MODEL} \
-DPAMC_HAMIL=${PAMC_HAMIL} \
-DPAMC_THERMO=${PAMC_THERMO} \
Expand Down

0 comments on commit ea9e485

Please sign in to comment.