Skip to main content
https://gricad-gitlab.univ-grenoble-alpes.fr/Geodynamo/webgeodyn/badges/master/build.svg https://img.shields.io/website/https/geodynamo.gricad-pages.univ-grenoble-alpes.fr/webgeodyn/index.html.svg?label=documentation&up_color=cyan https://img.shields.io/pypi/v/webgeodyn.svg

webgeodyn is a web-based plot tool to visualize Earth core flows and scalar fields at the Core Mantle Boundary (CMB). It consists in a Tornado web server, that can be started locally, that provides a set of visualisation tools on a variety of data formats.

Installation

Requirements

The installation of webgeodyn requires Python 3 to be installed.

The other dependencies will be automatically installed by the next step but are listed here for the sake of completeness:

  • numpy

  • scipy (version > 1.1)

  • h5py

  • tornado

  • cdflib

  • astropy

Installing the package

webgeodyn can be installed

  • from pip:

pip3 install webgeodyn [--user]

Put the --user flag if you are not installing in a virtual environment.

  • from the git repository :

Clone first the webgeodyn repository

git clone https://gricad-gitlab.univ-grenoble-alpes.fr/Geodynamo/webgeodyn.git

Then install the package:

cd webgeodyn
python3 setup.py install [--user]

Again, put the --user flag if needed.

Whatever the method used, you can test if the install succeed by importing webgeodyn in Python3:

python3 -c "import webgeodyn; print(webgeodyn.__version__)"

This command should return the installed version.

Running the example

You can give a first try at starting the web server by running the example:

python3 webgeodyn/example.py

or in the Python console:

>>> import webgeodyn.example
>>> webgeodyn.example.run()

This starts the server locally and should open your browser and display a page resembling the one at https://geodyn.univ-grenoble-alpes.fr/. If not, try to type http://localhost:8080 in your browser.

You can try the different visualisations tools provided on the loaded example model (CHAOS-7).

Note that this example will also try to load the result from the latest pygeodyn (geomagnetic data assimilation Python package also developed in our group) computation (if present in ~/pygeodyn_results/Current_computation/).

Running the server with your data

The server can be used to visualise any data of supported format. For that, it is necessary to follow the template of example.py:

  • First, load the data under the form of Model objects, of a given name and format, in a Models dictionary.

  • Then, the server must be started with the loaded Models.

This is shown in details below:

# 0.Import the necessary submodules
import webgeodyn.server
import webgeodyn.models

# 1.Initialising the Models dictionary
models = webgeodyn.models.Models()

# 2.Loading your data in the Models dictionary
# Syntax: models.loadModel('/path/to/the/model/directory', "Name of the model", "Format of the model")
# Example for pygeodyn:
models.loadModel('pygeodyn_results/Current_computation', 'Current pygeodyn computation', 'pygeodyn_hdf5')
# Several models can be loaded at once. Example for CHAOS:
models.loadModel('webgeodyn/webgeodyn/example_data/CHAOS-7', 'CHAOS-7.13', 'CHAOS')

# 3.Start the server with the loaded Models
webgeodyn.server.startServer(models,{})

By copying this code in a Python file of your own, you should be able to use the visualisation tools on data of supported formats.

The format of the models, that define the format of the files to read, are the modules of webgeodyn.inout. Here are some dataFormat examples:

  • archomag: to read COVARCH et COVLAKE files

  • chaos: to read CHAOS splines files

  • covobs: to read COVOBS realisations files in the spherical harmonics basis

  • covobs_splines: to read COVOBS realisations files filled with splines coefficients

  • enscore: to read files generated using [GBF15]-

  • pygeodyn_asc: for files in the old ASCII format used in pygeodyn

  • pygeodyn_hdf5: to read HDF5 files generated by pygeodyn

  • ZForecast: to read files generated by [BHF18] or [BGA17]

A list of the formats can be displayed by running:

>>> import webgeodyn.inout
>>> print(webgeodyn.inout._formats)

If you need the support of a new format of file, you can follow the templates given in the documentation of webgeodyn.inout to implement your own loading function. Otherwise, you can contact us using the information given below.

Developer documentation

Documentation of the submodules of the package are available online.

If Sphinx is installed and the files were cloned from the repository, it is possible to generate the documentation locally using:

cd doc && ./make_all_doc.sh

The documentation will then be available in HTML format at doc/html/index.html.

Conditions of use

The work is licensed under the GNU GPLv3.

Git repository

The source code is stored on a Git repository (https://gricad-gitlab.univ-grenoble-alpes.fr/Geodynamo/webgeodyn) which can also be used to give feedbacks through Issues.

References

[GBF15]

Gillet, N., Barrois, O. & Finlay, C. C. Stochastic forecasting of the geomagnetic field from the COV-OBS.x1 geomagnetic field model, and candidate models for IGRF-12. Earth, Planets and Space 67, (2015). doi:10.1186/s40623-015-0225-z

[BGA17]

Barrois, O., N. Gillet, and J. Aubert. “Contributions to the geomagnetic secular variation from a reanalysis of core surface dynamics.” Geophysical Journal International 211.1 (2017): 50-68.

[BHF18]

Barrois, O., Hammer, M. D., Finlay, C. C., Martin, Y. & Gillet, N. Assimilation of ground and satellite magnetic measurements: inference of core surface magnetic and velocity field changes. Geophysical Journal International (2018). doi:10.1093/gji/ggy297

Contact information

For scientific inquiries, contact Nicolas Gillet. For technical problems, contact Francois Dallasta and/or Franck Thollard.

Metadata

Release files for webgeodyn 0.10.5

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

Source distribution (sdist)

Source distribution for webgeodyn 0.10.5
File Size Uploaded
webgeodyn-0.10.5.tar.gz 11.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for webgeodyn 0.10.5
File Interpreter ABI Platform
webgeodyn-0.10.5-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 MB

Release files / webgeodyn-0.10.5.tar.gz

Download URL webgeodyn-0.10.5.tar.gz
Size 11.5 MB
Tags Source
SHA-256 checksum
How to use checksums
a574a99782c77c8e89e4c8d03ab1186bdefff5bad8e98ac41d9486b577079c8f
BLAKE2b-256 checksum
How to use checksums
4e70903c17e1a868a92354dd91f0d018f6c4ebd9c691891319b65afff8650d32
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / webgeodyn-0.10.5-py3-none-any.whl

Download URL webgeodyn-0.10.5-py3-none-any.whl
Size 11.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
c19218131f81f9d9a20402e97c339af90b9bd5c6a7bf98e59e9fe267aef446f4
BLAKE2b-256 checksum
How to use checksums
827cd7d904d487e5f29e3de586ab18f9b7a7825a4e562cc67a638a624b0d9558
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.10.5 This release

2 release files

0.10.4

2 release files

0.10.3

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.2

2 release files

0.9.1

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 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