{"id":43256530,"url":"https://github.com/openearth/glofrim","last_synced_at":"2026-02-01T13:34:02.253Z","repository":{"id":59430247,"uuid":"90723537","full_name":"openearth/glofrim","owner":"openearth","description":"Globally Applicable Framework for Integrated Hydrological-Hydrodynamic Modelling (GLOFRIM)","archived":false,"fork":false,"pushed_at":"2022-12-21T15:06:32.000Z","size":120834,"stargazers_count":47,"open_issues_count":9,"forks_count":27,"subscribers_count":8,"default_branch":"dev","last_synced_at":"2024-06-11T19:35:17.856Z","etag":null,"topics":["coupling","hydrodynamics","hydrology","large-scale","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openearth.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}},"created_at":"2017-05-09T08:47:49.000Z","updated_at":"2024-05-11T06:25:46.000Z","dependencies_parsed_at":"2023-01-30T04:00:55.358Z","dependency_job_id":null,"html_url":"https://github.com/openearth/glofrim","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/openearth/glofrim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openearth%2Fglofrim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openearth%2Fglofrim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openearth%2Fglofrim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openearth%2Fglofrim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openearth","download_url":"https://codeload.github.com/openearth/glofrim/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openearth%2Fglofrim/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28979137,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T12:13:08.691Z","status":"ssl_error","status_checked_at":"2026-02-01T12:13:08.356Z","response_time":56,"last_error":"SSL_read: 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":["coupling","hydrodynamics","hydrology","large-scale","python"],"created_at":"2026-02-01T13:34:02.174Z","updated_at":"2026-02-01T13:34:02.245Z","avatar_url":"https://github.com/openearth.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GLOFRIM 2.1\nGlobally Applicable Framework for Integrated Hydrological-Hydrodynamic Modelling (GLOFRIM)\n\ndevelopment by Jannis M. Hoch (Utrecht University, Deltares), Dirk Eilander (VU Amsterdam, Deltares), and Hiroaki Ikeuchi (University of Tokyo) \\\ncontact: Jannis M. Hoch (j.m.hoch@uu.nl), Dirk Eilander (dirk.eilander@vu.nl)\n\nWe also want to acknowledge the contributions of all colleagues at the insitues involved in the development of GLOFRIM.\n\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.597107.svg)](https://doi.org/10.5281/zenodo.597107)\n\n[![Documentation Status](https://readthedocs.org/projects/glofrim/badge/?version=latest)](https://glofrim.readthedocs.io/en/latest/?badge=latest)\n\n# Description\nGLOFRIM offers a flexible and modular tool to couple hydrologic, routing, and hydodynamic models across scales. This enables integration of physical processes from different models. The coupling process is spatially explicit (i.e. on grid-to-grid basis) and model information is exchanged online (i.e. per time step).\n\nGLOFRIM is designed as a “human interface” with additional and user friendly Python functions on top of the basic model interface (BMI), which makes it easy to setup and run coupled model simulations. For the model developer, only the BMI needs to be implemented in the model in a scripting language of choice, which makes it easy to develop and maintain. \n\nWhile version 1 allowed for coupling PCR-GLOBWB with either Delft3D Flexible Mesh or LISFLOOD-FP, version 2 has a more generic setup and has been extended with the hydrologic modelling suite wflow and the global routing model CaMa-Flood.\n\nWith the available models, different coupled hydrologic and hydrodynamic model runs can be done, for instance:\n - 2-step coupling: hydrology -\u003e 1D routing or hydrology -\u003e full 2D hydrodynamics\n - 3-step coupling: hydrology -\u003e 1D routing -\u003e full 2D hydrodynamics\n\n![alt text](/doc/_images/GLOFRIM_flows_wLegend.png \"Conceptual GLOFRIM diagram\")\n\n## Warrants\nCurrently, the coupling process in only one-directional, i.e. only downstream along the model cascade.\nWork is currently performed to extend it to a full feedback loop.\n\nIt is important to note that GLOFRIM provides only a tool to coupled models across scales and processes. The quality of simulations therefore still depends on the quality of the model discretizations used.\n\nThe framework has successfully been tested on Linux platforms. \nPlease note that it running it on Windows is currently not supported.\n\n## Model specs\n - PCR-GLOBWB: since the model does not generically contain BMI function, a bespoke version is provided with the GLOFRIM package.\n - Delft3D Flexible Mesh: the model is freely available, but currently needs to be requested; version 1.1.201 or higher is required   \n - LISFLOOD-FP: version 5.9 extended with BMI-functionality is available at GitLab\n - wflow: the latest version is required for full functionality and can be downloaded from GitHub\n - CaMa-Flood: a BMI'ed version of CaMa-Flood (v3.6.2) is available upon request\n\n## Content of package\n - glofrim: python package containing the functions required to execute the various coupling models\n - scripts: convienence scripts and examples to run GLOFRIM\n\n## Setting up GLOFRIM\nWe recommend you setup GLOFRIM within its own python environment. You can do so using [conda environments](https://conda.io/docs/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file) with the provided envrionment.yml file in the glofrim-py folder. This should also install the required python BMI-wrapper for you.\n\n```\n# create environmnet named glofrim\nconda env create -f environment.yml\n# activate glofrim environment\nsource activate glofrim\n```\n\nTo install GLOFRIM do (currently we recommend using the csdms-compliant branch):\n```\n# get copy of source code from git repos\ngit clone git@github.com/openearth/glofrim.git@csdms-compliant\n# navigate to the py-glofrim folder\ncd glofrim/py-glofrim\n# install for (the -e links the source code folder for development, this can be left out)\npip install -e \u003cpath/to/glofrim\u003e/py-glofrim\n```\n\nThen,  download and install the required models. More detailed descriptions how to install the models can be found in the model-specific _bmi.py files. For instance, for PCR-GLOBWB, first install [PC-RASTER](http://pcraster.geo.uu.nl/getting-started/pcraster-on-linux/), then:\n```\n# pcr-globwb is provided inside the glofrim distribution (will be changed)\npip install \u003cpath/to/glofrim\u003e/pcrglobwb_bmi_v203\n```\n\nNote that glofrim has only been tested on Linux. \n\n## Usage\nGLOFRIM exists of a series of uniformed BMI wrappers for each model and a overarching BMI wrapper for running coupled models.\n\nTo run a coupled model from python use the following lines. The glofrim.ini (see example in root directory) configuration file hold the information of the individual model configuration files and exchanges between the models.\n```\nfrom glofrim import Glofrim \ncbmi = Glofrim() # initialize coupled bmi\ncbmi.initialize_config(/path/to/glofrim.ini) # initialize the coupling with the glofrim.ini configuration file\n```\n\nA basic model run uses the following statements:\n```\nbmi.get_start_time() # optional: get the model start time\nbmi.initialize_model() # initialize model\nbmi.update_until(bmi.get_end_time()) # run until set endtime\nbmi.finalize()\n```\n\nTo run stand alone models via the GLOFRIM BMI wrapper you can use followed by the same statements as before:\n```\nfrom glofrim import CMF # import the CaMa-Flood bmi wrapper\nbmi = CMF(/path/to/model_engine) # intialize bmi with reference to engine (only for non-python models)\nbmi.initialize_config(/path/to/model_configuration_file)\n```\n\n## Convenience script:\nThe GLOFRIM library contains a script to run combined and single (for testing purposes) models with a single line from a terminal. This script can be found in the glofirm-py/scripts folder \n\nGLOFRIM can be executed as follows on Linux command line:\n```\npython glofrim_runner.py run /path/to/glofrim.ini --env /path/to/glofrim.env -s 200-01-01 -e 2001-01-01\n```\n\nFor more info on coupled runs, check\n```\npython glofrim_runner.py run –help\n```\n\nand for stand-alone runs:\n```\npython glofrim_runner.py run_single –help\n```\n\n## Literature and sources:\nGLOFRIM development and applications \\\nhttps://www.geosci-model-dev.net/10/3913/2017/gmd-10-3913-2017.html\n\t\t\nBMI\\\nhttps://bmi-spec.readthedocs.io/en/latest \\\nhttp://www.sciencedirect.com/science/article/pii/S0098300412001252\n\nBMI-wrapper for Python\\\nhttps://github.com/openearth/bmi-python\n\nPCR-GLOBWB\\\nhttps://www.geosci-model-dev.net/11/2429/2018 \\\nhttps://github.com/UU-Hydro/PCR_BMI/\n\nDelft3D Flexible Mesh\\\nhttps://link.springer.com/article/10.1007%2Fs10236-011-0423-6 \\\nhttps://www.deltares.nl/en/software/delft3d-flexible-mesh-suite/#7\n\nLISFLOOD-FP\\\nhttp://www.sciencedirect.com/science/article/pii/S002216940000278X \\\nhttps://gitlab.com/ChippChapp/LISFLOOD-BMI\n\nCaMa-Flood\\\nhttps://agupubs.onlinelibrary.wiley.com/doi/abs/10.1029/2010wr009726 \\\nhttps://github.com/hii600/cama-flood_bmi_v3.6.2\n\t\nwflow\\\nhttps://wflow.readthedocs.io/en/latest/index.html \\\nhttps://github.com/openstreams/wflow\n\nGLOFRIM 1.0 \\\nhttps://doi.org/10.5281/zenodo.597107\n\n## Disclaimer:\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program.  If not, see \u003chttp://www.gnu.org/licenses/\u003e.\n\nCopyright (C) 2017,2018 Jannis Hoch\n\nThe disclaimers/warranty statements of each component involved in this coupling (i.e. PCR-GLOBWB, LIFLOOD-FP, Delft3D Flexible Mesh, BMI Wrapper, CaMa-Flood, wflow)\nremain valid unless stated otherwise.\nNo warranty/responsibility for any outcome of using this coupling script.\nPlease ensure to cite the models involved in case of making use of this coupling script.\nAnd of course don't forget to cite the associated paper as well :)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenearth%2Fglofrim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenearth%2Fglofrim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenearth%2Fglofrim/lists"}