OceanBrowser

From GHER

Jump to: navigation, search

OceanBrowser allows to visualize gridded fields on-line.

It is used in SeaDataNet (http://gher-diva.phys.ulg.ac.be/web-vis/), chemical data in EMODNET (http://gher-diva.phys.ulg.ac.be/emodnet/) and for data set product by the GHER (http://gher-diva.phys.ulg.ac.be/gher-data/).


Within the SeaDataNet and EMODNET (Chemical lot) projects, several national ocean data centers have created gridded climatologies of different ocean properties using the data analysis software DIVA. In order to give a common viewing service to those interpolated products, the GHER has developed OceanBrowser which is based on open standards from the Open Geospatial Consortium (OGC), in particular Web Map Service (WMS) and Web Feature Service (WFS). These standards define a protocol for describing, requesting and querying two-dimensional maps at a given depth and time. The software OceanBrowser is composed by a client and server part. The server essentially supports the standardized requests for listing all available layers and format and projection in which they are available, provides a rendered picture of the required layer, and provides additional information of a given location (often the value of the field). The server is built entirely upon open source software. It is written in python using Matplotlib and basemap for graphical output. It is embedded in Apache and runs on a dedicated Linux server (two Intel Xeon E5420 quad-cores) at the University of Liege. The client part runs in a web browser and uses the JavaScript library OpenLayers to display the layers from the server. A simplified version of OceanBrowser is also used in Diva-on-web, an on-line tool to create interpolated fields from in situ ocean data.


Contents

Features

OceanBrowser currently supports the following operations:


  • Horizontal sections of the 4-dimensional fields (longitude, latitude, depth and time) can be visualized at a selected depth and time. The climatological fields can also be interpolated and visualized on arbitrary vertical sections (Figure 1).
  • The maps displayed in the browser are created dynamically and therefore several options are made available to the user to customize the graphical rending of those layers. Layers can be displayed either using interpolated shading, filled contours or simple contours and several options controlling the color-map are also available.
  • The horizontal and vertical sections can be animated in order to study the evolution in time.
  • Image can be saved in raster format (PNG) and vector image formats (SVG, EPS, PDF). It can also be saved as a KML file so that the current layer can be visualized in programs like Google Earth and it can be combined with other information imported in such programs.
  • The underlying 4-dimensional NetCDF file can be either downloaded as a whole from the interface or only as a subset using the linked OPeNDAP server based on pydap.
  • The web interface can also import third-party layers by using standard WMS requests. The user needs only to specify the URL of the WMS server and its supported version.
  • Several data sets can be visualized at the same time. For example, ocean temperature from the North Sea, Atlantic Ocean and Mediterranean Sea can be visualized at the same time. The consistency of the several ocean products in adjacent regions can be easily assessed and potential problems can be highlighted (Figure 1). This feature is available for horizontal as well for as for vertical sections. By choosing simple contours of one field in combination with filled contours of other field one visually sees the correspondence or location of frontal structures.

Future outlook

The upcoming HTML5 standard brings a large range of new features to modern web browsers which will also be useful to visualize ocean data. WebGL is a technology which allows displaying 3 dimensional data in a web browser using hardware acceleration. An experimental JavaScript library, called EarthGL (figure 2), has been developed which allows displaying horizontal and vertical sections of ocean fields on a globe with realistic topography [6]. This JavaScript library is strongly inspired by OpenLayers and should be familiar to developers using the library. WebGL is currently supported by Google Chrome (version 9) and the development version of Mozilla Firefox and Safari.

Basic Usage

  • Select a domain and variable in the "Add layer" dialog.
  • Per default the surface layer and the first time slice is shown. This can be changed in the depth and time select boxes next to the color bar (on the right). After the choice is confirmed by clicking on 'Plot/update', the map is redrawn.
  • The appearance of the field can be customized by clicking on the style button (config.png).
  • To remove a field from the map, click on the cross (close.png) next to the color bar (on the right).

Icons

  • zoom-plus-mini.png: zoom in
  • zoom-minus-mini.png: zoom out
  • zoom-world-mini.png: reset zoom
  • north-mini.png, east-mini.png, south-mini.png, west-mini.png: move to North, East, South or West
  • include-all-layers.png: Change zoom level to include all layers
  • panning-hand-on.png, panning-hand-off.png: panning mode is enabled (default) or disabled
  • drag-rectangle-on.png, drag-rectangle-off.png: zoom by drawing a rectangle is enabled or disabled (default). Click to draw a first corner of the rectangle and then drag it to the desired size.

Downloading data products

You can open the download dialog by clicking on the download icon (download.png) next to the color bar. You can either download the data (netCDF or OPeNDAP) or download images for the current layer.

Data products

Data products can be downloaded as NetCDF files by using the button labeled "Download NetCDF". A NetCDF file will contain the DIVA analysis for a single parameter as well as meta data as NetCDF attributes. User can also download subset of the data products by using the button "OPeNDAP Service". By click this button, a new window will open with the attributes of the NetCDF file. The URL of this window need to be copied into your OPeNDAP application.

Useful software to access the data in netCDF/OPeNDAP are:

ncBrowse
A Graphical netCDF File Browser
Panoply
netCDF, HDF and GRIB Data Viewer
Ncview
a netCDF visual browser

Images

It is also possible to download the current view as an image file by specifying the width and height of the image and the longitude and latitude range.

Feedback

Question and comments can be addressed to Alexander Barth (a dot barth at ulg dot ac dot be)

Adding files

Gridded field

NetCDF attributes

The basic idea of OceanBrowser is to impose the least constraint on the netCDF file. Here is a summary of rules used to create the virtual folder hierarchy:

  • Every folder under the root directory appears as a virtual folder in the web browser
  • Every netCDF file appears also as a virtual folder. Its name is the global netCDF attribute title. If this attribute does not exist then the global netCDF attribute description is used. If none of those attributes are found then the netCDF file name is used.
  • The long_name attribute of the variables is used to list the netCDF variable. If this attribute does not exist, the netCDF variable name is used.
  • The units attribute is also used and displayed

Grid specification

The netCDF variable that represent the space-time grid must satisfy certain requirements to be recognized:

Dimension netCDF variable name Units
longitude must contain 'lon' or be equal to x degree east (only between -180 and 180)
latitude must contain 'lat' or be equal to y degree north
depth depth or z m
time must contain 'time' or be equal to t arbitrary (specified in units attribute)

Notes:

  • the coordinate variable depth and time should not depend on longitude and latitude
  • The time and depth dimension may be omitted.
  • The netCDF coordinate variables and parameter must have the same dimension name
  • The netCDF file may contain much more attributes which are ignored
  • A data set should not be split across several file (one data set -> one file). For example, instead of having one file for different time instances, the time dimension should be embedded in the netcdf file.
  • Where possible, the file should be CF compliant (http://cf-pcmdi.llnl.gov/documents/cf-conventions/1.4/cf-conventions.html). You can check if your files are CF compliant here
  • According to the CF convention, the order of the dimensions must be: time, depth, latitude and longitude
  • If the variables contains some missing values or land point, then the variable should have the attribute _FillValue (of the same type than the netCDF variable). All grid points corresponding to those missing values or land point, should be equal to this fill value. This fill value should be a regular number (non NaN or Inf) outside of the range of typical values of the variable.


The ncdump output of a minimal example netCDF file that can be used:

netcdf data.nc {
dimensions:
	time = 100 ;
	lon = 70 ;
	lat = 80 ;
variables:
	float time(time) ;
		time:units = "days since 1900-01-01" ;
	float lon(lon) ;
		lon:units = "degree_east" ;
	float lat(lat) ;
		lat:units = "degree_north" ;
	float temperature(time, lat, lon) ;
		temperature:long_name = "Temperature" ;
		temperature:units = "degree_Celsius" ;
		temperature:_FillValue = -999.f ;

        :institution = "Your institution" ;
        :title = "Temperature of Ligurian Sea" ;
}

Uploading files

Before uploading a file, please:

  • check visually the interpolated field, and
  • verify the required netCDF attributes (in particular long_name, unit, title, institution (see above)) are present and accurate. NetCDF attributes can be edited by using programs like matlab, octave, nco, ...

If you notice strange characters in one of the attribute, you can edit with the command ncatted, available within nco program. Here is a small example:

ncatted -O -a date,global,o,c,2010-08-15 filename.nc
  • date = name of the attribute
  • global = name of the variable
  • o = overwrite
  • c = character

So this command will replace the actual value of 'date' by the chain of characters '2010-08-15'.

To upload a new file, you need the program sftp (not regular ftp). sftp is default on linux. On Windows you will need a program like WinSCP, putty or FileZilla.

A sample session of uploading a file 'file' in directory 'dir' would be on linux:

sftp usename@gher-diva.phys.ulg.ac.be
Connecting to gher-diva.phys.ulg.ac.be...
username@gher-diva.phys.ulg.ac.be's password:
sftp> ls
...
sftp> cd dir
sftp> put file
Uploading file to /home/username/file
...
sftp> quit

Contact us for the username and password. After the file upload, the viewer is not updated automatically. Please sent us an email so that we can update the viewing service. SeaDataNet file should go in the directory SeaDataNet and EMODNET files, in the directory EMODNET.

XML description generated by divadoxml should be submitted to Sextant following the instructions here: http://www.ifremer.fr/isi/sextant/emodnet-chemistry/EMODNET-CHEMISTRY-QUICKSTART-1.0.pdf. If you have any question about submitting the XML file, you can contact Ifremer at sextant@ifremer.fr.

Observation index files

Format

The index file is an ASCII table where the columns are separated by space (at least one space character). Each line of this file describes a plot. The index file has at least 9 columns:

  1. longitude (in decimal degrees East)
  2. latitude (in decimal degrees North)
  3. start depth (in meters, positive in water)
  4. end depth (in meters, positive in water)
  5. start time (yyyy-mm-ddTHH:MM:SS)
  6. end time (yyyy-mm-ddTHH:MM:SS)
  7. P011-code
  8. absolute URL of the image. If the image should be hosted on our server, the URL has the following structure: http://gher-diva.phys.ulg.ac.be/emodnet-chemistry/images/<institution>/<filename.svg>. The filename should only contain letters (a-z,A-Z), digits (0-9), underscore (_), hyphen (-) and dot (.). Using other characters (including a space) causes problems.
  9. comma-separated list of global CDI identifiers used in the image.

The dot is used as decimal separator. Columns 7, 8 and 9 can be repeated multiple times if there are various parameters measured at the same location and time span. Lines starting with // are comments and are ignored.

For example:

13.596167       45.663833       0       0       2006-05-10T00:00:00     2007-02-13T00:00:00     SDN:P011::AMONAADC      http://gher-diva.phys.ulg.ac.be/emodnet-chemistry/images/OGS/ECOMADR_1_SED_0_AMONAADC.svg SDN:CDI:12345,SDN:CDI:12346

Guidelines for plots

  • It is suggested to use ODV for manual generation of plots (other tools might be used for batch mode).
  • The minimum number of points per plot should be 4 or 5.
  • Data centers will generate plots in EPS format (one of the formats available using ODV) and then convert them in SVG format with software like Inkscape (Linux) or IRFAN View (Windows). SVG plots will be visualized through the Ocean Browser service.
  • Only the SVG files will be submitted to OceanBrowser.
  • Scatter points plots should be used without lines to connect plotted measures.


For more information see the Action List of the Liverpool meeting (24 November 2011).

Submitting

Before you submit:

  • check that all plots are fine
  • check that the index file has the correct format
  • check your CDIs. For example the CDI SDN:CDI:285916 should be in the Maris CDI catalog at the address:

http://seadatanet.maris2.nl/v_cdi_v3/print_ajax.asp?n_code=285916

Send the new products to emodnet-timeseriesprod at googlegroups dot com for a general revision about guidelines points: temporal resolution, data availability, software used...before publishing to the Ocean Browser

Acknowledgements

Funding was provided by SeaDataNet (FP7) and Emodnet Chemistry (DG-MARE).

GEBCO project is acknowledged for providing the GEBCO world map, http://www.gebco.net/

Personal tools