-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(eurec4a): new cmake and config file for eurec4a example
- Loading branch information
1 parent
3b6ddd1
commit 65eecf1
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# set cmake version | ||
if(NOT DEFINED CMAKE_MINIMUM_REQUIRED_VERSION) | ||
cmake_minimum_required(VERSION 3.18.0) | ||
# cmake_minimum_required(VERSION 3.21.1) # if using Kokkos c++ with NVC++ compiler | ||
endif() | ||
|
||
# set project name and print directory of this CMakeLists.txt (source directory of project) | ||
project("eurec4a1d") | ||
message("PROJECT_SOURCE_DIR: ${PROJECT_SOURCE_DIR}") | ||
|
||
# Set libraries from CLEO to link with executable | ||
set(CLEOLIBS gridboxes initialise observers2 runcleo superdrops zarr2) | ||
|
||
# create primary executable for CLEO in 1-D coupled to thermodynamics from file setup | ||
add_executable(eurec4a1D EXCLUDE_FROM_ALL "main_eurec4a1D.cpp") | ||
|
||
# Add directories and link libraries to target | ||
target_link_libraries(eurec4a1D PRIVATE coupldyn_fromfile cartesiandomain "${CLEOLIBS}") | ||
target_link_libraries(eurec4a1D PUBLIC Kokkos::kokkos) | ||
target_include_directories(eurec4a1D PRIVATE "${CMAKE_SOURCE_DIR}/libs") | ||
|
||
# set specific C++ compiler options for target (optional) | ||
#target_compile_options(eurec4a1D PRIVATE) | ||
|
||
# set compiler properties for target(s) | ||
set_target_properties(eurec4a1D PROPERTIES | ||
CMAKE_CXX_STANDARD_REQUIRED ON | ||
CMAKE_CXX_EXTENSIONS ON | ||
CXX_STANDARD 20) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* ----- CLEO ----- | ||
* File: eurec4a1d_config.txt | ||
* Project: config | ||
* Created Date: Tuesday 9th January 2024 | ||
* Author: Clara Bayley (CB) | ||
* Additional Contributors: | ||
* ----- | ||
* Last Modified: Tuesday 9th April 2024 | ||
* Modified By: CB | ||
* ----- | ||
* License: BSD 3-Clause "New" or "Revised" License | ||
* https://opensource.org/licenses/BSD-3-Clause | ||
* ----- | ||
* Copyright (c) 2023 MPI-M, Clara Bayley | ||
* ----- | ||
* File Description: | ||
* configuration input parameters for CLEO eurec4a 1-D rainshaft example | ||
*/ | ||
|
||
|
||
### Initialisation parameters ### | ||
constants_filename = ../libs/cleoconstants.hpp # name of file for values of physical constants | ||
initsupers_filename = ./share/eurec4a1d_dimlessSDsinit.dat # binary filename for initialisation of SDs | ||
grid_filename = ./share/eurec4a1d_dimlessGBxboundaries.dat # binary filename for initialisation of GBxs / GbxMaps | ||
|
||
### Output Data parameters ### | ||
setuptxt = ./bin/eurec4a1d_setup.txt # .txt filename to copy configuration to | ||
stats_filename = ./bin/eurec4a1d_stats.txt # .txt file to output runtime statistics to | ||
zarrbasedir = ./bin/eurec4a1d_sol.zarr # zarr store base directory | ||
maxchunk = 1250000 # maximum no. of elements in chunks of zarr store array | ||
|
||
### SDM Runtime parameters ### | ||
# domain setup # | ||
nspacedims = 1 # no. of spatial dimensions to model | ||
ngbxs = 60 # total number of Gbxs | ||
totnsupers = 15360 # (initial) total no. of SDs | ||
|
||
# timestepping # | ||
CONDTSTEP = 0.1 # time between SD condensation events [s] | ||
COLLTSTEP = 1 # time between SD collision events [s] | ||
MOTIONTSTEP = 2 # time between SDM motion [s] | ||
COUPLTSTEP = 2400 # time between dynamic couplings [s] | ||
OBSTSTEP = 5 # time between SDM observations [s] | ||
T_END = 2400 # time span of integration from 0s to T_END [s] | ||
|
||
# microphysics # | ||
cond_iters = 2 # no. iterations of Newton Raphson Method before testing for convergence | ||
cond_SUBTSTEP = 0.1 # smallest timestep in cases where substepping occurs [s] | ||
cond_rtol = 0.0 # relative tolerance for implicit euler integration | ||
cond_atol = 0.01 # abolute tolerance for implicit euler integration | ||
|
||
# superdroplets # | ||
doAlterThermo = false # enable condensation to alter the thermodynamic state | ||
|
||
### Coupled Dynamics Solver Parameters ### | ||
# type of coupling # | ||
thermosolver = fromfile # dynamics solver to configure | ||
|
||
### read in dynamics from file ### | ||
press_filename = ./share/eurec4a1d_dimlessthermo_press.dat # binary filename for pressure | ||
temp_filename = ./share/eurec4a1d_dimlessthermo_temp.dat # binary filename for temperature | ||
qvap_filename = ./share/eurec4a1d_dimlessthermo_qvap.dat # binary filename for vapour mixing ratio | ||
qcond_filename = ./share/eurec4a1d_dimlessthermo_qcond.dat # binary filename for liquid mixing ratio | ||
wvel_filename = ./share/eurec4a1d_dimlessthermo_wvel.dat # binary filename for vertical (z) velocity | ||
uvel_filename = ./share/eurec4a1d_dimlessthermo_uvel.dat # binary filename for horizontal x velocity | ||
vvel_filename = ./share/eurec4a1d_dimlessthermo_vvel.dat # binary filename for horizontal y velocity |