SCENE is a tokamak equilibrium solver which can generate equilibria in a variety of file formats.
SCENE requires:
- a F2008 Fortran compiler (tested with gfortran)
- neasy-f netCDF Fortran wrapper
- this requires netCDF and the netCDF-Fortran API
- LAPACK and BLAS
- CMake
And optionally, the GHOST Fortran graphics library.
To build SCENE, run cmake
:
# Configure the build
cmake . -B build
# Compile SCENE
cmake --build build
This will create a scene
executable under build/bin/
.
You can run the tests like so:
cmake --build build --target check
You may also need to tell CMake about the location of the other
libraries. You can do that through the below variables using the
syntax -D<variable>=/path/to/library
:
- neasy-f:
neasyf_ROOT
- by default, SCENE will download neasy-f automatically as required. You can
turn this behaviour off with
-DSCENE_DOWNLOAD_NEASYF=off
- by default, SCENE will download neasy-f automatically as required. You can
turn this behaviour off with
- NetCDF:
netCDFFortran_ROOT
for the Fortran API, andnetCDF_ROOT
for the base C library.- Note: for some operating systems that put Fortran modules in an
related location to the headers/libraries, such as Fedora, you
may also need to set
netCDF_Fortran_INCLUDE_DIR
to the directory containingnetcdf.mod
- Note: for some operating systems that put Fortran modules in an
related location to the headers/libraries, such as Fedora, you
may also need to set
- BLAS:
BLAS_ROOT
- LAPACK:
LAPACK_ROOT
For example, here's how to set the location of netCDF:
cmake . -B build -DnetCDFFortran_ROOT=/path/to/netcdf/fortran
To compile SCENE with GHOST, you can either let CMake download and build it automatically, or give the location of an existing installation:
# Configure the build, telling CMake to download GHOST
cmake . -B build -DSCENE_USE_GHOST=ON
# OR
# Configure the build, telling CMake where to find GHOST
cmake . -B build -DSCENE_USE_GHOST=ON -DGHOST_ROOT=/path/to/ghost