DIVAnd
DIVAnd performs an n-dimensional variational analysis of arbitrarily located observations
Science Score: 67.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 5 DOI reference(s) in README -
✓Academic publication links
Links to: science.org, zenodo.org -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.0%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
DIVAnd performs an n-dimensional variational analysis of arbitrarily located observations
Basic Info
Statistics
- Stars: 79
- Watchers: 6
- Forks: 14
- Open Issues: 3
- Releases: 34
Topics
Metadata Files
README.md
DIVAnd

DIVAnd (Data-Interpolating Variational Analysis in n dimensions) performs an n-dimensional variational analysis/gridding of arbitrarily located observations. Observations will be interpolated/analyzed on a curvilinear grid in 1, 2, 3 or more dimensions. In this sense it is a generalization of the original two-dimensional DIVA version (still available here https://github.com/gher-uliege/DIVA but not further developed anymore).
The method bears some similarities and equivalences with Optimal Interpolation or Krigging in that it allows to create a smooth and continous field from a collection of observations, observations which can be affected by errors. The analysis method is however different in practise, allowing to take into account topological features, physical constraints etc in a natural way. The method was initially developped with ocean data in mind, but it can be applied to any field where localized observations have to be used to produce gridded fields which are "smooth".
See also https://gher-uliege.github.io/DIVAnd-presentation/#1
Please cite this paper as follows if you use DIVAnd in a publication:
Barth, A., Beckers, J.-M., Troupin, C., Alvera-Azcárate, A., and Vandenbulcke, L.: DIVAnd-1.0: n-dimensional variational data analysis for ocean observations, Geosci. Model Dev., 7, 225-241, doi:10.5194/gmd-7-225-2014, 2014.
(click here for the BibTeX entry).
Summary of features
- N-Dimensional analysis/interpolation
- Scattered data
- Noise allowed
- Physical constraints can be added
- Inequality constraints can be added
- Topological constraints are handled naturally (barriers, holes)
- Analysis error maps can be estimated
- Periodicity in selected directions can be enforced
- Multivariate data can be used (experimental)
- The output grid can be curvilinear
- Instead of interpolating scattered data you can also peform Kernel Density Estimations with the points.
Installing
You need Julia (version 1.6 or later) to run DIVAnd. The command line version is sufficient for DIVAnd.
Inside a Julia terminal, you can download and install the package by issuing:
julia
using Pkg
Pkg.add("DIVAnd")
It is not recommended to download the source of DIVAnd.jl directly (using the green Clone or Download button above) because this by-passes Julia's package manager and you would need to install the dependencies of DIVAnd.jl manually.
Cloud environment
DIVAnd is also available in the BlueCloud virtual research environement implemented by D4Science:
https://blue-cloud.d4science.org/group/coastalcurrentsfromobservations
Note that BlueCloud supports several authentication mechanisms, it is quite likely that you have already credentials that can be used to register and sign-in.
From the drop-down menue Analytics, choose JupyterLab on D4Science then select the DIVAnd environement.
Updating DIVAnd
To update DIVAnd, run the following command and restart Julia (or restart the jupyter notebook kernel using Kernel -> Restart):
julia
using Pkg
Pkg.update("DIVAnd")
Note that Julia does not directly delete the previous installed version. To check if you have the latest version run the following command:
julia
using Pkg
Pkg.status()
The latest version number is available from here.
To explicitly install a given version X.Y.Z you can also use:
julia
using Pkg
Pkg.add(name="DIVAnd", version="X.Y.Z")
Or the master version:
julia
using Pkg
Pkg.add(name="DIVAnd", rev="master")
Testing
A test script is included to verify the correct functioning of the toolbox.
The script should be run in a Julia session.
Make sure to be in a directory with write-access (for example your home directory).
You can change the directory to your home directory with the cd(homedir()) command.
julia
using Pkg
Pkg.test("DIVAnd")
All tests should pass without error (it can take several minutes).
INFO: Testing DIVAnd
Test Summary: | Pass Total
DIVAnd | 461 461
INFO: DIVAnd tests passed
The test suite will download some sample data. You need to have Internet access and run the test function from a directory with write access.
Documentation
The main routine of this toolbox is called DIVAnd which performs an n-dimensional variational analysis of arbitrarily located observations. Type the following in Julia to view a list of parameters:
julia
using DIVAnd
?DIVAndrun
see also https://gher-uliege.github.io/DIVAnd.jl/latest/index.html
Example
DIVAndsimpleexample_4D.jl is a basic example in fours dimensions. The call to DIVAndrun looks like this:
```julia fi,s = DIVAndrun(mask,(pm,pn,po,pq),(xi,yi,zi,ti),(x,y,z,t),f,len,epsilon2);
``
where
maskis the land-sea mask, usually obtained from the bathymetry/topography,
(pm,pn,po,pq)is a *n*-element tuple (4 in this case) containing the scale factors of the grid,
(xi,yi,zi,ti)is a *n*-element tuple containing the coordinates of the final grid,
(x,y,z,t)is a *n*-element tuple containing the coordinates of the observations,
fis the data anomalies (with respect to a background field),
lenis the correlation length and
epsilon2` is the error variance of the observations.
The call returns fi, the analyzed field on the grid (xi,yi,zi,ti).
More examples are available in the notebooks from the Diva Workshop.
Note on which analysis function to use
DIVAndrun is the core analysis function in n dimensions. It does not know anything about the physical parameters or units you work with. Coordinates can also be very general. The only constraint is that the metrics (pm,pn,po,...) when multiplied by the corresponding length scales len lead to non-dimensional parameters. Furthermore the coordinates of the output grid (xi,yi,zi,...) need to have the same units as the observation coordinates (x,y,z,...).
DIVAndfun is a version with a minimal set of parameters (the coordinates and values of observations, i.e. (x,f), the remaining parameters being optional) and provides an interpolation function rather than an already gridded field.
diva3D is a higher-level function specifically designed for climatological analysis of data on Earth, using longitude/latitude/depth/time coordinates and correlations length in meters. It makes the necessary preparation of metrics, parameter optimizations etc you normally would program yourself before calling the analysis function DIVAndrun.
DIVAnd_heatmap can be used for additive data and produces Kernel Density Estimations.
DIVAndgo is only needed for very large problems when a call to DIVAndrun leads to memory or CPU time problems. This function tries to decide which solver (direct or iterative) to use and how to make an automatic domain decomposition. Not all options from DIVAndrun are available.
If you want to try out multivariate approaches, you can look at DIVAnd_multivarEOF and DIVAnd_multivarJAC
Note about the background field
If zero is not a valid first guess for your variable (as it is the case for e.g. ocean temperature), you have to subtract the first guess from the observations before calling DIVAnd and then add the first guess back in.
Determining the analysis parameters
The parameter epsilon2 and parameter len are crucial for the analysis.
epsilon2 corresponds to the inverse of the signal-to-noise ratio. epsilon2 is the normalized variance of observation error (i.e. divided by the background error variance). Therefore, its value depends on how accurate and how representative the observations are.
len corresponds to the correlation length and the value of len can sometimes be determined by physical arguments. Note that there should be one correlation length per dimension of the analysis.
One statistical way to determine the parameter(s) is to do a cross-validation.
- choose, at random, a relatively small subset of observations (about 5%). This is the validation data set.
- make the analysis without your validation data set
- compare the analysis to your validation data set and compute the RMS difference
- repeat steps 2 and 3 with different values of the parameters and try to minimize the RMS difference.
You can repeat all steps with a different validation data set to ensure that the optimal parameter values are robust. Tools to help you are included in (DIVAnd_cv.jl).
Note about the error fields
DIVAnd allows the calculation of the analysis error variance, scaled by the background error variance. Though it can be calculated "exactly" using the diagonal of the error covariance matrix s.P, it is generally too costly and approximations are provided. All of them are accessible as options via DIVAnd_errormap or you can let DIVAnd decide which version to use (possibly by specifying if you just need a quick estimate or a version closer the theoretical estimate) (see Beckers et al 2014 )
Advanced usage
Additional constraint
An arbitrary number of additional quadratic constraints can be included to the cost function which should have the following form:
J(x) = ∑i (Ci x - zi)ᵀ Qi-1 (Ci x - zi)
For every constrain, a structure with the following fields is passed to DIVAnd:
yo: the vector ziH: the matrix CiR: the matrix Qi (symmetric and positive defined)
Internally the observations are also implemented as constraint defined in this way.
Additional inequality constraint
An arbitrary number of additional inequality constraints can be included and which should have the following form:
(Hi x > yoi)
For every constraint, a structure with the following fields is passed to DIVAnd:
yo: a vectorH: a matrix
Run notebooks on a server which has no graphical interface
On the server, launch the notebook with:
bash
jupyter-notebook --no-browser --ip='0.0.0.0' --port=8888
where the path to jupyter-notebook might have to be adapted, depending on your installation. The ip and port parameters can also be modified.
Then from the local machine it is possible to connect to the server through the browser.
Thanks to Lennert and Bart (VLIZ) for this trick.
Example data
Some examples in DIVAnd.jl use a quite large data set which cannot be efficiently distributed through git. This data can be downloaded from the URL https://dox.ulg.ac.be/index.php/s/Bo01EicxnMgP9E3/download. The zip file should be decompressed and the directory DIVAnd-example-data should be placed on the same level than the directory DIVAnd.jl.
Reporting issues
Please include the following information when reporting an issue:
- Version of Julia
- Version of DIVAnd
- Operating system
- Full screen output preferably obtained by setting
ENV["JULIA_DEBUG"] = "DIVAnd". - Full stack strace with error message
- A short description of the problem
- The command and their arguments which produced the error
Note that only official julia builds are supported.
In all cases, if we provide a tentative solution, please provide a feedback in all cases (whether it solved your issue or not).
Fun
An educational web application has been developed to reconstruct a field based on point "observations". The user must choose in an optimal way the location of 10 observations such that the analysed field obtained by DIVAnd based on these observations is as close as possible to the original field.
You do not want to use Julia
You should really reconsider and try out Julia. It is easy to use and provides the native interface to DIVAnd.
If you have a stable workflow using python, into which you want to integrate DIVAnd, you might try
https://github.com/gher-uliege/DIVAnd.py
Owner
- Name: GHER
- Login: gher-uliege
- Kind: organization
- Location: Sart Tilman, Liège, Belgium
- Website: https://www.gher.uliege.be
- Twitter: GHER_ULiege
- Repositories: 48
- Profile: https://github.com/gher-uliege
The GHER is a research group of the University of Liège. It is focused on marine and environmental study and modelling.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: DIVAnd.jl
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Alexander
family-names: Barth
orcid: 'https://orcid.org/0000-0003-2952-5997'
email: A.Barth@uliege.be
affiliation: 'GHER, University of Liège'
- given-names: Jean-Marie
family-names: Beckers
email: JM.Beckers@uliege.be
affiliation: 'GHER, University of Liège'
orcid: 'https://orcid.org/0000-0002-7045-2470'
- given-names: Charles
family-names: Troupin
email: ctroupin@uliege.be
affiliation: 'GHER, University of Liège'
orcid: 'https://orcid.org/0000-0002-0265-1021'
- given-names: Menashè
family-names: Eliezer
- given-names: Benoit
family-names: Pasquier
affiliation: University of New South Wales
orcid: 'https://orcid.org/0000-0002-3838-5976'
- given-names: 'Katrin '
family-names: Leinweber
affiliation: Technische Informationsbibliothek (TIB)
orcid: 'https://orcid.org/0000-0001-5135-5758'
identifiers:
- type: doi
value: 10.5281/zenodo.1303229
description: Zenodo
- type: swh
value: 'swh:1:dir:d1dc29fdd3ca9b817a26a387dad5fc6f06060d37'
- type: doi
value: 10.5194/gmd-7-225-2014
description: 'Publication '
repository-code: 'https://github.com/gher-uliege/DIVAnd.jl'
keywords:
- Oceanography
- Data interpolation
- Data analysis
license: GPL-2.0
commit: a2412dbf3100dbe338965f672f57e74cb882d381
version: v2.7.13
date-released: '2025-08-05'
CodeMeta (codemeta.json)
{
"@context": "https://doi.org/10.5063/schema/codemeta-2.0",
"type": "SoftwareSourceCode",
"applicationCategory": "Oceanography",
"author": [
{
"id": "https://orcid.org/0000-0003-2952-5997",
"type": "Person",
"affiliation": {
"type": "Organization",
"name": "University of Lige"
},
"email": "A.barth@uliege.be",
"familyName": "Barth",
"givenName": "Alexander"
},
{
"id": "https://orcid.org/0000-0002-7045-2470",
"type": "Person",
"affiliation": {
"type": "Organization",
"name": "University of Lige"
},
"email": "JM.Beckers@uliege.be",
"familyName": "Beckers",
"givenName": "Jean-Marie"
}
],
"codeRepository": "https://github.com/gher-uliege/DIVAnd.jl",
"dateCreated": "2016-11-28",
"dateModified": "2024-09-19",
"datePublished": "2018-07-03",
"description": "DIVAnd (Data-Interpolating Variational Analysis in n dimensions) performs an n-dimensional variational analysis/gridding of arbitrarily located observations. Observations will be interpolated/analyzed on a curvilinear grid in 1, 2, 3 or more dimensions. In this sense it is a generalization of the original two-dimensional DIVA version.",
"downloadUrl": "https://github.com/gher-uliege/DIVAnd.jl/archive/refs/tags/v2.7.12.zip",
"identifier": "10.5281/zenodo.1303229",
"keywords": [
"Oceanography",
"interpolation",
"gridding"
],
"license": "https://spdx.org/licenses/GPL-2.0",
"name": "DIVAnd",
"operatingSystem": [
"Linux",
"Windows",
"MacOS"
],
"programmingLanguage": "Julia",
"version": "2.7.12",
"contIntegration": "https://github.com/gher-uliege/DIVAnd.jl/actions/workflows/CI.yml",
"codemeta:continuousIntegration": {
"id": "https://github.com/gher-uliege/DIVAnd.jl/actions/workflows/CI.yml"
},
"developmentStatus": "active",
"issueTracker": "https://github.com/gher-uliege/DIVAnd.jl/issues",
"referencePublication": "https://doi.org/10.5194/gmd-7-225-2014"
}
GitHub Events
Total
- Create event: 4
- Release event: 3
- Issues event: 8
- Watch event: 6
- Issue comment event: 7
- Push event: 14
- Pull request event: 2
- Fork event: 2
Last Year
- Create event: 4
- Release event: 3
- Issues event: 8
- Watch event: 6
- Issue comment event: 7
- Push event: 14
- Pull request event: 2
- Fork event: 2
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Alexander Barth | b****r@g****m | 1,309 |
| jmbeckers | j****s@u****e | 281 |
| ctroupin | c****n@g****m | 137 |
| Troupin Charles | c****n@u****e | 12 |
| CompatHelper Julia | c****y@j****g | 11 |
| meliezer | m****r@g****m | 8 |
| github-actions[bot] | 4****] | 8 |
| meliezer | m****r@i****t | 3 |
| Alexander Barth | a****h@u****e | 3 |
| Alexander Barth | e****l@e****m | 2 |
| Katrin Leinweber | k****i@p****e | 1 |
| Julia TagBot | 5****t | 1 |
| Benoit Pasquier | 4****c | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 77
- Total pull requests: 43
- Average time to close issues: 3 months
- Average time to close pull requests: 15 days
- Total issue authors: 22
- Total pull request authors: 7
- Average comments per issue: 6.56
- Average comments per pull request: 1.05
- Merged pull requests: 32
- Bot issues: 0
- Bot pull requests: 26
Past Year
- Issues: 5
- Pull requests: 4
- Average time to close issues: 1 day
- Average time to close pull requests: 4 months
- Issue authors: 4
- Pull request authors: 1
- Average comments per issue: 1.2
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 4
Top Authors
Issue Authors
- ctroupin (26)
- JianghuiDu (9)
- meliezer (8)
- ax1ine (4)
- qcazenave (3)
- GeoTuxMan (3)
- jmbeckers (3)
- croachutas (2)
- Fanningjin (2)
- Alexander-Barth (2)
- Leon6j (2)
- josselin-aval (2)
- MartinHanssonSMHI (2)
- JuliaTagBot (1)
- ChrisC28 (1)
Pull Request Authors
- github-actions[bot] (26)
- meliezer (6)
- jmbeckers (6)
- Alexander-Barth (2)
- katrinleinweber (1)
- briochemc (1)
- JuliaTagBot (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 50 total
- Total dependent packages: 2
- Total dependent repositories: 4
- Total versions: 29
juliahub.com: DIVAnd
DIVAnd performs an n-dimensional variational analysis of arbitrarily located observations
- Documentation: https://docs.juliahub.com/General/DIVAnd/stable/
- License: GPL-2.0
-
Latest release: 2.7.12
published over 1 year ago
Rankings
Dependencies
- JuliaRegistries/TagBot v1 composite
- actions/cache v1 composite
- actions/checkout v2 composite
- codecov/codecov-action v1 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-processcoverage v1 composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia v1 composite