Installation
From pip
gridmarthe is available on PyPi
and can be installed with:
pip install gridmarthe
From conda-forge (with conda or mamba)
gridmarthe is also available in the conda-forge channel.
Conda users can install it with:
conda install gridmarthe
# or, with mamba
mamba install gridmarthe
It is also possible to search for available versions:
mamba search gridmarthe --channel conda-forge
From the source
Get the sources:
git clone https://gitlab.com/brgm/hydrogeological-modelling/marthe-tools/gridmarthe.git
cd gridmarthe
Gridmarthe uses Fortran sources for efficient I/O operations on Marthe grid files.
These sources need to be compiled in order to use the lecsem module in gridmarthe.
The F90 sources are compiled with f2py (so make sure to have a compiler [gfortran
for example] and make installed on your system/python environment).
With pip
Then, for developper mode (ie with editable flag) just use the Makefile provided to do the compilation process and python installation.
make
Or, for a standard installation (not with editable flag):
pip install .
With conda (recommended on windows)
Alternatively, you can use a conda environment. For example with miniforge/mamba installed:
mamba env create -n gm -f environment.yml
mamba activate gm
pip install --no-deps .
For the editable/developper mode, one can add the -e flag in pip command, or use conda-build:
mamba env create -n gm -f environment.yml
mamba activate gm
mamba install conda-build
# Compile lecsem lib
make lib
# add develop path
conda develop src/
Verification
At this point, the following command should not give any error:
python3 -c "import gridmarthe"