The Ecotope-Map Maker based on Abiotics (EMMA) facilitates the translation from hydrodynamic model output data to ecotope maps. Ecotopes are ecological units that are defined by abiotic, biotic, and anthropogenic local conditions. An ecotope is a more-or-less homogeneous natural unit. In many instances, the word habitat is used where here the word ecotope is used, as habitat originally refers to the living environment of a single species, while ecotope refers to an ecosystem as it can be mapped.
This simple python
-interface allows to map aquatic ecotopes (or habitats) based on the abiotic output from an
hydrodynamic model. It does so by a modified version of the ZES.1 classification system.
The hydrodynamic model must contain the following three hydrodynamic parameters to do so:
- water depth (or, bottom and water level);
- flow velocity; and
- salinity.
Some basic usage of EMMA
is presented below (Basic usage). A more complete overview of use-cases are
grouped in the examples-folder.
Gijs G. Hendrickx
(Delft University of Technology).
Contact: [email protected].
When using this repository, please cite accordingly:
Hendrickx, G.G., and Brunink, S. (2023). EMMA: Ecotope-Map Maker based on Abiotics. 4TU.ResearchData. Software. doi: 10.4121/0100fc5a-a99c-4002-9864-3faade3899e3.
This repository is licensed under Apache License 2.0
.
This repository has the following requirements (see also requirements.txt
):
Python>=3.9
netCDF4
numpy
shapely
typer
xarray
matplotlib
[examples, optional]
Instead of installing netCDF4
, the xarray
-package can also be installed with the I/O
-option enabled:
python3 -m pip install xarray[io]
For further details, see the
xarray
-documentation;
also for further details on installing xarray
.
As of now, EMMA
is not available via PyPI
and can only be installed via GitHub
. Below, there are three ways
presented on how to install EMMA
via GitHub
. All these methods require you to have your virtual environment
activated. If you have no virtual environment yet, consider creating one
(official documentation):
python3 -m venv <venv>
After installation, run the following command to test if EMMA
and her dependencies are installed properly:
emma test
This should return the following message:
EMMA and her dependencies are installed properly.
EMMA
can be installed using pip
directly:
- Install
EMMA
-repository using itsHTTPS
-hyperlink:python3 -m pip install git+https://github.com/ghendrickx/EMMA.git
EMMA
can be cloned according to the
GitHub
-instructions
(note that you need to have git
on your computer):
- Open the command-line (or
Git Bash
on Windows), and change the directory to the desired location (usingcd
) - Clone the repository by typing
git clone
followed byEMMA
'sHTTPS
-hyperlink:git clone https://github.com/ghendrickx/EMMA.git
- Locally install
EMMA
:Or, when storingpython3 -m pip install .
EMMA
at a different location from the virtual environment:python3 -m pip install /path/to/EMMA
EMMA
can be downloaded as a ZIP
-file and unpacked locally:
- Click on the
Code
-button on the main page and choose theDownload ZIP
-option - Check your
Downloads
-folder and extract the downloadedZIP
-file (EMMA-master.zip
) - Move the repository-folder to the desired location [optional]
- Locally install
EMMA
:Or, when storingpython3 -m pip install .
EMMA
at a different location from the virtual environment:python3 -m pip install /path/to/EMMA
The basic usage of EMMA
requires calling the map_ecotopes()
-function:
from src.processing import map_ecotopes
results = map_ecotopes('<hydrodynamic_output_data_file>.nc', wd='<working/directory>')
There is also the option to use EMMA
from the command line directly:
emma run hydrodynamic_output_data_file.nc --wd working/directory
Note that the latter usage provides limited customisation. Call for the included features:
emma run --help
By default, EMMA
expects the relevant hydrodynamic variables to be named as given by dfm1.json
.
In case these key-words differ in the provided netCDF
-file (dependent on the hydrodynamic modelling software used),
provide a custom (partially overwriting) *.json
-file with the same key-words as in dfm1.json
;
see the config
-folder for an elaborate explanation on how to customise the configuration of EMMA
.
In the examples
-folder, a collection of examples are provided on how to use EMMA
including some of her
additional features. A dummy output-file is added that can be used to test the examples. For the
examples, there is also an additional README
in the examples
-folder to provide
some background to the examples, where needed.
Note that these examples all make use of the Python
-based execution of EMMA
.