Menu

Tree [892187] master /
 History

HTTPS access


File Date Author Commit
 init-scripts 2013-07-11 Jesper Baasch-Larsen Jesper Baasch-Larsen [f49e8f] fixed various stuff
 lib 2018-01-30 Jesper Baasch-Larsen Jesper Baasch-Larsen [892187] wader depths
 scripts 2013-11-15 Jesper Baasch-Larsen Jesper Baasch-Larsen [7c305a] output to stdout/err for supervisor
 server 2017-12-12 Jesper Baasch-Larsen Jesper Baasch-Larsen [eea028] bottom current removed
 tests 2013-11-15 Jesper Baasch-Larsen Jesper Baasch-Larsen [573276] testing more methods
 .gitignore 2012-04-10 Jesper Larsen Jesper Larsen [520772] major updates
 BUGS 2013-06-14 Jesper Baasch-Larsen Jesper Baasch-Larsen [e40d80] added access controls + ais demo
 COPYING 2012-04-03 Jesper Larsen Jesper Larsen [e4e63b] initial import
 INSTALL 2012-04-03 Jesper Larsen Jesper Larsen [e4e63b] initial import
 MANIFEST.in 2012-04-03 Jesper Larsen Jesper Larsen [e4e63b] initial import
 README 2013-04-08 Jesper Baasch-Larsen Jesper Baasch-Larsen [37855f] added chunking recommendation
 TODO 2013-03-21 Jesper Baasch-Larsen Jesper Baasch-Larsen [3b3224] bug fixes
 setup.py 2013-07-10 Jesper Baasch-Larsen Jesper Baasch-Larsen [f73a26] fixed email

Read Me

METOC Server
------------
Provides an on request web interface to METOC information. METOC Server is 
distributed under the GPL v.3 License, see COPYING for the full license. 
Installation instructions can be found in the INSTALL file.

Usage instructions
------------------
The METOC Server uses NetCDF files as input. The METOC Server assumes that the 
input NetCDF files are Climate and Forecast (C/F) compliant. In 
the current version there are some further limitations that may be lifted 
in future versions. The most important is that it is assumed that the (lat, lon, 
time) dimensions are one-dimensional and monotonic increasing. This means that
only regular non-rotated grids are currently supported. If your forecast files
have dimensions that are monotonic decreasing you can easily reverse them using
for example NetCDF Operators (NCO).

Configuration file
------------------
The configuration file is a fixed configuration files which determines where the
script should look for NetCDF files and some other information. You can find an
example in examples/metoc_route/metoc.cfg. Here is a snippet of this file:

[Parameters]
  [[Wind]]
    [[[HIRLAM-S03]]]
      file_tmpl = '/home/metoc/data/NETCDF/HIRLAM_S03_${epoch10}.nc'
      ncvars = ['wd', 'ws']

"Wind" is the name you must use in the request for a a wind forecast. HIRLAM-S03 
is the name of the forecast. You can have multiple forecasts for each parameter. 
The METOC Server will then try the forecasts in the order they are written in the 
config file until a forecast value is found. The file_tmpl variable is a template 
which will be globbed to produce a list of forecast files. ${epoch10} and 
${epoch12} will be substituted in the globbing (with 10*[0-9] and 12*[0-9] 
respectively). The ncvars variable is a list of NetCDF variables that this 
forecast will provide. In the above examples we have wind direction (wd) and 
wind speed (ws).

Server
------
Go to the "server" directory. There you will find setup files for the METOC
server. You will have to modify the configuration files so that the paths in 
the file point to files on your system. You can then start 
the server by typing:

$ metoc_server.py metoc.cfg dev.cfg

When the server is started up you can test it by accessing it using your browser:

http://yourserver:8081/web

Performance
-----------
* Use chunking on NetCDF files for better performance:
  http://www.unidata.ucar.edu/software/netcdf/docs/guide_nccopy.html