Skip to main content

python package to read/write/manage Marthe Grids

Project description

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.

Still, as Marthe meshes are always parallelepiped, the array does not necessarily follow the ugrid convention. This may be an evolution for future version if required.

The x, and y coordinates are the center of cell. Dx, Dy are the dimension of the cell.

Installation

From pip

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

pip install gridmarthe

For GNU/Linux and MacOS, the package needs gfotran/gcc to run.

Linux, example with debian/ubuntu:

sudo apt install gcc gfortran

MacOS:

brew install gcc gfortran

From conda-forge

gridmarthe is also available in the conda-forge channel. 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.

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 the package.

make

or, without the development mode :

pip install .

On a windows machine, it is possible to compile with gfortran (mingw project https://mingw-w64.org/ or https://winlibs.com/#download-release ; or choco install mingw). Neverless, the simpliest way is to use a conda environment (miniforge with mambalib is recommended) to install gcc/gfortran, and install the project.

With conda (recommended on Windows)

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
pip install --no-deps .

Here, the development mode is not available (yet, with the meson build). 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
make lib
conda develop src/

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

A. Manlay and J.P. Vergnes, (c) BRGM

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gridmarthe-0.3.0.tar.gz (107.0 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

gridmarthe-0.3.0-cp314-cp314t-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.14tWindows x86-64

gridmarthe-0.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

gridmarthe-0.3.0-cp314-cp314-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.14Windows x86-64

gridmarthe-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

gridmarthe-0.3.0-cp313-cp313-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.13Windows x86-64

gridmarthe-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

gridmarthe-0.3.0-cp312-cp312-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.12Windows x86-64

gridmarthe-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

gridmarthe-0.3.0-cp311-cp311-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.11Windows x86-64

gridmarthe-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

gridmarthe-0.3.0-cp310-cp310-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.10Windows x86-64

gridmarthe-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file gridmarthe-0.3.0.tar.gz.

File metadata

  • Download URL: gridmarthe-0.3.0.tar.gz
  • Upload date:
  • Size: 107.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gridmarthe-0.3.0.tar.gz
Algorithm Hash digest
SHA256 cb4b4541093e5676f14e2d5c59fc3f0ca814cd80dc4192b713ced733f61cb5b7
MD5 2ff9465ad9c9d69e8d0b2217dcb1cd92
BLAKE2b-256 1c817f2bb486a0235ec8b6cb5ccd120eba9b0c4df6ae6cbc2f2dc71ca5dedd1d

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0.tar.gz:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp314-cp314t-win_amd64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 a31fef4a942e3b7b9ae47b71f4b219b6e7d157f8feb2094015eccb5d43f04073
MD5 52a65a91d3aa5f95668603a10a676726
BLAKE2b-256 345129ca49fe70e048cb594dcde8b13351d91d393731e7a456d49b7f7541c89e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp314-cp314t-win_amd64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f06e459ed0fe51d50b7839e5dcc86ecf211bb19da4c85851ed6b665e01c09129
MD5 97cc899bfc558c08a4ca184eae7312b6
BLAKE2b-256 e21c7a86136df3d0188eda66c4b9bfbb2bc1f62db53aa3cd8786d2f1e61c24e9

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: gridmarthe-0.3.0-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gridmarthe-0.3.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ba857e957bac43fad7f83386b5058e8a7d367b8e6d7adb6b0b1f45ba3d608ba0
MD5 c3dd96ae61f3e734195cfcac23e2e53f
BLAKE2b-256 e2d53fe385e6e7faab2c4dea54fb853c669e41174425c71e9a6de80bbc18e9b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp314-cp314-win_amd64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1cb8e4b9694aa7c70e3faa3425a8dc28cbee612d67c1ba6aa38d3b358d9f0217
MD5 260228653ce4fea15940733f4690106c
BLAKE2b-256 87f521b479fd372471c28ea54c7f780b8b870e8f1fbb4f67c7a269e5eb679a58

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: gridmarthe-0.3.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gridmarthe-0.3.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3e448cccdf7b2a164c2f8f47bcf0174e811cc43e228d9f4d9269904731bb9a29
MD5 475ec9e6c57bc9657ac48e5d7be36807
BLAKE2b-256 f758e1e559604e995aa9a6aab17962ce4dca4502f4ae8461138a36c7f6141b2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp313-cp313-win_amd64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0aa78ffbc22da62330db58e30d91644b8efc579957c87327fde6a4c32d594be7
MD5 f28dbe4a20b08926473db88a10b38156
BLAKE2b-256 2b2b0d1aaf83224178d5f9d4fc5245cc76dc93e050f67a7293ec7acc1195495f

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: gridmarthe-0.3.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gridmarthe-0.3.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c82ea6ba324555e2f4b4610940460e00a2b3cc05c39eb4842c7baa0ffdbfe380
MD5 b664324690bf980e1dad030433faf168
BLAKE2b-256 b4229e841a2d33dd2f7f2b1cc2510594d0678391ce3b2927579f25c88f4cc815

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp312-cp312-win_amd64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e6d72da2e92c5bd31e17a2e173c528fd5cdf22c974d7eb663fad2acfd4abe9d9
MD5 71ac4ef6bf5305499aaa808c4f1a6aab
BLAKE2b-256 24dd1e4230225b42f84c0dd2b1b0c0c4eafb60f68ef485cf79f189d4e3e772a1

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: gridmarthe-0.3.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gridmarthe-0.3.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 8a2fe73cb014079f27cbcb23d9b011817d329c1e14c9248a15f5600e06e713fb
MD5 afc8939e24754155df10054fb1a70a95
BLAKE2b-256 db88b1604dd8de3678e5ce511517ac67980b63e3843a71ad28267b2d2f680fb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp311-cp311-win_amd64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5a6efc6284f8d24d9cea6d19bfa421679654d07ae53e69ef946a6455473c2b80
MD5 824343d6161f8ba74696d0055f6c4c42
BLAKE2b-256 c19b2cad6bb0c94b0d4b56ea0a97fbf970d927df3833ffda5574ccbb47b3f767

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: gridmarthe-0.3.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gridmarthe-0.3.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1ca7c3ef5778ea7eda66e03953d433e113ac41c436ccee0dfc6b5f5e007bd93b
MD5 6531988799f3b46b91db6f693cf0d7c8
BLAKE2b-256 7b041d432d3e6a8951ebe5c075adca6b9602fdc454c9ab8a60636e00d04af443

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp310-cp310-win_amd64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gridmarthe-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for gridmarthe-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a2bf87b4e57272bb65e67248a95b767881c99d52067cc1d2f8589e953a5bbcfb
MD5 6fa12b90678b55a68220e31ebaf29d48
BLAKE2b-256 7302debfb7fd2ebcf46727bc948ccbf908aa8e3d14137a748455fb11efebac67

See more details on using hashes here.

Provenance

The following attestation bundles were made for gridmarthe-0.3.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build.yml on manlaya/gridmarthe

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page