Note: a common convention is to compile (build) project in the "build/" directory. That is, the Gemini.bin executable and other libraries and test executables will be created under gemini3d/build. Feel free to use any directory name you like.
When using a meta-build system like CMake, building a program takes two steps.
- configure: "cmake -B build": user specifies options (if any) and CMake determines what compiler options and finds libraries.
- build: "cmake --build build": CMake uses a low-level build system, typically Ninja or Make, to orchestrate the C, C++, and Fortran compiler commands in parallel.
If a user makes changes to source code, they need only rerun the cmake --build build command.
If a user wishes to change a CMake option, run both commands again.
Many Gemini3D users don't need any custom options to get started. In that case, build Gemini3D from the gemini3d/ directory by:
cmake -B build
cmake --build buildCMake build-time options in general are enabled or disabled at configure time like
cmake -B build -Doption=true
cmake -B build -Doption=falseIf you've already built Gemini but wish to change a CMake configuration option, you can reconfigure as above, then rebuild:
cmake --build buildThose adding or modifying Gemini3D code itself may be interested in Debug builds.
MacOS users usually use:
- Homebrew GCC
- Macports GCC
- Intel oneAPI
When trying to use GCC, be aware MacOS itself provides a "fake" gcc that is linked to Clang.
You may desire to use GCC instead of Clang if you get compiler errors.
These errors may arise due to certain ABI incompatibilities between Clang and GCC.
Tell CMake (or other build systems) you want to use just GCC by:
export FC=gfortran-13 CC=gcc-13 CXX=g++-13To default to GCC / Gfortran, add the line above in ~/.zprofile.
NCAR GLOW is optional. Auroral emissions use GLOW.
Disable GLOW by:
cmake -B build -Dglow=offThe neutral atmosphere model MSISE00 is used by default. To use the newer MSIS 2.x, the simulation config.nml must specify the following to actually use MSIS 2.x:
&neutral_BG
msis_version = 21 ! MSIS version multiplied by 10 e.g. 21 is MSIS 2.1
/Omitting this namelist variable or specifying msis_version=0 uses MSISE00.
Gemini3D may use the HWM14 horizontal wind model by:
cmake -B build -Dhwm14=on