FORCES
FORtran lib for Comp. Env. Sys.
|
This is the FORTRAN library for Computational Environmental Systems of the
Department Computational Hydrosystems
Helmholtz Centre for Environmental Research - UFZ
Permoserstr. 15
04318 Leipzig, Germany
It is a lightweight fork of the jams_fortran
library maintained by Matthias Cuntz et al: https://github.com/mcuntz/jams_fortran
The jams_fortran
library was formerly developed at the CHS department at the UFZ and is now released under the MIT license.
Let's assume, you want to write a fortran program using forces, like this example test.f90
:
You should create a minimal CMakeLists.txt
file next to the test.f90
file like this:
There, CPM
(the cmake package manager) is downloaded on the fly and used to get FORCES
to be able to link against it.
Afterwards you only need to do the following to configure, compile and execute your program:
And it will happily write:
For a more complex project, prepared for unit-tests, documentation and modules, have a look at the Fortran Template.
It is recommended to have a clean installation at a custom location for a C compiler, a Fortran compiler, the NetCDF C library and the NetCDF Fortran library with consistent compilers.
We recommend to use a conda environment by using Miniconda to get all dependencies easily:
With this you could now proceed with the example given above.
LGPLv3 (c) 2005-2024 CHS-Developers