{"id":28421747,"url":"https://github.com/joboog/r2ogs6","last_synced_at":"2026-02-15T03:31:25.265Z","repository":{"id":186956200,"uuid":"591267025","full_name":"joboog/r2ogs6","owner":"joboog","description":"R-API to the multiphysics simulator OpenGeoSys 6.       THIS IS A MIRROR OF: https://gitlab.opengeosys.org/ogs/tools/r2ogs6","archived":false,"fork":false,"pushed_at":"2024-12-19T10:43:15.000Z","size":87320,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-05T02:20:56.572Z","etag":null,"topics":["geoscience","hydrogeology","hydrology","multi-physics","opengeosys","porous-media-flow","r","transport-modelling"],"latest_commit_sha":null,"homepage":"https://joboog.github.io/r2ogs6/","language":"R","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/joboog.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-01-20T10:37:42.000Z","updated_at":"2024-12-19T10:43:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"b3d6c312-3e4a-4fd0-adf4-257a70707860","html_url":"https://github.com/joboog/r2ogs6","commit_stats":{"total_commits":498,"total_committers":5,"mean_commits":99.6,"dds":0.3493975903614458,"last_synced_commit":"8573f581bbf6c13b7ad13054f68b40a24883a545"},"previous_names":["joboog/r2ogs6"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/joboog/r2ogs6","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joboog%2Fr2ogs6","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joboog%2Fr2ogs6/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joboog%2Fr2ogs6/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joboog%2Fr2ogs6/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joboog","download_url":"https://codeload.github.com/joboog/r2ogs6/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joboog%2Fr2ogs6/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29466929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-15T01:01:38.065Z","status":"online","status_checked_at":"2026-02-15T02:00:07.449Z","response_time":118,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["geoscience","hydrogeology","hydrology","multi-physics","opengeosys","porous-media-flow","r","transport-modelling"],"created_at":"2025-06-05T06:44:59.303Z","updated_at":"2026-02-15T03:31:25.249Z","avatar_url":"https://github.com/joboog.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# r2ogs6\n\n[![Pipeline Status](https://gitlab.opengeosys.org/ogs/tools/r2ogs6/badges/master/pipeline.svg)](https://gitlab.opengeosys.org/ogs/tools/r2ogs6/-/commits/master)\n[![Test Coverage](https://gitlab.opengeosys.org/ogs/tools/r2ogs6/badges/master/coverage.svg)](https://gitlab.opengeosys.org/ogs/tools/r2ogs6/-/jobs)\n[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.7389626.svg)](https://doi.org/10.5281/zenodo.7389626)\n[![JOSS Submission](https://joss.theoj.org/papers/08cb661c22ca8553e418acafeb9e7cb5/status.svg)](https://joss.theoj.org/papers/08cb661c22ca8553e418acafeb9e7cb5)\n\n`r2ogs6` provides a file--based interface of the multi--physics sub-surface process simulator [OpenGeoSys 6](https://gitlab.opengeosys.org/ogs/ogs) to the `R` programing and statistical computing environment.\nIt enables geoscientist, hydrologists and engineers to perform and analyze simulation models of the sub--surface earth system with R.\n`r2ogs6` provides means to:\n- pre-process (preparing input files) simulations with OpenGeoSys 6\n- execute single and ensemble simulations\n- output post-processing and visualization\n\n\n## Setup\n\n`r2ogs6` requires an installation of OpenGeoSys 6.\nFurthermore, Python including the libraries `numpy` and `vtk` is required to read in the `.vtu` and `.pvd` files produced by OpenGeoSys 6.\nThese can be install after having installed `r2ogs6`.\n`r2ogs6` was tested with the following environment: `python==3.10.12`, `vtk==9.3.1`, `numpy==1.26.4`\n\n\n### r2ogs6 Installation\n\nFirst, open a terminal and clone the `r2ogs6` repository to your local machine.\n\n```\ngit clone https://gitlab.opengeosys.org/ogs/tools/r2ogs6.git\n```\n\nTo install `r2ogs6`, you first need the R-packages `remotes` and `BiocManager`.\n`remotes` is used for installing `r2ogs6` and `BiocManager` to set the URLs \nto search dependencies on *CRAN* and *bioconductor.org*.\nFor instance, the dependency `rhdf5` is only available on *bioconductor.org*.\nOpen a R console in your specific project:\n\n```r\ninstall.packages(c(\"remotes\", \"BiocManager\"))\n```\n\nWith `remotes`, you can now install `r2ogs6` in your preferred library.\n\n```r\n# Install r2ogs6. Change \"path/to/r2ogs6\" to that of the cloned repository!\nremotes::install_local(\n    path=\"path/to/r2ogs6\", \n    dependencies=\"Imports\",\n    repos=BiocManager::repositories()\n)\n```\n\n#### Set-up Python\n\nOpenGeoSys 6 requires a Python installation of version 3.8--3.11.\n\n\n##### Linux systems\n\nIf you do not have Python installed yet you can do so with the \n[reticulate](https://rstudio.github.io/reticulate/index.html) library from\nyour R console.\n\n```r\nreticulate::install_python(version = \"3.10:latest\")\n```\n\nOtherwise you can use the package manager of your linux distribution.\n\n\n##### Windows\n\nIdeally, install Python with a [Python Windows installer](https://www.python.org/downloads/windows/).\nOf course you could also try:\n\n```r\nreticulate::install_python(version = \"3.10:latest\")\n```\n\n#### Install Python dependencies and OpenGeoSys 6\n\nCreate a Python virtual environment with a specific name (e.g. \"r2ogs6) and the\n path to the Python executable you just installed.\n\n```r\nreticulate::virtualenv_create(\n    envname=\"r2ogs6\", \n    python=\"/path/to/python\",\n    packages = c(\"numpy==1.26.4\", \"vtk==9.3.1\")\n)\n```\n\nMake sure that `reticulate::py_config()$python` points to the python executable\nin the newly installed Python virtual environment.\nYou can try to force `reticulate` to use the executable of your environment by:\n\n```\nreticulate::use_virtualenv(virtualenv=\"r2ogs6\")\n```\n\nIf that does not work, quit your R session and create a `.Renviron` file in \nyour project folder where you can set the path to the created virtual python\nenvironment:\n\n```\n# .Renviron linux\nRETICULATE_PYTHON=/path/to/your/virtualenv/bin/python\n```\n\nThis file is read at the start-up of R and forces `reticulate` to use your\nspecific Python executable. Double check if your python envrionment is now \nrecognized:\n\n```r\nreticulate::py_config()\n``` \n\nThen you can install OpenGeoSys 6 (the Python dependencies `numpy` and `vtk` \nwill be installed alongside) as Python module.\n\n```\nlibrary(r2ogs6)\ninstall_ogs(ogs_version = \"6.5.2\", envname = \"r2ogs6\")\n```\nBe aware, to install the OpenGeoSys 6 version compatible with the `r2ogs6` version,\n see [releases](https://gitlab.opengeosys.org/ogs/tools/r2ogs6/-/releases).\nCheck if OpenGeoSys 6 was installed correctly.\n\n```\nreticulate::py_module_available(\"ogs\")\n```\n\nThe OpenGeoSys 6 binary should be located at `/path/to/your/python_env/bin/ogs` \n(Linux) or `/path/to/your/python_env/Scripts/ogs` (Windows). \nIn your active R session you can temporarily set this path as default when \nusing `r2ogs6` (sets `options(\"r2ogs6.default_ogs6_bin_path\")`.)\n\n```\nset_ogs6_bin_path()\n```\n\nFor setting this permanently, create a `config.yml` file in your project \ndirectory.\n\n```yml\n# config.yml for linux\ndefault:\n    r2ogs6.default_ogs6_bin_path: /path/to/python_env/bin/ogs\n```\n\n\n#### Alternative manual setup of Python environment\n\nAlternatively, you can set up the python environment including OpenGeoSys 6\nwithout `reticulate`; have a look [here](https://www.opengeosys.org/docs/userguide/basics/introduction/#install-via-pip).\nBe aware, to download or install the OpenGeoSys 6 version compatible with the `r2ogs6` version, see [releases](https://gitlab.opengeosys.org/ogs/tools/r2ogs6/-/releases).\n\nNevertheless `r2ogs6` uses `reticulate` under the hood.\nSo make sure that `reticulate::py_config()` shows the correct Python\nenvironment that you configured.\n\n\n## Usage\n\nTo quickly test if your set up works just run a benchmark shipped with the \npackage. \nRemember that if you closed your R session in between you may have to reset the\n `ogs_bin_path` by ```set_ogs6_bin_path()```.\nNow you can setup an example by:\n\n```\nsim_path \u003c- tempdir()\n\n# Create new ogs object\nogs6_obj \u003c- OGS6$new(\n    sim_name = \"my_simulation\",\n    sim_path = sim_path\n)\n\n# Read in a project setup file\nprj_path \u003c- system.file(\n    \"extdata/benchmarks/flow_no_strain/flow_no_strain.prj\",\n    package = \"r2ogs6\"\n)\nread_in_prj(ogs6_obj, prj_path = prj_path, read_in_gml = T)\n```\n\nJust start the simulation, check if it succeeds (returns a \"0\" exit status) and\n hav a look at the output.\n\n```\nogs6_run_simulation(ogs6_obj)\n\nogs6_read_output_files(ogs6_obj)\nresult_df \u003c- ogs6_obj$pvds[[1]]$get_point_data(keys = c(\"pressure\"))\nresult_df\n```\n\n\n## Further Reading\n\nFor tutorials on how to use the `r2ogs6` package, have a look at its vignettes:\n\n* [User Guide](vignettes/user_workflow_vignette.Rmd) \n* [Ensemble Guide](vignettes/ensemble_workflow_vignette.Rmd)\n* [Developer Guide](vignettes/dev_workflow_vignette.Rmd)\n\nCorresponding HTML versions can be found [here](inst/vignettes_built/).\n\n## Links\n\n* [OpenGeoSys Project](https://www.opengeosys.org/)\n* [OpenGeoSys source code](https://gitlab.opengeosys.org/ogs/ogs)\n* [OpenGeoSys documentation](https://www.opengeosys.org/docs/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoboog%2Fr2ogs6","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoboog%2Fr2ogs6","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoboog%2Fr2ogs6/lists"}