OceanBrowser

From GHER

Revision as of 10:50, 19 March 2012 by Alex (Talk | contribs)
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/).


Contents

Basic Usage

  • In the left column select a domain and variable. Click on the check-box to add the variable to the map
  • Per default the surface layer and the first time slice is shown. This can be changed in the depth and time select boxes. 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 button style.
  • To remove a field from the map, you need to un-check the check-box or click on the remove button.

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 rectange is enabled or disabled (default). Click to draw a first corner of the rectange and then drag it to the desired size.
  • info-on.png, info-off.png: querying a location by a simple click is enabled or disabled (default).

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)
  • 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 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.

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 saved as a EPS file. 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.eps>. 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 softwares 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 catalogue at the address:

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

You can either send the plots by email (a dot barth at ulg dot ac dot be) as an attached zip file (if size is less than 2M) or by uploading them to our sftp server (see above).

Personal tools