Using Diva on web

From GHER

Jump to: navigation, search

Contents

What is the Diva web-interface

The Diva web-interface (available at http://gher-diva.phys.ulg.ac.be/web-vis/diva.html) is a web service to interpolate ocean data on a regular grid. It uses Data-Interpolating Variational Analysis (Diva) for the interpolation.

If you use the results generated by Diva-on-web, please include the following citation:

A. Barth, A. Alvera-Azcárate, C. Troupin, M. Ouberdous, and J.-M. Beckers. A web interface for griding arbitrarily distributed in situ data based on Data-Interpolating Variational Analysis (Diva). Advances in Geosciences, 28:29–37, 2010. doi: 10.5194/adgeo-28-29-2010. URL http://www.adv-geosci.net/28/29/2010/.

Using the Interface

Upload

Extracted data

The file containing the in situ data must must be an ASCII text file with three columns. The columns represent longitude, latitude and value of the observation respectively. For example:

     29.7667 45.15 16.146
     29.7667 45.15 16.346
     29.7667 45.15 16.526
     29.8167 45.15 2.016
     ...

The in situ data is thus extracted for a given time and depth (using programs such Ocean Data Data View).

ODV4 files

ODV4 files conforming to this standard (http://www.seadatanet.org/Standards-Software/Data-Transport-Formats) can also be used. In addition to the variable to analyse, the ODV4 file must have the columns named Station, Longitude, Latitude, Depth and time_ISO8601 (for time in yyyy-mm-ddThh:mm:ss.sss).

Multiple ODV4 files can also be placed in a zip file. All files in zip file are interpreted as ODV4 files. However files ending with metadata.csv are ignored.

Grid

Longitude and Latitude must be specified in decimal degrees North and East respectively. For example the latitude 77° 2' 56.4" W must be specified as -77.049. The depth level represents the distance between the sea surface and the horizontal plane where the analysis is performed.


Velocity files

For the advection constraint, a velocity field on a regular longitude/latitude grid can be provided. The increments in longitude and latitude must be constant and cover the entire domain of the analysis. The NetCDF file must have the following structure.

netcdf example {
dimensions:
	lon = 100 ; 
	lat = 81 ;
variables:
	double lon(lon) ;
		lon:standard_name = "longitude" ;
		lon:units = "degree_east" ;
	double lat(lat) ;
		lat:standard_name = "latitude" ;
		lat:units = "degree_north" ;
	double u(lat, lon) ;
		u:standard_name = "northward_sea_water_velocity" ;
		u:units = "m s-1" ;
	double v(lat, lon) ;
		v:standard_name = "eastward_sea_water_velocity" ;
		v:units = "m s-1" ;

// global attributes:
		:Conventions = "CF-1.5" ;
}

This would be the output of the command ncdump -h example.nc. Users of GNU Octave/Matlab could use the following code to generate a NetCDF file with the necessary format:

% load your data
%x = vector of longitude
%y = vector of latitude
%u = u-velocity (dimensions: longitude x latitude)
%v = v-velocity (dimensions: longitude x latitude)

filename = 'example.nc'; 
delete(filename);

nccreate(filename,'lon','Dimensions',{'lon',size(u,1)},'Format','classic');
ncwriteatt(filename,'lon','standard_name','longitude');
ncwriteatt(filename,'lon','units','degree_east');

nccreate(filename,'lat','Dimensions',{'lat',size(u,2)});
ncwriteatt(filename,'lat','standard_name','latitude');
ncwriteatt(filename,'lat','units','degree_north');

nccreate(filename,'u','Dimensions',{'lon','lat'});
ncwriteatt(filename,'u','standard_name','northward_sea_water_velocity');
ncwriteatt(filename,'u','units','m s-1');

nccreate(filename,'v','Dimensions',{'lon','lat'});
ncwriteatt(filename,'v','standard_name','eastward_sea_water_velocity');
ncwriteatt(filename,'v','units','m s-1');

ncwriteatt(filename,'/','Conventions','CF-1.5');

ncwrite(filename,'lon',x);
ncwrite(filename,'lat',y);
ncwrite(filename,'u',u);
ncwrite(filename,'v',v);

For GNU Octave, the package http://octave.sourceforge.net/netcdf/ is necessary to run this code.

Analysis

Correlation length
represents the typical distance over which two points are correlation (specified in decimal degrees).
Signal to noise ratio

Embed in your web site

You may embed the results of the analysis on your web site. Copy the code fragment in the embed box and paste it at the place in the HTML code where you want the figure to appear.

The analysis produced on the gher-diva server are regularly erased unless you requested to save the analysis.

<iframe src ="http://gher-diva.phys.ulg.ac.be/web-vis/mydiva-1.0.html?analysis=some_long_file_name&max_error=1&xmin=26&xmax=45.&ymin=40.&ymax=45.&vmin=13&vmax=26." 
 width="620" height="500" frameborder="0">
 </iframe>

The value of 'analysis' is a string which identified your analysis on our web server. It will be different for every analysis that you perform. You may change (or add) a posteriori the values of those parameters:

max_error
maximum relative error (default 1)
analysis_name
name of the analysis visible in the layer-switcher (default "Analysis");
errormask_name
name of the error mask visible in the layer-switcher (default "Error mask");
xmin, xmax, ymin, ymax
lon/lat range (default: query server; not always possible due to security restriction in the web-browser)
vmin, vmax
color-bar range (default: query server; not always possible due to security restriction in the web-browser)

A minimal example of an HTML page with embedded diva viewer:


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"></nowiki>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
    <title>Example for embeding mydiva</title>
  </head>
  <body>
    <h1>Example for embeding mydiva</h1>
     <p>Some text</p>
    
    <iframe src ="http://gher-diva.phys.ulg.ac.be/web-vis/mydiva-1.0.html?analysis=some_long_file_name&max_error=1&xmin=26&xmax=45.&ymin=40.&ymax=45.&vmin=13&vmax=26." 
       width="620" height="500" frameborder="0">
     </iframe>
    
    <p>Some more text</p>
  </body>
</html>
</nowiki>

Tested browsers

  • Firefox
  • Google Chrome
  • Internet Explorer

CPU time limit

We limited the CPU time for each user to ensure availability of the web service.

Image:cputime-exceeded.png

A too small correlation length, a too large domain or too many observations can result in an analysis which exceeds the CPU time.

Memory usage

Memory usage of the browser were measured after using divafit and after analyzing the Black sea surface salinity sample data.


Browser OS Memory Usage
Firefox 3.0 Linux (Ubuntu 8.04.1) 30 Mb
Firefox 3.0 Windows XP SP2 45 Mb
Google Chrome 1.0 Windows XP SP2 59 Mb
Safari 3.2.1 Windows XP SP2 58 Mb
Internet Explorer 7.0 Windows XP SP2 236 Mb

Firefox memory usage where obtained with all Add-on disabled. The Internet Explorer memory usage is not a joke. If you use Internet Explorer and you experience that the use of this page slows down your computer, consider to use a different brower with a lower memory footprint.

Personal tools