-
Notifications
You must be signed in to change notification settings - Fork 51
FABM 2.0
This page describes the upcoming FABM 2.0 release, which is currently available from branch 2.0rc1.
FABM 2.0 is in most respects a minor release, but it includes a few backward-incompatible changes that warrant a new version number.
Users: FABM 2.0 drops support for very old (> 5 years) versions of cmake, gfortran and Python. This is unlikely to cause problems, as most production systems have newer version of these packages installed. Users of pyfabm will need to adopt the new (simpler) installation mechanism.
Developers: biogeochemical models will not require changes to support FABM 2.0. Host models only require changes if they directly access the metadata or value of biogeochemical parameters, which is extremely rare.
FABM 2.0 drops support for older releases (from 5 years or more ago) of cmake, gfortran, and Python. This has enabled simplication and clean-up of the code. More details are available here. The minimum supported versions now are:
- cmake 3.12
- gfortran 5.1 (only relevant if you use gfortran; other Fortran compilers are also fine, e.g., Intel, Cray, AMD)
- Python 3.7 (only relevant if you use pyfabm)
To verify if you meet these requirements, you can execute cmake --version, gfortran --version, python --version.
(NB on some systems, the latest Python will be python3 rather than python)
pyfabm is now installed using normal Python conventions:
pip install <FABMDIR>
The replaces the old installation mechanism that required you to create a build directory, call cmake, and build the "install" target.
Underneath, the pip-based installation calls cmake. Therefore, you do still need to have cmake and a Fortran commpiler installed.
If you want to customize cmake options (e.g., to customize FABM_INSTITUTES, or manually specify the Fortran compiler to use), the easiest way to do this is to create a file named setup.cfg in the toplevel FABM directory, with contents
[build_ext]
cmake_opts=<CMAKE-OPTIONS>
You can enumerate all active model instances and their parameters like this:
type (type_model_list_node), pointer :: instance
type (type_key_value_pair), pointer :: pair
! Get pointer to the first model instance
instance => model%root%children%first
do while (associated(instance))
if (instance%model%user_created) then
print *, 'Instance ', trim(instance%model%name)
pair => instance%model%parameters%first
do while (associated(pair))
select type (value => pair%value)
class is (type_real_setting)
print *, ' ', trim(pair%name), ': ', value%pvalue
class is (type_integer_setting)
print *, ' ', trim(pair%name), ': ', value%pvalue
class is (type_logical_setting)
print *, ' ', trim(pair%name), ': ', value%pvalue
class is (type_string_setting)
print *, ' ', trim(pair%name), ': ', value%pvalue
end select
pair => pair%next
end do
end if
instance => instance%next
end doFor questions about FABM's use or development, visit Discussions. If you would like to cite FABM, please refer to its main publication and/or URLs.
Background
User guide
- Obtaining the source code
- Building and installing
- Setting up a simulation
- Available biogeochemical models
- Specific hosts
Developer guide
Updates
Tips and tricks
Support
How to cite
Licensing and copyright
Acknowledgements
Presentations