Top-level package for delft3dfmpy.
Project description
Python package to generate delft3dfm models from standardized data models or other flow models.
Free software: MIT license
WIKI (in Dutch): https://hkvconfluence.atlassian.net/wiki/spaces/DHYD/pages/222396421/Achtergrond
Features
Read Hydamo or shape files to Python data structure
Build Delft3D FM model from Hydamo or seperately defined elements
Generate rectangular meshes with refinement
Create 1D 2D connections
Create RR model schematisation
Write to Delft3D FM model
Installation
The package delft3dfmpy requires you to have (a) an environment with required dependencies and (b) an Integrated Development Envrionment (IDE) that can access this envrionment.
Please meet these two conditions first with instructions below before installing the Python package delft3dfmpy.
Environment Preparation
Prepare an environment with the correct dependencies for delft3dfmpy.
Install a Anaconda or Minoconda Python distribution:
https://www.anaconda.com/products/individual https://docs.conda.io/en/latest/miniconda.html
Save the content of https://raw.githubusercontent.com/openearth/delft3dfmpy/master/environment.yml and store this in a local file named environment.yml
Open Ananconda prompt and enter the directory where the envrionment.yml from step 2 is stored.
Install the delft3dfmpy environment with the required modules, by executing the following command in the opened command prompt.
conda env create -f environment.yml
This should create a delft3dfmpy environment with the required dependencies.
Activate the created environment by the following command in command prompt:
conda activate delft3dfmpy
You now have a correct and activated environment for installation of the delft3dfmpy Python package
Python package delft3dfmpy
Install the Python package delft3dfmpy directly, by executing the following command in an Anaconda Prompt
python -m pip install delft3dfmpy
Note that in this way the most recent version that is available on PyPi (see releases) is installed. From June 2022, and version 2.0.1, delft3dfmpy expects DAMO2.2 GPKG files as input, instead of HyDAMO v13 GML-files.
It is also possible to force installation of older versions and use the idential packages for GML input. The equivalent version of delft3dfmpy for HyDAMO v13 format is v1.2.3. This can be installed as follows:
python -m pip install delft3dfmpy=1.2.3
If the command prompt states Successfully built delft3dfmpy then installation is succesful.
Envrionment Integration in your IDE
Integration of the prepared environment depends on the IDE of usage. Here we mention briefly some options for the user (pick one!):
For a new instance of Jupyter within the activated environment:
Using Notebook
conda install -c conda-forge notebook
or using JupyterLab
conda install -c conda-forge jupyterlab
To register the newly created environment as a new kernel for Jupyter (Notebook or JupyterLab):
python -m ipykernel install --user --name=delft3dfmpy
No extra actions are required for PyCharm, Spyder or VSCode + Python extension.
Usage
Activate the created environment in an (Anaconda) command prompt (conda activate delft3dfmpy) before running your notebook or script. A Jupyter notebook or command prompt for the environment can also be launched from the Anaconda Navigator. For more information on how to use environments, see: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
The usage is best described by the example notebook: https://github.com/openearth/delft3dfmpy/blob/master/notebooks/Usage_introduction_coupled_RRFM.ipynb
Contribution
Contributions are much welcome for documentation, desirable features and bugs. The code and development happens in this GitHub repository: https://github.com/openearth/delft3dfmpy.
For contributions, use the following guidelines:
Fork the project on GitHub and clone the fork to your Operating System.
Make sure you have installed and activated the environment as is described above.
Delft3dfmpy uses flit to to build, package and publish the project. To install the development dependencies and register the cloned fork as a Python package for development purposes do the following:
From an elevated Anaconda Prompt (run as Administrator) within the activated delft3dfmpy environment:
conda install -c conda-forge flit
flit install --deps develop --symlink
This installs the development dependencies and creates a symbolic link in the Python site-packages folder of the activated environment.
Open the repository as folder/workspace in your favorite IDE (eg. VSCode + Python extension)
Make your contributions and test the changes locally.
Once satisfied, push your changes as a new branch to your fork and create a Pull Request to the original repository.
A maintainer on the main GitHub repository will review your PR and guide the merging process.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file delft3dfmpy-2.0.3.tar.gz
.
File metadata
- Download URL: delft3dfmpy-2.0.3.tar.gz
- Upload date:
- Size: 89.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c7e4a922e465dccc0f01516948a85c83d79e16f8d6281eddffe35dfc6ca43686 |
|
MD5 | dd0f2af40538900c132e5b2602acefea |
|
BLAKE2b-256 | 901e5fd256c3f280470bb39b27b3dfd9f0908cc20add240ced21fded2171b296 |
File details
Details for the file delft3dfmpy-2.0.3-py3-none-any.whl
.
File metadata
- Download URL: delft3dfmpy-2.0.3-py3-none-any.whl
- Upload date:
- Size: 1.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.28.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8031de625340d36e7f340085d80236654f92ff95ac79c3bd05207458c12701cf |
|
MD5 | a36ead60d8d6b79fac2d284d55c885d3 |
|
BLAKE2b-256 | 5a257f6f59de76286f3b5e5c2fc2b7260dceb2dec7a2ba3a531c6a8a99b1d92c |