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