Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csdms/bmi-f90
Fortran bindings for the Basic Model Interface
https://github.com/csdms/bmi-f90
bmi csdms fortran
Last synced: 18 days ago
JSON representation
Fortran bindings for the Basic Model Interface
- Host: GitHub
- URL: https://github.com/csdms/bmi-f90
- Owner: csdms
- License: mit
- Created: 2015-01-13T21:08:05.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2019-09-04T21:33:37.000Z (over 5 years ago)
- Last Synced: 2024-01-27T00:43:32.105Z (12 months ago)
- Topics: bmi, csdms, fortran
- Language: Fortran
- Homepage:
- Size: 52.7 KB
- Stars: 1
- Watchers: 8
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://travis-ci.org/csdms/bmi-f90.svg?branch=master)](https://travis-ci.org/csdms/bmi-f90)
# bmi-f90
Fortran 90 bindings for the CSDMS
[Basic Model Interface](https://bmi-spec.readthedocs.io) (BMI).## Build
To build the bindings and tests on Linux and macOS, run
$ mkdir _build && cd _build
$ cmake .. -DCMAKE_INSTALL_PREFIX=
$ makewhere `` is the base directory where you want
to install things (`/usr/local` is the default).## Install
To install:
$ make install
## Test
Run some simple tests with
$ make test
## Use
Run the heat model through its BMI with the `run_bmiheatf90` program,
which takes a model configuration file
(see the [testing](./testing) directory for a sample)
as a required parameter.
If `run_bmiheatf90` is in your path, run it withrun_bmiheatf90 test.cfg
Output from the model is written to the file **bmiheatf90.out**
in the current directory.## Note
Why two different Fortran BMIs?
Though Fortran 90/95 has the concept of an interface,
it doesn't allow procedures to be included within types.
This is difficult to reconcile with BMI, which, in Fortran,
would ideally be implemented as a collection of procedures in a type.
Thus, the Fortran 90/95 BMI is set up as an example
that a user can copy and modify,
substituting their code for code in the example.
This is somewhat cumbersome.
The Fortran 2003 BMI implementation acts a true interface--it can be imported
as a type from a module into a Fortran program and its methods overridden.
The CSDMS IF software engineers recommend using the Fortran 2003 bindings
in https://github.com/csdms/bmi-fortran;
however, we will continue to support the Fortran 90/95 bindings
for users in the CSDMS community who aren't comfortable
using the object-oriented features of Fortran 2003.
Further, both BMI implementations are backward-compatible with Fortran 77.
All that is needed is a compiler that's capable of handling
the more recent versions of Fortran;
for example `gfortran` in the GNU Compiler Collection.