From 3ff181a40f89b9dbf5d61faa605a2e6231f7e761 Mon Sep 17 00:00:00 2001 From: JoerivanEngelen Date: Wed, 1 Nov 2023 07:02:27 +0000 Subject: [PATCH] deploy: 73a65946d5faaaf9c4c0dbc0ebf67305655d315d --- index.html | 12 +- practical.html | 14 +- search.json | 758 ++++++++++++++++++++++++------------------------- tutorial.html | 6 +- 4 files changed, 395 insertions(+), 395 deletions(-) diff --git a/index.html b/index.html index 45b8426..4905b24 100644 --- a/index.html +++ b/index.html @@ -200,7 +200,7 @@

iMOD Suite Documentation

-
+ -
+ -
+ -
+ -
+ -
+

diff --git a/practical.html b/practical.html index f6e425d..541c6af 100644 --- a/practical.html +++ b/practical.html @@ -201,7 +201,7 @@

Practic
-
+ -
+ -
+ -
+ -
+ -
+ -
+

diff --git a/search.json b/search.json index 4abf4a5..9c66326 100644 --- a/search.json +++ b/search.json @@ -1,4 +1,67 @@ [ + { + "objectID": "introduction.html", + "href": "introduction.html", + "title": " Introduction", + "section": "", + "text": "The iMOD Suite provides tools to efficiently build and visualize groundwater models.\nDeltares is working to integrate and improve our groundwater software. Therefore iMOD is extended with a new iMOD Suite to link to the latest developments on the MODFLOW and on the changing requirements in the field of groundwatermodelling, most pressing currently the support of unstructured grids.\nWe created the new iMOD Suite to aid pre- and post-processing unstructured groundwater models. Furthermore, a second goal of this suite was to better connect to the latest developments in the data science ecosystem, by utilizing:\n\nExisting data format conventions (NetCDF, UGRID) instead of developing new ones, allowing more user flexibility to find the right tools for the right job.\nWidely used and tested software (QGIS) to which we add our extension, instead of creating complete programs ourselves.\nModern programming languages (C++ and Python) that allow connecting to a big and lively software ecoystem.\n\nThe iMOD Suite offers different modules which support modelling with MODFLOW 6 (including unstructured meshes):\n\niMOD Viewer: The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin. The iMOD QGIS Plugin allows visualisation of model input and output with tools for cross-sections, timeseries and link to the 3D viewer. It supports structured NetCDF, UGRID and IPF files. And the iMOD 3D Viewer for interactive 3D visualisation of unstructured input and output. Supports UGRID file format and IPF borelog files.\niMOD Python: A Python package to support MODFLOW groundwater modeling. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this workflow reproducible.\niMOD Coupler: Software that couples MODFLOW 6 to other computational cores. It currently supports a coupling to MetaSWAP, but additional computational cores are planned in the future.\n\n\n\n\nEasy plotting of 4 dimensional [t, z, y, x] data in the iMOD QGIS plugin. The example shows the chlorine concentrations computed by the NHI fresh-salt model.\n\n\n\n\n\nThe chlorine concentrations computed by the NHI-fresh-salt model for the province of Zeeland, plotted in the new iMOD 3D viewer. The top layer is made partly transparent, creating the pretty mist effect in the creek ridges." + }, + { + "objectID": "introduction.html#whats-included", + "href": "introduction.html#whats-included", + "title": " Introduction", + "section": "", + "text": "The iMOD Suite provides tools to efficiently build and visualize groundwater models.\nDeltares is working to integrate and improve our groundwater software. Therefore iMOD is extended with a new iMOD Suite to link to the latest developments on the MODFLOW and on the changing requirements in the field of groundwatermodelling, most pressing currently the support of unstructured grids.\nWe created the new iMOD Suite to aid pre- and post-processing unstructured groundwater models. Furthermore, a second goal of this suite was to better connect to the latest developments in the data science ecosystem, by utilizing:\n\nExisting data format conventions (NetCDF, UGRID) instead of developing new ones, allowing more user flexibility to find the right tools for the right job.\nWidely used and tested software (QGIS) to which we add our extension, instead of creating complete programs ourselves.\nModern programming languages (C++ and Python) that allow connecting to a big and lively software ecoystem.\n\nThe iMOD Suite offers different modules which support modelling with MODFLOW 6 (including unstructured meshes):\n\niMOD Viewer: The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin. The iMOD QGIS Plugin allows visualisation of model input and output with tools for cross-sections, timeseries and link to the 3D viewer. It supports structured NetCDF, UGRID and IPF files. And the iMOD 3D Viewer for interactive 3D visualisation of unstructured input and output. Supports UGRID file format and IPF borelog files.\niMOD Python: A Python package to support MODFLOW groundwater modeling. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this workflow reproducible.\niMOD Coupler: Software that couples MODFLOW 6 to other computational cores. It currently supports a coupling to MetaSWAP, but additional computational cores are planned in the future.\n\n\n\n\nEasy plotting of 4 dimensional [t, z, y, x] data in the iMOD QGIS plugin. The example shows the chlorine concentrations computed by the NHI fresh-salt model.\n\n\n\n\n\nThe chlorine concentrations computed by the NHI-fresh-salt model for the province of Zeeland, plotted in the new iMOD 3D viewer. The top layer is made partly transparent, creating the pretty mist effect in the creek ridges." + }, + { + "objectID": "introduction.html#comparison-with-imod-5", + "href": "introduction.html#comparison-with-imod-5", + "title": " Introduction", + "section": "Comparison with iMOD 5", + "text": "Comparison with iMOD 5\nThe proven technology and expertise of iMOD is consolidated within iMOD 5. iMOD 5 supports structured calculations with MODFLOW2005 and structured MODFLOW 6 and can be coupled to the unsaturated zone model MetaSWAP. The model input and output can be visualised in its fast interactive viewer. The documentation of iMOD 5 can be found here .\nImportant technological innovations will be developed in the new iMOD Suite, whereas iMOD 5 will be maintained the coming years, but will see no big new feature developments. Table 1 and Table 2 respectively provide comparisons between iMOD Suite and iMOD 5 for the components and supported MODFLOW6 packages.\n\n\nTable 1: Comparison between iMOD Suite & iMOD 5\n\n\n\n\n\n\n\n\niMOD Suite\niMOD 5\n\n\n\n\ncomputational kernels\nMODFLOW 2005, MODFLOW 6, SEAWAT, MT3DMS, MetaSWAP\nMODFLOW 2005, MODFLOW 6, SEAWAT, MT3DMS, MetaSWAP\n\n\nfile types\nNetCDF, UGRID, shp, tiff, idf, ipf, gen\nidf, ipf, isg, gen\n\n\ngrid types\nstructured & unstructured\nstructured & nested structured\n\n\nscripted pre-processing\niMOD Python\niMOD Batch\n\n\ninteractive pre-processing\n(QGIS)\niMOD GUI\n\n\nscripted 2D plot\niMOD Python\niMOD Batch\n\n\ninteractive 2D plot\niMOD QGIS plugin (& QGIS)\niMOD GUI\n\n\nscripted 3D plot\niMOD Python\n\n\n\ninteractive 3D plot\niMOD 3D Viewer\niMOD GUI\n\n\n\n\n\n\nTable 2: Supported MODFLOW6 flow packages in iMOD Suite & iMOD 5\n\n\n\n\n\n\n\n\nPackage\nDescription\niMOD Suite\niMOD 5\n\n\n\n\nDIS\nStructured Discretization\nx\nx\n\n\nDISV\nDiscretization by Vertices\nx\n\n\n\nDISU\nStructured Discretization\n\n\n\n\nIC\nInitial Conditions\nx\nx\n\n\nOC\nOutput Control\nx\nx\n\n\nNPF\nNode Property Flow\nx\nx\n\n\nHFB\nHorizontal Flow Barrier\nx\nx\n\n\nSTO\nStorage\nx\nx\n\n\nCSUB\nSkeletal Storage, Compaction, and Subsidence\n\n\n\n\nBUY\nBuoyancy\nx\n\n\n\nCHD\nConstant-Head\nx\nx\n\n\nWEL\nWell\nx\nx\n\n\nDRN\nDrain\nx\nx\n\n\nRIV\nRiver\nx\nx\n\n\nGHB\nGeneral-Head Boundary\nx\nx\n\n\nRCH\nRecharge\nx\nx\n\n\nEVT\nEvapotranspiration\nx\nx\n\n\nMAW\nMulti-Aquifer Well\n\n\n\n\nSFR\nStreamflow Routing\n\nx\n\n\nLAK\nLake\n\n\n\n\nUZF\nUnsaturated Zone Flow\nx\n\n\n\nMVR\nWater Mover" + }, + { + "objectID": "practical_git_dvc.html", + "href": "practical_git_dvc.html", + "title": " Version control your projects", + "section": "", + "text": "Since scripting becomes increasingly important in hydrological projects, the rules of software development also start to apply to us. This has the downside that it requires extra effort from us, hydrologists, to learn new tools, but the upside is that there already is a wealth of properly tested tools and documentation available from the software development world. Having reproducible code is one of these important things, for which version control systems have been developed. It is very useful to use these systems in hydrological projects, since they provide the following advantages:\n\nYou keep track of the history of a project. In this way you keep a journal of decisions made in a project.\nIf you mess up something, you can always revert to a previous state.\nIt allows for collaborative development, where individuals can create their own branch to safely work on new developments and later merge their changes.\n\nThis document describes how to use Git and DVC. If you are running into issues, Stackoverflow has a lot of information available (>145,000 questions at 02-03-2023), since Git is so commonly used today.\n\n\nToday (03-2023), Git is the most commonly used version control system for code. Code development is usually shared on platforms such as Github or Gitlab.\nOne of the main differences between Git and older systems such as Subversion is that Git is a distributed version control system, whereas Subversion is a centralized system. In subversion, there is no history of changes on the machine, only on the central server. So therefore, to do any version control, the user has to be connected to a server. With Git a repository on a server (called remote) is first cloned to the user's local machine. This repository includes the full history of changes. The user can then make his/her changes, after which he/she can push these back to the remote, but does not have to. Because it is more indirect, and the availability of widely used platforms such as Github, the distributed nature of Git allows for smooth development between different organizations as well as open-source code development. Furthermore, you can develop code offline.\nDue to its background in software engineering, Git is only useful for versioning scripts and textfiles, and not for large files. For versioning larger files we use DVC.\n\n\n\nDVC stands for Data Version Control and it does exactly that. It is built on top of Git and so it uses very similar commands, which can be both easy and confusing at the same time. DVC ensures your large files themselves are not tracked by Git. Instead, it keeps the large files in its own cache and writes simple text files, which store the unique \"version code\" (a hash), each time you commit to DVC. These textfiles then have to be committed to Git. This may seem a bit cumbersome, as you have to commit data first to DVC, and then its version code to Git, but this allows the user to utilize the full potential of both Github as well as Cloud Storages (Like Amazon S3, Google Cloud, Microsoft Azure etc.). The version history is all stored in Git and can be pushed to Github or Gitlab, but the data itself can be stored on different platforms more specialized in handling large files." + }, + { + "objectID": "practical_git_dvc.html#introduction", + "href": "practical_git_dvc.html#introduction", + "title": " Version control your projects", + "section": "", + "text": "Since scripting becomes increasingly important in hydrological projects, the rules of software development also start to apply to us. This has the downside that it requires extra effort from us, hydrologists, to learn new tools, but the upside is that there already is a wealth of properly tested tools and documentation available from the software development world. Having reproducible code is one of these important things, for which version control systems have been developed. It is very useful to use these systems in hydrological projects, since they provide the following advantages:\n\nYou keep track of the history of a project. In this way you keep a journal of decisions made in a project.\nIf you mess up something, you can always revert to a previous state.\nIt allows for collaborative development, where individuals can create their own branch to safely work on new developments and later merge their changes.\n\nThis document describes how to use Git and DVC. If you are running into issues, Stackoverflow has a lot of information available (>145,000 questions at 02-03-2023), since Git is so commonly used today.\n\n\nToday (03-2023), Git is the most commonly used version control system for code. Code development is usually shared on platforms such as Github or Gitlab.\nOne of the main differences between Git and older systems such as Subversion is that Git is a distributed version control system, whereas Subversion is a centralized system. In subversion, there is no history of changes on the machine, only on the central server. So therefore, to do any version control, the user has to be connected to a server. With Git a repository on a server (called remote) is first cloned to the user's local machine. This repository includes the full history of changes. The user can then make his/her changes, after which he/she can push these back to the remote, but does not have to. Because it is more indirect, and the availability of widely used platforms such as Github, the distributed nature of Git allows for smooth development between different organizations as well as open-source code development. Furthermore, you can develop code offline.\nDue to its background in software engineering, Git is only useful for versioning scripts and textfiles, and not for large files. For versioning larger files we use DVC.\n\n\n\nDVC stands for Data Version Control and it does exactly that. It is built on top of Git and so it uses very similar commands, which can be both easy and confusing at the same time. DVC ensures your large files themselves are not tracked by Git. Instead, it keeps the large files in its own cache and writes simple text files, which store the unique \"version code\" (a hash), each time you commit to DVC. These textfiles then have to be committed to Git. This may seem a bit cumbersome, as you have to commit data first to DVC, and then its version code to Git, but this allows the user to utilize the full potential of both Github as well as Cloud Storages (Like Amazon S3, Google Cloud, Microsoft Azure etc.). The version history is all stored in Git and can be pushed to Github or Gitlab, but the data itself can be stored on different platforms more specialized in handling large files." + }, + { + "objectID": "practical_git_dvc.html#installation", + "href": "practical_git_dvc.html#installation", + "title": " Version control your projects", + "section": "Installation", + "text": "Installation\nFirst install Git from this link. If installing on Windows it is useful to make sure Git is added to the %PATH% variable during installation. To test if the installation works, open a command line or shell window and test if the following command works:\nIf this works, install DVC from this link." + }, + { + "objectID": "practical_git_dvc.html#software-to-use-git-and-dvc", + "href": "practical_git_dvc.html#software-to-use-git-and-dvc", + "title": " Version control your projects", + "section": "Software to use Git and DVC", + "text": "Software to use Git and DVC\nYou can run git from the regular Windows command line, but the Windows installation also comes with MinGW (Minimalist GNU for Windows) which can be useful.\n\nMinGW\nMinGW allows you to use Linux commands, as well as other cool stuff (e.g. compiling Fortran 90 with gfortran for free). Note that in it you have to specify paths with Linux-style forward slashes / instead of Windows style backward slashes \\.\nWe recommend defining a button for MinGW in Total Commander by clicking:\nConfiguration > Button Bar > Add\nAnd then specify the path to git-bash.exe under \"Command\", e.g. C:\\\\Program Files\\\\Git\\\\Git\\\\git-bash.exe\n\n\n\n\n\n\nNote\n\n\n\nDepending on your system configuration, you might need to add under \"Parameters\": --login -i\n\n\n\n\nVSCode\nVScode has integrated Git support as well. This is very useful when you are mainly coding, but since you cannot call DVC, less when you are changing model data. This documentation describes how to use it." + }, + { + "objectID": "practical_git_dvc.html#tutorial", + "href": "practical_git_dvc.html#tutorial", + "title": " Version control your projects", + "section": "Tutorial", + "text": "Tutorial\nThere are already several tutorials online available on Git as well as DVC. For Git, this is a useful no-nonsense guide. For DVC, there is this bit more involved tutorial. However, because we want this document to be a bit more than a pointer to other tutorials, here's a quick guide that will describe your typical workflow.\n\nStarting a repository\nYou can start you own repository by changing to the directory first and then initializing git. Open your terminal of choice (e.g. Powershell, cmd, bash) and run the following commands\n> cd path/to/folder \n> git init\nThis will create a hidden .git folder.\nTo then initialize dvc:\n> dvc init\nThis will create a hidden .dvc folder as well as a .dvc/.gitignore file, which will tell Git to automatically ignore parts of the .dvc folder, for example the .dvc/cache folder, where DVC stores all versions of data files. We want Git to ignore these, as we do not want Git to keep track of Gigabytes of data!\n\n\n\n\n\n\nNote\n\n\n\nTo show hidden files and folders (very useful), you can configure Total Commander by clicking:\nConfiguration > Options > Display > \"Show hidden files\"\n\n\n\n\n\n\n\n\nNote\n\n\n\nIt is convenient for later to add the file extensions of files you want to keep in dvc in the .gitignore file, e.g. *.idf. Or you could add your data folder (e.g. data) to this file to exclude everything in it by specifying data/.\n\n\n\n\n\n\n\n\nNote\n\n\n\nThis recipe allows you to kickstart your project, creating already a smart folder structure, a readme and a .gitignore file.\n\n\n\n\nChecking the status\nOne of the first things you should do once you have started your repository, is checking its status.\nChange directories into the repo and call:\n> git status\nThis will show in red the files that are untracked by Git and have to be added still. And in green the files that are staged but have not been committed yet.\nIn order to check if any data files changed in DVC, in a similar way you call:\n> dvc status\n\n\nChecking differences\nIf you have modified one or multiple files, you can view lines you have changed per file with:\n> git diff\nThis will show in green the lines that are new, or different, in the new version of the file. And in red the lines as they were in the old version, or now have been removed.\n\n\nAdding textfiles\nSo you have checked the status and will probably have seen that there is a .dvc/.gitignore file that is already staged (this was added by DVC). What DVC has done for us is the following:\n> git add .dvc/.gitignore\nThis will stage the .gitignore file. This means you have selected a change to be added to a commit. If you want to include a script or other textfile in version control, you have to stage it yourself by calling the git add command.\n\n\n\n\n\n\nWarning\n\n\n\nStaging a script does not mean you have added it to version control yet! A file is only added to version control after you have committed your changes (see next section).\n\n\n\n\nCommitting changes\nBefore your files are added to version control, you have to commit them first. A commit can be seen as a \"snapshot\" of a project that is added to the version control and is therefore \"safe\".\nEach commit should be followed by a message that specifies what you have changed. It is very important that these messages are short and informative, as they form your \"journal entries\" and will make searching your version history a lot easier.\nIn our example, you can commit the added .gitignore file to your version control by calling:\n> git commit -m \"Added file extensions to be ignored by Git.\"\nThe -m option allows you to specify a string that will be your commit message.\nBut what if you accidentally made an error in your message? You can then change it using:\n> git commit --amend\nThis will open up a text editor where you can alter your commit message.\n\n\n\n\n\n\nNote\n\n\n\nThe Windows installation of Git comes with a common Linux text editor called Vim. It is possible your Git is configured to automatically open Vim. Vim is very powerful, but has a steep learning curve. Especially confusing for beginners is closing Vim\nSo to close Vim: First press ESC, then press the colon :. To save your changes, you can type x, or to discard them you can type q!. Finish by pressing Enter.\n\n\n\n\n\n\n\n\nWarning\n\n\n\nAfter committing data, do not naively rename files or move them around. Instead, you should use Git for that. See @section_moving.\n\n\n\n\nMoving/renaming scripts\nBe careful moving scripts around after they have been committed to Git. Despite having the same filename, Git does not necessarily understand this: It sees a file being deleted and other file being created.\nSo in order to safely move or rename committed files, don't copy+paste committed files in your Windows Explorer, but instead let Git do it for you:\n> git mv script.py src/script.py\nThe same holds for renaming:\n> git mv script.py renamed_script.py\n\n\nAdding and committing data files\nWe now know how to add textfiles, but not how to add large binary files, your data. For this we use DVC, to add data in data version control, e.g. all files in the folder data/rivers, you can add the folder:\n> dvc add data/rivers\nThis creates a unique version code (hash) for all files in the folder and adds the data to the cache in the .dvc directory. The hash of the data is stored in textfile named data/rivers.dvc.\nWe have however not included the data in the version log yet... DVC lets Git take care of keeping the version log, so that both code changes as well as data changes are in the same log.\nIt does this by creating .dvc files with the hashes and we are expected to add these to our git repository. We therefore have to run the following commands to fully include the added data to our version control:\n> git add -f data/rivers.dvc \n> git commit -m \"Added river data\"\nWe added the -f option to the add command, just in case you added the data folder to your .gitignore file. This forces git to still add the rivers.dvc file.\nTo summarize, the data backups are stored in the .dvc folder, the log of changes in the .git folder. This allows us to send the data separately to a data cloud oriented to handling large data files (Google Cloud, Amazon S3, Azure etc.), and to send the .git folder to Github or Gitlab to have a nicely browsable version history.\n\n\nUpdating data\nThe commands to add changes made in the data are the same as to add new data:\n> dvc add data/rivers \n> git add -f data/rivers.dvc \n> git commit -m \"Changed river data\"\n\n\nMoving data\nYou can safely move data to a different location in your repo with DVC by calling:\n> dvc move heads.nc data/heads.nc \n> git add data/heads.nc.dvc \n> git commit -m \"Moved heads to data folder\"\n\n\nViewing the version history\nTo view the results of your hard work of carefully maintaining version control, you can call:\n> git log\nThis shows the version history in text form. This is useful for a quick lookup of the last commits, but if you want to go back a lot more becomes cumbersome. There are quite some graphical user interfaces available to view the version history, one of which is already included with your windows installation. You can start it by calling:\n> gitk\nThis is a very light-weight interface, and more fancy ones exist. Furthermore, when pushing to a remote (see @pushing_to_remote), Github and Gitlab have very good interfaces to view the commit history as well.\n\n\nReverting and resetting commits\nSay you added a commit that was not going to be used, and want to go back. Git provides multiple options to do this safely, and some to do this not so safely.\nSay you want to revert the repository back to a previous state, but want to keep the changes you made after that state. You can revert the last commit you made with:\n> git revert HEAD\nHEAD is the hash of the last commit you made. You can lookup these hashes by calling git log. Say this last hash currently is j1c13377c6d4adfhcc69c6ac7b51e919b15a65c4 We could do the same by calling:\n> git revert j1c13377c6d4adfhcc69c6ac7b51e919b15a65c4\nIf you now call git log again, you can see that the revert of this specific commit is also stored as a new commit. You can always revert the revert as well, if you suddenly decide you actually needed those changes.\nSometimes you commit something which in hindsight is so stupid, you neither want to bother other people with it, nor yourself again. In this case you can reset the repository to a previous state. Say you want to reset to the state before your last commit (basically undoing the last commit), you can call:\n> git reset --hard HEAD~1\nHEAD~1 is the hash of the second last commit. In this way all commits after the second last commit are deleted, so be careful.\n\n\n\n\n\n\nNote\n\n\n\nNote that for git revert we refer to the commit we want to undo, whereas for git reset we refer to the commit before this, because git reset wants to know the state we want to reset to.\n\n\nIf you are also resetting/reverting data changes added to DVC, the data referred to in the last git commit still has to be put in your workspace. To do this call:\n> dvc checkout\nThis will make DVC check all data referred to in the .dvc files again, recalculating hashes, which is a slow process. If you know which files are changed (e.g. 'heads.nc'), you can speed up things considerably by referring to the specific files:\n> dvc checkout heads.nc\n\n\nPushing to remote\nUp to now you have learned how to safely store scripts and data locally, but what if your hard-drive crashes? Or if you accidentally shift+delete your whole repository? In those cases you wished you also stored your repository somewhere else! That's why Git, as well as DVC, allow you to push your repository to a remote.\nThis has two benefits:\n\nYour repository is safely stored somewhere else\nYour colleagues can also access your repository and collaborate on Gitlab/Github.\n\nWe first have to configure Git to know the location of your remote and give it a name. A commonly used name for remote repo is \"origin\".\n> git remote add origin <https://github.com/username/repo.git>\nYou can list the remotes you have added with:\n> git remote -v\nAfter you have added your remote, you can push your code to the remote by calling:\n> git push\nDVC behaves very similar, except that the location of the DVC remote is stored in a file named .dvc/config that has to be added to Git. Say we want to add my google drive to a remote named \"google-drive\":\n> dvc remote add google-drive gdrive://some-hash-number-here \n> git add .dvc/config\n> git commit -m \"Added google-drive as dvc remote\"\nYou can then push to google-drive by calling:\n> dvc push\n\n\nCloning an existing repository\nIt is also possible to easily create a local copy of an existing repository. You can tell git to clone a remote repository into the current directory with:\n> git clone <http-address>\nFor example, to clone the California model repository, you can call:\n> git clone <https://gitlab.com/deltares/imod/california_model.git>\n\n\n\n\n\n\nNote\n\n\n\nThis might require a Gitlab account with 2 factor authorization.\n\n\n\n\n\n\n\n\nNote\n\n\n\nYour organization might have strict security settings and you might run into: SSL certificate problem: self signed certificate in certificate chain github. You can follow these instructions to fix this." + }, + { + "objectID": "practical_git_dvc.html#further-reading", + "href": "practical_git_dvc.html#further-reading", + "title": " Version control your projects", + "section": "Further reading", + "text": "Further reading\nFor Git commands, you can also take a look at this useful cheat sheet ." + }, { "objectID": "practical.html", "href": "practical.html", @@ -7,116 +70,116 @@ "text": "Listed here are practical tips how to use the iMOD Suite in combination with other tools for very performant workflows.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Consistent folder structures with Cookiecutter\n\n\nKickstart your projects with Cookiecutter\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Version control your projects\n\n\nUse Git and DVC to version control your model workflows\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Snakemake Tips \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Handling messy data\n\n\nSome tips in dealing with messy data, or – God forbid – to avoid producing it yourself.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Parallel MODFLOW\n\n\nFix common issues when running iMODFLOW & iMOD-WQ codes with MPI.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Powershell profile error\n\n\nLearn how to fix the Powershell profile error which can hamper using Visual Studio Code\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n How to look like a pro\n\n\nSome general tips and tricks to make your editors and terminals look cool.\n\n\n\n\n\n\n\n\n\n\n\n\nNo matching items" }, { - "objectID": "qgis_user_manual.html", - "href": "qgis_user_manual.html", - "title": "QGIS Plugin User Manual", - "section": "", - "text": "This part contains the user guide of the QGIS plugin." - }, - { - "objectID": "qgis_user_manual.html#description", - "href": "qgis_user_manual.html#description", - "title": "QGIS Plugin User Manual", + "objectID": "coupler_architecture.html", + "href": "coupler_architecture.html", + "title": "Architecture", "section": "", - "text": "This part contains the user guide of the QGIS plugin." + "text": "The purpose of iMOD Coupler is to couple hydrological kernels. iMOD Coupler itself is written in Python, but the kernels are written in either Julia or Fortran. The most common way of interacting with libraries written in different languages is by letting them expose a C interface and compiling them as shared libraries.\nWhile not technically required, these libraries are expected to follow a variation of the Basic Model Interface or BMI. This describes a standardized way of controlling a modelling framework. It also allows to utilize the xmipy package, which wraps the C API into a Python API. On top of that, it is often convenient to add functions specific to the kernels. This is why Ribasim and MODFLOW 6 get a XmiWrapper subclass, that is called ribasim_api and modflow_api respectively.\nflowchart BT\n libribasim.dll--> xmipy_r[xmipy]\n libmf6.dll --> xmipy_m[xmipy]\n xmipy_r --> ribasim_api \n xmipy_m --> modflow_api \n ribasim_api --> imodc[iMOD Coupler]\n modflow_api --> imodc\nMost input data needs to be pre-processed in order to be suitable for the hydrological kernels. In the case of Ribasim this is handled by Ribasim Python, in the case of MODFLOW 6 it is handled by iMOD Python. However, the input data for the iMOD Coupler needs to be pre-processed as well. Coupling tables describe how the coupling takes place. In order to generate them, input data from all kernels are needed. The primod package wraps the functionality of the kernel pre-processors and generates the coupling data for iMOD Coupler.\nflowchart BT\n ribasim_python[Ribasim Python] --> primod\n imod-python[iMOD Python] --> primod\n primod --> ribasim[Ribasim]\n primod --> imodc\n primod --> modflow6[MODFLOW 6]\n ribasim --> imodc[\"iMOD Coupler\"]\n modflow6 --> imodc" }, { - "objectID": "qgis_user_manual.html#configuration", - "href": "qgis_user_manual.html#configuration", - "title": "QGIS Plugin User Manual", - "section": "Configuration", - "text": "Configuration\n\nYou probably want to change the language settings in QGIS, if it defaults to Dutch, it’s Extra > Opties > Algemeen. Change it to to US settings (that’s generally the safest default). You will need to restart QGIS before this has effect.\n\n\n\n\n\nStart up QGIS, go to Plugins > Manage and Install plugins > Installed. Make sure the iMOD plugin is ticked.\n\n\nIf the installation and configuration was successful, the plugin should be visible in your toolbar." + "objectID": "coupler_architecture.html#drivers", + "href": "coupler_architecture.html#drivers", + "title": "Architecture", + "section": "Drivers", + "text": "Drivers\nCoupling Ribasim and MODFLOW 6 is only one of multiple coupling configurations. Each configuration is handled by an iMOD Coupler driver. A driver is a Python module under imod_coupler/drivers. At the minimum, it includes a subclass of the abstract class Driver as well as its own config under the [[driver.coupling]] namespace. A driver itself also includes a BMI interface, executing it then looks like this:\nself.initialize()\n\nwhile self.get_current_time() < self.get_end_time():\n self.update()\n\nself.finalize()" }, { - "objectID": "qgis_user_manual.html#functionality", - "href": "qgis_user_manual.html#functionality", - "title": "QGIS Plugin User Manual", - "section": "Functionality", - "text": "Functionality\nThe QGIS plugin currently consists of five widgets, of which the functionality will be described in the next section:\n\nOpen IPF\n3D Viewer\nTime Series\nCross section\nAdd NHI data\n\n\n Open IPF\nOpen IPF file and lets QGIS interpret it as a regular shapefile with points. Required to interpret timeseries in the Time Series widget, as well as to visualize borelogs in Cross section and 3D Viewer widget. To an IPF timeseries file it attaches two columns to the attribute table of the vector layer, namely a \"start time\" and \"end time\". This allows using the QGIS Temporal Controller Panel to browse through time, and see which points have data defined within a certain time frame.\n\nPress the \"...\" button to select a path to a file (as you would in other QGIS windows).\nPress \"Add\" to load the file into the QGIS explorer.\n\n\n\n\n\n\n\nWarning\n\n\n\nCurrently the IPF reader is not able to read every IPF file, as iMOD 5 supports quite a wide range of IPF files. For example, iMOD 5 supports both whitespace and comma separated files, whereas the QGIS plugin only supports comma separated IPF files. If the plugin is unable to read your IPF file, it is best to read the file with iMOD Python and consequently write it again. This can help, because the IPF reader in iMOD Python is a lot more flexible, but its writer always writes to a specific format. We plan to improve the flexibility of the plugin's IPF reader.\n\n\n\n\n\nThe Open IPF widget.\n\n\n\n\n\nThe temporal controller panel and map canvas of QGIS. The temporal controller panel is opened by clicking the clock in the \"map navigation\" toolbar.\n\n\n\n\n 3D Viewer\nThe 3D viewer widget creates a connection between QGIS and the iMOD 3D viewer. It allows you to make selections in QGIS and forward them to the 3D viewer. Note that there are two perquisites for the iMOD viewer to correctly render mesh data:\n\nThe mesh data needs to be stored in a UGRID file\nVertical axis is stored as variables top_layer_* and bottom_layer_*. The data belonging to each layer follows the following format head_layer_*, e.g. for a variable head.\n\nThis means that not all data that can be loaded in QGIS as mesh can be viewed in the 3D viewer. Currently only UGRID meshes and IPF borelog files are supported.\n\nUse the selection box at the top to select the mesh layer/ipf file you want to inspect in the 3D viewer.\nThe \"Extent\" group allows the user to manually set the bounding box by editing the numbers under \"North\", \"East\", \"South\", and \"West\", and more:\n\nThe \"Current Layer Extent\" button sets the bounding box to the extent of the layer selected in the QGIS explorer.\nThe \"Calculate from Layer\" box allows you to select a dataset loaded in the QGIS explorer to calculate the extent from.\n\"Map canvas extent\" sets the bounding box to the map canvas\n\nThe \"Select\" group contains a set of buttons to spatially select data to be forwarded to the 3D viewer\n\nThe \"Draw fence diagram\" button allows to draw lines on the map canvas which can be forwarded to the 3D viewer to draw a fence diagram. Press the button to start drawing mode. Left-click to start drawing a line; right-click to stop drawing the line.\nThe \"Clear fence diagram\" button clears all lines from the map canvas\nThe \"Draw extent\" buttons allows you to click and drag a box that allows you to set a bounding box. The iMOD viewer will only load the data within this boundary box, which can be useful when exploring specific areas in large datasets. Drawing an bounding box will update the \"Extent\" widget. Right-click to stop drawing the extent.\n\nThe \"View\" group contains a set of buttons to interact with the 3D viewer\n\n\"Start iMOD viewer\" starts the iMOD viewer and immediately loads the data selected in the widget.\n\"Load mesh data\" remove previous data from viewer and load new mesh data in it.\n\"Load fence diagram\" loads the lines drawn with \"Draw fence diagram\" to the viewer and renders a fence diagram.\n\"Load legend\" transfers legend in the QGIS map layer to fence diagram and/or mesh data in the 3D viewer for the selected variable in the QGIS map canvas.\n\n\n\n\n\nThe 3D viewer widget. It will be opened on the right-hand side of the screen.\n\n\n\n\n\n\n\n\nNote\n\n\n\nThe 3D Viewer widget does not forward any data to the iMOD 3D viewer, it only forwards the path to the data to load, and a command how to load it. As of now, the widget does not understand changes made by the user in the 3D viewer. It only supports \"one-way traffic\" towards the viewer.\n\n\n\n\n Time Series\nThe Time Series widget visualizes time series stored in IPF files or mesh data in a graph window. You can freely zoom and drag the graph in this window. Sometimes you lose your view of the lines by dragging too fast; so to reset your view, you can click on the small \"A\" in the bottom left corner of the graph window. The buttons in the widget change, depending on which data type is being selected.\n\nUse the box on the top left of the widget to select the ipf file or mesh data to plot.\n\"ID column\" box allows you to select the column of the attribute table that sets the point ID's to be plotted in the legend.\nThe \"Variable\" box sets the variable (or variables in case of IPFs) to be plotted.\nThe \"Layer\" box sets the layers of a mesh to be plotted. Multiple layers can be selected.\nThe \"Select points\" box allows selecting points in a dataset to plot.\n\n\nWhen selecting on a IPF, left-click and drag a box to select points. SHIFT + click to add points to the existing selection. Press CTRL + ALT + A to deselect all points. You can also click Deselect features from all layers in QGIS' selection toolbar. To stop selecting, click Pan Map in QGIS' Map Navigation toolbar, or close the Timeseries widget.\nWhen selecting on a mesh, left-click to select a point on a mesh to plot, right-click to stop selecting.\n\n\nThe \"update on selection checkbox\": when checked on, the widget automatically plots newly selected points for point data or plots data at the location of the cursor for mesh data.\nThe \"Line Color\" box allows you to set a color of a selected line. You can select a plotted line by clicking on it.\nThe \"Draw markers\" check box enables the drawing of markers on each data point. Recommended when there are not many datapoints to show and/or when the intervals between data points are not constant.\nThe \"Colors\" button opens up a new window that lets you select different colorramps.\nThe \"Export\" button allows you to export your plot to an image file (.png, .jpg etc.), a vector file (.svg for Inkscape), or a .csv to allow for plotting in different software.\n\n\n\n\nThe Time series widget and map canvas for points. Notice that the widget can handle irregular time series filled with gaps. The yellow points on the map canvas indicate the selected points.\n\n\n\n\n\nThe Time series widget and map canvas for a mesh. The red crosses indicate the location of the plotted time-series.\n\n\n\n\n\n\n\n\nNote\n\n\n\nA known issue with a multiple monitor setup is that the grid behind the plot might be plotted way off. See the known issues section for more info and how to fix this.\n\n\n\n\n Cross-section\nThe cross-section widget allows you to draw cross-sections of both mesh and raster data. Note that the widget expects that the vertical axis is stored as variables top_layer_* and bottom_layer_*. The data belonging to each layer follows the following format head_layer_*, e.g. for a variable head. For time dependent data, when the Temporal Controller Panel is turned on, the cross-section plot is automatically updated when a different moment in time is selected.\nThe cross-section widget consists of three component:\n\nThe top bar\nA styling table, specifying the styling and order of elements to plot.\nA graph window, in which the cross-section is plotted.\n\nThe functionality of each component is explained below.\n\n\nThe top bar\n\n\n\"Select location\" lets you draw a line on the map, along which a cross-section will be drawn. Left-click to start and to stop drawing a line. Right-click to stop the selection.\nWhen the \"Dynamic resolution\" checkbox option is switched on, the amount of points along which data is sampled for the plot is set to a fixed number and resolution varies. Turning this off and setting a very small resolution size might improve precision, but will definitely result in a performance loss.\nThe \"Search buffer\" box sets the tangential distance from which boreholes will will be selected.\nThe \"Plot\" button plots the data and styling selected in the styling table to the graph window.\nThe \"Export\" button allows you to export your plot to an image file (.png, .jpg etc.), a vector file (.svg for Inkscape), or a .csv to allow for plotting in different software.\n\n\n\n\nThe styling table\n\n\nThe top left selection box allows you to choose the dataset to plot.\nThe \"Variable\" box, you can select the variable to plot.\nThe \"Layer\" box lets you select individual layers to plot. By default all are plotted.\nThe \"As line(s)\" checkbox turns on an option to plot data as lines. Useful to plot layer tops or bottoms to show interfaces.\nThe \"Add\" button adds a dataset to the table.\n\n\n\n\nThe plot window\n\n\nRight-click the plotting window to set zoom options.\nYou can click the small \"A\" in the bottom left corner to reset zoom.\n\n\n\n\n\n\n\nThe \"Cross-section\" widget and map canvas. An example is shown in which layer ids are plotted as colors, and borelogs are plotted as bars.\n\n\n\n\n\n\n\n\nNote\n\n\n\nA known issue with a multiple monitor setup is that the grid behind the plot might be plotted way off. See the known issues section for more info and how to fix this.\n\n\n\n\n Add NHI-data\nOpens up a window to select data from the NHI portal to load directly in QGIS. The NHI is the Netherlands Hydrological Instrument . The NHI data provides datasets with different kinds of services:\n\na \"Web Map Service\" (WMS), which provides a map with a (fixed) legend.\na \"Web Feature Service\" (WFS), which provides features from vector data via the internet.\na \"Web Coverage Service\" (WCS), which provides raster data via the internet.\n\nYou can use the search bar to search for datasets of your liking.\n\n\n\nThe \"Add NHI window\"\n\n\n\n\n\n\n\n\nNote\n\n\n\nExperience has shown that sometimes these services are hard to reach and data cannot be loaded." + "objectID": "coupler_architecture.html#continuous-integration", + "href": "coupler_architecture.html#continuous-integration", + "title": "Architecture", + "section": "Continuous Integration", + "text": "Continuous Integration\nWe took great care to set up a pipeline to ensure that iMOD Coupler continues to work with the newest version of its dependencies. This is especially important since we access internal state of the kernels when coupling them. It can happen very easily that kernel developers change something that break assumptions of the coupler.\nAt the time of this writing, there are three kernels handled by iMOD Coupler:\n\nRibasim,\nMODFLOW 6, and\nMetaSWAP.\n\nOn TeamCity, the three kernels will be compiled to shared libraries and iMOD Coupler will be compiled to an executable. These binaries are then collected in a zip file, called the iMOD Collector. The iMOD Collector is checked on our testbench and can be downloaded by users.\n\n\n\n\nflowchart BT\n ribasim[Ribasim] --> imod_collector[iMOD Collector]\n modflow[MODFLOW 6] --> imod_collector\n metaswap[MetaSWAP] --> imod_collector\n imodc[iMOD Coupler] --> imod_collector\n imod_collector --> testbench[Testbench Coupler]" }, { - "objectID": "index.html", - "href": "index.html", - "title": "iMOD Suite Documentation", + "objectID": "python_getting_started.html", + "href": "python_getting_started.html", + "title": "Getting started", "section": "", - "text": "The iMOD Suite offers different modules which support modelling with MODFLOW 6 (including unstructured meshes):\n\niMOD Viewer: The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin. The iMOD QGIS Plugin QGIS plugin allows visualisation of model input and output with tools for cross-sections, timeseries and link to the 3D viewer. It supports structured NetCDF, UGRID and IPF files. And the iMOD 3D Viewer for interactive 3D visualisation of unstructured input and output. Supports UGRID file format and IPF borelog files.\niMOD Python: A Python package to support MODFLOW groundwater modeling. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this workflow reproducible.\niMOD Coupler: Software that couples MODFLOW 6 to other computational cores. It currently supports a coupling to MetaSWAP, but additional computational cores are planned in the future.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Introduction\n\n\nLearn what’s included.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n iMOD Viewer\n\n\nVisualization of unstructured grids in GIS and 3D.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n iMOD Python\n\n\nBuild large groundwater models with scripts\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n iMOD Coupler\n\n\nApplication for coupling hydrological kernels.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Tutorials\n\n\nLearn how to use the iMOD Suite\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Practical Tips\n\n\nUseful tips to use the iMOD Suite with other tools.\n\n\n\n\n\n\n\n\n\n\n\n\nNo matching items" + "text": "import imod\n\n# read and write IPF files to pandas DataFrame\ndf = imod.ipf.read('wells.ipf')\nimod.ipf.save('wells-out.ipf', df)\n\n# get all calculated heads in a xarray DataArray\n# with dimensions time, layer, y, x\nda = imod.idf.open('path/to/results/head_*.idf')\n\n# create a groundwater model\n# abridged example, see examples for the full code\ngwf_model = imod.mf6.GroundwaterFlowModel()\ngwf_model[\"dis\"] = imod.mf6.StructuredDiscretization(\n top=200.0, bottom=bottom, idomain=idomain\n)\ngwf_model[\"chd\"] = imod.mf6.ConstantHead(\n head, print_input=True, print_flows=True, save_flows=True\n)\nsimulation = imod.mf6.Modflow6Simulation(\"ex01-twri\")\nsimulation[\"GWF_1\"] = gwf_model\nsimulation.time_discretization(times=[\"2000-01-01\", \"2000-01-02\"])\nsimulation.write(modeldir)" }, { - "objectID": "tutorial_wq.html", - "href": "tutorial_wq.html", - "title": "Conceptual fresh-salt model", + "objectID": "viewer_known_issues.html", + "href": "viewer_known_issues.html", + "title": "Known Issues", "section": "", - "text": "In this example we create an example fresh-salt groundwater model of a strip-shaped freshwater lens, which could be a very simple analogue of a barrier island.\nThe workflow consists of the following steps:\n\nCreating a model with an iMOD-python script\nRunning the model in a terminal with iMOD-WQ\nUse iMOD-python to post-process the model output (IDF) to a data format supported by QGIS (UGRID)\nViewing a cross-section in iMOD QGIS plugin\nUse the plugin to view the results in the iMOD 3D viewer" + "text": "Known issues with the iMOD Viewer are listed over here." }, { - "objectID": "tutorial_wq.html#description", - "href": "tutorial_wq.html#description", - "title": "Conceptual fresh-salt model", + "objectID": "viewer_known_issues.html#introduction", + "href": "viewer_known_issues.html#introduction", + "title": "Known Issues", "section": "", - "text": "In this example we create an example fresh-salt groundwater model of a strip-shaped freshwater lens, which could be a very simple analogue of a barrier island.\nThe workflow consists of the following steps:\n\nCreating a model with an iMOD-python script\nRunning the model in a terminal with iMOD-WQ\nUse iMOD-python to post-process the model output (IDF) to a data format supported by QGIS (UGRID)\nViewing a cross-section in iMOD QGIS plugin\nUse the plugin to view the results in the iMOD 3D viewer" + "text": "Known issues with the iMOD Viewer are listed over here." }, { - "objectID": "tutorial_wq.html#creating-a-model", - "href": "tutorial_wq.html#creating-a-model", - "title": "Conceptual fresh-salt model", - "section": "Creating a model", - "text": "Creating a model\nThe iMOD-python script below creates a simple 3D iMOD-WQ model.\nTo install iMOD-python, see these instructions.\nWe define a middle strip which has fresh recharge (rch) applied, and the sides have a fixed concentration (bnd = -1) of 35 (sconc = 35.) in the top layer. This creates freshwater lens along the strip.\nimport numpy as np\nimport xarray as xr\n\nimport imod\n\n\n# Discretization\nnrow = 40 # number of rows\nncol = 40 # number of columns\nnlay = 15 # number of layers\n\ndz = 10\ndx = 250\ndy = -dx\n\nx = np.arange(0.5 * dx, dx * ncol, dx)\ny = np.arange(-dy * ncol, 0.5 * -dy, dy)\n\n# setup ibound\nbnd = xr.DataArray(\n data=np.full((nlay, nrow, ncol), 1.0),\n coords={\n \"y\": y,\n \"x\": x,\n \"layer\": np.arange(1, 1 + nlay),\n \"dx\": dx,\n \"dy\": dy,\n },\n dims=(\"layer\", \"y\", \"x\"),\n)\n\n# set constant heads\nbnd[0, :, 0:12] = -1\nbnd[0, :, 28:40] = -1\n\n# set up tops and bottoms\ntop1D = xr.DataArray(\n np.arange(nlay * dz, 0.0, -dz), {\"layer\": np.arange(1, nlay + 1)}, (\"layer\")\n)\n\ntop3D = top1D * xr.full_like(bnd, 1.0)\nbot = top3D - dz\n\n# Defining the starting concentrations\nsconc = xr.DataArray(\n data=np.full((nlay, nrow, ncol), 35.0),\n coords={\n \"y\": y,\n \"x\": x,\n \"layer\": np.arange(1, nlay + 1),\n \"dx\": dx,\n \"dy\": dy,\n },\n dims=(\"layer\", \"y\", \"x\"),\n)\n\nsconc[0, :, 13:27] = 0.0\n\n# Defining the recharge rates\nrch_rate = xr.DataArray(\n data=np.full((nrow, ncol), 0.0),\n coords={\"y\": y, \"x\": x, \"dx\": dx, \"dy\": dy},\n dims=(\"y\", \"x\"),\n)\nrch_rate[:, 13:27] = 0.001\n\nrch_conc = xr.full_like(rch_rate, fill_value=0.0)\n\n\n# Finally, we build the model.\n\nm = imod.wq.SeawatModel(\"FreshwaterLens\")\nm[\"bas\"] = imod.wq.BasicFlow(\n ibound=bnd, top=top3D.sel(layer=1), bottom=bot, starting_head=0.0\n)\nm[\"lpf\"] = imod.wq.LayerPropertyFlow(\n k_horizontal=10.0, k_vertical=20.0, specific_storage=0.0\n)\nm[\"btn\"] = imod.wq.BasicTransport(\n icbund=bnd, starting_concentration=sconc, porosity=0.35\n)\nm[\"adv\"] = imod.wq.AdvectionTVD(courant=1.0)\nm[\"dsp\"] = imod.wq.Dispersion(longitudinal=0.0, diffusion_coefficient=0.0)\nm[\"vdf\"] = imod.wq.VariableDensityFlow(density_concentration_slope=0.71)\nm[\"rch\"] = imod.wq.RechargeHighestActive(rate=rch_rate, concentration=0.0)\nm[\"pcg\"] = imod.wq.PreconditionedConjugateGradientSolver(\n max_iter=150, inner_iter=30, hclose=0.0001, rclose=0.1, relax=0.98, damp=1.0\n)\nm[\"gcg\"] = imod.wq.GeneralizedConjugateGradientSolver(\n max_iter=150,\n inner_iter=30,\n cclose=1.0e-6,\n preconditioner=\"mic\",\n lump_dispersion=True,\n)\nm[\"oc\"] = imod.wq.OutputControl(save_head_idf=True, save_concentration_idf=True)\nm.time_discretization(times=[\"1900-01-01T00:00\", \"2000-01-01T00:00\"])\n\n# Now we write the model, including runfile:\nm.write(\"FreshwaterLens\")\n# You can run the model using the command prompt and the iMOD-WQ executable" + "objectID": "viewer_known_issues.html#qgis-plugin", + "href": "viewer_known_issues.html#qgis-plugin", + "title": "Known Issues", + "section": "QGIS plugin", + "text": "QGIS plugin\n\nPlot axis off\nIn the QGIS plugin, a weird offset in the plot axis can occur when you use a multiple monitor setup. Both the Time series widget as well as the Cross-section widget can suffer from this.\n\n\n\nNotice the y-axis being moved too high and the x-axis being scaled weirdly.\n\n\nSo far we haven't been able to fix it in the code, so you can fix this as a user by either:\n\nMoving your QGIS application to the main window of your monitor setup\nIn Windows, navigate to Settings > Display then under Rearrange your displays select the monitor you want to view QGIS on, and finally tick the box Make this my main display\n\n\n\nIPF reader does not support all IPF files\nCurrently the IPF reader is not able to read every IPF file, as iMOD 5 supports quite a wide range of IPF files. For example, iMOD 5 supports both whitespace and comma separated files, whereas the QGIS plugin only supports comma separated IPF files. If the plugin is unable to read your IPF file, it is best to read the file with iMOD Python and consequently write it again. This can help, because the IPF reader in iMOD Python is a lot more flexible, but its writer always writes to a specific format. We plan to improve the flexibility of the plugin's IPF reader." }, { - "objectID": "tutorial_wq.html#running-the-model", - "href": "tutorial_wq.html#running-the-model", - "title": "Conceptual fresh-salt model", - "section": "Running the model", - "text": "Running the model\nThis model requires the iMOD-WQ kernel, which is part of iMOD 5 and which you can download for free here after registering. It usually takes only a few minutes before a link is sent.\nOpen a terminal (cmd.exe is fine, but the cool kids use Powershell and call the following lines of code:\n./path/to/iMOD-WQ.exe ./FreshwaterLens.run\nThis will run the iMOD-WQ model, and should not take more than 10 seconds.\n\n\n\nIf everything worked well, iMOD WQ prints “Normal termination of iMOD-WQ”" + "objectID": "viewer_known_issues.html#d-viewer", + "href": "viewer_known_issues.html#d-viewer", + "title": "Known Issues", + "section": "3D Viewer", + "text": "3D Viewer\n\nSupported Windows versions\nAt present, only Windows 10 is supported. Windows 8.1 and Windows 11 currently are not supported, and it has been confirmed that the 3D viewer does not function properly with these Windows versions.\n\n\nMSVCR100.dll missing\nYou might get an error at startup of the 3D viewer, such as: \"The code execution cannot proceed because MSVCR100.dll was not found. Reinstalling the program may fix the problem\"\nThis usually happens on a clean machine, which has not yet installed the Microsoft Visual C++ 2010 redistributable. You can download it here\nMake sure to check if you have a 32-bit or 64-bit Windows version on your system and consequently installing the right version of the redistributable. You can find this out pressing the Windows key (or clicking Start) and typing System Information. Click it, and look under \"System Type\". If it says x64-based PC, you have a 64-bit system." }, { - "objectID": "tutorial_wq.html#convert-output-data", - "href": "tutorial_wq.html#convert-output-data", - "title": "Conceptual fresh-salt model", - "section": "Convert output data", - "text": "Convert output data\niMOD-WQ writes IDF files, a data format used in iMOD 5, which not many other software packages support. Therefore iMOD-python allows for reading these IDF files and converting them to other data formats in Python.\nIn this example we convert the output to a UGRID file, which can be read by QGIS.\nimport imod\nimport numpy as np\nimport xarray as xr\n\n# We assume that this script is located in the same directory\n# as in create_wq_input.py.\n# We provide a UNIX style global path\n# to select all IDF files in the conc directory.\nconc_path = \"./results/conc/*.IDF\"\nbottom_path = \"./FreshwaterLens/bas/bottom*.idf\"\ntop_path = \"./FreshwaterLens/bas/top.idf\"\n\n# Open the IDF files.\nconc = imod.idf.open(conc_path).compute()\nbottom = imod.idf.open(bottom_path).compute()\nsurface = imod.idf.open(top_path).compute()\n\n# Reconstruct vertical discretization\n# We need this as IDFs do not store vertical discretization\nsurface = surface.assign_coords(layer=1)\n\n## Create 3D array of tops\n### Roll bottom one layer downward: the bottom of a layer is top of next layer\ntop = bottom.roll(layer=1, roll_coords=False)\n### Remove layer 1\ntop = top.sel(layer=slice(2, None))\n### Add surface as layer 1\ntop = xr.concat([surface, top], dim=\"layer\")\n### Reorder dimensions\ntop = top.transpose(\"layer\", \"y\", \"x\")\n\n# Merge into dataset\nds = xr.merge([conc, top, bottom])\n\n# Create MDAL supported UGRID\n# NOTE: This requires iMOD-python v1.0(?)\nds_ugrid = imod.util.to_ugrid2d(ds)\n\n#%% Due to a bug in MDAL, we have to encode the times as floats\n# instead of integers\n# until this is fixed: https://github.com/lutraconsulting/MDAL/issues/348\nds_ugrid[\"time\"].encoding[\"dtype\"] = np.float64\n\nds_ugrid.to_netcdf(\"./results/output_ugrid.nc\")" + "objectID": "practical_cookiecutter.html", + "href": "practical_cookiecutter.html", + "title": " Consistent folder structures with Cookiecutter", + "section": "", + "text": "Cookiecutter enables creating templated folder structures and files to kickstart your projects. At Deltares, we created such a template.\nUsing the same project template in an organization has the following advantages:\nThe iMOD Gitlab group contains multiple applications of the Deltares Project template." }, { - "objectID": "tutorial_wq.html#viewing-the-results-in-qgis", - "href": "tutorial_wq.html#viewing-the-results-in-qgis", - "title": "Conceptual fresh-salt model", - "section": "Viewing the results in QGIS", - "text": "Viewing the results in QGIS\nStart QGIS and open the ./results/output_ugrid.nc file as a mesh.\n\n\n\nWhere to find the action to load a mesh layer\n\n\nYou can select the variable to plot on the map canvas by right-clicking the output_ugrid layer in the Layers panel, and then navigating to: Properties > Symbology\nNext select which variable to plot in the group selection screen by clicking the color ramp next to the variable name, which will render the variable on the map canvas.\n\n\n\nWhere to find the group selection screen. Here you can select the variables to be plotted. The red circle indicates where the color ramp symbol can be found.\n\n\nColormaps can be set by navigating to the color selection menu\n\n\n\nThe color selection menu, here you can set the colormap that will be used, as well as adjusting its binning. In these example screenshots we use the colormap \"Spectral\".\n\n\nNext, open the iMOD plugin's cross-section tool and draw a cross-section by clicking from Map and right-clicking to stop drawing. Then select conc as variable to be plotted, and click Add. Next click Plot.\nBy default the tool will plot with a green to blue gradient called Viridis, but we can change the gradient by clicking the dataset's gradient box under symbology in the table.\nThis opens up a color dialog, where we can select the color ramp. Clicking the small arrow next to the color gradient box in the dialog will allow selecting presets. We chose \"Spectral\" and also select \"Invert Color Ramp\" in the examples, but you can select whatever colormap you think is suitable!\n\n\n\nYou should see this if you followed precisely what we did." + "objectID": "practical_cookiecutter.html#install", + "href": "practical_cookiecutter.html#install", + "title": " Consistent folder structures with Cookiecutter", + "section": "Install", + "text": "Install\nTo install Cookiecutter, run the following command:\npip install cookiecutter" }, { - "objectID": "tutorial_wq.html#viewing-the-results-in-the-imod-3d-viewer", - "href": "tutorial_wq.html#viewing-the-results-in-the-imod-3d-viewer", - "title": "Conceptual fresh-salt model", - "section": "Viewing the results in the iMOD 3D Viewer", - "text": "Viewing the results in the iMOD 3D Viewer\nAs a final step we will look at the results in the iMOD 3D Viewer. Click the 3D viewer symbol in QGIS, which will open up the 3D viewer widget of the iMOD plugin.\nFirst, click the Draw Extent button to draw an extent to be plotted. This can be very useful for large datasets, to only look at a smaller zone of the data.\nSecond, click Start iMOD 3D viewer to start the iMOD 3D viewer. Third, click Load mesh data to load the mesh you selected in the QGIS widget to be opened in the 3D viewer.\nFourth, to plot the data, under the Imported files, expand the data selection tree, and under Layered datasets, selecting conc.\nFinally, you can migrate the colormap you used in QGIS by clicking Load legend.\n\n\n\nIf you followed the instructions, you should see this." + "objectID": "practical_cookiecutter.html#kickstart-project", + "href": "practical_cookiecutter.html#kickstart-project", + "title": " Consistent folder structures with Cookiecutter", + "section": "Kickstart project", + "text": "Kickstart project\nThen to create a new project:\ncookiecutter gl:deltares/imod/cookiecutter-reproducible-project\nThis will create the following folder and file structure:\n.\n├── AUTHORS.md\n├── LICENSE\n├── README.md\n├── bin <- Your compiled model code can be stored here (not tracked by git)\n├── config <- Configuration files, e.g., for doxygen or for your model if needed\n├── data \n│ ├── 1-external <- Data external to the project.\n│ ├── 2-interim <- Intermediate data that has been altered.\n│ ├── 3-input <- The processed data sets, ready for modeling.\n│ ├── 4-output <- Data dump from the model.\n│ └── 5-visualization <- Post-processed data, ready for visualisation.\n├── docs <- Documentation, e.g., doxygen or scientific papers (not tracked by git)\n├── notebooks <- Jupyter notebooks\n├── reports <- For a manuscript source, e.g., LaTeX, Markdown, etc., or any project reports\n│   └── figures <- Figures for the manuscript or reports\n└── src <- Source code for this project\n ├── 0-setup <- Install necessary software, dependencies, pull other git projects, etc.\n ├── 1-prepare <- Scripts and programs to process data, from 1-external to 2-interim.\n ├── 2-build <- Scripts to create model specific input from 2-interim to 3-input. \n ├── 3-model <- Scripts to run model and convert or compress model results, from 3-input to 4-output.\n ├── 4-analyze <- Scripts to post-process model results, from 4-output to 5-visualization.\n └── 5-visualize <- Scripts for visualisation of your results, from 5-visualization to ./report/figures." }, { - "objectID": "tutorial_wq.html#concluding", - "href": "tutorial_wq.html#concluding", - "title": "Conceptual fresh-salt model", - "section": "Concluding", - "text": "Concluding\nIn short, we wrote model input with iMOD-python, ran a model with iMOD-WQ, converted its output to UGRID with iMOD-python, and viewed the results in QGIS and the iMOD 3D viewer." + "objectID": "practical_messy_data.html", + "href": "practical_messy_data.html", + "title": " Handling messy data", + "section": "", + "text": "Generally, you want to do cleanup, analysis, etc. in (Python) scripts -- reason being that it's reproducible:\n\nThere's something that describes step by step how something was done;\nYou can easily redo something when you find a mistake, get a new version of the data, etc.\n\nA general source of messy data is Excel -- after all, many people can work with Excel, in their own (perfidious) ways. Treat this as your immutable external data. However, convert the individual spreadsheets to CSV (or TSV if you like).\nThis has multiple benefits:\n\nData becomes more explicitly visible: separated tables, instead of somewhat hidden spreadsheets;\nData is much faster to read by most software: Excel files are a complicated format of zipped XML files. This is useful to store equations, formatting, etc., but not to just store the data;\nExcel file reader are not required: most software can easily read plain text like CSV, xsls files (zipped XML) not so much.\n\nIt's okay to make this a manual step: open the data with Excel, Save As, and store in your external data." }, { - "objectID": "python_getting_started.html", - "href": "python_getting_started.html", - "title": "Getting started", + "objectID": "practical_messy_data.html#dont-use-excel-files", + "href": "practical_messy_data.html#dont-use-excel-files", + "title": " Handling messy data", "section": "", - "text": "import imod\n\n# read and write IPF files to pandas DataFrame\ndf = imod.ipf.read('wells.ipf')\nimod.ipf.save('wells-out.ipf', df)\n\n# get all calculated heads in a xarray DataArray\n# with dimensions time, layer, y, x\nda = imod.idf.open('path/to/results/head_*.idf')\n\n# create a groundwater model\n# abridged example, see examples for the full code\ngwf_model = imod.mf6.GroundwaterFlowModel()\ngwf_model[\"dis\"] = imod.mf6.StructuredDiscretization(\n top=200.0, bottom=bottom, idomain=idomain\n)\ngwf_model[\"chd\"] = imod.mf6.ConstantHead(\n head, print_input=True, print_flows=True, save_flows=True\n)\nsimulation = imod.mf6.Modflow6Simulation(\"ex01-twri\")\nsimulation[\"GWF_1\"] = gwf_model\nsimulation.time_discretization(times=[\"2000-01-01\", \"2000-01-02\"])\nsimulation.write(modeldir)" + "text": "Generally, you want to do cleanup, analysis, etc. in (Python) scripts -- reason being that it's reproducible:\n\nThere's something that describes step by step how something was done;\nYou can easily redo something when you find a mistake, get a new version of the data, etc.\n\nA general source of messy data is Excel -- after all, many people can work with Excel, in their own (perfidious) ways. Treat this as your immutable external data. However, convert the individual spreadsheets to CSV (or TSV if you like).\nThis has multiple benefits:\n\nData becomes more explicitly visible: separated tables, instead of somewhat hidden spreadsheets;\nData is much faster to read by most software: Excel files are a complicated format of zipped XML files. This is useful to store equations, formatting, etc., but not to just store the data;\nExcel file reader are not required: most software can easily read plain text like CSV, xsls files (zipped XML) not so much.\n\nIt's okay to make this a manual step: open the data with Excel, Save As, and store in your external data." }, { - "objectID": "coupler_ribamod_config.html", - "href": "coupler_ribamod_config.html", - "title": "Configuration", + "objectID": "practical_messy_data.html#avoid-alphabetical-or-numeric-codes", + "href": "practical_messy_data.html#avoid-alphabetical-or-numeric-codes", + "title": " Handling messy data", + "section": "Avoid alphabetical or numeric codes", + "text": "Avoid alphabetical or numeric codes\nThe following labels are obviously require a lot of additional information to become meaningful:\n\nA, B, C ...\nA1, B1, B2, ...\n1.1, 1.2, 1.3, 2.1, ...\n\nTry to avoid using such labels to describe data sources, scenario names, filenames, etc. Not only do they require (more) description to make sense, they're much harder to memorize compared to (more) verbose labels:\n\nnational_dataset, provincial_dataset, local_dataset\nlow_recharge, high_recharge\n\nAnd harder to memorize means: more mix-ups, more mistakes, time lost.\nJust like in scripting or programming: readability beats ease of writing." + }, + { + "objectID": "python_install.html", + "href": "python_install.html", + "title": "Install", "section": "", - "text": "The configuration file is necessary to describe the model and its dependencies. It is in the toml format and should have a .toml extension.\nNote that toml uses quote marks differently than python. Single quotes in toml ('') are interpreted similarly to how python would interpret a rawstring (r'' or r\"\"), whereas double quotes (\"\") are interpreted in a similar manner to regular strings in python (\"\" or ''). This matters for paths on Windows, for which we advice to use single quotes." + "text": "The recommended way of installing iMOD Python is by running the Deltaforge installer. Read the Deltaforge installation instructions here.\nFor other ways to install iMOD Python, see its documentation.\niMOD Python has no point release schedule, but instead has a \"rolling release\", where the package is frequently updated. For the quickest access to the latest changes, do a development install." }, { - "objectID": "coupler_ribamod_config.html#config-schema", - "href": "coupler_ribamod_config.html#config-schema", - "title": "Configuration", - "section": "Config schema", - "text": "Config schema\n\nlog_level\n\n\n\n\n\n\ndescription\nThis setting determines the severity and therefore the verbosity of the log messages.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\ndefault\nINFO\n\n\nenum\nDEBUG, INFO, WARNING, ERROR, CRITICAL\n\n\n\n\ntiming\n\n\n\n\n\n\ndescription\nSpecifies whether the coupling should be timed. This option requires the log level to at least include INFO.\n\n\ntype\nboolean\n\n\nrequired\nfalse\n\n\ndefault\nfalse\n\n\n\n\ndriver_type\n\n\n\n\n\n\ndescription\nSpecifies which driver should be used. Typically, this determines which hydrological kernels are coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\nenum\nribamod\n\n\n\n\ndriver.kernels.modflow6\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the MODFLOW 6 library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of MODFLOW 6.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nwork_dir\n\n\n\n\n\n\ndescription\nThe working directory MODFLOW 6 expects. This is the directory where the simulation name file resides.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.kernels.ribasim\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the Ribasim library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of Ribasim.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nconfig_file\n\n\n\n\n\n\ndescription\nThe path to the Ribasim config file.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.coupling\n\nmf6_model\n\n\n\n\n\n\ndescription\nSpecifies the MODFLOW 6 model name to which Ribasim will be coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_active_river_packages\n\n\n\n\n\n\ndescription\nSpecifies the active river packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue\n\n\n\n\nmf6_passive_river_packages\n\n\n\n\n\n\ndescription\nSpecifies the passive river packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue\n\n\n\n\nmf6_active_drainage_packages\n\n\n\n\n\n\ndescription\nSpecifies the active drainage packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue\n\n\n\n\nmf6_passive_drainage_packages\n\n\n\n\n\n\ndescription\nSpecifies the passive drainage packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue" + "objectID": "practical_powershell.html", + "href": "practical_powershell.html", + "title": " Powershell profile error", + "section": "", + "text": "Your computer might throw you the following error in Windows PowerShell. This is annoying, because it prevents the Visual Studio Code terminal (which uses PowerShell) to use conda.\nFile C:\\Users\\Herman\\Documents\\WindowsPowerShell\\profile.ps1 cannot be loaded because the\nexecution of scripts is disabled on this system. Please see \"get-help about_signing\" for\nmore details.\nAt line:1 char:2\n+ . <<<< 'C:\\Users\\Herman\\Documents\\WindowsPowerShell\\profile.ps1'\n + CategoryInfo : NotSpecified: (:) [], PSSecurityException\n + FullyQualifiedErrorId : RuntimeException\nIn order to solve this, it is recommended to run the following command:\nSet-ExecutionPolicy RemoteSigned -Scope CurrentUser\nFor more information, see this link." }, { "objectID": "3dviewer_user_manual.html", @@ -203,235 +266,67 @@ "text": "Layered UGRID\nThe iMOD 3D Viewer currently supports only 2D UGRID files. However, when it recognizes that datasets called layer_1_top and layer_1_bottom are present (1 being a layer number), it will create a 3D grid using the x and y coordinates from the 2D grid, and the top and bottoms from the datasets. The result is a grid with cells that have horizontal and vertical cell faces, and that can represent for example a geological layer. Additional datasets (layer_2_top and layer_2_bottom) can be provided to create additional layers. The grids created this way will all have the same x and y positions for their nodes, but due to the top and bot datasets, they are at different depths. There can be holes between the layers to represent for example aquicludes.\nEach layer is shown in the explorer as a separate grid that can be loaded and unloaded independently. Properties can be assigned to each layer by listing the layer number in the dataset name. For example, we can assign a kD property to each layer by creating datasets called kD_layer_1, kD_layer_2, etcetera.\nAn example to convert a layered subsurface model in *.idf to a UGRID file can be found on https:/gitlab.com/deltares/imod/imod-python/-/snippets/2104179\n\n\n\nFigure 28: A 2D UGRID file rendered as a layered 3D grid\n\n\n\n\n\nFigure 29: View on internals of UGRID that can be used for rendering as a 3D layered grid" }, { - "objectID": "practical_git_dvc.html", - "href": "practical_git_dvc.html", - "title": " Version control your projects", + "objectID": "tutorial_wq.html", + "href": "tutorial_wq.html", + "title": "Conceptual fresh-salt model", "section": "", - "text": "Since scripting becomes increasingly important in hydrological projects, the rules of software development also start to apply to us. This has the downside that it requires extra effort from us, hydrologists, to learn new tools, but the upside is that there already is a wealth of properly tested tools and documentation available from the software development world. Having reproducible code is one of these important things, for which version control systems have been developed. It is very useful to use these systems in hydrological projects, since they provide the following advantages:\n\nYou keep track of the history of a project. In this way you keep a journal of decisions made in a project.\nIf you mess up something, you can always revert to a previous state.\nIt allows for collaborative development, where individuals can create their own branch to safely work on new developments and later merge their changes.\n\nThis document describes how to use Git and DVC. If you are running into issues, Stackoverflow has a lot of information available (>145,000 questions at 02-03-2023), since Git is so commonly used today.\n\n\nToday (03-2023), Git is the most commonly used version control system for code. Code development is usually shared on platforms such as Github or Gitlab.\nOne of the main differences between Git and older systems such as Subversion is that Git is a distributed version control system, whereas Subversion is a centralized system. In subversion, there is no history of changes on the machine, only on the central server. So therefore, to do any version control, the user has to be connected to a server. With Git a repository on a server (called remote) is first cloned to the user's local machine. This repository includes the full history of changes. The user can then make his/her changes, after which he/she can push these back to the remote, but does not have to. Because it is more indirect, and the availability of widely used platforms such as Github, the distributed nature of Git allows for smooth development between different organizations as well as open-source code development. Furthermore, you can develop code offline.\nDue to its background in software engineering, Git is only useful for versioning scripts and textfiles, and not for large files. For versioning larger files we use DVC.\n\n\n\nDVC stands for Data Version Control and it does exactly that. It is built on top of Git and so it uses very similar commands, which can be both easy and confusing at the same time. DVC ensures your large files themselves are not tracked by Git. Instead, it keeps the large files in its own cache and writes simple text files, which store the unique \"version code\" (a hash), each time you commit to DVC. These textfiles then have to be committed to Git. This may seem a bit cumbersome, as you have to commit data first to DVC, and then its version code to Git, but this allows the user to utilize the full potential of both Github as well as Cloud Storages (Like Amazon S3, Google Cloud, Microsoft Azure etc.). The version history is all stored in Git and can be pushed to Github or Gitlab, but the data itself can be stored on different platforms more specialized in handling large files." + "text": "In this example we create an example fresh-salt groundwater model of a strip-shaped freshwater lens, which could be a very simple analogue of a barrier island.\nThe workflow consists of the following steps:\n\nCreating a model with an iMOD-python script\nRunning the model in a terminal with iMOD-WQ\nUse iMOD-python to post-process the model output (IDF) to a data format supported by QGIS (UGRID)\nViewing a cross-section in iMOD QGIS plugin\nUse the plugin to view the results in the iMOD 3D viewer" }, { - "objectID": "practical_git_dvc.html#introduction", - "href": "practical_git_dvc.html#introduction", - "title": " Version control your projects", + "objectID": "tutorial_wq.html#description", + "href": "tutorial_wq.html#description", + "title": "Conceptual fresh-salt model", "section": "", - "text": "Since scripting becomes increasingly important in hydrological projects, the rules of software development also start to apply to us. This has the downside that it requires extra effort from us, hydrologists, to learn new tools, but the upside is that there already is a wealth of properly tested tools and documentation available from the software development world. Having reproducible code is one of these important things, for which version control systems have been developed. It is very useful to use these systems in hydrological projects, since they provide the following advantages:\n\nYou keep track of the history of a project. In this way you keep a journal of decisions made in a project.\nIf you mess up something, you can always revert to a previous state.\nIt allows for collaborative development, where individuals can create their own branch to safely work on new developments and later merge their changes.\n\nThis document describes how to use Git and DVC. If you are running into issues, Stackoverflow has a lot of information available (>145,000 questions at 02-03-2023), since Git is so commonly used today.\n\n\nToday (03-2023), Git is the most commonly used version control system for code. Code development is usually shared on platforms such as Github or Gitlab.\nOne of the main differences between Git and older systems such as Subversion is that Git is a distributed version control system, whereas Subversion is a centralized system. In subversion, there is no history of changes on the machine, only on the central server. So therefore, to do any version control, the user has to be connected to a server. With Git a repository on a server (called remote) is first cloned to the user's local machine. This repository includes the full history of changes. The user can then make his/her changes, after which he/she can push these back to the remote, but does not have to. Because it is more indirect, and the availability of widely used platforms such as Github, the distributed nature of Git allows for smooth development between different organizations as well as open-source code development. Furthermore, you can develop code offline.\nDue to its background in software engineering, Git is only useful for versioning scripts and textfiles, and not for large files. For versioning larger files we use DVC.\n\n\n\nDVC stands for Data Version Control and it does exactly that. It is built on top of Git and so it uses very similar commands, which can be both easy and confusing at the same time. DVC ensures your large files themselves are not tracked by Git. Instead, it keeps the large files in its own cache and writes simple text files, which store the unique \"version code\" (a hash), each time you commit to DVC. These textfiles then have to be committed to Git. This may seem a bit cumbersome, as you have to commit data first to DVC, and then its version code to Git, but this allows the user to utilize the full potential of both Github as well as Cloud Storages (Like Amazon S3, Google Cloud, Microsoft Azure etc.). The version history is all stored in Git and can be pushed to Github or Gitlab, but the data itself can be stored on different platforms more specialized in handling large files." + "text": "In this example we create an example fresh-salt groundwater model of a strip-shaped freshwater lens, which could be a very simple analogue of a barrier island.\nThe workflow consists of the following steps:\n\nCreating a model with an iMOD-python script\nRunning the model in a terminal with iMOD-WQ\nUse iMOD-python to post-process the model output (IDF) to a data format supported by QGIS (UGRID)\nViewing a cross-section in iMOD QGIS plugin\nUse the plugin to view the results in the iMOD 3D viewer" }, { - "objectID": "practical_git_dvc.html#installation", - "href": "practical_git_dvc.html#installation", - "title": " Version control your projects", - "section": "Installation", - "text": "Installation\nFirst install Git from this link. If installing on Windows it is useful to make sure Git is added to the %PATH% variable during installation. To test if the installation works, open a command line or shell window and test if the following command works:\nIf this works, install DVC from this link." + "objectID": "tutorial_wq.html#creating-a-model", + "href": "tutorial_wq.html#creating-a-model", + "title": "Conceptual fresh-salt model", + "section": "Creating a model", + "text": "Creating a model\nThe iMOD-python script below creates a simple 3D iMOD-WQ model.\nTo install iMOD-python, see these instructions.\nWe define a middle strip which has fresh recharge (rch) applied, and the sides have a fixed concentration (bnd = -1) of 35 (sconc = 35.) in the top layer. This creates freshwater lens along the strip.\nimport numpy as np\nimport xarray as xr\n\nimport imod\n\n\n# Discretization\nnrow = 40 # number of rows\nncol = 40 # number of columns\nnlay = 15 # number of layers\n\ndz = 10\ndx = 250\ndy = -dx\n\nx = np.arange(0.5 * dx, dx * ncol, dx)\ny = np.arange(-dy * ncol, 0.5 * -dy, dy)\n\n# setup ibound\nbnd = xr.DataArray(\n data=np.full((nlay, nrow, ncol), 1.0),\n coords={\n \"y\": y,\n \"x\": x,\n \"layer\": np.arange(1, 1 + nlay),\n \"dx\": dx,\n \"dy\": dy,\n },\n dims=(\"layer\", \"y\", \"x\"),\n)\n\n# set constant heads\nbnd[0, :, 0:12] = -1\nbnd[0, :, 28:40] = -1\n\n# set up tops and bottoms\ntop1D = xr.DataArray(\n np.arange(nlay * dz, 0.0, -dz), {\"layer\": np.arange(1, nlay + 1)}, (\"layer\")\n)\n\ntop3D = top1D * xr.full_like(bnd, 1.0)\nbot = top3D - dz\n\n# Defining the starting concentrations\nsconc = xr.DataArray(\n data=np.full((nlay, nrow, ncol), 35.0),\n coords={\n \"y\": y,\n \"x\": x,\n \"layer\": np.arange(1, nlay + 1),\n \"dx\": dx,\n \"dy\": dy,\n },\n dims=(\"layer\", \"y\", \"x\"),\n)\n\nsconc[0, :, 13:27] = 0.0\n\n# Defining the recharge rates\nrch_rate = xr.DataArray(\n data=np.full((nrow, ncol), 0.0),\n coords={\"y\": y, \"x\": x, \"dx\": dx, \"dy\": dy},\n dims=(\"y\", \"x\"),\n)\nrch_rate[:, 13:27] = 0.001\n\nrch_conc = xr.full_like(rch_rate, fill_value=0.0)\n\n\n# Finally, we build the model.\n\nm = imod.wq.SeawatModel(\"FreshwaterLens\")\nm[\"bas\"] = imod.wq.BasicFlow(\n ibound=bnd, top=top3D.sel(layer=1), bottom=bot, starting_head=0.0\n)\nm[\"lpf\"] = imod.wq.LayerPropertyFlow(\n k_horizontal=10.0, k_vertical=20.0, specific_storage=0.0\n)\nm[\"btn\"] = imod.wq.BasicTransport(\n icbund=bnd, starting_concentration=sconc, porosity=0.35\n)\nm[\"adv\"] = imod.wq.AdvectionTVD(courant=1.0)\nm[\"dsp\"] = imod.wq.Dispersion(longitudinal=0.0, diffusion_coefficient=0.0)\nm[\"vdf\"] = imod.wq.VariableDensityFlow(density_concentration_slope=0.71)\nm[\"rch\"] = imod.wq.RechargeHighestActive(rate=rch_rate, concentration=0.0)\nm[\"pcg\"] = imod.wq.PreconditionedConjugateGradientSolver(\n max_iter=150, inner_iter=30, hclose=0.0001, rclose=0.1, relax=0.98, damp=1.0\n)\nm[\"gcg\"] = imod.wq.GeneralizedConjugateGradientSolver(\n max_iter=150,\n inner_iter=30,\n cclose=1.0e-6,\n preconditioner=\"mic\",\n lump_dispersion=True,\n)\nm[\"oc\"] = imod.wq.OutputControl(save_head_idf=True, save_concentration_idf=True)\nm.time_discretization(times=[\"1900-01-01T00:00\", \"2000-01-01T00:00\"])\n\n# Now we write the model, including runfile:\nm.write(\"FreshwaterLens\")\n# You can run the model using the command prompt and the iMOD-WQ executable" }, { - "objectID": "practical_git_dvc.html#software-to-use-git-and-dvc", - "href": "practical_git_dvc.html#software-to-use-git-and-dvc", - "title": " Version control your projects", - "section": "Software to use Git and DVC", - "text": "Software to use Git and DVC\nYou can run git from the regular Windows command line, but the Windows installation also comes with MinGW (Minimalist GNU for Windows) which can be useful.\n\nMinGW\nMinGW allows you to use Linux commands, as well as other cool stuff (e.g. compiling Fortran 90 with gfortran for free). Note that in it you have to specify paths with Linux-style forward slashes / instead of Windows style backward slashes \\.\nWe recommend defining a button for MinGW in Total Commander by clicking:\nConfiguration > Button Bar > Add\nAnd then specify the path to git-bash.exe under \"Command\", e.g. C:\\\\Program Files\\\\Git\\\\Git\\\\git-bash.exe\n\n\n\n\n\n\nNote\n\n\n\nDepending on your system configuration, you might need to add under \"Parameters\": --login -i\n\n\n\n\nVSCode\nVScode has integrated Git support as well. This is very useful when you are mainly coding, but since you cannot call DVC, less when you are changing model data. This documentation describes how to use it." + "objectID": "tutorial_wq.html#running-the-model", + "href": "tutorial_wq.html#running-the-model", + "title": "Conceptual fresh-salt model", + "section": "Running the model", + "text": "Running the model\nThis model requires the iMOD-WQ kernel, which is part of iMOD 5 and which you can download for free here after registering. It usually takes only a few minutes before a link is sent.\nOpen a terminal (cmd.exe is fine, but the cool kids use Powershell and call the following lines of code:\n./path/to/iMOD-WQ.exe ./FreshwaterLens.run\nThis will run the iMOD-WQ model, and should not take more than 10 seconds.\n\n\n\nIf everything worked well, iMOD WQ prints “Normal termination of iMOD-WQ”" }, { - "objectID": "practical_git_dvc.html#tutorial", - "href": "practical_git_dvc.html#tutorial", - "title": " Version control your projects", - "section": "Tutorial", - "text": "Tutorial\nThere are already several tutorials online available on Git as well as DVC. For Git, this is a useful no-nonsense guide. For DVC, there is this bit more involved tutorial. However, because we want this document to be a bit more than a pointer to other tutorials, here's a quick guide that will describe your typical workflow.\n\nStarting a repository\nYou can start you own repository by changing to the directory first and then initializing git. Open your terminal of choice (e.g. Powershell, cmd, bash) and run the following commands\n> cd path/to/folder \n> git init\nThis will create a hidden .git folder.\nTo then initialize dvc:\n> dvc init\nThis will create a hidden .dvc folder as well as a .dvc/.gitignore file, which will tell Git to automatically ignore parts of the .dvc folder, for example the .dvc/cache folder, where DVC stores all versions of data files. We want Git to ignore these, as we do not want Git to keep track of Gigabytes of data!\n\n\n\n\n\n\nNote\n\n\n\nTo show hidden files and folders (very useful), you can configure Total Commander by clicking:\nConfiguration > Options > Display > \"Show hidden files\"\n\n\n\n\n\n\n\n\nNote\n\n\n\nIt is convenient for later to add the file extensions of files you want to keep in dvc in the .gitignore file, e.g. *.idf. Or you could add your data folder (e.g. data) to this file to exclude everything in it by specifying data/.\n\n\n\n\n\n\n\n\nNote\n\n\n\nThis recipe allows you to kickstart your project, creating already a smart folder structure, a readme and a .gitignore file.\n\n\n\n\nChecking the status\nOne of the first things you should do once you have started your repository, is checking its status.\nChange directories into the repo and call:\n> git status\nThis will show in red the files that are untracked by Git and have to be added still. And in green the files that are staged but have not been committed yet.\nIn order to check if any data files changed in DVC, in a similar way you call:\n> dvc status\n\n\nChecking differences\nIf you have modified one or multiple files, you can view lines you have changed per file with:\n> git diff\nThis will show in green the lines that are new, or different, in the new version of the file. And in red the lines as they were in the old version, or now have been removed.\n\n\nAdding textfiles\nSo you have checked the status and will probably have seen that there is a .dvc/.gitignore file that is already staged (this was added by DVC). What DVC has done for us is the following:\n> git add .dvc/.gitignore\nThis will stage the .gitignore file. This means you have selected a change to be added to a commit. If you want to include a script or other textfile in version control, you have to stage it yourself by calling the git add command.\n\n\n\n\n\n\nWarning\n\n\n\nStaging a script does not mean you have added it to version control yet! A file is only added to version control after you have committed your changes (see next section).\n\n\n\n\nCommitting changes\nBefore your files are added to version control, you have to commit them first. A commit can be seen as a \"snapshot\" of a project that is added to the version control and is therefore \"safe\".\nEach commit should be followed by a message that specifies what you have changed. It is very important that these messages are short and informative, as they form your \"journal entries\" and will make searching your version history a lot easier.\nIn our example, you can commit the added .gitignore file to your version control by calling:\n> git commit -m \"Added file extensions to be ignored by Git.\"\nThe -m option allows you to specify a string that will be your commit message.\nBut what if you accidentally made an error in your message? You can then change it using:\n> git commit --amend\nThis will open up a text editor where you can alter your commit message.\n\n\n\n\n\n\nNote\n\n\n\nThe Windows installation of Git comes with a common Linux text editor called Vim. It is possible your Git is configured to automatically open Vim. Vim is very powerful, but has a steep learning curve. Especially confusing for beginners is closing Vim\nSo to close Vim: First press ESC, then press the colon :. To save your changes, you can type x, or to discard them you can type q!. Finish by pressing Enter.\n\n\n\n\n\n\n\n\nWarning\n\n\n\nAfter committing data, do not naively rename files or move them around. Instead, you should use Git for that. See @section_moving.\n\n\n\n\nMoving/renaming scripts\nBe careful moving scripts around after they have been committed to Git. Despite having the same filename, Git does not necessarily understand this: It sees a file being deleted and other file being created.\nSo in order to safely move or rename committed files, don't copy+paste committed files in your Windows Explorer, but instead let Git do it for you:\n> git mv script.py src/script.py\nThe same holds for renaming:\n> git mv script.py renamed_script.py\n\n\nAdding and committing data files\nWe now know how to add textfiles, but not how to add large binary files, your data. For this we use DVC, to add data in data version control, e.g. all files in the folder data/rivers, you can add the folder:\n> dvc add data/rivers\nThis creates a unique version code (hash) for all files in the folder and adds the data to the cache in the .dvc directory. The hash of the data is stored in textfile named data/rivers.dvc.\nWe have however not included the data in the version log yet... DVC lets Git take care of keeping the version log, so that both code changes as well as data changes are in the same log.\nIt does this by creating .dvc files with the hashes and we are expected to add these to our git repository. We therefore have to run the following commands to fully include the added data to our version control:\n> git add -f data/rivers.dvc \n> git commit -m \"Added river data\"\nWe added the -f option to the add command, just in case you added the data folder to your .gitignore file. This forces git to still add the rivers.dvc file.\nTo summarize, the data backups are stored in the .dvc folder, the log of changes in the .git folder. This allows us to send the data separately to a data cloud oriented to handling large data files (Google Cloud, Amazon S3, Azure etc.), and to send the .git folder to Github or Gitlab to have a nicely browsable version history.\n\n\nUpdating data\nThe commands to add changes made in the data are the same as to add new data:\n> dvc add data/rivers \n> git add -f data/rivers.dvc \n> git commit -m \"Changed river data\"\n\n\nMoving data\nYou can safely move data to a different location in your repo with DVC by calling:\n> dvc move heads.nc data/heads.nc \n> git add data/heads.nc.dvc \n> git commit -m \"Moved heads to data folder\"\n\n\nViewing the version history\nTo view the results of your hard work of carefully maintaining version control, you can call:\n> git log\nThis shows the version history in text form. This is useful for a quick lookup of the last commits, but if you want to go back a lot more becomes cumbersome. There are quite some graphical user interfaces available to view the version history, one of which is already included with your windows installation. You can start it by calling:\n> gitk\nThis is a very light-weight interface, and more fancy ones exist. Furthermore, when pushing to a remote (see @pushing_to_remote), Github and Gitlab have very good interfaces to view the commit history as well.\n\n\nReverting and resetting commits\nSay you added a commit that was not going to be used, and want to go back. Git provides multiple options to do this safely, and some to do this not so safely.\nSay you want to revert the repository back to a previous state, but want to keep the changes you made after that state. You can revert the last commit you made with:\n> git revert HEAD\nHEAD is the hash of the last commit you made. You can lookup these hashes by calling git log. Say this last hash currently is j1c13377c6d4adfhcc69c6ac7b51e919b15a65c4 We could do the same by calling:\n> git revert j1c13377c6d4adfhcc69c6ac7b51e919b15a65c4\nIf you now call git log again, you can see that the revert of this specific commit is also stored as a new commit. You can always revert the revert as well, if you suddenly decide you actually needed those changes.\nSometimes you commit something which in hindsight is so stupid, you neither want to bother other people with it, nor yourself again. In this case you can reset the repository to a previous state. Say you want to reset to the state before your last commit (basically undoing the last commit), you can call:\n> git reset --hard HEAD~1\nHEAD~1 is the hash of the second last commit. In this way all commits after the second last commit are deleted, so be careful.\n\n\n\n\n\n\nNote\n\n\n\nNote that for git revert we refer to the commit we want to undo, whereas for git reset we refer to the commit before this, because git reset wants to know the state we want to reset to.\n\n\nIf you are also resetting/reverting data changes added to DVC, the data referred to in the last git commit still has to be put in your workspace. To do this call:\n> dvc checkout\nThis will make DVC check all data referred to in the .dvc files again, recalculating hashes, which is a slow process. If you know which files are changed (e.g. 'heads.nc'), you can speed up things considerably by referring to the specific files:\n> dvc checkout heads.nc\n\n\nPushing to remote\nUp to now you have learned how to safely store scripts and data locally, but what if your hard-drive crashes? Or if you accidentally shift+delete your whole repository? In those cases you wished you also stored your repository somewhere else! That's why Git, as well as DVC, allow you to push your repository to a remote.\nThis has two benefits:\n\nYour repository is safely stored somewhere else\nYour colleagues can also access your repository and collaborate on Gitlab/Github.\n\nWe first have to configure Git to know the location of your remote and give it a name. A commonly used name for remote repo is \"origin\".\n> git remote add origin <https://github.com/username/repo.git>\nYou can list the remotes you have added with:\n> git remote -v\nAfter you have added your remote, you can push your code to the remote by calling:\n> git push\nDVC behaves very similar, except that the location of the DVC remote is stored in a file named .dvc/config that has to be added to Git. Say we want to add my google drive to a remote named \"google-drive\":\n> dvc remote add google-drive gdrive://some-hash-number-here \n> git add .dvc/config\n> git commit -m \"Added google-drive as dvc remote\"\nYou can then push to google-drive by calling:\n> dvc push\n\n\nCloning an existing repository\nIt is also possible to easily create a local copy of an existing repository. You can tell git to clone a remote repository into the current directory with:\n> git clone <http-address>\nFor example, to clone the California model repository, you can call:\n> git clone <https://gitlab.com/deltares/imod/california_model.git>\n\n\n\n\n\n\nNote\n\n\n\nThis might require a Gitlab account with 2 factor authorization.\n\n\n\n\n\n\n\n\nNote\n\n\n\nYour organization might have strict security settings and you might run into: SSL certificate problem: self signed certificate in certificate chain github. You can follow these instructions to fix this." - }, - { - "objectID": "practical_git_dvc.html#further-reading", - "href": "practical_git_dvc.html#further-reading", - "title": " Version control your projects", - "section": "Further reading", - "text": "Further reading\nFor Git commands, you can also take a look at this useful cheat sheet ." - }, - { - "objectID": "coupler_architecture.html", - "href": "coupler_architecture.html", - "title": "Architecture", - "section": "", - "text": "The purpose of iMOD Coupler is to couple hydrological kernels. iMOD Coupler itself is written in Python, but the kernels are written in either Julia or Fortran. The most common way of interacting with libraries written in different languages is by letting them expose a C interface and compiling them as shared libraries.\nWhile not technically required, these libraries are expected to follow a variation of the Basic Model Interface or BMI. This describes a standardized way of controlling a modelling framework. It also allows to utilize the xmipy package, which wraps the C API into a Python API. On top of that, it is often convenient to add functions specific to the kernels. This is why Ribasim and MODFLOW 6 get a XmiWrapper subclass, that is called ribasim_api and modflow_api respectively.\nflowchart BT\n libribasim.dll--> xmipy_r[xmipy]\n libmf6.dll --> xmipy_m[xmipy]\n xmipy_r --> ribasim_api \n xmipy_m --> modflow_api \n ribasim_api --> imodc[iMOD Coupler]\n modflow_api --> imodc\nMost input data needs to be pre-processed in order to be suitable for the hydrological kernels. In the case of Ribasim this is handled by Ribasim Python, in the case of MODFLOW 6 it is handled by iMOD Python. However, the input data for the iMOD Coupler needs to be pre-processed as well. Coupling tables describe how the coupling takes place. In order to generate them, input data from all kernels are needed. The primod package wraps the functionality of the kernel pre-processors and generates the coupling data for iMOD Coupler.\nflowchart BT\n ribasim_python[Ribasim Python] --> primod\n imod-python[iMOD Python] --> primod\n primod --> ribasim[Ribasim]\n primod --> imodc\n primod --> modflow6[MODFLOW 6]\n ribasim --> imodc[\"iMOD Coupler\"]\n modflow6 --> imodc" - }, - { - "objectID": "coupler_architecture.html#drivers", - "href": "coupler_architecture.html#drivers", - "title": "Architecture", - "section": "Drivers", - "text": "Drivers\nCoupling Ribasim and MODFLOW 6 is only one of multiple coupling configurations. Each configuration is handled by an iMOD Coupler driver. A driver is a Python module under imod_coupler/drivers. At the minimum, it includes a subclass of the abstract class Driver as well as its own config under the [[driver.coupling]] namespace. A driver itself also includes a BMI interface, executing it then looks like this:\nself.initialize()\n\nwhile self.get_current_time() < self.get_end_time():\n self.update()\n\nself.finalize()" - }, - { - "objectID": "coupler_architecture.html#continuous-integration", - "href": "coupler_architecture.html#continuous-integration", - "title": "Architecture", - "section": "Continuous Integration", - "text": "Continuous Integration\nWe took great care to set up a pipeline to ensure that iMOD Coupler continues to work with the newest version of its dependencies. This is especially important since we access internal state of the kernels when coupling them. It can happen very easily that kernel developers change something that break assumptions of the coupler.\nAt the time of this writing, there are three kernels handled by iMOD Coupler:\n\nRibasim,\nMODFLOW 6, and\nMetaSWAP.\n\nOn TeamCity, the three kernels will be compiled to shared libraries and iMOD Coupler will be compiled to an executable. These binaries are then collected in a zip file, called the iMOD Collector. The iMOD Collector is checked on our testbench and can be downloaded by users.\n\n\n\n\nflowchart BT\n ribasim[Ribasim] --> imod_collector[iMOD Collector]\n modflow[MODFLOW 6] --> imod_collector\n metaswap[MetaSWAP] --> imod_collector\n imodc[iMOD Coupler] --> imod_collector\n imod_collector --> testbench[Testbench Coupler]" - }, - { - "objectID": "tutorial.html", - "href": "tutorial.html", - "title": " Tutorials", - "section": "", - "text": "The iMOD-suite consists of several components, and combining these in different ways allows for different workflows. This “mix-and-match” capability benefits user flexibility, but it can be a bit daunting at start.\nTherefore, we have compiled a set of tutorials to help you get started and give you an overview of the Suite’s capabilities.\nTo download and install the iMOD Suite, follow the instructions here. To download the tutorial material, you can follow this link.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nAbbeyfeale\n\n\nComponents: QGIS and iMOD plugin\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nConceptual fresh-salt model\n\n\nComponents: iMOD Python, iMOD WQ, QGIS plugin, 3D Viewer\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDommel\n\n\nComponents: iMOD 3D Viewer\n\n\n\n\n\n\n\n\n\n\n\n\nNo matching items" - }, - { - "objectID": "python_install.html", - "href": "python_install.html", - "title": "Install", - "section": "", - "text": "The recommended way of installing iMOD Python is by running the Deltaforge installer. Read the Deltaforge installation instructions here.\nFor other ways to install iMOD Python, see its documentation.\niMOD Python has no point release schedule, but instead has a \"rolling release\", where the package is frequently updated. For the quickest access to the latest changes, do a development install." - }, - { - "objectID": "deltaforge_install.html", - "href": "deltaforge_install.html", - "title": "Install iMOD Python with Deltaforge", - "section": "", - "text": "Deltaforge is a python distribution which includes iMOD Python and all its dependencies. It is provided as an installer and makes installing iMOD Python easy. You can download the Deltaforge installer on the Deltares download portal." - }, - { - "objectID": "deltaforge_install.html#what-is-deltaforge", - "href": "deltaforge_install.html#what-is-deltaforge", - "title": "Install iMOD Python with Deltaforge", - "section": "", - "text": "Deltaforge is a python distribution which includes iMOD Python and all its dependencies. It is provided as an installer and makes installing iMOD Python easy. You can download the Deltaforge installer on the Deltares download portal." - }, - { - "objectID": "deltaforge_install.html#installation", - "href": "deltaforge_install.html#installation", - "title": "Install iMOD Python with Deltaforge", - "section": "Installation", - "text": "Installation\nTo install Deltaforge, double-click the executable, this will open the installation Wizard. You will be greeted with the welcome screen.\n\n\n\nThe welcome screen\n\n\nClick \"Next\", and then \"I agree\" in the license agreement.\n\n\n\nLicense agreement screen\n\n\nNext, you get to decide what type of installation you want. On your local machine it suffices to select Just me. If you are an admin of a server and you want to let others enjoy the Deltaforge installation as well, click All Users.\n\n\n\nThe installation type screen\n\n\nNext you get to decide where the python environment is installed. The default location is usually fine.\n\n\n\nThe location of the python installation\n\n\nFinally, some further configuration is possible. The screenshots contains the options we recommend.\n\n\n\nInstallation options with the recommended options selected." - }, - { - "objectID": "deltaforge_install.html#using-deltaforge", - "href": "deltaforge_install.html#using-deltaforge", - "title": "Install iMOD Python with Deltaforge", - "section": "Using Deltaforge", - "text": "Using Deltaforge\nThe easiest way to start your environment is by pressing the Windows Key and start typing deltaforge. This will let you select the Deltaforge Prompt. Select this.\n\n\n\nThe Deltaforge Prompt should be findable in the Windows start menu\n\n\nThis will start a command prompt screen (cmd.exe), where at startup the Deltaforge python environment is activated.\n\n\n\nThe Deltaforge prompt. You can type mamba list to view all the packages installed.\n\n\nTo view all the packages installed in the environment you can type mamba list and press Enter. This will list all packages installed in the environment. If you want to start coding, you can type spyder, which will start Spyder, a Python scientific development environment." - }, - { - "objectID": "python.html", - "href": "python.html", - "title": " iMOD Python", - "section": "", - "text": "The iMOD Python package is designed to help you in your MODFLOW groundwater modeling efforts. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this process reproducible. Whether you want to build a simple 2D conceptual model, or a complex 3D regional model with millions of cells, iMOD Python scales automatically by making use of dask.\nBy building on top of popular Python packages like xarray, pandas, rasterio and geopandas, a lot of functionality comes for free.\nCurrently we support the creation of the following MODFLOW-based models:\n\nUSGS MODFLOW 6, currently only the Groundwater Flow packages\niMODFLOW\niMOD-WQ, which integrates SEAWAT (density-dependent groundwater flow) and MT3DMS (multi-species reactive transport calculations)\n\nDocumentation: https://deltares.gitlab.io/imod/imod-python This documentation includes a section \"How do I\" which can be used for common data conversions in imod-python or xarray. This section will be regular updated based on the different questions of users.\nSource code: https://gitlab.com/deltares/imod/imod-python" - }, - { - "objectID": "viewer_known_issues.html", - "href": "viewer_known_issues.html", - "title": "Known Issues", - "section": "", - "text": "Known issues with the iMOD Viewer are listed over here." - }, - { - "objectID": "viewer_known_issues.html#introduction", - "href": "viewer_known_issues.html#introduction", - "title": "Known Issues", - "section": "", - "text": "Known issues with the iMOD Viewer are listed over here." - }, - { - "objectID": "viewer_known_issues.html#qgis-plugin", - "href": "viewer_known_issues.html#qgis-plugin", - "title": "Known Issues", - "section": "QGIS plugin", - "text": "QGIS plugin\n\nPlot axis off\nIn the QGIS plugin, a weird offset in the plot axis can occur when you use a multiple monitor setup. Both the Time series widget as well as the Cross-section widget can suffer from this.\n\n\n\nNotice the y-axis being moved too high and the x-axis being scaled weirdly.\n\n\nSo far we haven't been able to fix it in the code, so you can fix this as a user by either:\n\nMoving your QGIS application to the main window of your monitor setup\nIn Windows, navigate to Settings > Display then under Rearrange your displays select the monitor you want to view QGIS on, and finally tick the box Make this my main display\n\n\n\nIPF reader does not support all IPF files\nCurrently the IPF reader is not able to read every IPF file, as iMOD 5 supports quite a wide range of IPF files. For example, iMOD 5 supports both whitespace and comma separated files, whereas the QGIS plugin only supports comma separated IPF files. If the plugin is unable to read your IPF file, it is best to read the file with iMOD Python and consequently write it again. This can help, because the IPF reader in iMOD Python is a lot more flexible, but its writer always writes to a specific format. We plan to improve the flexibility of the plugin's IPF reader." - }, - { - "objectID": "viewer_known_issues.html#d-viewer", - "href": "viewer_known_issues.html#d-viewer", - "title": "Known Issues", - "section": "3D Viewer", - "text": "3D Viewer\n\nSupported Windows versions\nAt present, only Windows 10 is supported. Windows 8.1 and Windows 11 currently are not supported, and it has been confirmed that the 3D viewer does not function properly with these Windows versions.\n\n\nMSVCR100.dll missing\nYou might get an error at startup of the 3D viewer, such as: \"The code execution cannot proceed because MSVCR100.dll was not found. Reinstalling the program may fix the problem\"\nThis usually happens on a clean machine, which has not yet installed the Microsoft Visual C++ 2010 redistributable. You can download it here\nMake sure to check if you have a 32-bit or 64-bit Windows version on your system and consequently installing the right version of the redistributable. You can find this out pressing the Windows key (or clicking Start) and typing System Information. Click it, and look under \"System Type\". If it says x64-based PC, you have a 64-bit system." - }, - { - "objectID": "coupler_metamod_config.html", - "href": "coupler_metamod_config.html", - "title": "Configuration", - "section": "", - "text": "The configuration file is necessary to describe the model and its dependencies. It is in the toml format and should have a .toml extension.\nNote that toml uses quote marks differently than python. Single quotes in toml ('') are interpreted similarly to how python would interpret a rawstring (r'' or r\"\"), whereas double quotes (\"\") are interpreted similarly to regular strings in python (\"\" or ''). This matters for paths on Windows, for which we advise to use single quotes." - }, - { - "objectID": "coupler_metamod_config.html#config-schema", - "href": "coupler_metamod_config.html#config-schema", - "title": "Configuration", - "section": "Config schema", - "text": "Config schema\n\nlog_level\n\n\n\n\n\n\ndescription\nThis setting determines the severity and therefore the verbosity of the log messages.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\ndefault\nINFO\n\n\nenum\nDEBUG, INFO, WARNING, ERROR, CRITICAL\n\n\n\n\ntiming\n\n\n\n\n\n\ndescription\nSpecifies whether the coupling should be timed. This option requires the log level to at least include INFO.\n\n\ntype\nbool\n\n\nrequired\nfalse\n\n\ndefault\nfalse\n\n\n\n\ndriver_type\n\n\n\n\n\n\ndescription\nSpecifies which driver should be used. Typically, this determines which hydrological kernels are coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\nenum\nmetamod\n\n\n\n\ndriver.kernels.modflow6\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the MODFLOW 6 library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of MODFLOW 6.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nwork_dir\n\n\n\n\n\n\ndescription\nThe working directory MODFLOW 6 expects. This is the directory where the simulation name file resides.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.kernels.metaswap\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the MetaSWAP library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of MetaSWAP.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nwork_dir\n\n\n\n\n\n\ndescription\nThe working directory MetaSWAP expects.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.coupling\n\nenable_sprinkling\n\n\n\n\n\n\ndescription\nWhether to enable sprinkling, that is: enable extracting groundwater for irrigation.\n\n\ntype\nbool\n\n\nrequired\ntrue\n\n\n\n\nmf6_model\n\n\n\n\n\n\ndescription\nSpecifies the MODFLOW 6 model name to which MetaSWAP will be coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_recharge_pkg\n\n\n\n\n\n\ndescription\nSpecifies the package name (specified in the Modflow 6 simulation name file) of the recharge package to which MetaSWAP will be coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_well_pkg\n\n\n\n\n\n\ndescription\nSpecifies the package name (specified in the Modflow 6 simulation name file) of the recharge package to which MetaSWAP will be coupled. This setting is only required if enable_sprinkling is set to true.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nmf6_msw_node_map\n\n\n\n\n\n\ndescription\nPath to the file specifying the mapping between MODFLOW 6 cells and MetaSWAP svats.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_recharge_pkg\n\n\n\n\n\n\ndescription\nPath to the file specifying the mapping between MODFLOW 6 recharge cells and MetaSWAP svats.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_sprinkling_map\n\n\n\n\n\n\ndescription\nPath to the file specifying the mapping between MODFLOW 6 wells and MetaSWAP svats. This setting is only required if enable_sprinkling is set to true.\n\n\ntype\nstr\n\n\nrequired\nfalse" - }, - { - "objectID": "introduction.html", - "href": "introduction.html", - "title": " Introduction", - "section": "", - "text": "The iMOD Suite provides tools to efficiently build and visualize groundwater models.\nDeltares is working to integrate and improve our groundwater software. Therefore iMOD is extended with a new iMOD Suite to link to the latest developments on the MODFLOW and on the changing requirements in the field of groundwatermodelling, most pressing currently the support of unstructured grids.\nWe created the new iMOD Suite to aid pre- and post-processing unstructured groundwater models. Furthermore, a second goal of this suite was to better connect to the latest developments in the data science ecosystem, by utilizing:\n\nExisting data format conventions (NetCDF, UGRID) instead of developing new ones, allowing more user flexibility to find the right tools for the right job.\nWidely used and tested software (QGIS) to which we add our extension, instead of creating complete programs ourselves.\nModern programming languages (C++ and Python) that allow connecting to a big and lively software ecoystem.\n\nThe iMOD Suite offers different modules which support modelling with MODFLOW 6 (including unstructured meshes):\n\niMOD Viewer: The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin. The iMOD QGIS Plugin allows visualisation of model input and output with tools for cross-sections, timeseries and link to the 3D viewer. It supports structured NetCDF, UGRID and IPF files. And the iMOD 3D Viewer for interactive 3D visualisation of unstructured input and output. Supports UGRID file format and IPF borelog files.\niMOD Python: A Python package to support MODFLOW groundwater modeling. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this workflow reproducible.\niMOD Coupler: Software that couples MODFLOW 6 to other computational cores. It currently supports a coupling to MetaSWAP, but additional computational cores are planned in the future.\n\n\n\n\nEasy plotting of 4 dimensional [t, z, y, x] data in the iMOD QGIS plugin. The example shows the chlorine concentrations computed by the NHI fresh-salt model.\n\n\n\n\n\nThe chlorine concentrations computed by the NHI-fresh-salt model for the province of Zeeland, plotted in the new iMOD 3D viewer. The top layer is made partly transparent, creating the pretty mist effect in the creek ridges." - }, - { - "objectID": "introduction.html#whats-included", - "href": "introduction.html#whats-included", - "title": " Introduction", - "section": "", - "text": "The iMOD Suite provides tools to efficiently build and visualize groundwater models.\nDeltares is working to integrate and improve our groundwater software. Therefore iMOD is extended with a new iMOD Suite to link to the latest developments on the MODFLOW and on the changing requirements in the field of groundwatermodelling, most pressing currently the support of unstructured grids.\nWe created the new iMOD Suite to aid pre- and post-processing unstructured groundwater models. Furthermore, a second goal of this suite was to better connect to the latest developments in the data science ecosystem, by utilizing:\n\nExisting data format conventions (NetCDF, UGRID) instead of developing new ones, allowing more user flexibility to find the right tools for the right job.\nWidely used and tested software (QGIS) to which we add our extension, instead of creating complete programs ourselves.\nModern programming languages (C++ and Python) that allow connecting to a big and lively software ecoystem.\n\nThe iMOD Suite offers different modules which support modelling with MODFLOW 6 (including unstructured meshes):\n\niMOD Viewer: The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin. The iMOD QGIS Plugin allows visualisation of model input and output with tools for cross-sections, timeseries and link to the 3D viewer. It supports structured NetCDF, UGRID and IPF files. And the iMOD 3D Viewer for interactive 3D visualisation of unstructured input and output. Supports UGRID file format and IPF borelog files.\niMOD Python: A Python package to support MODFLOW groundwater modeling. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this workflow reproducible.\niMOD Coupler: Software that couples MODFLOW 6 to other computational cores. It currently supports a coupling to MetaSWAP, but additional computational cores are planned in the future.\n\n\n\n\nEasy plotting of 4 dimensional [t, z, y, x] data in the iMOD QGIS plugin. The example shows the chlorine concentrations computed by the NHI fresh-salt model.\n\n\n\n\n\nThe chlorine concentrations computed by the NHI-fresh-salt model for the province of Zeeland, plotted in the new iMOD 3D viewer. The top layer is made partly transparent, creating the pretty mist effect in the creek ridges." - }, - { - "objectID": "introduction.html#comparison-with-imod-5", - "href": "introduction.html#comparison-with-imod-5", - "title": " Introduction", - "section": "Comparison with iMOD 5", - "text": "Comparison with iMOD 5\nThe proven technology and expertise of iMOD is consolidated within iMOD 5. iMOD 5 supports structured calculations with MODFLOW2005 and structured MODFLOW 6 and can be coupled to the unsaturated zone model MetaSWAP. The model input and output can be visualised in its fast interactive viewer. The documentation of iMOD 5 can be found here .\nImportant technological innovations will be developed in the new iMOD Suite, whereas iMOD 5 will be maintained the coming years, but will see no big new feature developments. Table 1 and Table 2 respectively provide comparisons between iMOD Suite and iMOD 5 for the components and supported MODFLOW6 packages.\n\n\nTable 1: Comparison between iMOD Suite & iMOD 5\n\n\n\n\n\n\n\n\niMOD Suite\niMOD 5\n\n\n\n\ncomputational kernels\nMODFLOW 2005, MODFLOW 6, SEAWAT, MT3DMS, MetaSWAP\nMODFLOW 2005, MODFLOW 6, SEAWAT, MT3DMS, MetaSWAP\n\n\nfile types\nNetCDF, UGRID, shp, tiff, idf, ipf, gen\nidf, ipf, isg, gen\n\n\ngrid types\nstructured & unstructured\nstructured & nested structured\n\n\nscripted pre-processing\niMOD Python\niMOD Batch\n\n\ninteractive pre-processing\n(QGIS)\niMOD GUI\n\n\nscripted 2D plot\niMOD Python\niMOD Batch\n\n\ninteractive 2D plot\niMOD QGIS plugin (& QGIS)\niMOD GUI\n\n\nscripted 3D plot\niMOD Python\n\n\n\ninteractive 3D plot\niMOD 3D Viewer\niMOD GUI\n\n\n\n\n\n\nTable 2: Supported MODFLOW6 flow packages in iMOD Suite & iMOD 5\n\n\n\n\n\n\n\n\nPackage\nDescription\niMOD Suite\niMOD 5\n\n\n\n\nDIS\nStructured Discretization\nx\nx\n\n\nDISV\nDiscretization by Vertices\nx\n\n\n\nDISU\nStructured Discretization\n\n\n\n\nIC\nInitial Conditions\nx\nx\n\n\nOC\nOutput Control\nx\nx\n\n\nNPF\nNode Property Flow\nx\nx\n\n\nHFB\nHorizontal Flow Barrier\nx\nx\n\n\nSTO\nStorage\nx\nx\n\n\nCSUB\nSkeletal Storage, Compaction, and Subsidence\n\n\n\n\nBUY\nBuoyancy\nx\n\n\n\nCHD\nConstant-Head\nx\nx\n\n\nWEL\nWell\nx\nx\n\n\nDRN\nDrain\nx\nx\n\n\nRIV\nRiver\nx\nx\n\n\nGHB\nGeneral-Head Boundary\nx\nx\n\n\nRCH\nRecharge\nx\nx\n\n\nEVT\nEvapotranspiration\nx\nx\n\n\nMAW\nMulti-Aquifer Well\n\n\n\n\nSFR\nStreamflow Routing\n\nx\n\n\nLAK\nLake\n\n\n\n\nUZF\nUnsaturated Zone Flow\nx\n\n\n\nMVR\nWater Mover" - }, - { - "objectID": "coupler.html", - "href": "coupler.html", - "title": " iMOD Coupler", - "section": "", - "text": "Deltares have worked together with the USGS to create the MODFLOW API, based on the Basic Model Interface (BMI) with some extensions. The first version of this functionality became available with the release of MODFLOW 6.2.0. BMI is a set of standard control and query functions that, when added to a model code, make that model both easier to learn and easier to couple with other software elements. Furthermore, the BMI makes it possible to control MODFLOW 6 execution from scripting languages using bindings for the BMI.\nWe have also developed xmipy, a Python package with bindings for the API, which allow you to run and update (at runtime) a MODFLOW 6 model from Python. This allows coupling MODFLOW 6 to other computational cores. One of its first applications is a coupling of MODFLOW 6 to MetaSWAP, as part of the iMOD Coupler package. Other applications can be found in this paper." - }, - { - "objectID": "coupler.html#coupling-to-modflow-6", - "href": "coupler.html#coupling-to-modflow-6", - "title": " iMOD Coupler", - "section": "", - "text": "Deltares have worked together with the USGS to create the MODFLOW API, based on the Basic Model Interface (BMI) with some extensions. The first version of this functionality became available with the release of MODFLOW 6.2.0. BMI is a set of standard control and query functions that, when added to a model code, make that model both easier to learn and easier to couple with other software elements. Furthermore, the BMI makes it possible to control MODFLOW 6 execution from scripting languages using bindings for the BMI.\nWe have also developed xmipy, a Python package with bindings for the API, which allow you to run and update (at runtime) a MODFLOW 6 model from Python. This allows coupling MODFLOW 6 to other computational cores. One of its first applications is a coupling of MODFLOW 6 to MetaSWAP, as part of the iMOD Coupler package. Other applications can be found in this paper." + "objectID": "tutorial_wq.html#convert-output-data", + "href": "tutorial_wq.html#convert-output-data", + "title": "Conceptual fresh-salt model", + "section": "Convert output data", + "text": "Convert output data\niMOD-WQ writes IDF files, a data format used in iMOD 5, which not many other software packages support. Therefore iMOD-python allows for reading these IDF files and converting them to other data formats in Python.\nIn this example we convert the output to a UGRID file, which can be read by QGIS.\nimport imod\nimport numpy as np\nimport xarray as xr\n\n# We assume that this script is located in the same directory\n# as in create_wq_input.py.\n# We provide a UNIX style global path\n# to select all IDF files in the conc directory.\nconc_path = \"./results/conc/*.IDF\"\nbottom_path = \"./FreshwaterLens/bas/bottom*.idf\"\ntop_path = \"./FreshwaterLens/bas/top.idf\"\n\n# Open the IDF files.\nconc = imod.idf.open(conc_path).compute()\nbottom = imod.idf.open(bottom_path).compute()\nsurface = imod.idf.open(top_path).compute()\n\n# Reconstruct vertical discretization\n# We need this as IDFs do not store vertical discretization\nsurface = surface.assign_coords(layer=1)\n\n## Create 3D array of tops\n### Roll bottom one layer downward: the bottom of a layer is top of next layer\ntop = bottom.roll(layer=1, roll_coords=False)\n### Remove layer 1\ntop = top.sel(layer=slice(2, None))\n### Add surface as layer 1\ntop = xr.concat([surface, top], dim=\"layer\")\n### Reorder dimensions\ntop = top.transpose(\"layer\", \"y\", \"x\")\n\n# Merge into dataset\nds = xr.merge([conc, top, bottom])\n\n# Create MDAL supported UGRID\n# NOTE: This requires iMOD-python v1.0(?)\nds_ugrid = imod.util.to_ugrid2d(ds)\n\n#%% Due to a bug in MDAL, we have to encode the times as floats\n# instead of integers\n# until this is fixed: https://github.com/lutraconsulting/MDAL/issues/348\nds_ugrid[\"time\"].encoding[\"dtype\"] = np.float64\n\nds_ugrid.to_netcdf(\"./results/output_ugrid.nc\")" }, { - "objectID": "coupler.html#source-code", - "href": "coupler.html#source-code", - "title": " iMOD Coupler", - "section": "Source Code", - "text": "Source Code\nThe xmipy library can be found on: https://github.com/Deltares/xmipy\nThe iMOD Coupler can be found on: https://github.com/Deltares/imod_coupler" + "objectID": "tutorial_wq.html#viewing-the-results-in-qgis", + "href": "tutorial_wq.html#viewing-the-results-in-qgis", + "title": "Conceptual fresh-salt model", + "section": "Viewing the results in QGIS", + "text": "Viewing the results in QGIS\nStart QGIS and open the ./results/output_ugrid.nc file as a mesh.\n\n\n\nWhere to find the action to load a mesh layer\n\n\nYou can select the variable to plot on the map canvas by right-clicking the output_ugrid layer in the Layers panel, and then navigating to: Properties > Symbology\nNext select which variable to plot in the group selection screen by clicking the color ramp next to the variable name, which will render the variable on the map canvas.\n\n\n\nWhere to find the group selection screen. Here you can select the variables to be plotted. The red circle indicates where the color ramp symbol can be found.\n\n\nColormaps can be set by navigating to the color selection menu\n\n\n\nThe color selection menu, here you can set the colormap that will be used, as well as adjusting its binning. In these example screenshots we use the colormap \"Spectral\".\n\n\nNext, open the iMOD plugin's cross-section tool and draw a cross-section by clicking from Map and right-clicking to stop drawing. Then select conc as variable to be plotted, and click Add. Next click Plot.\nBy default the tool will plot with a green to blue gradient called Viridis, but we can change the gradient by clicking the dataset's gradient box under symbology in the table.\nThis opens up a color dialog, where we can select the color ramp. Clicking the small arrow next to the color gradient box in the dialog will allow selecting presets. We chose \"Spectral\" and also select \"Invert Color Ramp\" in the examples, but you can select whatever colormap you think is suitable!\n\n\n\nYou should see this if you followed precisely what we did." }, { - "objectID": "coupler.html#known-issues", - "href": "coupler.html#known-issues", - "title": " iMOD Coupler", - "section": "Known Issues", - "text": "Known Issues\n\niMOD v5.2 release\nThe MetaSWAP and Modflow6 libraries provided with iMOD 5.2 for imod_coupler were not statically linked. This could result in the following error:\nFileNotFoundError: '''Could not find module \"\\path\\to\\MetaSWAP.dll\" (or one\nof its dependencies). Try using the full path with constructor syntax.'''\nThis is caused by not having the Intel redistrutable libraries on the system. These can be downloaded from this page. Make sure to choose the correct platform and the version for 'Parallel Studio XE 2020'." + "objectID": "tutorial_wq.html#viewing-the-results-in-the-imod-3d-viewer", + "href": "tutorial_wq.html#viewing-the-results-in-the-imod-3d-viewer", + "title": "Conceptual fresh-salt model", + "section": "Viewing the results in the iMOD 3D Viewer", + "text": "Viewing the results in the iMOD 3D Viewer\nAs a final step we will look at the results in the iMOD 3D Viewer. Click the 3D viewer symbol in QGIS, which will open up the 3D viewer widget of the iMOD plugin.\nFirst, click the Draw Extent button to draw an extent to be plotted. This can be very useful for large datasets, to only look at a smaller zone of the data.\nSecond, click Start iMOD 3D viewer to start the iMOD 3D viewer. Third, click Load mesh data to load the mesh you selected in the QGIS widget to be opened in the 3D viewer.\nFourth, to plot the data, under the Imported files, expand the data selection tree, and under Layered datasets, selecting conc.\nFinally, you can migrate the colormap you used in QGIS by clicking Load legend.\n\n\n\nIf you followed the instructions, you should see this." }, { - "objectID": "practical_powershell.html", - "href": "practical_powershell.html", - "title": " Powershell profile error", - "section": "", - "text": "Your computer might throw you the following error in Windows PowerShell. This is annoying, because it prevents the Visual Studio Code terminal (which uses PowerShell) to use conda.\nFile C:\\Users\\Herman\\Documents\\WindowsPowerShell\\profile.ps1 cannot be loaded because the\nexecution of scripts is disabled on this system. Please see \"get-help about_signing\" for\nmore details.\nAt line:1 char:2\n+ . <<<< 'C:\\Users\\Herman\\Documents\\WindowsPowerShell\\profile.ps1'\n + CategoryInfo : NotSpecified: (:) [], PSSecurityException\n + FullyQualifiedErrorId : RuntimeException\nIn order to solve this, it is recommended to run the following command:\nSet-ExecutionPolicy RemoteSigned -Scope CurrentUser\nFor more information, see this link." + "objectID": "tutorial_wq.html#concluding", + "href": "tutorial_wq.html#concluding", + "title": "Conceptual fresh-salt model", + "section": "Concluding", + "text": "Concluding\nIn short, we wrote model input with iMOD-python, ran a model with iMOD-WQ, converted its output to UGRID with iMOD-python, and viewed the results in QGIS and the iMOD 3D viewer." }, { - "objectID": "practical_cookiecutter.html", - "href": "practical_cookiecutter.html", - "title": " Consistent folder structures with Cookiecutter", + "objectID": "viewer_install_msi.html", + "href": "viewer_install_msi.html", + "title": "Install iMOD Viewer with the Deltares setup", "section": "", - "text": "Cookiecutter enables creating templated folder structures and files to kickstart your projects. At Deltares, we created such a template.\nUsing the same project template in an organization has the following advantages:\nThe iMOD Gitlab group contains multiple applications of the Deltares Project template." - }, - { - "objectID": "practical_cookiecutter.html#install", - "href": "practical_cookiecutter.html#install", - "title": " Consistent folder structures with Cookiecutter", - "section": "Install", - "text": "Install\nTo install Cookiecutter, run the following command:\npip install cookiecutter" - }, - { - "objectID": "practical_cookiecutter.html#kickstart-project", - "href": "practical_cookiecutter.html#kickstart-project", - "title": " Consistent folder structures with Cookiecutter", - "section": "Kickstart project", - "text": "Kickstart project\nThen to create a new project:\ncookiecutter gl:deltares/imod/cookiecutter-reproducible-project\nThis will create the following folder and file structure:\n.\n├── AUTHORS.md\n├── LICENSE\n├── README.md\n├── bin <- Your compiled model code can be stored here (not tracked by git)\n├── config <- Configuration files, e.g., for doxygen or for your model if needed\n├── data \n│ ├── 1-external <- Data external to the project.\n│ ├── 2-interim <- Intermediate data that has been altered.\n│ ├── 3-input <- The processed data sets, ready for modeling.\n│ ├── 4-output <- Data dump from the model.\n│ └── 5-visualization <- Post-processed data, ready for visualisation.\n├── docs <- Documentation, e.g., doxygen or scientific papers (not tracked by git)\n├── notebooks <- Jupyter notebooks\n├── reports <- For a manuscript source, e.g., LaTeX, Markdown, etc., or any project reports\n│   └── figures <- Figures for the manuscript or reports\n└── src <- Source code for this project\n ├── 0-setup <- Install necessary software, dependencies, pull other git projects, etc.\n ├── 1-prepare <- Scripts and programs to process data, from 1-external to 2-interim.\n ├── 2-build <- Scripts to create model specific input from 2-interim to 3-input. \n ├── 3-model <- Scripts to run model and convert or compress model results, from 3-input to 4-output.\n ├── 4-analyze <- Scripts to post-process model results, from 4-output to 5-visualization.\n └── 5-visualize <- Scripts for visualisation of your results, from 5-visualization to ./report/figures." + "text": "To install the iMOD Viewer components (3D Viewer & QGIS plugin), download the installer on the Deltares download portal. If the subscription worked correctly, you will receive a download link via e-mail within only a few minutes.\n\n\n\n\n\n\nWarning\n\n\n\nThe QGIS plugin of course requires QGIS. You can download the standalone QGIS setup on the QGIS website We recommend downloading a QGIS version >= 3.28 here. After downloading the QGIS setup, run it.\n\n\nUnzip the zipfile, which includes the viewer installer. Double click the .msi file.\nThis will open up the first screen of the setup wizard.\n\n\n\nThe starting screen.\n\n\nClick Next here, which will open up the next screen, which is the license screen.\n\n\n\nThe license screen\n\n\nTick the \"I accept\" tickbox, and click Next.\nThis will open up the installation selection screen.\n\n\n\nInstallation selection type.\n\n\nYou can select a Minimal or Complete installation here, by clicking the respective buttons.\nNote that the QGIS plugin, which comes only with a Complete install, is required to use all features of the iMOD viewer. These are:\n\nDrawing fence diagrams\nLoading only a sub section of the map (useful for large files)\nAccess to more legends.\n\nAfter selecting the preferred installation type, you still have to click Next before installation continues.\nThis will open the install screen.\n\n\n\nThe wizard install screen\n\n\nClick Install and after installation is complete, click Finalize. You should now be ready to go.\nThe installer will also create a program shortcut to the pdf with documentation. If you open the Windows Start window and type \"iMOD Suite User Manual\" it should pop up.\n\n\n\nA program shortcut should created by the installer to the User Manual." }, { "objectID": "tutorial_Abbeyfeale.html", @@ -475,6 +370,13 @@ "section": "iMOD Python", "text": "iMOD Python\nThis is the moment where we start with Python. With the help of the iMOD Python package you will create a simple MODFLOW6 model and run it.\n\nAll input we use for this simple model is available in your tutorial folder “…\\iMOD-Suite-Tutorial_01\\data\\1-external\\..”“. There you find the spatial data we loaded to QGIS, and there is a CSV file containing all single parameter values: “parameters.csv”.\nAll steps, from the preparation of the model input to visualization of the results, are available in separate Python scripts. You find the scripts for each phase in the folder and subfolders within “..\\iMOD-Suite-Tutorial_01\\src\\..”\n\n\nClick on the windows START button and type Deltaforge prompt. Click on the app and a black DOS window will start. [for Python experts: with this prompt a python environment is activated containing the iMOD python package as well as Snakemake (workflow manager)].\n\nFrom this DOS window we will run the different python scripts (*.py files). For the scripts to work properly, we need to navigate to the correct folder location.\n\nIn the DOS window type the letter of the drive you work on (e.g. C: or D:) and press ENTER.\nNavigate to the correct main tutorial folder with CD (change directory). E.g. “CD c:\\imod\\training\\iMOD-Suite-Tutorial_01” and press ENTER.\n\nTIP: After copying your path, you can paste your path in the prompt window with CTRL+V.\nNow we run 4 scripts to convert basic data into an interim model format (NetCDF), ready to create MODFLOW6 input files. \n\nScript 1 – template\n\nThis script opens the DTM file, uses its extent for the model boundary and sets the cell size to 40m.\n\nIn the Deltaforge prompt type the command: Python src\\1-prepare\\1-create-template-grid.py and press ENTER.\n\n\nResults 1: The result is a raster file (NetCDF format) describing the mask of our model (extent and cell size) as well as our DTM scaled up to the size of the model mask.\n\nOptional step. Load the topography_raster.nc file into QGIS. The file is in the folder “…\\iMOD-Suite-Tutorial_01\\data\\2-interim”.\n\n\nScript 2 – River\n\nThis script opens a shape file with river elements. It rasterizes it to the project cell size and adds a default river depth (1 m) and bottom resistance.\n\nIn the Deltaforge prompt type the command: Python src\\1-prepare\\2-create-river-system.py and press ENTER.\n\nResults 2: The result is a raster file (NetCDF format) for the river data, containing data for the parameters Stage, Bottom and Conductance.\n\nLoad the file “..\\iMOD-Suite-Tutorial_01\\data\\2-interim\\river_raster.nc” into QGIS via the menu Layer > Add Layer > Add Raster Layer. From the interim window you see that the NC files contains 3 river parameters.\nClick on the button Add Layers and click Close to close the Data Source Manager.\n\n\nScript 3 – Recharge\n\nThis script opens the shape file with recharge zones (polygons) containing the recharge in mm per year. The recharge zones are rasterized to the project extent and cell size. Finally the script adds a seasonal forcing (sine function) resulting in a time series of daily recharge values for 1 year.\n\nIn the Deltaforge prompt type the command: Python src\\1-prepare\\3-create-recharge.py and press ENTER.\n\nResults 3: The result is a mesh file (NetCDF format) for the recharge data, containing data for 365 days. This NC file must be loaded as mesh in stead of a raster.\n\nFrom the menu Layer > Add layer > Add Mesh Layer… load the file “…\\iMOD-Suite-Tutorial_01\\data\\2-interim\\recharge_mesh.nc” into QGIS. From the panel Layer you can see that the file is a timeseries because a small clock symbol is visible .\n\nThere are 2 ways to visualize this recharge over time:\n\nanimation over time;\ntimeseries at location.\n\nLet’s now activate the panels for both methods.\n\nFor the animation over time, activate the Temporal Control Panel with the clock button on the Map Navigation Toolbar ().\nFor timeseries at location activate the Timeseries panel with the Timeseries button ( ) on the iMOD Toolbar.\n\nYour display should look similar with Figure 6, except for the red line below.\n\nIn the Temporal Controller panel click the green play button (). Navigation buttons appear.\nIncrease the Step from 1 to 14 days and start the animation with a click on the Play button ().\nIn the iMOD time series panel be sure the layer RECHARGE_MESH is loaded. The mesh only contains a single variable: Recharge.\nClick the button Select Points, your mouse changes into a . Be sure Update on Selection is checked and hover over the mesh. The graph shows the timeseries at the location of your mouse.\nDeselect the checkbox Update on Selection.\nClick the button Select Points (your mouse becomes a and with the left mouse button select 3 points ad random.\nFinally click the Plot button and the 3 timeseries are added to the chart. Colors can be changed.\n\n\n\n\nFigure 6: Recharge data analysed in the Temporal Controller (QGIS) and the Time Series Plot tool (iMOD)\n\n\n\nScript 4 – Geohydrology\n\nThis script reads default parameter values from the file “parameters.csv” in order to create a NetCDF file with top and bottom of 3 layers including the geohydraulic parameters. The default values are: \n\nParameter values\n\n\nParameter\nValue\nQuantity\nDescription\n\n\n\n\nK_tz\n5.9\nm/d\nPermeability Transition Zone\n\n\nK_sb\n0.02\nm/d\nPermeability Shallow Bed rock\n\n\nK_db\n0.014\nm/d\nPermeability Deep Bed rock\n\n\nD_tz\n1\nm\nThickness transition zone\n\n\nD_sb\n5\nm\nThickness shallow bed rock zone\n\n\nD_db\n50\nm\nThickness deep bed rock zone\n\n\n\n\nIn the Deltaforge prompt type the command: Python src\\1-prepare\\4-create-hydrogeology.py and press ENTER.\n\nResults 4: The result is a mesh file (NetCDF format) for the geohydrological data. This NC file must be loaded as mesh instead of a raster.\n\nFrom the menu Layer > Add layer > Add Mesh layer… load the file “…\\iMOD-Suite-Tutorial_01\\data\\2-interim\\hydrogeology_mesh.nc” into QGIS.\nDouble click on the layer name “hydrogeology_mesh” and the window Layer Properties will open.\nClick on the group Source on the left, and on the right you see all Available Datasets in this single mesh.\n\nLet’s create a cross-section with the permeability plot within each layer.\n\nFirst, we must deactivate temporal control. Open the Temporal Control Panel again (), and turn off temporal navigation with the button .\nOn the iMOD Toolbar select the button to start the iMOD Cross Section tool.\nIn the iMOD cross-section panel be sure the layer “hydrogeology_mesh” is selected. From the Variable dropdown select permeability and from the Layers dropdown select all layers.\nClick the button Add to add this item to the list of chart elements.\nClick on the button Select Location and draw a single line over the model area with your left mouse button. Close the line with your right mouse button.\nClick the button Plot and the geology along the line colored by permeability is draw in the chart.\n\nTIP: If you do not see any line, perhaps the axes are not defined well. To view all data, click you right mouse button in the figure and select the option “View All”. The alternative is to click on the small A symbol () in the lower left of the chart.\nYour screen might look like Figure 7. In case the default legend is not you can change it.\n\nTo change the legend, click on the colored bar in the column symbology.\nIn the new window go the “Render type” menu and select Unique values and click Apply.\nUse the scroll button on your mouse to zoom in order to make the permeability of the thin first layer visible.\n\n\n\n\nFigure 7: Three model layers coloured by permeability in the iMOD cross-section tool\n\n\n\nScript 5 – Create MODFLOW 6 input\n\nNow the input data for the model are available, it is time to convert the data into the standard MODFLOW6 format. For that conversion a function exists within iMOD Python. We prepared another python script for you to easily do the conversion by running the script in the Deltaforge prompt.\n[If you are interested in the content of the script, open it in your Python editor (e.g. Spyder) or a simple Text editor].\n\nIn the Deltaforge prompt type the command: Python src\\2-build\\5-build-model.py and press ENTER.\n\nThe result of the script is a folder with the standard MODFLOW 6 input.\n\nOptional step Visit the folder “…\\iMOD-Suite-Tutorial_01\\data\\3-input” with your file manager. There your find the file MFSIM.NAM. This is the main MODFLOW6 file with references to the other files and settings. The folder GWF_1 contains the model input and later the model results.\n\n\nScript 6 – Run the MODFLOW 6 model\n\niMOD Suite uses the official USGS version of MODFLOW 6. The executable is provided with the tutorial database and is available as “…\\iMOD-Suite-Tutorial_01\\bin\\mf6.exe”.\n\nIn the Deltaforge prompt type the command: Python src\\3-model\\6-run-model.py and press ENTER.\n\nYou can check the logfile of the model in order to see if it was run successful.\nOpen the file “…\\iMOD-Suite-Tutorial_01\\data\\3-input\\mf.sim.lst” in the Text Editor you prefer. Go to the end of the file and see the total run time of the model and a confirmation of a “normal termination of the simulation”.\nOpen the file “…\\iMOD-Suite-Tutorial_01\\data\\3-input\\gwf_1\\gwf_1.lst”. At the end of the file you see the Volume Budgets, the water balance for the last stress period.\n\n\nScript 7 - Convert the MODFLOW 6 results for QGIS\n\nThe standard output of MODFLOW6 cannot be loaded into QGIS. Therefore, iMOD Python contains a function to convert the output into NetCDF files.\n\nIn the Deltaforge prompt type the command: Python src\\3-model\\7-post-process-output.py and press ENTER.\n\nThe result of this script is a NetCDF file with the calculated head for 365 days.\n\nLoad the file “…\\iMOD-Suite-Tutorial_01\\data\\4-output\\hds_mesh.nc” into QGIS.\n\nBy default, the variable bottom_layer_1 is loaded. We will change the selected variable into Heads and pick a legend specific for plotting of time series.\n\nDouble click on the layer “hds_mesh” to open the Layer Properties window.\nSelect the group Source on the left and see that the mesh contains several datasets.\nSelect the group Symbology on the left and select the first tab Dataset (). Here we can select the group we want to plot, for now it is “head_layer_1”.\n\nClick on the icon () on the line for “head_layer_1” and change it into (). Click on Apply.\nSelect the second tab Contours ( ).\nSet the Min value on 40.00 and the Max value on 60.00 in order to see head changes over time.\nFrom the dropdown menu Color Ramp select Turbo and click on OK to close the window.\n\nNow we try to show an animation of the variation of calculated Heads over time and as timeseries.\n\nFor the animation over time, activate the Temporal Control Panel with the button () on the Map Navigation Toolbar.\nFrom you experience with this tool, try to start the animation with timestep of 14 days.\nFor timeseries at location activate the Timeseries panel with the Timeseries button () on the iMOD Toolbar.\nFrom you experience with this tool, select 3 points in the model area and plot the corresponding calculated Heads for layer 1.\n\n\n\n\nFigure 8: Calculated head with MODFLOW 6 on 3 points within the model area\n\n\nThe QGIS part of the tutorial ends here. You can save your QGIS project now." }, + { + "objectID": "viewer.html", + "href": "viewer.html", + "title": " iMOD Viewer", + "section": "", + "text": "The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin.\n\nThe iMOD 3D Viewer is a 3D viewer for grids and datasets. It supports IDF files, UGRID files and Grb.disu files that contain an unstructured layered grid.\nThe 3D Viewer also supports viewing some non-grid objects like IPF files and Shapefiles.\nThe iMOD QGIS plugin aids exploring 4D geospatial data in QGIS.\nIts primary components are visualization of timeseries, both at points as well as on an unstructured grid, cross-section visualization, including borelogs, and connecting to the 3D Viewer." + }, { "objectID": "coupler_metamod_technical.html", "href": "coupler_metamod_technical.html", @@ -518,60 +420,60 @@ "text": "Coupler\n\nnodenr2svat.dxc\nThis file takes care of mapping the MODFLOW node numbers to the MetaSWAP svats, which is required for coupling the heads and storages of both kernels, it thus excludes nodes connected where wells are for sprinkling. The file format is as follows:\nnode_nr svat ly\n...\nWhere node_nr is the MODFLOW6 node number (to be specific: the user node number), which replaces the MODFLOW 2005 CellID. svat is the MetaSWAP svat number and ly is the Modflow layer number.\n\n\nrchindex2svat.dxc\nThis file takes care of mapping the recharge cells to the MetaSWAP svats. The file format is as follows:\nrch_index svat ly\n...\nWhere rch_index is the MODFLOW6 RCH index number, which equals the row number of the data specified under period in the .rch file. svat is the MetaSWAP svat number and ly is the MODFLOW layer number.\n\n\nwellindex2svat.dxc\nThis file takes care of mapping MODFLOW wells to the MetaSWAP svats for sprinkling. The file format is as follows:\nwell_index svat ly\n...\nWhere well_index is the MODFLOW6 WEL index number, which equals the row number of the data specified under period in the .wel file. svat is the MetaSWAP svat number and ly is the MODFLOW layer number." }, { - "objectID": "viewer_install.html", - "href": "viewer_install.html", - "title": "Install iMOD Viewer", + "objectID": "about.html", + "href": "about.html", + "title": "About", "section": "", - "text": "For the complete iMOD viewer (QGIS plugin and 3D viewer) can be installed using the Deltares installer. A working QGIS is needed before installing the iMOD viewer. It is also possible to install the QGIS plugin using the QGIS plugin repository. This installation is without the 3D viewer.\nThe different ways to install the QGIS plugin are described in Section 3.1, Section 3.2, and Section 3.3. Each of these, however, require the user to install QGIS. To install the QGIS plugin, we recommend running the iMOD Viewer installer (Section 3.1), which will both install the iMOD 3D viewer, as well as the iMOD QGIS plugin." + "text": "If you have questions on using iMOD Suite or want to report a bug, you can send an email to imod.support@deltares.nl.\n\n\n\nBelow is the list of repositories that contain the source code of the individual components. You can raise issues, or suggest changes, here.\n\niMOD Documentation Github\niMOD QGIS plugin Github\niMOD 3D Viewer Github\niMOD Python Gitlab" }, { - "objectID": "viewer_install.html#description", - "href": "viewer_install.html#description", - "title": "Install iMOD Viewer", + "objectID": "about.html#get-involved", + "href": "about.html#get-involved", + "title": "About", "section": "", - "text": "For the complete iMOD viewer (QGIS plugin and 3D viewer) can be installed using the Deltares installer. A working QGIS is needed before installing the iMOD viewer. It is also possible to install the QGIS plugin using the QGIS plugin repository. This installation is without the 3D viewer.\nThe different ways to install the QGIS plugin are described in Section 3.1, Section 3.2, and Section 3.3. Each of these, however, require the user to install QGIS. To install the QGIS plugin, we recommend running the iMOD Viewer installer (Section 3.1), which will both install the iMOD 3D viewer, as well as the iMOD QGIS plugin." + "text": "If you have questions on using iMOD Suite or want to report a bug, you can send an email to imod.support@deltares.nl.\n\n\n\nBelow is the list of repositories that contain the source code of the individual components. You can raise issues, or suggest changes, here.\n\niMOD Documentation Github\niMOD QGIS plugin Github\niMOD 3D Viewer Github\niMOD Python Gitlab" }, { - "objectID": "viewer_install.html#sec-install_QGIS", - "href": "viewer_install.html#sec-install_QGIS", - "title": "Install iMOD Viewer", - "section": "2 Installing QGIS", - "text": "2 Installing QGIS\nYou can download the standalone QGIS setup [on the QGIS website] (https://qgis.org/en/site/forusers/download.html). We recommend downloading a QGIS version >= 3.28 here. After downloading the QGIS setup, run it.\nThis installs a user installation of QGIS, which is sufficient in most cases. For a system wide installation, see Section 4." + "objectID": "about.html#history", + "href": "about.html#history", + "title": "About", + "section": "History", + "text": "History\nDevelopments on iMOD started in 2006, with the aim to make groundwater modelling with MODFLOW easier. iMOD developed into a full fletched GUI, which could be used to build and analyse groundwater models from start to finish. Focus of the software always has been on large groundwater models, for which the software was so successful that most regional groundwater models owned by water boards in Netherlands, plus the Dutch National model (LHM), run on iMOD. In 2014, in Deltares’ move to make their software open source, the Fortran code of iMOD was shared and in 2015 the compiled executables became freely available. In many international projects (for example in India, New Orleans, Colombia, Germany, and Switzerland) this was one of the reasons to adopt iMOD as the modelling software. iMOD’s capabilities of simulating large groundwater models were pushed further in 2017 when iMOD and its custom computational kernels iMODFLOW and iMOD-WQ, could be run in parallel. Developments on the GUI continued up to 2020, when it became apparent that the approach up to that point had a few drawbacks:\n\nWith the release of Modflow 6, computations on unstructured grids were possible. This created a demand for supporting all types of unstructured grids. iMOD, however, could not support these grids (except multi-model structured subgrids).\nIt was difficult to connect iMOD to the ever changing software and data science ecosystem, because of the use of Fortran and iMOD’s custom data formats. For example, Python has a larger ecosystem, allowing users to easily incorporate all kinds of packages into their workflows.\n\nTherefore, in 2021, the iMOD Suite was released. This suite consists of a Python package, a QGIS plugin, and a 3D viewer. It therefore supports reproducible workflows for unstructured groundwater models and relies more on standard filetypes such as NetCDF, UGRID, and shapefiles.\nThe classic iMOD GUI and its batch functionality is consolidated under the name iMOD 5, and will be maintained for the coming years. During this transition period it is easy to use iMOD 5 in combination with iMOD Suite. New developments will land in iMOD Suite.\n\n\n\n\n\n\nflowchart TB\n subgraph 2006\n A{iMOD 1.0}\n X{{Start development}}\n end\n A --> B{iMOD 2.0}\n subgraph 2014\n B\n Y{{Fortran code \\n available as open source}}\n end\n B --> C{iMOD 3.0}\n subgraph 2015\n C\n Z{{Executables freely \\n available}}\n end\n C --> D{iMOD 4.0}\n subgraph 2017\n D\n XX{{parallel Solver Pks}}\n end\n D --> E{iMOD 5.0}\n subgraph 2019\n E\n XY{{iMOD Water Quality \\n and MODFLOW6}}\n end\n E --> F{iMOD 5.2}\n subgraph 2020\n F\n XZ{{BMI coupling \\n Modflow6-MetaSWAP}}\n end\n F --> G{iMOD Suite}\n F --> H{iMOD 5.3}\n subgraph 2021\n G\n YX{{Tooling in Python, QGIS \\n C++. Unstructured grids}}\n end\n subgraph 2021 \n H\n end\n H --> I{iMOD 5.5}\n G --> J{iMOD Suite}\n subgraph 2023\n I\n end\n subgraph 2023 \n J\n YY{{Model input validation, \\n CPT plotting in QGIS, \\n Backwards \\n compatibility iMOD 5}}\n end" }, { - "objectID": "viewer_install.html#installing-the-imod-viewer", - "href": "viewer_install.html#installing-the-imod-viewer", - "title": "Install iMOD Viewer", - "section": "3 Installing the iMOD Viewer", - "text": "3 Installing the iMOD Viewer\nThe different options to install the iMOD Viewer are listed below. The iMOD Viewer consists of the iMOD QGIS plugin and iMOD 3D viewer.\n\n3.1 (Option 1) Install with the Deltares setup\nRun the .msi you can download on the Deltares download portal.\nFollow the installation instructions for the viewer install, and make sure to do a Complete install.\n\n\n3.2 (Option 2) Installing from the QGIS plugin repository\nIn QGIS, navigate to Plugins > Manage and Install Plugins > All. In the search bar, type: “iMOD”. Select the iMOD plugin, and click “Install”.\nThis does not install the iMOD 3D Viewer; so for 3D viewing functionality, follow the instructions in Section 3.1, but instead select a Minimal install.\n\n\n3.3 (Option 3) Manually download and copy the iMOD QGIS plugin\nDownload the iMOD QGIS plugin code from the [Github page](https://github.com/Deltares/imod-qgis]\nUnpack the zip files, and copy the imodqgis folder to your QGIS plugin directory. This is probably located in your Appdata folder. In windows it is something such as: c:\\Users\\%USER%\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\plugins\nIf you cannot find the folder, follow [these instructions] (https://gis.stackexchange.com/a/274312>).\nIn QGIS, make sure under Plugins > Manage and Install Plugins > Installed that the checkbox iMOD is checked." + "objectID": "about.html#trainings", + "href": "about.html#trainings", + "title": "About", + "section": "Trainings", + "text": "Trainings\n\nDelft Software Days\nTwice a year, there is an iMOD day, where users can hear the latest iMOD developments and get training in the latest features. These are a great opportunity to get to know fellow users and the developers. Trainings will be announced on the Delft Software Days website and via the iMOD mailing list, so keep an eye out on those.\nIn 2021, the Delft Software Days were not held in person but recorded as webinars, which can be viewed online. Note that due to privacy settings, you might need follow the link below the video to view it on the Deltares Vimeo page.\n\niMOD User Day 2021 from Deltares on Vimeo.\n\n\nPast trainings iMOD Suite\n2023-02: National University of Singapore, Singapore\n\n2022-11: Deltares Campus, Delft\n\n2022-06: Trinity college, Dublin" }, { - "objectID": "viewer_install.html#sec-system-wide", - "href": "viewer_install.html#sec-system-wide", - "title": "Install iMOD Viewer", - "section": "4 Advanced: Installing the QGIS plugin system-wide", - "text": "4 Advanced: Installing the QGIS plugin system-wide\nThere are cases where a system-wide QGIS installation is required, for example on computational servers, where multiple users need to use the software. Requiring each user to install the plugin themselves can be a burden.\nThis requires the following steps:\n\nInstalling the OSGeo4W QGIS installation\nPutting the plugin files in the right folder.\n\n\n4.1 Installing the OSGeo4W QGIS installation\n\nDownload the OSGeo4W installer from the QGIS website <https://qgis.org/en/site/forusers/download.html>_\nRight-click osgeo4w-setup.exe and click Run as administrator\nAt the starting screen, choose Advanced Install\nIn the Choose Installation Type screen, choose Install from Internet if you have access to the internet, this will download the files to a folder called something like: %APPDATA%\\Local\\Temp\\http%3a%2f%2fdownload.osgeo.org%2fosgeo4w%2fv2%2f\\\nYou can use this folder to Install from Local Directory later (for example on a restricted server)\nIn Choose Installation Directory check All Users\nIn “Select Local Package Directory”, you can leave the default options\nIf you previously checked “Install from Internet”:\n\nin the Select Connection Type, choose Direct Connection\nin Choose Download Sites, choose http://download.osgeo.org\n\nIn the Select Packages screen, make sure the following components are installed:\n\nunder Desktop, qgis: QGIS Desktop.\nunder Libs, python3-pandas\n\nA component will be installed if there is a version number in the “New” column (If Skip change this by clicking the cell with Skip in it).\nAfter downloading an installing, check Finish\n\n\n\n\n\n\n\nTip\n\n\n\nMaximize the screen to see the package names\n\n\n\n\n\nThe Select packages screen enlarged. If you click Skip, a version number should appear in the column New.\n\n\n\n\n4.2 Putting the plugin files in the right folder\nDownload the iMOD QGIS plugin code from the Github page\nUnpack the zip files, and copy the imodqgis folder to your QGIS plugin directory. This is probably located in your Appdata folder. In windows it is something such as: c:\\OSGeo4W\\apps\\qgis\\python\\plugins\\imodqgis" + "objectID": "about.html#publications-using-imod-suite", + "href": "about.html#publications-using-imod-suite", + "title": "About", + "section": "Publications using iMOD Suite", + "text": "Publications using iMOD Suite\n\n\nDelsman, Joost R., Tobias Mulder, Betsy Romero Verastegui, Huite Bootsma, Pieter Zitman, Sebastian Huizer, and Gualbert H. P. Oude Essink. 2023. “Reproducible Construction of a High-Resolution National Variable-Density Groundwater Salinity Model for the Netherlands.” Environmental Modelling & Software, 105683. https://doi.org/https://doi.org/10.1016/j.envsoft.2023.105683.\n\n\nEngelen, J. van, G H P Oude Essink, and M F P Bierkens. 2022. “Sustainability of fresh groundwater resources in fifteen major deltas around the world.” Environmental Research Letters 17 (12): 125001. https://doi.org/10.1088/1748-9326/aca16c.\n\n\nEngelen, Joeri van, Marc F. P. Bierkens, Joost R. Delsman, and Gualbert H. P. Oude Essink. 2020. “Factors Determining the Natural Fresh-Salt Groundwater Distribution in Deltas.” Water Resources Research 57 (1). https://doi.org/10.1029/2020WR027290.\n\n\nEngelen, Joeri van, Jarno Verkaik, Jude King, Eman R. Nofal, Marc F. P. Bierkens, and Gualbert H. P. Oude Essink. 2019. “A three-dimensional palaeohydrogeological reconstruction of the groundwater salinity distribution in the Nile Delta Aquifer.” Hydrology and Earth System Sciences 23: 5175–98. https://doi.org/10.5194/hess-2019-151.\n\n\nKing, Jude, Tobias Mulder, Gualbert Oude Essink, and Marc F. P. Bierkens. 2021. “Joint estimation of groundwater salinity and hydrogeological parameters using variable-density groundwater flow, salt transport modelling and airborne electromagnetic surveys.” Advances in Water Resources 160 (December): 104118. https://doi.org/10.1016/j.advwatres.2021.104118.\n\n\nSeibert, Stephan L., Janek Greskowiak, Friederike Bungenstock, Holger Freund, Martina Karle, Rena Meyer, Gualbert H. P. Oude Essink, Joeri van Engelen, and Gudrun Massmann. 2023. “Paleo-Hydrogeological Modeling to Understand Present-Day Groundwater Salinities in a Low-Lying Coastal Groundwater System (Northwestern Germany).” Water Resources Research 59 (4): 1–24. https://doi.org/https://doi.org/10.1029/2022WR033151.\n\n\nThomas, Ariel T., Aaron Micallef, Shuangmin Duan, and Zhihui Zou. 2023. “Characteristics and Controls of an Offshore Freshened Groundwater System in the Shengsi Region, East China Sea.” Frontiers in Earth Science 11. https://doi.org/10.3389/feart.2023.1198215." }, { - "objectID": "practical_messy_data.html", - "href": "practical_messy_data.html", - "title": " Handling messy data", + "objectID": "python.html", + "href": "python.html", + "title": " iMOD Python", "section": "", - "text": "Generally, you want to do cleanup, analysis, etc. in (Python) scripts -- reason being that it's reproducible:\n\nThere's something that describes step by step how something was done;\nYou can easily redo something when you find a mistake, get a new version of the data, etc.\n\nA general source of messy data is Excel -- after all, many people can work with Excel, in their own (perfidious) ways. Treat this as your immutable external data. However, convert the individual spreadsheets to CSV (or TSV if you like).\nThis has multiple benefits:\n\nData becomes more explicitly visible: separated tables, instead of somewhat hidden spreadsheets;\nData is much faster to read by most software: Excel files are a complicated format of zipped XML files. This is useful to store equations, formatting, etc., but not to just store the data;\nExcel file reader are not required: most software can easily read plain text like CSV, xsls files (zipped XML) not so much.\n\nIt's okay to make this a manual step: open the data with Excel, Save As, and store in your external data." + "text": "The iMOD Python package is designed to help you in your MODFLOW groundwater modeling efforts. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this process reproducible. Whether you want to build a simple 2D conceptual model, or a complex 3D regional model with millions of cells, iMOD Python scales automatically by making use of dask.\nBy building on top of popular Python packages like xarray, pandas, rasterio and geopandas, a lot of functionality comes for free.\nCurrently we support the creation of the following MODFLOW-based models:\n\nUSGS MODFLOW 6, currently only the Groundwater Flow packages\niMODFLOW\niMOD-WQ, which integrates SEAWAT (density-dependent groundwater flow) and MT3DMS (multi-species reactive transport calculations)\n\nDocumentation: https://deltares.gitlab.io/imod/imod-python This documentation includes a section \"How do I\" which can be used for common data conversions in imod-python or xarray. This section will be regular updated based on the different questions of users.\nSource code: https://gitlab.com/deltares/imod/imod-python" }, { - "objectID": "practical_messy_data.html#dont-use-excel-files", - "href": "practical_messy_data.html#dont-use-excel-files", - "title": " Handling messy data", + "objectID": "practical_parallel.html", + "href": "practical_parallel.html", + "title": " Parallel MODFLOW", "section": "", - "text": "Generally, you want to do cleanup, analysis, etc. in (Python) scripts -- reason being that it's reproducible:\n\nThere's something that describes step by step how something was done;\nYou can easily redo something when you find a mistake, get a new version of the data, etc.\n\nA general source of messy data is Excel -- after all, many people can work with Excel, in their own (perfidious) ways. Treat this as your immutable external data. However, convert the individual spreadsheets to CSV (or TSV if you like).\nThis has multiple benefits:\n\nData becomes more explicitly visible: separated tables, instead of somewhat hidden spreadsheets;\nData is much faster to read by most software: Excel files are a complicated format of zipped XML files. This is useful to store equations, formatting, etc., but not to just store the data;\nExcel file reader are not required: most software can easily read plain text like CSV, xsls files (zipped XML) not so much.\n\nIt's okay to make this a manual step: open the data with Excel, Save As, and store in your external data." + "text": "Especially if you're running on Windows, you might get (rather cryptic) errors in the vein off:\nUnable to start the local smpd manager\nError while connecting to host, No connection could be made because the\ntarget machine actively refused it.\nA possible cause is that the path to the smpd.exe, which is a parallel process manager, isn't the right one for the MPI version you're using. The MODFLOW models are generally running with a version of MPICHI2 (https://www.mpich.org/). It's not uncommon, however, to have multiple implementations of MPI installed.\nTo check, run:\nwhere smpd\nWhich e.g. returns:\nC:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32_win\\mpirt\\smpd.exe c:\\Program\nFiles\\MPICH2\\bin\\smpd.exe\nHere, there's two versions installed: the Intel version, and the MPICH2 version. In this case, the Intel version is on top, and which generally be called first. Then, when trying to run the model, it's expecting the MPICH2 version instead, and it won't run.\nTo address this, you can run:\nc:\\Program Files\\MPICH2\\bin\\smpd.exe -install\nThis should promote it to the top of the list when you run where again.\nOr, just remove it from your PATH if possible. Now, if you run mpiexec.exe, it'll use the right version of smpd.exe." }, { - "objectID": "practical_messy_data.html#avoid-alphabetical-or-numeric-codes", - "href": "practical_messy_data.html#avoid-alphabetical-or-numeric-codes", - "title": " Handling messy data", - "section": "Avoid alphabetical or numeric codes", - "text": "Avoid alphabetical or numeric codes\nThe following labels are obviously require a lot of additional information to become meaningful:\n\nA, B, C ...\nA1, B1, B2, ...\n1.1, 1.2, 1.3, 2.1, ...\n\nTry to avoid using such labels to describe data sources, scenario names, filenames, etc. Not only do they require (more) description to make sense, they're much harder to memorize compared to (more) verbose labels:\n\nnational_dataset, provincial_dataset, local_dataset\nlow_recharge, high_recharge\n\nAnd harder to memorize means: more mix-ups, more mistakes, time lost.\nJust like in scripting or programming: readability beats ease of writing." + "objectID": "practical_parallel.html#smpd-errors", + "href": "practical_parallel.html#smpd-errors", + "title": " Parallel MODFLOW", + "section": "", + "text": "Especially if you're running on Windows, you might get (rather cryptic) errors in the vein off:\nUnable to start the local smpd manager\nError while connecting to host, No connection could be made because the\ntarget machine actively refused it.\nA possible cause is that the path to the smpd.exe, which is a parallel process manager, isn't the right one for the MPI version you're using. The MODFLOW models are generally running with a version of MPICHI2 (https://www.mpich.org/). It's not uncommon, however, to have multiple implementations of MPI installed.\nTo check, run:\nwhere smpd\nWhich e.g. returns:\nC:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32_win\\mpirt\\smpd.exe c:\\Program\nFiles\\MPICH2\\bin\\smpd.exe\nHere, there's two versions installed: the Intel version, and the MPICH2 version. In this case, the Intel version is on top, and which generally be called first. Then, when trying to run the model, it's expecting the MPICH2 version instead, and it won't run.\nTo address this, you can run:\nc:\\Program Files\\MPICH2\\bin\\smpd.exe -install\nThis should promote it to the top of the list when you run where again.\nOr, just remove it from your PATH if possible. Now, if you run mpiexec.exe, it'll use the right version of smpd.exe." }, { "objectID": "practical_look_like_a_pro.html", @@ -588,11 +490,32 @@ "text": "Powershell themes\nThere are themes available for Powershell which you can use to make your boring terminal look cooler. These will also be used by Windows Terminal and VSCode after some extra configuration.\n\n\n\nFigure 1: Look at all the colors on top! It contains the current git branch, as well as which Spotify song I'm currently listening to. Remember to only listen to cool music if you want to look cool!\n\n\n\nStep 1: Installing new fonts\nAll these cool extra icons like the play button and the folder symbol in Figure 1 require extra icons not contained in your standard monotype font. To unlock them, you have to install \"Nerd fonts\".\n\n\n\nFigure 2: It is cool to be a nerd these days.\n\n\nIn the following examples, I will use CascadiaCode NerdFont, which you can download zipped via this link\nUnzip its' contents, and install Caskaydia Cove Nerd Font Complete Mono Windows Compatible.ttf, by right-clicking the file and install for all users. You know it has to be good with such a long filename!\n\n\nStep 2: Configure software to use Nerd Font\nWe first have to configure your editor/terminal to use the Nerd Font, otherwise all the icons will be shown as ￿, which spoils the fun.\nIn Windows Terminal, press CTRL+, , which opens the Settings window. Next, navigate to Windows Powershell > Appearance. And under Fonts, select CaskaydiaCove NF, if you installed the font I suggested.\n\n\n\nimage\n\n\nIn VSCode, also press CTRL+, to open the Settings window. Navigate to Text Editor > Font and under Font Family type CaskaydiaCove NF in front.\n\n\n\nimage\n\n\nIn Powershell, you can right click window bar and navigate to Properties > Font and under Font, you can select CaskaydiaCove NF.\n\n\nStep 3: Install Git for Windows\nIf you want your themes to integrate with Git, you can install Git for Windows .\nI have not tested if the themes worked without Git for Windows, so I recommend installing it.\nI also wrote a guide on how to use Git by the way.\n\n\nStep 4: Install themes for Powershell\nNow open up a Powershell instance as administrator, and run the following lines of code:\nInstall-Module posh-git -Scope CurrentUser\nInstall-Module oh-my-posh -Scope CurrentUser -RequiredVersion 2.0.412\nUpdate-Module -Name oh-my-posh -AllowPrerelease -Scope CurrentUser\nInstall-Module -Name PSReadLine -Scope CurrentUser -Force -SkipPublisherCheck\nThis will probably throw you some warnings if you really want to install this stuff, but let's trust the good people at Microsoft.\n\n\nStep 5: Configure Powershell\nBecause we want Powershell to automatically use new cool themes, we will configure our Powershell profile. Call notepad $PROFILE and paste the following lines of text:\nImport-Module posh-git\nImport-Module oh-my-posh\nSet-PoshPrompt -Theme cinnamon\nIf everything worked, if you open up a new Powershell terminal, it will look like Figure 1. If you see any squares as ￿, you have to check if Step 2 went OK.\n\n\nStep 6: Being a unique individual\nA cool person decides what is cool him/herself of course. To get a list of all available themes, you can call Get-PoshThemes.\n\n\n\nWowzers!\n\n\nThis provide a nice demo reel of available themes.\nIf you find something you like, you can set it as your default theme by repeating Step 5, and changing the last line, e.g.: Set-PoshPrompt -Theme powerline.\n\n\nBonus: Get a headache with retro effects\nWindows Terminal has retro effects available. Again press CTRL+,, go to Windows Powershell > Appearance. And click Retro terminal effects.\nThis will make your terminal more headache inducing:\n\n\n\nArgh!" }, { - "objectID": "viewer_install_msi.html", - "href": "viewer_install_msi.html", - "title": "Install iMOD Viewer with the Deltares setup", + "objectID": "tutorial_Dommel.html", + "href": "tutorial_Dommel.html", + "title": "Dommel", "section": "", - "text": "To install the iMOD Viewer components (3D Viewer & QGIS plugin), download the installer on the Deltares download portal. If the subscription worked correctly, you will receive a download link via e-mail within only a few minutes.\n\n\n\n\n\n\nWarning\n\n\n\nThe QGIS plugin of course requires QGIS. You can download the standalone QGIS setup on the QGIS website We recommend downloading a QGIS version >= 3.28 here. After downloading the QGIS setup, run it.\n\n\nUnzip the zipfile, which includes the viewer installer. Double click the .msi file.\nThis will open up the first screen of the setup wizard.\n\n\n\nThe starting screen.\n\n\nClick Next here, which will open up the next screen, which is the license screen.\n\n\n\nThe license screen\n\n\nTick the \"I accept\" tickbox, and click Next.\nThis will open up the installation selection screen.\n\n\n\nInstallation selection type.\n\n\nYou can select a Minimal or Complete installation here, by clicking the respective buttons.\nNote that the QGIS plugin, which comes only with a Complete install, is required to use all features of the iMOD viewer. These are:\n\nDrawing fence diagrams\nLoading only a sub section of the map (useful for large files)\nAccess to more legends.\n\nAfter selecting the preferred installation type, you still have to click Next before installation continues.\nThis will open the install screen.\n\n\n\nThe wizard install screen\n\n\nClick Install and after installation is complete, click Finalize. You should now be ready to go.\nThe installer will also create a program shortcut to the pdf with documentation. If you open the Windows Start window and type \"iMOD Suite User Manual\" it should pop up.\n\n\n\nA program shortcut should created by the installer to the User Manual." + "text": "In this tutorial, you will learn the following:\n\nBasic usage of the iMOD 3D Viewer\nView a shapefile in the 3D viewer\nView a grid with timeseries in the 3D viewer" + }, + { + "objectID": "tutorial_Dommel.html#description", + "href": "tutorial_Dommel.html#description", + "title": "Dommel", + "section": "", + "text": "In this tutorial, you will learn the following:\n\nBasic usage of the iMOD 3D Viewer\nView a shapefile in the 3D viewer\nView a grid with timeseries in the 3D viewer" + }, + { + "objectID": "tutorial_Dommel.html#objective", + "href": "tutorial_Dommel.html#objective", + "title": "Dommel", + "section": "Objective", + "text": "Objective\nIn this tutoral we will explore the iMOD 3D Viewer, based on data of the Dommel, a catchment in south of the Netherlands. This viewer is developed because QGIS does not support 3D viewing. It can display your geological data (layers and borehole data) but also data variation through time like chloride concentrations.\nThere are 2 options to start the 3D Viewer. One option is to select layers in QGIS and select the 3D Viewer icon on the iMOD toolbar . The selected layers are opened in the 3D Viewer. The other option is to start the 3D Viewer directly. In this short Tutorial we’ll pursue the second option." + }, + { + "objectID": "tutorial_Dommel.html#tutorial", + "href": "tutorial_Dommel.html#tutorial", + "title": "Dommel", + "section": "Tutorial", + "text": "Tutorial\n\nLaunch the iMOD 3D Viewer from your START menu or your desktop. Search for “imod6.exe”.\nMaximize the program window for a better view.\n\nWe display some data from Brabant, a province in The Netherlands. (In case you missed the download instructions for the Tutorial data, visit the start page iMOD Suite Tutorial).\nLet’s first import an overlay file showing the surface water elements.\n\nIn the main menu choose “Data”, select “Open overlay” and open the shape file “…\\iMod-Suite-Tutorial_01\\data\\1-external\\Brabant-data\\riv_brabant.shp”.\nSelect the new layer in the overview and click the “draw-selected-layer” button ().\n\nNow we’ll open a dataset containing Heads calculated with a MODFLOW model. This NetCDF file contains for each model layer the top, the bottom and a timeseries of calculated heads.\n\nIn the main menu choose “Data”, select “Open grid file” and open the shape file “..\\iMod-Suite-Tutorial_01\\data\\1-external\\Brabant-data\\Calculated-Heads.nc”.\nSelect both layers in the overview and click the “draw-selected-layer” button ().\nClick on the “>” sign left from the layer “Calculated-Heads“ and you’ll see a subset with “All Layer” and “Layered Datasets”.\nClick on the “>” sign left from both the section “All Layer” and “Layered Datasets”.\n\nYour screen might look like Figure 1\n\n\n\nFigure 1: Top view of dataset “Calculated-Heads” and river overlay in the 3D viewer\n\n\nLet’s now experience with the viewer controls.\n\nSpin the mouse wheel forward to zoom in and spin backwards to zoom out. On a laptop, move two fingers up and down on the touchpad.\nIn case you lost control on your display view, click in the toolbar Viewer Controls on the “zoom-to-extent” button () to return to the initial view.\nCombine the Shift button + right mouse and move the camera horizontally/vertically with each mouse move (or finger on your touch pad).\nCombine the Ctrl button + right mouse and rotate the camera around its lens with a mouse move (or finger on your touch pad).\nGo back to the initial view with the “zoom-to-extent” button ().\nHold the right mouse button while moving the mouse and the camera moves around the grid.\n\nThe imported data is a nice example of an unstructured grid.\n\nZoom in to the upper left part of the grid. Notice that the grid is built from triangles, concentrated around the rivers.\nSwitch the dataset on and off with a click on the () button in file overview, left of the layer. See the underlying rivers.\n\nIn your display the vertical thickness of the dataset is perhaps rather small. Let’s increase the vertical exaggeration.\n\nIn the upper right corner, switch off the “automatic exaggeration of the z-axis”.\nNow increase the value to 50.0 and the view will change automatically.\n\nSome final experience with the other viewer controls.\n\nUse the buttons () to reposition your camera to another fixed position to the grid.\nClick the button “Toggle Sliders”() to activate the sliders for the X, Y and Z direction.\nExperiment with the sliders, both left and right \n\nThe colors in the display by default referred to the Elevation of the layers. Let’s now color the layers by calculated Head.\n\nIn the list of imported files select “Calculated-Heads”.\nFrom the subset “layered Datasets” double click on the element “data”.\n\nWait a few seconds and the name turns bold and the colors in the display change.\n\nSelect the name “data” and click your right mouse button to open a pop-up window.\nSelect “Edit legend” to open the “Legend editor” (see figure below).\n\nSelect PIYG for Color scale.\nCheck the Percentiles box.\nClick on OK and the window will close. The colors in your display change automatically.\n\nThe imported file doesn’t contain one single head, but a timeseries of calculated heads ranging from 01/01/2018 – 01/02/2018. Now let’s use the Time Slider to display the data through time. \n\nFirst click the button “Back(+y)” for a nice 3D view.\nClick the button () to start the animation. It is a large dataset to the view in the display only changes slowly.\nStop the animation with the button ().\nPlay around with the slider.\n\nThat’s all for now. You can save your session if you like.\n\nFrom the main menu choose “File” and select “Save As…” to save the session as an *.imod file.\nClose the 3D viewer via menu “File” and select Quit”.\n\nThank you for your patience and attention.\n\n\n\nFigure 2: iMOD 3D Viewer - Legend Editor" }, { "objectID": "practical_snakemake.html", @@ -665,87 +588,164 @@ "text": "Parallel execution\nWhen modelling, you usually want to run the model a few times using different configurations. For example a simulation with a horizontal hydraulic conductivity of 10 m/d and one with a hydraulic conductivity of 25 m/d. In the rest of this section, I call these scenarios.\nThis basically means the same task has to be run multiple times, using different configurations, but similar files. These can be run independently from each other, in parallel! Wouldn't it be cool if Snakemake would be able to recognize this and run this in parallel?\nHa! It does!\nSnakemake lets you define groups, using a group keyword. Take for example this Snakefile which runs three scenarios and converts their output to a NetCDF, all in parallel. The group keyword sets which rules can be executed in parallel.\nscenarios = [1, 2, 3]\n\nrule all:\n input:\n expand(\"data/4-output/scenario_{scenario}/head.nc\", scenario = scenarios),\n expand(\"data/4-output/scenario_{scenario}/conc.nc\", scenario = scenarios),\n\nrule idf_to_netcdf:\n input:\n head_dir = \"data/4-output/scenario_{scenario}/head\",\n conc_dir = \"data/4-output/scenario_{scenario}/conc\",\n group:\n \"scenarios\"\n output:\n head_nc = \"data/4-output/scenario_{scenario}/head.nc\",\n conc_nc = \"data/4-output/scenario_{scenario}/conc.nc\",\n script:\n \"src/4-analyze/idf_to_netcdf.py\"\n\nrule run_model:\n input:\n r\"data/4-output/scenario_{scenario}/model.run\" \n group:\n \"scenarios\"\n output:\n temp(directory(\"data/4-output/scenario_{scenario}/conc\")),\n temp(directory(\"data/4-output/scenario_{scenario}/head\")),\n shell:\n r\".\\src\\3-model\\run_model.bat data\\4-output\\scenario_{wildcards.scenario}> .\\data\\4-output\\scenario_{wildcards.scenario}\\std.out\"\nWe need the wildcards keyword under the shell command to expand scenario numbers before sending the string to the shell. Note that snakemake requires one rule that \"collects\" all separate groups, in this case the rule all.\nYou can then consequently run these tasks in parallel on three cores by calling:\n>snakemake --cores 3" }, { - "objectID": "practical_parallel.html", - "href": "practical_parallel.html", - "title": " Parallel MODFLOW", + "objectID": "index.html", + "href": "index.html", + "title": "iMOD Suite Documentation", "section": "", - "text": "Especially if you're running on Windows, you might get (rather cryptic) errors in the vein off:\nUnable to start the local smpd manager\nError while connecting to host, No connection could be made because the\ntarget machine actively refused it.\nA possible cause is that the path to the smpd.exe, which is a parallel process manager, isn't the right one for the MPI version you're using. The MODFLOW models are generally running with a version of MPICHI2 (https://www.mpich.org/). It's not uncommon, however, to have multiple implementations of MPI installed.\nTo check, run:\nwhere smpd\nWhich e.g. returns:\nC:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32_win\\mpirt\\smpd.exe c:\\Program\nFiles\\MPICH2\\bin\\smpd.exe\nHere, there's two versions installed: the Intel version, and the MPICH2 version. In this case, the Intel version is on top, and which generally be called first. Then, when trying to run the model, it's expecting the MPICH2 version instead, and it won't run.\nTo address this, you can run:\nc:\\Program Files\\MPICH2\\bin\\smpd.exe -install\nThis should promote it to the top of the list when you run where again.\nOr, just remove it from your PATH if possible. Now, if you run mpiexec.exe, it'll use the right version of smpd.exe." + "text": "The iMOD Suite offers different modules which support modelling with MODFLOW 6 (including unstructured meshes):\n\niMOD Viewer: The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin. The iMOD QGIS Plugin QGIS plugin allows visualisation of model input and output with tools for cross-sections, timeseries and link to the 3D viewer. It supports structured NetCDF, UGRID and IPF files. And the iMOD 3D Viewer for interactive 3D visualisation of unstructured input and output. Supports UGRID file format and IPF borelog files.\niMOD Python: A Python package to support MODFLOW groundwater modeling. It makes it easy to go from your raw data to a fully defined MODFLOW model, with the aim to make this workflow reproducible.\niMOD Coupler: Software that couples MODFLOW 6 to other computational cores. It currently supports a coupling to MetaSWAP, but additional computational cores are planned in the future.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Introduction\n\n\nLearn what’s included.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n iMOD Viewer\n\n\nVisualization of unstructured grids in GIS and 3D.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n iMOD Python\n\n\nBuild large groundwater models with scripts\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n iMOD Coupler\n\n\nApplication for coupling hydrological kernels.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Tutorials\n\n\nLearn how to use the iMOD Suite\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n Practical Tips\n\n\nUseful tips to use the iMOD Suite with other tools.\n\n\n\n\n\n\n\n\n\n\n\n\nNo matching items" }, { - "objectID": "practical_parallel.html#smpd-errors", - "href": "practical_parallel.html#smpd-errors", - "title": " Parallel MODFLOW", + "objectID": "qgis_user_manual.html", + "href": "qgis_user_manual.html", + "title": "QGIS Plugin User Manual", "section": "", - "text": "Especially if you're running on Windows, you might get (rather cryptic) errors in the vein off:\nUnable to start the local smpd manager\nError while connecting to host, No connection could be made because the\ntarget machine actively refused it.\nA possible cause is that the path to the smpd.exe, which is a parallel process manager, isn't the right one for the MPI version you're using. The MODFLOW models are generally running with a version of MPICHI2 (https://www.mpich.org/). It's not uncommon, however, to have multiple implementations of MPI installed.\nTo check, run:\nwhere smpd\nWhich e.g. returns:\nC:\\Program Files (x86)\\Common Files\\Intel\\Shared Libraries\\redist\\ia32_win\\mpirt\\smpd.exe c:\\Program\nFiles\\MPICH2\\bin\\smpd.exe\nHere, there's two versions installed: the Intel version, and the MPICH2 version. In this case, the Intel version is on top, and which generally be called first. Then, when trying to run the model, it's expecting the MPICH2 version instead, and it won't run.\nTo address this, you can run:\nc:\\Program Files\\MPICH2\\bin\\smpd.exe -install\nThis should promote it to the top of the list when you run where again.\nOr, just remove it from your PATH if possible. Now, if you run mpiexec.exe, it'll use the right version of smpd.exe." + "text": "This part contains the user guide of the QGIS plugin." }, { - "objectID": "viewer.html", - "href": "viewer.html", - "title": " iMOD Viewer", + "objectID": "qgis_user_manual.html#description", + "href": "qgis_user_manual.html#description", + "title": "QGIS Plugin User Manual", "section": "", - "text": "The iMOD Viewer consist of a standalone 3D viewer and a QGIS plugin.\n\nThe iMOD 3D Viewer is a 3D viewer for grids and datasets. It supports IDF files, UGRID files and Grb.disu files that contain an unstructured layered grid.\nThe 3D Viewer also supports viewing some non-grid objects like IPF files and Shapefiles.\nThe iMOD QGIS plugin aids exploring 4D geospatial data in QGIS.\nIts primary components are visualization of timeseries, both at points as well as on an unstructured grid, cross-section visualization, including borelogs, and connecting to the 3D Viewer." + "text": "This part contains the user guide of the QGIS plugin." }, { - "objectID": "tutorial_Dommel.html", - "href": "tutorial_Dommel.html", - "title": "Dommel", + "objectID": "qgis_user_manual.html#configuration", + "href": "qgis_user_manual.html#configuration", + "title": "QGIS Plugin User Manual", + "section": "Configuration", + "text": "Configuration\n\nYou probably want to change the language settings in QGIS, if it defaults to Dutch, it’s Extra > Opties > Algemeen. Change it to to US settings (that’s generally the safest default). You will need to restart QGIS before this has effect.\n\n\n\n\n\nStart up QGIS, go to Plugins > Manage and Install plugins > Installed. Make sure the iMOD plugin is ticked.\n\n\nIf the installation and configuration was successful, the plugin should be visible in your toolbar." + }, + { + "objectID": "qgis_user_manual.html#functionality", + "href": "qgis_user_manual.html#functionality", + "title": "QGIS Plugin User Manual", + "section": "Functionality", + "text": "Functionality\nThe QGIS plugin currently consists of five widgets, of which the functionality will be described in the next section:\n\nOpen IPF\n3D Viewer\nTime Series\nCross section\nAdd NHI data\n\n\n Open IPF\nOpen IPF file and lets QGIS interpret it as a regular shapefile with points. Required to interpret timeseries in the Time Series widget, as well as to visualize borelogs in Cross section and 3D Viewer widget. To an IPF timeseries file it attaches two columns to the attribute table of the vector layer, namely a \"start time\" and \"end time\". This allows using the QGIS Temporal Controller Panel to browse through time, and see which points have data defined within a certain time frame.\n\nPress the \"...\" button to select a path to a file (as you would in other QGIS windows).\nPress \"Add\" to load the file into the QGIS explorer.\n\n\n\n\n\n\n\nWarning\n\n\n\nCurrently the IPF reader is not able to read every IPF file, as iMOD 5 supports quite a wide range of IPF files. For example, iMOD 5 supports both whitespace and comma separated files, whereas the QGIS plugin only supports comma separated IPF files. If the plugin is unable to read your IPF file, it is best to read the file with iMOD Python and consequently write it again. This can help, because the IPF reader in iMOD Python is a lot more flexible, but its writer always writes to a specific format. We plan to improve the flexibility of the plugin's IPF reader.\n\n\n\n\n\nThe Open IPF widget.\n\n\n\n\n\nThe temporal controller panel and map canvas of QGIS. The temporal controller panel is opened by clicking the clock in the \"map navigation\" toolbar.\n\n\n\n\n 3D Viewer\nThe 3D viewer widget creates a connection between QGIS and the iMOD 3D viewer. It allows you to make selections in QGIS and forward them to the 3D viewer. Note that there are two perquisites for the iMOD viewer to correctly render mesh data:\n\nThe mesh data needs to be stored in a UGRID file\nVertical axis is stored as variables top_layer_* and bottom_layer_*. The data belonging to each layer follows the following format head_layer_*, e.g. for a variable head.\n\nThis means that not all data that can be loaded in QGIS as mesh can be viewed in the 3D viewer. Currently only UGRID meshes and IPF borelog files are supported.\n\nUse the selection box at the top to select the mesh layer/ipf file you want to inspect in the 3D viewer.\nThe \"Extent\" group allows the user to manually set the bounding box by editing the numbers under \"North\", \"East\", \"South\", and \"West\", and more:\n\nThe \"Current Layer Extent\" button sets the bounding box to the extent of the layer selected in the QGIS explorer.\nThe \"Calculate from Layer\" box allows you to select a dataset loaded in the QGIS explorer to calculate the extent from.\n\"Map canvas extent\" sets the bounding box to the map canvas\n\nThe \"Select\" group contains a set of buttons to spatially select data to be forwarded to the 3D viewer\n\nThe \"Draw fence diagram\" button allows to draw lines on the map canvas which can be forwarded to the 3D viewer to draw a fence diagram. Press the button to start drawing mode. Left-click to start drawing a line; right-click to stop drawing the line.\nThe \"Clear fence diagram\" button clears all lines from the map canvas\nThe \"Draw extent\" buttons allows you to click and drag a box that allows you to set a bounding box. The iMOD viewer will only load the data within this boundary box, which can be useful when exploring specific areas in large datasets. Drawing an bounding box will update the \"Extent\" widget. Right-click to stop drawing the extent.\n\nThe \"View\" group contains a set of buttons to interact with the 3D viewer\n\n\"Start iMOD viewer\" starts the iMOD viewer and immediately loads the data selected in the widget.\n\"Load mesh data\" remove previous data from viewer and load new mesh data in it.\n\"Load fence diagram\" loads the lines drawn with \"Draw fence diagram\" to the viewer and renders a fence diagram.\n\"Load legend\" transfers legend in the QGIS map layer to fence diagram and/or mesh data in the 3D viewer for the selected variable in the QGIS map canvas.\n\n\n\n\n\nThe 3D viewer widget. It will be opened on the right-hand side of the screen.\n\n\n\n\n\n\n\n\nNote\n\n\n\nThe 3D Viewer widget does not forward any data to the iMOD 3D viewer, it only forwards the path to the data to load, and a command how to load it. As of now, the widget does not understand changes made by the user in the 3D viewer. It only supports \"one-way traffic\" towards the viewer.\n\n\n\n\n Time Series\nThe Time Series widget visualizes time series stored in IPF files or mesh data in a graph window. You can freely zoom and drag the graph in this window. Sometimes you lose your view of the lines by dragging too fast; so to reset your view, you can click on the small \"A\" in the bottom left corner of the graph window. The buttons in the widget change, depending on which data type is being selected.\n\nUse the box on the top left of the widget to select the ipf file or mesh data to plot.\n\"ID column\" box allows you to select the column of the attribute table that sets the point ID's to be plotted in the legend.\nThe \"Variable\" box sets the variable (or variables in case of IPFs) to be plotted.\nThe \"Layer\" box sets the layers of a mesh to be plotted. Multiple layers can be selected.\nThe \"Select points\" box allows selecting points in a dataset to plot.\n\n\nWhen selecting on a IPF, left-click and drag a box to select points. SHIFT + click to add points to the existing selection. Press CTRL + ALT + A to deselect all points. You can also click Deselect features from all layers in QGIS' selection toolbar. To stop selecting, click Pan Map in QGIS' Map Navigation toolbar, or close the Timeseries widget.\nWhen selecting on a mesh, left-click to select a point on a mesh to plot, right-click to stop selecting.\n\n\nThe \"update on selection checkbox\": when checked on, the widget automatically plots newly selected points for point data or plots data at the location of the cursor for mesh data.\nThe \"Line Color\" box allows you to set a color of a selected line. You can select a plotted line by clicking on it.\nThe \"Draw markers\" check box enables the drawing of markers on each data point. Recommended when there are not many datapoints to show and/or when the intervals between data points are not constant.\nThe \"Colors\" button opens up a new window that lets you select different colorramps.\nThe \"Export\" button allows you to export your plot to an image file (.png, .jpg etc.), a vector file (.svg for Inkscape), or a .csv to allow for plotting in different software.\n\n\n\n\nThe Time series widget and map canvas for points. Notice that the widget can handle irregular time series filled with gaps. The yellow points on the map canvas indicate the selected points.\n\n\n\n\n\nThe Time series widget and map canvas for a mesh. The red crosses indicate the location of the plotted time-series.\n\n\n\n\n\n\n\n\nNote\n\n\n\nA known issue with a multiple monitor setup is that the grid behind the plot might be plotted way off. See the known issues section for more info and how to fix this.\n\n\n\n\n Cross-section\nThe cross-section widget allows you to draw cross-sections of both mesh and raster data. Note that the widget expects that the vertical axis is stored as variables top_layer_* and bottom_layer_*. The data belonging to each layer follows the following format head_layer_*, e.g. for a variable head. For time dependent data, when the Temporal Controller Panel is turned on, the cross-section plot is automatically updated when a different moment in time is selected.\nThe cross-section widget consists of three component:\n\nThe top bar\nA styling table, specifying the styling and order of elements to plot.\nA graph window, in which the cross-section is plotted.\n\nThe functionality of each component is explained below.\n\n\nThe top bar\n\n\n\"Select location\" lets you draw a line on the map, along which a cross-section will be drawn. Left-click to start and to stop drawing a line. Right-click to stop the selection.\nWhen the \"Dynamic resolution\" checkbox option is switched on, the amount of points along which data is sampled for the plot is set to a fixed number and resolution varies. Turning this off and setting a very small resolution size might improve precision, but will definitely result in a performance loss.\nThe \"Search buffer\" box sets the tangential distance from which boreholes will will be selected.\nThe \"Plot\" button plots the data and styling selected in the styling table to the graph window.\nThe \"Export\" button allows you to export your plot to an image file (.png, .jpg etc.), a vector file (.svg for Inkscape), or a .csv to allow for plotting in different software.\n\n\n\n\nThe styling table\n\n\nThe top left selection box allows you to choose the dataset to plot.\nThe \"Variable\" box, you can select the variable to plot.\nThe \"Layer\" box lets you select individual layers to plot. By default all are plotted.\nThe \"As line(s)\" checkbox turns on an option to plot data as lines. Useful to plot layer tops or bottoms to show interfaces.\nThe \"Add\" button adds a dataset to the table.\n\n\n\n\nThe plot window\n\n\nRight-click the plotting window to set zoom options.\nYou can click the small \"A\" in the bottom left corner to reset zoom.\n\n\n\n\n\n\n\nThe \"Cross-section\" widget and map canvas. An example is shown in which layer ids are plotted as colors, and borelogs are plotted as bars.\n\n\n\n\n\n\n\n\nNote\n\n\n\nA known issue with a multiple monitor setup is that the grid behind the plot might be plotted way off. See the known issues section for more info and how to fix this.\n\n\n\n\n Add NHI-data\nOpens up a window to select data from the NHI portal to load directly in QGIS. The NHI is the Netherlands Hydrological Instrument . The NHI data provides datasets with different kinds of services:\n\na \"Web Map Service\" (WMS), which provides a map with a (fixed) legend.\na \"Web Feature Service\" (WFS), which provides features from vector data via the internet.\na \"Web Coverage Service\" (WCS), which provides raster data via the internet.\n\nYou can use the search bar to search for datasets of your liking.\n\n\n\nThe \"Add NHI window\"\n\n\n\n\n\n\n\n\nNote\n\n\n\nExperience has shown that sometimes these services are hard to reach and data cannot be loaded." + }, + { + "objectID": "deltaforge_install.html", + "href": "deltaforge_install.html", + "title": "Install iMOD Python with Deltaforge", "section": "", - "text": "In this tutorial, you will learn the following:\n\nBasic usage of the iMOD 3D Viewer\nView a shapefile in the 3D viewer\nView a grid with timeseries in the 3D viewer" + "text": "Deltaforge is a python distribution which includes iMOD Python and all its dependencies. It is provided as an installer and makes installing iMOD Python easy. You can download the Deltaforge installer on the Deltares download portal." }, { - "objectID": "tutorial_Dommel.html#description", - "href": "tutorial_Dommel.html#description", - "title": "Dommel", + "objectID": "deltaforge_install.html#what-is-deltaforge", + "href": "deltaforge_install.html#what-is-deltaforge", + "title": "Install iMOD Python with Deltaforge", "section": "", - "text": "In this tutorial, you will learn the following:\n\nBasic usage of the iMOD 3D Viewer\nView a shapefile in the 3D viewer\nView a grid with timeseries in the 3D viewer" + "text": "Deltaforge is a python distribution which includes iMOD Python and all its dependencies. It is provided as an installer and makes installing iMOD Python easy. You can download the Deltaforge installer on the Deltares download portal." }, { - "objectID": "tutorial_Dommel.html#objective", - "href": "tutorial_Dommel.html#objective", - "title": "Dommel", - "section": "Objective", - "text": "Objective\nIn this tutoral we will explore the iMOD 3D Viewer, based on data of the Dommel, a catchment in south of the Netherlands. This viewer is developed because QGIS does not support 3D viewing. It can display your geological data (layers and borehole data) but also data variation through time like chloride concentrations.\nThere are 2 options to start the 3D Viewer. One option is to select layers in QGIS and select the 3D Viewer icon on the iMOD toolbar . The selected layers are opened in the 3D Viewer. The other option is to start the 3D Viewer directly. In this short Tutorial we’ll pursue the second option." + "objectID": "deltaforge_install.html#installation", + "href": "deltaforge_install.html#installation", + "title": "Install iMOD Python with Deltaforge", + "section": "Installation", + "text": "Installation\nTo install Deltaforge, double-click the executable, this will open the installation Wizard. You will be greeted with the welcome screen.\n\n\n\nThe welcome screen\n\n\nClick \"Next\", and then \"I agree\" in the license agreement.\n\n\n\nLicense agreement screen\n\n\nNext, you get to decide what type of installation you want. On your local machine it suffices to select Just me. If you are an admin of a server and you want to let others enjoy the Deltaforge installation as well, click All Users.\n\n\n\nThe installation type screen\n\n\nNext you get to decide where the python environment is installed. The default location is usually fine.\n\n\n\nThe location of the python installation\n\n\nFinally, some further configuration is possible. The screenshots contains the options we recommend.\n\n\n\nInstallation options with the recommended options selected." }, { - "objectID": "tutorial_Dommel.html#tutorial", - "href": "tutorial_Dommel.html#tutorial", - "title": "Dommel", - "section": "Tutorial", - "text": "Tutorial\n\nLaunch the iMOD 3D Viewer from your START menu or your desktop. Search for “imod6.exe”.\nMaximize the program window for a better view.\n\nWe display some data from Brabant, a province in The Netherlands. (In case you missed the download instructions for the Tutorial data, visit the start page iMOD Suite Tutorial).\nLet’s first import an overlay file showing the surface water elements.\n\nIn the main menu choose “Data”, select “Open overlay” and open the shape file “…\\iMod-Suite-Tutorial_01\\data\\1-external\\Brabant-data\\riv_brabant.shp”.\nSelect the new layer in the overview and click the “draw-selected-layer” button ().\n\nNow we’ll open a dataset containing Heads calculated with a MODFLOW model. This NetCDF file contains for each model layer the top, the bottom and a timeseries of calculated heads.\n\nIn the main menu choose “Data”, select “Open grid file” and open the shape file “..\\iMod-Suite-Tutorial_01\\data\\1-external\\Brabant-data\\Calculated-Heads.nc”.\nSelect both layers in the overview and click the “draw-selected-layer” button ().\nClick on the “>” sign left from the layer “Calculated-Heads“ and you’ll see a subset with “All Layer” and “Layered Datasets”.\nClick on the “>” sign left from both the section “All Layer” and “Layered Datasets”.\n\nYour screen might look like Figure 1\n\n\n\nFigure 1: Top view of dataset “Calculated-Heads” and river overlay in the 3D viewer\n\n\nLet’s now experience with the viewer controls.\n\nSpin the mouse wheel forward to zoom in and spin backwards to zoom out. On a laptop, move two fingers up and down on the touchpad.\nIn case you lost control on your display view, click in the toolbar Viewer Controls on the “zoom-to-extent” button () to return to the initial view.\nCombine the Shift button + right mouse and move the camera horizontally/vertically with each mouse move (or finger on your touch pad).\nCombine the Ctrl button + right mouse and rotate the camera around its lens with a mouse move (or finger on your touch pad).\nGo back to the initial view with the “zoom-to-extent” button ().\nHold the right mouse button while moving the mouse and the camera moves around the grid.\n\nThe imported data is a nice example of an unstructured grid.\n\nZoom in to the upper left part of the grid. Notice that the grid is built from triangles, concentrated around the rivers.\nSwitch the dataset on and off with a click on the () button in file overview, left of the layer. See the underlying rivers.\n\nIn your display the vertical thickness of the dataset is perhaps rather small. Let’s increase the vertical exaggeration.\n\nIn the upper right corner, switch off the “automatic exaggeration of the z-axis”.\nNow increase the value to 50.0 and the view will change automatically.\n\nSome final experience with the other viewer controls.\n\nUse the buttons () to reposition your camera to another fixed position to the grid.\nClick the button “Toggle Sliders”() to activate the sliders for the X, Y and Z direction.\nExperiment with the sliders, both left and right \n\nThe colors in the display by default referred to the Elevation of the layers. Let’s now color the layers by calculated Head.\n\nIn the list of imported files select “Calculated-Heads”.\nFrom the subset “layered Datasets” double click on the element “data”.\n\nWait a few seconds and the name turns bold and the colors in the display change.\n\nSelect the name “data” and click your right mouse button to open a pop-up window.\nSelect “Edit legend” to open the “Legend editor” (see figure below).\n\nSelect PIYG for Color scale.\nCheck the Percentiles box.\nClick on OK and the window will close. The colors in your display change automatically.\n\nThe imported file doesn’t contain one single head, but a timeseries of calculated heads ranging from 01/01/2018 – 01/02/2018. Now let’s use the Time Slider to display the data through time. \n\nFirst click the button “Back(+y)” for a nice 3D view.\nClick the button () to start the animation. It is a large dataset to the view in the display only changes slowly.\nStop the animation with the button ().\nPlay around with the slider.\n\nThat’s all for now. You can save your session if you like.\n\nFrom the main menu choose “File” and select “Save As…” to save the session as an *.imod file.\nClose the 3D viewer via menu “File” and select Quit”.\n\nThank you for your patience and attention.\n\n\n\nFigure 2: iMOD 3D Viewer - Legend Editor" + "objectID": "deltaforge_install.html#using-deltaforge", + "href": "deltaforge_install.html#using-deltaforge", + "title": "Install iMOD Python with Deltaforge", + "section": "Using Deltaforge", + "text": "Using Deltaforge\nThe easiest way to start your environment is by pressing the Windows Key and start typing deltaforge. This will let you select the Deltaforge Prompt. Select this.\n\n\n\nThe Deltaforge Prompt should be findable in the Windows start menu\n\n\nThis will start a command prompt screen (cmd.exe), where at startup the Deltaforge python environment is activated.\n\n\n\nThe Deltaforge prompt. You can type mamba list to view all the packages installed.\n\n\nTo view all the packages installed in the environment you can type mamba list and press Enter. This will list all packages installed in the environment. If you want to start coding, you can type spyder, which will start Spyder, a Python scientific development environment." }, { - "objectID": "about.html", - "href": "about.html", - "title": "About", + "objectID": "coupler_metamod_config.html", + "href": "coupler_metamod_config.html", + "title": "Configuration", "section": "", - "text": "If you have questions on using iMOD Suite or want to report a bug, you can send an email to imod.support@deltares.nl.\n\n\n\nBelow is the list of repositories that contain the source code of the individual components. You can raise issues, or suggest changes, here.\n\niMOD Documentation Github\niMOD QGIS plugin Github\niMOD 3D Viewer Github\niMOD Python Gitlab" + "text": "The configuration file is necessary to describe the model and its dependencies. It is in the toml format and should have a .toml extension.\nNote that toml uses quote marks differently than python. Single quotes in toml ('') are interpreted similarly to how python would interpret a rawstring (r'' or r\"\"), whereas double quotes (\"\") are interpreted similarly to regular strings in python (\"\" or ''). This matters for paths on Windows, for which we advise to use single quotes." }, { - "objectID": "about.html#get-involved", - "href": "about.html#get-involved", - "title": "About", + "objectID": "coupler_metamod_config.html#config-schema", + "href": "coupler_metamod_config.html#config-schema", + "title": "Configuration", + "section": "Config schema", + "text": "Config schema\n\nlog_level\n\n\n\n\n\n\ndescription\nThis setting determines the severity and therefore the verbosity of the log messages.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\ndefault\nINFO\n\n\nenum\nDEBUG, INFO, WARNING, ERROR, CRITICAL\n\n\n\n\ntiming\n\n\n\n\n\n\ndescription\nSpecifies whether the coupling should be timed. This option requires the log level to at least include INFO.\n\n\ntype\nbool\n\n\nrequired\nfalse\n\n\ndefault\nfalse\n\n\n\n\ndriver_type\n\n\n\n\n\n\ndescription\nSpecifies which driver should be used. Typically, this determines which hydrological kernels are coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\nenum\nmetamod\n\n\n\n\ndriver.kernels.modflow6\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the MODFLOW 6 library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of MODFLOW 6.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nwork_dir\n\n\n\n\n\n\ndescription\nThe working directory MODFLOW 6 expects. This is the directory where the simulation name file resides.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.kernels.metaswap\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the MetaSWAP library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of MetaSWAP.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nwork_dir\n\n\n\n\n\n\ndescription\nThe working directory MetaSWAP expects.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.coupling\n\nenable_sprinkling\n\n\n\n\n\n\ndescription\nWhether to enable sprinkling, that is: enable extracting groundwater for irrigation.\n\n\ntype\nbool\n\n\nrequired\ntrue\n\n\n\n\nmf6_model\n\n\n\n\n\n\ndescription\nSpecifies the MODFLOW 6 model name to which MetaSWAP will be coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_recharge_pkg\n\n\n\n\n\n\ndescription\nSpecifies the package name (specified in the Modflow 6 simulation name file) of the recharge package to which MetaSWAP will be coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_well_pkg\n\n\n\n\n\n\ndescription\nSpecifies the package name (specified in the Modflow 6 simulation name file) of the recharge package to which MetaSWAP will be coupled. This setting is only required if enable_sprinkling is set to true.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nmf6_msw_node_map\n\n\n\n\n\n\ndescription\nPath to the file specifying the mapping between MODFLOW 6 cells and MetaSWAP svats.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_recharge_pkg\n\n\n\n\n\n\ndescription\nPath to the file specifying the mapping between MODFLOW 6 recharge cells and MetaSWAP svats.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_msw_sprinkling_map\n\n\n\n\n\n\ndescription\nPath to the file specifying the mapping between MODFLOW 6 wells and MetaSWAP svats. This setting is only required if enable_sprinkling is set to true.\n\n\ntype\nstr\n\n\nrequired\nfalse" + }, + { + "objectID": "coupler.html", + "href": "coupler.html", + "title": " iMOD Coupler", "section": "", - "text": "If you have questions on using iMOD Suite or want to report a bug, you can send an email to imod.support@deltares.nl.\n\n\n\nBelow is the list of repositories that contain the source code of the individual components. You can raise issues, or suggest changes, here.\n\niMOD Documentation Github\niMOD QGIS plugin Github\niMOD 3D Viewer Github\niMOD Python Gitlab" + "text": "Deltares have worked together with the USGS to create the MODFLOW API, based on the Basic Model Interface (BMI) with some extensions. The first version of this functionality became available with the release of MODFLOW 6.2.0. BMI is a set of standard control and query functions that, when added to a model code, make that model both easier to learn and easier to couple with other software elements. Furthermore, the BMI makes it possible to control MODFLOW 6 execution from scripting languages using bindings for the BMI.\nWe have also developed xmipy, a Python package with bindings for the API, which allow you to run and update (at runtime) a MODFLOW 6 model from Python. This allows coupling MODFLOW 6 to other computational cores. One of its first applications is a coupling of MODFLOW 6 to MetaSWAP, as part of the iMOD Coupler package. Other applications can be found in this paper." }, { - "objectID": "about.html#history", - "href": "about.html#history", - "title": "About", - "section": "History", - "text": "History\nDevelopments on iMOD started in 2006, with the aim to make groundwater modelling with MODFLOW easier. iMOD developed into a full fletched GUI, which could be used to build and analyse groundwater models from start to finish. Focus of the software always has been on large groundwater models, for which the software was so successful that most regional groundwater models owned by water boards in Netherlands, plus the Dutch National model (LHM), run on iMOD. In 2014, in Deltares’ move to make their software open source, the Fortran code of iMOD was shared and in 2015 the compiled executables became freely available. In many international projects (for example in India, New Orleans, Colombia, Germany, and Switzerland) this was one of the reasons to adopt iMOD as the modelling software. iMOD’s capabilities of simulating large groundwater models were pushed further in 2017 when iMOD and its custom computational kernels iMODFLOW and iMOD-WQ, could be run in parallel. Developments on the GUI continued up to 2020, when it became apparent that the approach up to that point had a few drawbacks:\n\nWith the release of Modflow 6, computations on unstructured grids were possible. This created a demand for supporting all types of unstructured grids. iMOD, however, could not support these grids (except multi-model structured subgrids).\nIt was difficult to connect iMOD to the ever changing software and data science ecosystem, because of the use of Fortran and iMOD’s custom data formats. For example, Python has a larger ecosystem, allowing users to easily incorporate all kinds of packages into their workflows.\n\nTherefore, in 2021, the iMOD Suite was released. This suite consists of a Python package, a QGIS plugin, and a 3D viewer. It therefore supports reproducible workflows for unstructured groundwater models and relies more on standard filetypes such as NetCDF, UGRID, and shapefiles.\nThe classic iMOD GUI and its batch functionality is consolidated under the name iMOD 5, and will be maintained for the coming years. During this transition period it is easy to use iMOD 5 in combination with iMOD Suite. New developments will land in iMOD Suite.\n\n\n\n\n\n\nflowchart TB\n subgraph 2006\n A{iMOD 1.0}\n X{{Start development}}\n end\n A --> B{iMOD 2.0}\n subgraph 2014\n B\n Y{{Fortran code \\n available as open source}}\n end\n B --> C{iMOD 3.0}\n subgraph 2015\n C\n Z{{Executables freely \\n available}}\n end\n C --> D{iMOD 4.0}\n subgraph 2017\n D\n XX{{parallel Solver Pks}}\n end\n D --> E{iMOD 5.0}\n subgraph 2019\n E\n XY{{iMOD Water Quality \\n and MODFLOW6}}\n end\n E --> F{iMOD 5.2}\n subgraph 2020\n F\n XZ{{BMI coupling \\n Modflow6-MetaSWAP}}\n end\n F --> G{iMOD Suite}\n F --> H{iMOD 5.3}\n subgraph 2021\n G\n YX{{Tooling in Python, QGIS \\n C++. Unstructured grids}}\n end\n subgraph 2021 \n H\n end\n H --> I{iMOD 5.5}\n G --> J{iMOD Suite}\n subgraph 2023\n I\n end\n subgraph 2023 \n J\n YY{{Model input validation, \\n CPT plotting in QGIS, \\n Backwards \\n compatibility iMOD 5}}\n end" + "objectID": "coupler.html#coupling-to-modflow-6", + "href": "coupler.html#coupling-to-modflow-6", + "title": " iMOD Coupler", + "section": "", + "text": "Deltares have worked together with the USGS to create the MODFLOW API, based on the Basic Model Interface (BMI) with some extensions. The first version of this functionality became available with the release of MODFLOW 6.2.0. BMI is a set of standard control and query functions that, when added to a model code, make that model both easier to learn and easier to couple with other software elements. Furthermore, the BMI makes it possible to control MODFLOW 6 execution from scripting languages using bindings for the BMI.\nWe have also developed xmipy, a Python package with bindings for the API, which allow you to run and update (at runtime) a MODFLOW 6 model from Python. This allows coupling MODFLOW 6 to other computational cores. One of its first applications is a coupling of MODFLOW 6 to MetaSWAP, as part of the iMOD Coupler package. Other applications can be found in this paper." }, { - "objectID": "about.html#trainings", - "href": "about.html#trainings", - "title": "About", - "section": "Trainings", - "text": "Trainings\n\nDelft Software Days\nTwice a year, there is an iMOD day, where users can hear the latest iMOD developments and get training in the latest features. These are a great opportunity to get to know fellow users and the developers. Trainings will be announced on the Delft Software Days website and via the iMOD mailing list, so keep an eye out on those.\nIn 2021, the Delft Software Days were not held in person but recorded as webinars, which can be viewed online. Note that due to privacy settings, you might need follow the link below the video to view it on the Deltares Vimeo page.\n\niMOD User Day 2021 from Deltares on Vimeo.\n\n\nPast trainings iMOD Suite\n2023-02: National University of Singapore, Singapore\n\n2022-11: Deltares Campus, Delft\n\n2022-06: Trinity college, Dublin" + "objectID": "coupler.html#source-code", + "href": "coupler.html#source-code", + "title": " iMOD Coupler", + "section": "Source Code", + "text": "Source Code\nThe xmipy library can be found on: https://github.com/Deltares/xmipy\nThe iMOD Coupler can be found on: https://github.com/Deltares/imod_coupler" }, { - "objectID": "about.html#publications-using-imod-suite", - "href": "about.html#publications-using-imod-suite", - "title": "About", - "section": "Publications using iMOD Suite", - "text": "Publications using iMOD Suite\n\n\nDelsman, Joost R., Tobias Mulder, Betsy Romero Verastegui, Huite Bootsma, Pieter Zitman, Sebastian Huizer, and Gualbert H. P. Oude Essink. 2023. “Reproducible Construction of a High-Resolution National Variable-Density Groundwater Salinity Model for the Netherlands.” Environmental Modelling & Software, 105683. https://doi.org/https://doi.org/10.1016/j.envsoft.2023.105683.\n\n\nEngelen, J. van, G H P Oude Essink, and M F P Bierkens. 2022. “Sustainability of fresh groundwater resources in fifteen major deltas around the world.” Environmental Research Letters 17 (12): 125001. https://doi.org/10.1088/1748-9326/aca16c.\n\n\nEngelen, Joeri van, Marc F. P. Bierkens, Joost R. Delsman, and Gualbert H. P. Oude Essink. 2020. “Factors Determining the Natural Fresh-Salt Groundwater Distribution in Deltas.” Water Resources Research 57 (1). https://doi.org/10.1029/2020WR027290.\n\n\nEngelen, Joeri van, Jarno Verkaik, Jude King, Eman R. Nofal, Marc F. P. Bierkens, and Gualbert H. P. Oude Essink. 2019. “A three-dimensional palaeohydrogeological reconstruction of the groundwater salinity distribution in the Nile Delta Aquifer.” Hydrology and Earth System Sciences 23: 5175–98. https://doi.org/10.5194/hess-2019-151.\n\n\nKing, Jude, Tobias Mulder, Gualbert Oude Essink, and Marc F. P. Bierkens. 2021. “Joint estimation of groundwater salinity and hydrogeological parameters using variable-density groundwater flow, salt transport modelling and airborne electromagnetic surveys.” Advances in Water Resources 160 (December): 104118. https://doi.org/10.1016/j.advwatres.2021.104118.\n\n\nSeibert, Stephan L., Janek Greskowiak, Friederike Bungenstock, Holger Freund, Martina Karle, Rena Meyer, Gualbert H. P. Oude Essink, Joeri van Engelen, and Gudrun Massmann. 2023. “Paleo-Hydrogeological Modeling to Understand Present-Day Groundwater Salinities in a Low-Lying Coastal Groundwater System (Northwestern Germany).” Water Resources Research 59 (4): 1–24. https://doi.org/https://doi.org/10.1029/2022WR033151.\n\n\nThomas, Ariel T., Aaron Micallef, Shuangmin Duan, and Zhihui Zou. 2023. “Characteristics and Controls of an Offshore Freshened Groundwater System in the Shengsi Region, East China Sea.” Frontiers in Earth Science 11. https://doi.org/10.3389/feart.2023.1198215." + "objectID": "coupler.html#known-issues", + "href": "coupler.html#known-issues", + "title": " iMOD Coupler", + "section": "Known Issues", + "text": "Known Issues\n\niMOD v5.2 release\nThe MetaSWAP and Modflow6 libraries provided with iMOD 5.2 for imod_coupler were not statically linked. This could result in the following error:\nFileNotFoundError: '''Could not find module \"\\path\\to\\MetaSWAP.dll\" (or one\nof its dependencies). Try using the full path with constructor syntax.'''\nThis is caused by not having the Intel redistrutable libraries on the system. These can be downloaded from this page. Make sure to choose the correct platform and the version for 'Parallel Studio XE 2020'." + }, + { + "objectID": "tutorial.html", + "href": "tutorial.html", + "title": " Tutorials", + "section": "", + "text": "The iMOD-suite consists of several components, and combining these in different ways allows for different workflows. This “mix-and-match” capability benefits user flexibility, but it can be a bit daunting at start.\nTherefore, we have compiled a set of tutorials to help you get started and give you an overview of the Suite’s capabilities.\nTo download and install the iMOD Suite, follow the instructions here. To download the tutorial material, you can follow this link.\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nAbbeyfeale\n\n\nComponents: QGIS and iMOD plugin\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nConceptual fresh-salt model\n\n\nComponents: iMOD Python, iMOD WQ, QGIS plugin, 3D Viewer\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nDommel\n\n\nComponents: iMOD 3D Viewer\n\n\n\n\n\n\n\n\n\n\n\n\nNo matching items" + }, + { + "objectID": "viewer_install.html", + "href": "viewer_install.html", + "title": "Install iMOD Viewer", + "section": "", + "text": "For the complete iMOD viewer (QGIS plugin and 3D viewer) can be installed using the Deltares installer. A working QGIS is needed before installing the iMOD viewer. It is also possible to install the QGIS plugin using the QGIS plugin repository. This installation is without the 3D viewer.\nThe different ways to install the QGIS plugin are described in Section 3.1, Section 3.2, and Section 3.3. Each of these, however, require the user to install QGIS. To install the QGIS plugin, we recommend running the iMOD Viewer installer (Section 3.1), which will both install the iMOD 3D viewer, as well as the iMOD QGIS plugin." + }, + { + "objectID": "viewer_install.html#description", + "href": "viewer_install.html#description", + "title": "Install iMOD Viewer", + "section": "", + "text": "For the complete iMOD viewer (QGIS plugin and 3D viewer) can be installed using the Deltares installer. A working QGIS is needed before installing the iMOD viewer. It is also possible to install the QGIS plugin using the QGIS plugin repository. This installation is without the 3D viewer.\nThe different ways to install the QGIS plugin are described in Section 3.1, Section 3.2, and Section 3.3. Each of these, however, require the user to install QGIS. To install the QGIS plugin, we recommend running the iMOD Viewer installer (Section 3.1), which will both install the iMOD 3D viewer, as well as the iMOD QGIS plugin." + }, + { + "objectID": "viewer_install.html#sec-install_QGIS", + "href": "viewer_install.html#sec-install_QGIS", + "title": "Install iMOD Viewer", + "section": "2 Installing QGIS", + "text": "2 Installing QGIS\nYou can download the standalone QGIS setup [on the QGIS website] (https://qgis.org/en/site/forusers/download.html). We recommend downloading a QGIS version >= 3.28 here. After downloading the QGIS setup, run it.\nThis installs a user installation of QGIS, which is sufficient in most cases. For a system wide installation, see Section 4." + }, + { + "objectID": "viewer_install.html#installing-the-imod-viewer", + "href": "viewer_install.html#installing-the-imod-viewer", + "title": "Install iMOD Viewer", + "section": "3 Installing the iMOD Viewer", + "text": "3 Installing the iMOD Viewer\nThe different options to install the iMOD Viewer are listed below. The iMOD Viewer consists of the iMOD QGIS plugin and iMOD 3D viewer.\n\n3.1 (Option 1) Install with the Deltares setup\nRun the .msi you can download on the Deltares download portal.\nFollow the installation instructions for the viewer install, and make sure to do a Complete install.\n\n\n3.2 (Option 2) Installing from the QGIS plugin repository\nIn QGIS, navigate to Plugins > Manage and Install Plugins > All. In the search bar, type: “iMOD”. Select the iMOD plugin, and click “Install”.\nThis does not install the iMOD 3D Viewer; so for 3D viewing functionality, follow the instructions in Section 3.1, but instead select a Minimal install.\n\n\n3.3 (Option 3) Manually download and copy the iMOD QGIS plugin\nDownload the iMOD QGIS plugin code from the [Github page](https://github.com/Deltares/imod-qgis]\nUnpack the zip files, and copy the imodqgis folder to your QGIS plugin directory. This is probably located in your Appdata folder. In windows it is something such as: c:\\Users\\%USER%\\AppData\\Roaming\\QGIS\\QGIS3\\profiles\\default\\python\\plugins\nIf you cannot find the folder, follow [these instructions] (https://gis.stackexchange.com/a/274312>).\nIn QGIS, make sure under Plugins > Manage and Install Plugins > Installed that the checkbox iMOD is checked." + }, + { + "objectID": "viewer_install.html#sec-system-wide", + "href": "viewer_install.html#sec-system-wide", + "title": "Install iMOD Viewer", + "section": "4 Advanced: Installing the QGIS plugin system-wide", + "text": "4 Advanced: Installing the QGIS plugin system-wide\nThere are cases where a system-wide QGIS installation is required, for example on computational servers, where multiple users need to use the software. Requiring each user to install the plugin themselves can be a burden.\nThis requires the following steps:\n\nInstalling the OSGeo4W QGIS installation\nPutting the plugin files in the right folder.\n\n\n4.1 Installing the OSGeo4W QGIS installation\n\nDownload the OSGeo4W installer from the QGIS website <https://qgis.org/en/site/forusers/download.html>_\nRight-click osgeo4w-setup.exe and click Run as administrator\nAt the starting screen, choose Advanced Install\nIn the Choose Installation Type screen, choose Install from Internet if you have access to the internet, this will download the files to a folder called something like: %APPDATA%\\Local\\Temp\\http%3a%2f%2fdownload.osgeo.org%2fosgeo4w%2fv2%2f\\\nYou can use this folder to Install from Local Directory later (for example on a restricted server)\nIn Choose Installation Directory check All Users\nIn “Select Local Package Directory”, you can leave the default options\nIf you previously checked “Install from Internet”:\n\nin the Select Connection Type, choose Direct Connection\nin Choose Download Sites, choose http://download.osgeo.org\n\nIn the Select Packages screen, make sure the following components are installed:\n\nunder Desktop, qgis: QGIS Desktop.\nunder Libs, python3-pandas\n\nA component will be installed if there is a version number in the “New” column (If Skip change this by clicking the cell with Skip in it).\nAfter downloading an installing, check Finish\n\n\n\n\n\n\n\nTip\n\n\n\nMaximize the screen to see the package names\n\n\n\n\n\nThe Select packages screen enlarged. If you click Skip, a version number should appear in the column New.\n\n\n\n\n4.2 Putting the plugin files in the right folder\nDownload the iMOD QGIS plugin code from the Github page\nUnpack the zip files, and copy the imodqgis folder to your QGIS plugin directory. This is probably located in your Appdata folder. In windows it is something such as: c:\\OSGeo4W\\apps\\qgis\\python\\plugins\\imodqgis" + }, + { + "objectID": "coupler_ribamod_config.html", + "href": "coupler_ribamod_config.html", + "title": "Configuration", + "section": "", + "text": "The configuration file is necessary to describe the model and its dependencies. It is in the toml format and should have a .toml extension.\nNote that toml uses quote marks differently than python. Single quotes in toml ('') are interpreted similarly to how python would interpret a rawstring (r'' or r\"\"), whereas double quotes (\"\") are interpreted in a similar manner to regular strings in python (\"\" or ''). This matters for paths on Windows, for which we advice to use single quotes." + }, + { + "objectID": "coupler_ribamod_config.html#config-schema", + "href": "coupler_ribamod_config.html#config-schema", + "title": "Configuration", + "section": "Config schema", + "text": "Config schema\n\nlog_level\n\n\n\n\n\n\ndescription\nThis setting determines the severity and therefore the verbosity of the log messages.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\ndefault\nINFO\n\n\nenum\nDEBUG, INFO, WARNING, ERROR, CRITICAL\n\n\n\n\ntiming\n\n\n\n\n\n\ndescription\nSpecifies whether the coupling should be timed. This option requires the log level to at least include INFO.\n\n\ntype\nboolean\n\n\nrequired\nfalse\n\n\ndefault\nfalse\n\n\n\n\ndriver_type\n\n\n\n\n\n\ndescription\nSpecifies which driver should be used. Typically, this determines which hydrological kernels are coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\nenum\nribamod\n\n\n\n\ndriver.kernels.modflow6\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the MODFLOW 6 library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of MODFLOW 6.\n\n\ntype\nstr\n\n\nrequired\nfalse\n\n\n\n\nwork_dir\n\n\n\n\n\n\ndescription\nThe working directory MODFLOW 6 expects. This is the directory where the simulation name file resides.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.kernels.ribasim\n\ndll\n\n\n\n\n\n\ndescription\nThe path to the Ribasim library.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\ndll_dep_dir\n\n\n\n\n\n\ndescription\nThe path to the dependencies of Ribasim.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nconfig_file\n\n\n\n\n\n\ndescription\nThe path to the Ribasim config file.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\n\ndriver.coupling\n\nmf6_model\n\n\n\n\n\n\ndescription\nSpecifies the MODFLOW 6 model name to which Ribasim will be coupled.\n\n\ntype\nstr\n\n\nrequired\ntrue\n\n\n\n\nmf6_active_river_packages\n\n\n\n\n\n\ndescription\nSpecifies the active river packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue\n\n\n\n\nmf6_passive_river_packages\n\n\n\n\n\n\ndescription\nSpecifies the passive river packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue\n\n\n\n\nmf6_active_drainage_packages\n\n\n\n\n\n\ndescription\nSpecifies the active drainage packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue\n\n\n\n\nmf6_passive_drainage_packages\n\n\n\n\n\n\ndescription\nSpecifies the passive drainage packages of MODFLOW 6 that will be coupled together with the path to the mapping table.\n\n\ntype\ndict[str, str]\n\n\nrequired\ntrue" } ] \ No newline at end of file diff --git a/tutorial.html b/tutorial.html index 385c18e..540810d 100644 --- a/tutorial.html +++ b/tutorial.html @@ -245,7 +245,7 @@

Tutorials