{"id":34634629,"url":"https://github.com/c-hydro/hmc-dev","last_synced_at":"2026-04-01T17:34:06.272Z","repository":{"id":42692285,"uuid":"118136239","full_name":"c-hydro/hmc-dev","owner":"c-hydro","description":"Hydrological Model Continuum - Source Code","archived":false,"fork":false,"pushed_at":"2026-03-18T14:27:10.000Z","size":315085,"stargazers_count":4,"open_issues_count":2,"forks_count":4,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-19T05:06:00.614Z","etag":null,"topics":["computing","hydrology","modeling","river","water"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"eupl-1.2","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c-hydro.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","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":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-01-19T14:38:43.000Z","updated_at":"2026-03-18T14:25:35.000Z","dependencies_parsed_at":"2022-08-24T02:00:25.347Z","dependency_job_id":"72e77ade-a1d1-4b92-84d5-344147e46b1a","html_url":"https://github.com/c-hydro/hmc-dev","commit_stats":{"total_commits":60,"total_committers":6,"mean_commits":10.0,"dds":"0.33333333333333337","last_synced_commit":"3b511b919a67db3b391ec5d20fcb5d1520d8ab1d"},"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/c-hydro/hmc-dev","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Fhmc-dev","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Fhmc-dev/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Fhmc-dev/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Fhmc-dev/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-hydro","download_url":"https://codeload.github.com/c-hydro/hmc-dev/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-hydro%2Fhmc-dev/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31290537,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"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":["computing","hydrology","modeling","river","water"],"created_at":"2025-12-24T16:59:50.242Z","updated_at":"2026-04-01T17:34:06.263Z","avatar_url":"https://github.com/c-hydro.png","language":"Fortran","readme":"Hydrological Model Continuum\n============================\n\nWelcome to the **Hydrological Model Continuum** GitHub repository. This is an hydrological model supported by the Italian Civil Department (DPC) and is used for preventing and reducing hydrogeological risk.\n\nBackground\n**********\n\nThe **Hydrological Model Continuum**, commonly named **HMC**, is the hydrological model used by **Flood-PROOFS Modelling System**. The Flood-PROODS framework is a modelling system designed to assist decision makers during the operational phases of flood forecasting, nowcasting, mitigation and monitoring in various-sized catchments. \n\nThe system is operational in real time in different basins on the whole Italian territory for the National Civil Protection Department and in some basins of Bolivia, Albania and Lebanon. It is also used for water management purposed by Italian hydro-power companies (Compagnia Valdostana delle Acque, CVA, ERG Power Generation). \n\nThe main components of the HMC are reported below:\n- Modified Horton Method for Infiltration\n- Runoff Routing;\n- Subsurface Flow Routing;\n- Complete Energy Balance using Force Restore Equation to compute Soil Temperature;\n- Tdeep Filter;\n- WaterTable and Deep Flow Routing;\n- Snow model and correction;\n- SoilMoisture correction;\n- Groundwater fracturation.\n\nComponents\n**********\n\nAll codes and datasets are freely available and users can be get them from our github repository [1_].\n\nPrerequisites\n*************\n\nIn order to use the HMC, users are strongly raccomanted to control if the following characteristics, libraries and packages are available and correctly installed on their machine.\n\nUsually, HMC libraries are installed on **Linux Debian/Ubuntu 64bit** environment and all libraries, packages and applications must be compilled and/or installed in according with this operative system.\n\nAll codes, subroutines and scripts are developed using **Fortran** (version 2003 and greater) programming language [2_].\n\nThe section for installing all needed libraries and environments is usually named **fp-envs** [3_]and the users can find it our codes repository hosted by GitHub [1_].\n\nFortran libraries\n-----------------\n\nHMC needs netcdf4 library to read input provided by other preprocessing tools and to write output for external applications (such as Panoply, cdo, ncview ...).\nTo set and compile netcdf4 library a bash script named **setup_fp_env_system.sh** is provided. \nScript downloads **zlib** [4_], **hdf5** [5_] and **netcdf4** [6_] libraries from their repositories; after downloading source compressed archives, script creates a folder in “$HOME/user/fp_libs_system/” where all libraries will be compilled and installed. During the installation, a environment file named “fp_env_system” is created for saving LD_LIBRARY_PATH (for native code libraries) and PATH (for executables) references of installed libraries.\n\nHMC libraries\n-------------\nAfter preparing all necessary libraries and environmental settings, source files of HMC must be compiled to run properly [7_]; usually, sources are compiled using **GNU compilers** (such as gcc and gfortran) that have to be installed on user’s machine. To compile and optimize HMC codes a bash file named **setup_fp_env_hmc.sh** is provided. Using this setup file, user will have to answer some questions about how to compile HMC codes.\nUsually, to build Continuum for production use, options have to set as follows:\n\n    • set compiler type [1] for using GNU/GFortran compiler;\n    • set optimization option [2] for using production mode; \n    • set profiler option [2] for skipping profiling used to control model performances;\n    • set NetCDF4 library [1] for using NetCDF4 input and output files format.\n\nNetbeans configuration\n----------------------\nIn order to use and develop the HMC, users are strongly raccomanded to set their devoloping environment\nusing a IDE such as NetBeans Apache [8_].\n\nThe users could be interested in debugging codes to have a deeper knowledge of the HMC; usually, for doing this task, the common advice is used a IDE (e.g, CodeBlock, VS Code, Apache Netbeans) in order to easily analyze codes and memory usage. In this part, the configuration of a debug workspace in Apache NetBeans IDE will be presented.\n\nFirst of all, the package for C, C++ and Fortran programming languages have to be installed in Apache NetBeans; to complete this step, the users have to install the package related with C/C++ language. Particuarly, following these instructions:\n\n  1) Tools --\u003e Plugins --\u003e Settings --\u003e Tick \"NetBeans 8.2 Plugin Portal\" --\u003e Close \n\nand Reboot the Apache NetBeans IDE.\nNext step, users should create a New Project following these instructions: \n\n  2) File --\u003e New Project --\u003e Category :: Sample :: C/C++ --\u003e Project :: Hello World Fortran Application --\u003e Next --\u003e Choose Name --\u003e Close\n\nAfter creating a folder project, users have to import all source code in the project folder; Using the left menu where the name of projects\nare visible, right click on selected project:\n\n  3) Source Files --\u003e Add existing items ...\n\nperforming this action, a form to select all file will be opened. Finally, all source files will be available into source file folder\nof the selected project. \nNext steps cover the configuration of the dependencies in the project. Particularly, the main task is linking the NetCDF library against\nthe project.\nFor configuring the NetCDF4 in Apache NetBeans IDE, the users have to add in:\n\n  4) Project --\u003e Properties --\u003e Linker --\u003e Libraries\n     \n     in /path_to_netcdf/ find the following files\n     netcdff.a and netcdff.so \n     and note \"double f\" for fortran libraries\n\n  5) Project --\u003e Properties --\u003e Linker --\u003e Additional Options\n     \n      -I/path_to_netcdf/include/ \n      -L/path_to_netcdf/lib/ \n      -lnetcdff -lnetcdf   \n\n  6) Project --\u003e Properties --\u003e Fortran Compiler --\u003e Additional Options\n\n      -I/path_to_netcdf/include/ \n      -L/path_to_netcdf/lib/ \n      -lnetcdff -lnetcdf  \n\n  7) Project --\u003e Properties --\u003e Fortran Compiler --\u003e Additional Options\n  \n      gfortran: -cpp -DLIB_NC\n      ifort: -fpp -DLIB_NC  \n\n  8) Project --\u003e Properties --\u003e Run --\u003e Environment --\u003e NewValue\n  \n      Name: LD_LIBRARY_PATH \n      Value: $LD_LIBRARY_PATH:/path_to_necdf/lib/\n\nOnce the NetCDF4 are linked, it will be possible to compile each source file using the F9 key.\nAfter doing all these steps, the users have to set the debug command to run Hydrological Model Continuum \nusing, for instance, a namelist file of a study case:  \n  \n  9) Debug --\u003e Debug Command \n  \t\n  \"${OUTPUT_PATH}\" domainname.info.txt\n\nAfter setting the environment and all needed options for running the model, the users will are able to get a deeper information using the options to execute code in a debugging mode using breakpoints and all the features available in **gdb** debugging library [9_].\n\nPotential Users\n***************\nThe HMC has been released to enable different applications (for example local/regional scenario assessment) and further development by external users.\n\nPotential users are anticipated to predominately be interested in the ability to run the model with local data (including scenario modelling) and to modify the model with new capabilities. The potential collaborators have expressed a range of potential goals for their use of the HMC, including performing comparisons with existing models, tailoring the hydrological performance to specific land uses and cropping types.\n\nContribute and Guidelines\n*************************\n\nWe are happy if you want to contribute. Please raise an issue explaining what is missing or if you find a bug. We will also gladly accept pull requests against our master branch for new features or bug fixes.\n\nIf you want to contribute please follow these steps:\n\n    • fork the hmc-dev repository to your account;\n    • clone the repository, make sure you use \"git clone --recursive\" to also get the test data repository;\n    • make a new feature branch from the repository master branch;\n    • add your feature;\n    • please include tests for your contributions in one of the test directories;\n    • submit a pull request to our master branch.\n\nAuthors\n*******\n\nAll authors involved in the library development for the HMC are reported in this authors_ file.\n\nLicense\n*******\n\nBy accessing or using the HMC, code, data or documentation, you agree to be bound by the HMC license available. See the license_ for details. \n\nChangelog\n*********\n\nAll notable changes and bugs fixing to this project will be documented in this changelog_ file.\n\nReferences\n**********\n| [1_] CIMA Hydrology and Hydraulics GitHub Repository\n| [2_] Fortran programming language\n| [3_] FloodPROOFS virtual environment tools\n| [4_] ZLIB compression library\n| [5_] HDF5 data software library \n| [6_] NetCDF4 data software library \n| [7_] Hydrological Model Continuum codes\n| [8_] NetBeans Apache IDE \n| [9_] GDB \n\n.. _1: https://github.com/c-hydro\n.. _2: https://en.wikipedia.org/wiki/Fortran\n.. _3: https://github.com/c-hydro/fp-env\n.. _4: https://zlib.net/\n.. _5: https://www.hdfgroup.org/solutions/hdf5/\n.. _6: https://www.unidata.ucar.edu/\n.. _7: https://github.com/c-hydro/hmc-dev\n.. _8: https://netbeans.apache.org/\n.. _9: https://www.gnu.org/software/gdb/\n.. _license: LICENSE.rst\n.. _changelog: CHANGELOG.rst\n.. _authors: AUTHORS.rst\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-hydro%2Fhmc-dev","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-hydro%2Fhmc-dev","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-hydro%2Fhmc-dev/lists"}