Skip to main content

PyPI - Version Conda Version GitLab License

Gridmarthe

gridmarthe is a Python project for (fast) Marthe grid operations.

MARTHE is a hydrogeological modelling code developped at BRGM, French Geological Survey (Thiery, 2020), and is available at https://www.brgm.fr/en/software/marthe-modelling-software-groundwater-flows

gridmarthe in a nutshell

gridmarthe allow users to read/write efficiently Marthe Grids (v9, v8, constant_data, etc.) with python, for any MARTHE variable.

With the gridmarthe API, data are stored in a xarray dataset, and can be manage with xarray functions (or numpy). Specific treatments/functions are also provided by gridmarthe.

The package also install different command line tools: ncmart to convert Marthe Grid to netCDF format, martshp to convert in shapefile/geopackage, cleanmgrid to fix marthe grid format.

Full documentation and tutorials can be founded at https://gridmarthe.readthedocs.io

Grids are stored as a 2 dimensions matrix composed of a 1D spatial vector and a time dimension (Reduced Horizontal Grid, as recommended for lossless compression by gathering in cf-conventions: see cf-compression-gathering and cf-reduced-horizontal-grid). This means that the spatial domain is flatten in grid, and each point is associated with a index, a x coordinate, a y coordinate, eventually a z coordinate (number of layer in most cases), and dx, dy values.

The x, and y coordinates are the center of cell. dx, dy are the dimensions of the cell.

Installation

From pip

On pip, gridmarthe is available for GNU/Linux, and Windows for python >=3.10. Users can install it with:

pip install gridmarthe
# or with all optional dependencies
pip install gridmarthe[opt]

For UNIX systems, the package needs gfortran/gcc shared libraries to run. For example, using a Debian-based GNU/Linux distribution, one can install gcc with:

sudo apt install gcc gfortran

From conda-forge

gridmarthe is also available in the conda-forge channel (Linux, Windows). Conda users can install it with:

conda install gridmarthe
# or, with mamba
mamba install gridmarthe

From sources

gridmarthe use some Fortran modules which need to be compiled before local installation, hence user/developer who want to install from sources will need a Fortran and a C compiler.

Compilation and installation

Get the sources :

git clone https://gitlab.com/brgm/hydrogeological-modelling/marthe-tools/gridmarthe
cd gridmarthe
With pip (Unix-like OS)

On a Unix-like machine, with gfortran, ninja-build, python3, the project Makefile will compile Fortran sources and install in development mode (i.e. with editable flag) the package.

make requirements
make

or, without the development/editable mode :

pip install .

On a Windows machine, it is possible to compile with gfortran/gcc (mingw project https://mingw-w64.org/ or https://winlibs.com/#download-release ; it can also be installed with chocolatey choco install mingw, or with conda with conda-forge packages mingw-w64, gcc and gfortran).

It is also possible to install gridmarthe in a conda environment. An environment file is provided (example with mamba):

mamba env create -n gm -f environment.yml
mamba activate gm
make

This will install the library using pip editable mode, but with dependencies installed from conda-forge.

Alternatively, you can use conda-build and the conda develop command to install the library in development mode.

mamba env create -n gm -f environment.yml
mamba activate gm
make conda-dev

On Windows, it is also possible to use a different compiler, for compatibility issues with other libraries. For example, use llvm compilers (flang and clang) instead of gfortran and gcc. To do so, use the following command:

mamba env create -n gm -f tools/env/conda_dev_llvm.yml
mamba activate gm
make conda-dev FC=flang CC=clang LD=lld

Warning: this approach requires an installation of VStudio.

Usage

Simple examples can be found in the documentation.

License

This program is free software and released under the terms of the GNU General Public License (version 3 or later).

Authors and acknowledgment

gridmarthe is released by (C) BRGM, French Geological Survey

Authors and contributors:

  • A. Manlay,
  • J.P. Vergnes,
  • S. Wang,
  • S. Lopez,
  • S. Magne,
  • T. Hallouin

References

Thiery, D. (2020). Guidelines for MARTHE v7.8 computer code for hydro-systems modelling (English version) (Report BRGM/RP-69660-FR; p. 246 p.) http://ficheinfoterre.brgm.fr/document/RP-69660-FR

Metadata

Release files for gridmarthe 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gridmarthe 0.5.0
File Size Uploaded
gridmarthe-0.5.0.tar.gz 183.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for gridmarthe 0.5.0
File
gridmarthe-0.5.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
gridmarthe-0.5.0-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
gridmarthe-0.5.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
gridmarthe-0.5.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
gridmarthe-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details
gridmarthe-0.5.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
gridmarthe-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details
gridmarthe-0.5.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
gridmarthe-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details

Total release size: 14.5 MB

Release files / gridmarthe-0.5.0.tar.gz

Download URL gridmarthe-0.5.0.tar.gz
Size 183.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f7ec91e0c094dc79ee78910ad221b2e7e36a1060980e385bb3fe5e029751603d
BLAKE2b-256 checksum
How to use checksums
15bca9a2a865a0a1982fbfe8aaf98cd51a9d81635dfdc14dbe198de8b656eabb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL gridmarthe-0.5.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.14 CPython 3.14 free-threading Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e3f9958c52b983089819d05008759938d699a1c8ebb63e36a8668e9fd4a9ad15
BLAKE2b-256 checksum
How to use checksums
745fe7ca82444c138598b410e813217258b18543fa6b5bcb07fe305b34c65d81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp314-cp314-win_amd64.whl

Download URL gridmarthe-0.5.0-cp314-cp314-win_amd64.whl
Size 1.9 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
07a66c720d7586ef7d706e3b4571611c497f663e6c548f16fc3d96f42b025361
BLAKE2b-256 checksum
How to use checksums
87a23a8db6b7a3c61baa3621c871ee06050d9bbdc30e6011f70da24663b19f48
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL gridmarthe-0.5.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.14 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f4c4f224f8cb81db0994761df74d49a81bad567f1aeb4553780129dfc8250f0e
BLAKE2b-256 checksum
How to use checksums
14e0c7fdc8f5a8bd2010f078bc3979c22f6efaec241bbad63b0b943edddc7b7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp313-cp313-win_amd64.whl

Download URL gridmarthe-0.5.0-cp313-cp313-win_amd64.whl
Size 1.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
43308be24306f5dd04de82d50a84ac9a5709f426832845d606e8a68b2ee7f7f4
BLAKE2b-256 checksum
How to use checksums
d82b5c687786793cb44ae3b17affae5483267bf77224912930f1b1d38bda6d24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL gridmarthe-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.13 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
5738bc424471392dad4cdf60b5a7e7935bb9f080eae52254a608aefb76bc4463
BLAKE2b-256 checksum
How to use checksums
4b0d60fd2d6b4faac0d73c595fa2055ca820790374f4c5eb609616b696538433
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp312-cp312-win_amd64.whl

Download URL gridmarthe-0.5.0-cp312-cp312-win_amd64.whl
Size 1.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
96925e5883cc1f2a7c75b77e0e159e0c885e69761c27b26d8a7872c1ad373cd3
BLAKE2b-256 checksum
How to use checksums
5371cfdba222af1b4e5c540f296e0cab79cf4206a90d997e5a2680026df94c67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL gridmarthe-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e6d607e4f6f05d894956da719adf3aa54a522b5e6a73c1fe67d05610fa3b64f4
BLAKE2b-256 checksum
How to use checksums
c661d60763e7d4547267bbf78ed7ce1877a1a1e6bbd2848fc099c0acf2c5599a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp311-cp311-win_amd64.whl

Download URL gridmarthe-0.5.0-cp311-cp311-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3f8c2078ac860f18d15b103cde2898ea680a778ecfc4a64481ecca3d0dee8dc9
BLAKE2b-256 checksum
How to use checksums
5c622529c99c075177b1d21ef3ac4b7152b5baca9821ee8e4c91a3d779083dd2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / gridmarthe-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL gridmarthe-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.4 MB
Tags CPython 3.11 Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
8591fef449b4403afafbb806d15cd8fbba80f28288ba20b9c111d0b899403bd4
BLAKE2b-256 checksum
How to use checksums
c596e5315c931b0890e119880790634e666dbece42d0b681b2a73a3eb4303525
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

10 release files

0.4.0

11 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page