{"id":23831947,"url":"https://github.com/csdms/bmi-fortran","last_synced_at":"2026-02-18T04:32:58.385Z","repository":{"id":53551153,"uuid":"84101233","full_name":"csdms/bmi-fortran","owner":"csdms","description":"Basic Model Interface for Fortran","archived":false,"fork":false,"pushed_at":"2024-12-17T18:58:57.000Z","size":166,"stargazers_count":8,"open_issues_count":5,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2026-01-27T00:50:03.646Z","etag":null,"topics":["bmi","csdms","fortran"],"latest_commit_sha":null,"homepage":"https://bmi.csdms.io","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csdms.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-03-06T17:25:59.000Z","updated_at":"2025-07-03T00:01:46.000Z","dependencies_parsed_at":"2023-10-13T15:35:05.571Z","dependency_job_id":"706f192f-f2d3-4ac0-b257-74241223a4e2","html_url":"https://github.com/csdms/bmi-fortran","commit_stats":{"total_commits":213,"total_committers":4,"mean_commits":53.25,"dds":"0.014084507042253502","last_synced_commit":"239f11f21b7bda431e7b0570c5690033a56ee542"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/csdms/bmi-fortran","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-fortran","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-fortran/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-fortran/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-fortran/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/bmi-fortran/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-fortran/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29568504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T04:18:28.490Z","status":"ssl_error","status_checked_at":"2026-02-18T04:13:49.018Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bmi","csdms","fortran"],"created_at":"2025-01-02T14:16:41.432Z","updated_at":"2026-02-18T04:32:53.375Z","avatar_url":"https://github.com/csdms.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/84101233.svg)](https://zenodo.org/badge/latestdoi/84101233)\n[![Build and Test](https://github.com/csdms/bmi-fortran/actions/workflows/test.yml/badge.svg)](https://github.com/csdms/bmi-fortran/actions/workflows/test.yml)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/bmi-fortran/badges/version.svg)](https://anaconda.org/conda-forge/bmi-fortran)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/bmi-fortran/badges/platforms.svg)](https://anaconda.org/conda-forge/bmi-fortran)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/bmi-fortran/badges/downloads.svg)](https://anaconda.org/conda-forge/bmi-fortran)\n\n# bmi-fortran\n\nThe Fortran specification, created with Fortran 2003,\nfor the CSDMS [Basic Model Interface](https://bmi.readthedocs.io).\n\n\n## Build/Install\n\nThe Fortran BMI bindings can be built on Linux, macOS, and Windows.\nInstructions are given below.\n\n**Prerequisites:**\n* A Fortran compiler\n* CMake or [Fortran Package Manager](https://fpm.fortran-lang.org/)\n* pkg-config\n\nAlternately,\n[conda binaries](https://anaconda.org/conda-forge/bmi-fortran)\nhave been built for Linux, macOS, and Windows.\nInstall the Fortran BMI bindings (no build needed)\ninto an Anaconda distribution with\n\n    conda install bmi-fortran -c conda-forge\n\n### CMake - Linux and macOS\n\nTo build the Fortran BMI bindings from source with cmake, run\n\n    mkdir _build \u0026\u0026 cd _build\n    cmake .. -DCMAKE_INSTALL_PREFIX=\u003cpath-to-installation\u003e\n    make\n\nwhere `\u003cpath-to-installation\u003e` is the base directory in which to install the bindings.\nThe default is`/usr/local`.\nWhen using a conda environment,\nuse the `$CONDA_PREFIX` environment variable.\n\nThen, to install:\n\n    make install\n\nThe installation will look (on Linux) like:\n\n```bash\n.\n|-- include\n|   `-- bmif_2_0.mod\n`-- lib\n    |-- libbmif.so -\u003e libbmif.so.2.0\n    |-- libbmif.so.2.0\n    `-- pkgconfig\n        `-- bmif.pc\n```\n\n### CMake - Windows\n\nAn additional prerequisite is needed for Windows:\n\n* Microsoft Visual Studio 2017 or Microsoft Build Tools for Visual Studio 2017\n\nTo configure the Fortran BMI bindings from source with cmake,\nrun the following in a [Developer Command Prompt](https://docs.microsoft.com/en-us/dotnet/framework/tools/developer-command-prompt-for-vs)\n\n    mkdir _build \u0026\u0026 cd _build\n    cmake .. ^\n\t  -G \"NMake Makefiles\" ^\n\t  -DCMAKE_INSTALL_PREFIX=\u003cpath-to-installation\u003e ^\n\t  -DCMAKE_BUILD_TYPE=Release\n\nwhere `\u003cpath-to-installation\u003e` is the base directory in which to install the bindings.\nThe default is `\"C:\\Program Files (x86)\"`.\nNote that quotes and an absolute path are needed.\nWhen using a conda environment, use `\"%CONDA_PREFIX%\\Library\"`.\n\nThen, to build and install:\n\n\tcmake --build . --target install --config Release\n\n\n### Fortran Package Manager (fpm)\n\nIf you don't already have fpm installed, you can do so via\nConda:\n\n    conda install fpm -c conda-forge\n\nThen, to build and install:\n\n    fpm build --profile release\n    fpm install --prefix \u003cpath-to-installation\u003e\n\nwhere `\u003cpath-to-installation\u003e` is the base directory\nin which to install the bindings. The default prefix\non Unix systems is `$HOME/.local` and `%APPDATA%\\local`\non Windows. Note this differs from installs using CMake.\n\nThe installation will look like:\n\n```bash\n.\n|-- include\n|   `-- bmif_2_0.mod\n`-- lib\n    `-- libbmif.a\n```\n\nNote that fpm does not currently support the building\nof shared/dyanmic libraries (`.so` on Unix, `.dll` on Windows).\n\n\n## Use\n\nTo write a BMI for a model,\n`use` the `bmif_2_0` module and implement all the BMI procedures\nincluded in the interface defined therein.\nBMI methods that aren't used\n(e.g., `get_grid_x` for a uniform rectilinear grid)\ncan simply return the BMI_FAILURE status code.\nA sample implementation is given in the\nhttps://github.com/csdms/bmi-example-fortran\nrepository.\n\n\n## Note\n\nFor a Fortran BMI that uses Fortran 90/95,\nsee https://github.com/csdms/bmi-f90.\n\nWhy two different Fortran BMIs?\nThough Fortran 90/95 has the concept of an interface,\nit doesn't allow procedures to be included within types.\nThis is difficult to reconcile with BMI, which, in Fortran,\nwould ideally be implemented as a collection of procedures in a type.\nThus, the Fortran 90/95 BMI is set up as an example\nthat a user can copy and modify,\nsubstituting their code for code in the example.\nThis is somewhat cumbersome.\nThe Fortran 2003 BMI implementation acts a true interface--it can be imported\nas a type from a module into a Fortran program and its methods overridden.\n\nThe CSDMS IF software engineers recommend using the Fortran 2003 bindings;\nhowever, we will continue to support the Fortran 90/95 bindings\nfor users who aren't comfortable with\nthe object-oriented features of Fortran 2003.\nFurther, both BMI implementations are backward-compatible with Fortran 77.\nAll that is needed is a compiler that's capable of handling\nthe more recent versions of Fortran;\nfor example `gfortran` in the GNU Compiler Collection.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-fortran","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fbmi-fortran","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-fortran/lists"}