{"id":23831965,"url":"https://github.com/csdms/bmi-c","last_synced_at":"2025-10-25T09:31:55.197Z","repository":{"id":24483119,"uuid":"27887433","full_name":"csdms/bmi-c","owner":"csdms","description":"Basic Model Interface for C","archived":false,"fork":false,"pushed_at":"2024-06-24T21:18:05.000Z","size":87,"stargazers_count":1,"open_issues_count":1,"forks_count":3,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-06-24T22:56:46.435Z","etag":null,"topics":["bmi","c","cmake","csdms"],"latest_commit_sha":null,"homepage":"https://bmi.readthedocs.io","language":"C","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}},"created_at":"2014-12-11T19:18:31.000Z","updated_at":"2024-06-24T21:18:05.000Z","dependencies_parsed_at":"2024-01-09T17:17:17.582Z","dependency_job_id":null,"html_url":"https://github.com/csdms/bmi-c","commit_stats":{"total_commits":56,"total_committers":2,"mean_commits":28.0,"dds":0.4642857142857143,"last_synced_commit":"cb402a63ffeaf066415da67d65e7cbca38fac0b8"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csdms%2Fbmi-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csdms","download_url":"https://codeload.github.com/csdms/bmi-c/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232206387,"owners_count":18488512,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","c","cmake","csdms"],"created_at":"2025-01-02T14:16:45.594Z","updated_at":"2025-10-25T09:31:55.097Z","avatar_url":"https://github.com/csdms.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![DOI](https://zenodo.org/badge/27887433.svg)](https://zenodo.org/badge/latestdoi/27887433)\n[![Build and Test](https://github.com/csdms/bmi-c/actions/workflows/test.yml/badge.svg)](https://github.com/csdms/bmi-c/actions/workflows/test.yml)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/bmi-c/badges/version.svg)](https://anaconda.org/conda-forge/bmi-c)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/bmi-c/badges/platforms.svg)](https://anaconda.org/conda-forge/bmi-c)\n[![Anaconda-Server Badge](https://anaconda.org/conda-forge/bmi-c/badges/downloads.svg)](https://anaconda.org/conda-forge/bmi-c)\n\n# bmi-c\n\nC bindings for the CSDMS [Basic Model Interface](https://bmi.readthedocs.io).\n\n\n## Build/Install\n\nThe C BMI bindings can be built on Linux, macOS, and Windows.\nInstructions are given below.\n\n**Prerequisites:**\n* A C compiler\n* CMake\n\nAlternately,\n[conda binaries](https://anaconda.org/conda-forge/bmi-c)\nhave been built for Linux, macOS, and Windows.\nInstall the C BMI bindings (no build needed)\ninto an Anaconda distribution with\n\n    conda install bmi-c -c conda-forge\n\n### Linux and macOS\n\nTo install the C 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 install\n\nwhere `\u003cpath-to-installation\u003e` is the base directory\nin which to install the bindings (`/usr/local` is the default).\nWhen using a conda environment,\nuse the `$CONDA_PREFIX` environment variable.\n\nThe installation will look like:\n\n```bash\n.\n|-- include\n|   `-- bmi.h\n`-- lib\n    `-- pkgconfig\n        `-- bmic.pc\n```\n\n### 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 and install the C 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\tcmake --build . --target install --config 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\n## Use\n\nTo write a BMI for a model,\ninclude the `bmi.h` header and implement all the BMI functions\nincluded in the interface defined therein.\nBMI functions 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-c\nrepository.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsdms%2Fbmi-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsdms%2Fbmi-c/lists"}