The analysed field generated by DIVA
(Data-Interpolating Variational Analysis) can be visualised using the WMS protocol which supports the following requests:
This request is used to provide all layers of the map server. To every parameter and to every region corresponds a different WMS layer. An example of such a request would be:
http://ec.oceanbrowser.net/emodnet/Python/web/wms?request=GetCapabilities&service=WMS&version=1.3.0
This request allows the extraction of a horizontal section of the 4D netCDF file at the specified depth and time (Example URL).
By default, the axis are not displayed on a map. This can be activated by setting the parameter DECORATED
to true
(Example URL).
The GetMap
can also be used to extract a vertical section (Example URL). The path of the section is encoded in the SECTION
parameter: the longitude and latitude are separated by a comma and the coordinates by the pipe-symbol (|
). The x-axis corresponds to the distance in arc degrees along the section (the first point is the origin) and the y-axis in the depth in meters. The parameter RATIO
defines the aspect ratio of the vertical section.
Images can be returned in raster (PNG) or vector image formats (SVG, EPS, PDF). They can also be saved as a KML file so that the current layer can be visualized in programs like Google Earth and combined with other information imported in such programs.
By providing multiple time instances, the web map server can also return animation in the WebM or MP4 formats using this GetMap request (Example URL. As the animations are generated dynamically, it usually takes a couple of minutes to create them. The frame rate of the animation is controlled through the parameter rate
.
This request returns a simple XML file with the underlying value of the analysed field (Example URL).
However, the WMS standards (in version 1.1.1 and 1.3.0) are not completely adequate for ocean analyses. A WMS allows one to represent a data set according to a list of different styles. A legend is attributed to each style which for scalar is colorbar. The legend for a given style is represented by a link to an image.
A single legend is used for the entire data set (for all depth layers and time instances in particular). However the ocean is strongly stratified and a unique legend does not provide sufficient contrast because the ocean properties at depth are often very different from the properties near the surface. The solution is to make the legend dynamic so that it can be adjusted based on a range of values at a specified depth and time.
OPeNDAP allows one to download and subset gridded datasets. The OPeNDAP product is nowadays included in the netCDF library so that most programs able to read netCDF files can also access remote datasets over OPeNDAP and download only the actual required data subset.
A Jupyter notebook illustrates the use of an EMODNET-Chemistry product using OPeNDAP. To run this example, it is necessary to install the following (free) software packages:
- Julia available from https://julialang.org/downloads/. The code is tested with the version 0.6 of Julia.
- Some Julia packages (NCDatasets, PyPlot and IJulia), which can be installed with these commands once you have started Julia:
Pkg.add("NCDatasets.jl")
Pkg.add("PyPlot")
Pkg.add("IJulia")