You have seen already how to visualise outputs
Table of Contents |
---|
Overview
Most processing you will do with Metview will lead to an visualisation you might want to save to either publish on web pages or reports air archive to keep records. This session will give you more information on how you can save and customise your visualisations.
Output formats
All graphical output formats are generated through ECMWF's graphics library Magics. This means that all graphical capabilities in Metview depends on what Magics offers. Detailed descriptions of the output formats and their settings can be found in the Magics reference documentation.
The table below gives you a list of all the formats Magics/Metview support and how you can use them.
Format | parameter | How to visualise | What to use for |
---|---|---|---|
Qt | Metview display window | Interactive usage within Metview | |
PostScript | ps/eps | okular, ghostscript/gv | Printing, publications |
okular, acroread | Web, archiving | ||
PNG | png | web browsers, display, xv | Web, presentations -> animations |
SVG | svg | web browsers, inkscape | Web HTML5, editing with inkscape |
KML/KMZ | kml | Google Earth, Google Maps, OpenLayers | Interactive publications |
Metadata
When a large amount of plots is generated it is often hard to find later plots with specific contents. What can help is to store additional information with the plots to describe what the content is. This descriptions about the content are called Metadata. Magics/Metview support the saving of such metadata when the format allows this. Especially in text/XML based formats, such as Postscript and SVG, you can use simple UNIX tools like grep to search the files for specific keywords.
How to save your visualisations
Here we quickly recap how you can save your display from the interactive plot window or save them within Macros.
Exporting from the plot window
Whenever you have a plot window open which displays any map or graph, you are able to export the plot into other file formats. You can either select the export button in the menu (looks like a disk)
...
You will get a dialogue as shown below
Exercises
Tasks
- From an open display window, try Try to save your plot as a PDF.
- Try Now try to save your plot as a SVG without and with fixed dimensions.
- Open both files in Firefox and see how the plots behave when you resize the browser window.
- Open one of the SVGs in inkscape and edit the images (for example add some text) and save it as a PDF.
Setting output formats in macro code
You have already seen in previous excesses how to save plots from macros.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
output_common = ( output_name : "/tmp/myOutputTest", output_width : 1000, output_title : "Map of Z500", output_debug : "ON", output_filelist : "ON", output_filelist_name : "/tmp/filelist.txt" ) ps = ps_output( output_common, output_ps_scale : 0.9, output_ps_colour_model : "CMYK" ) png = png_output( output_common, output_cairo_transparent_background : "ON" ) svg = svg_output( output_common, output_svg_fix_size : "ON", output_svg_meta : "Metview map of Z500", output_svg_desc : "This file was generated for the Training course" ) kml = kml_output( output_common, kml_description : "This file was generated for the Training course", kml_author : "Stephan Siemen", kml_link : "http://www.ecmwf.int", kml_latitude : 30, kml_longitude : 120, kml_coastlines : "ON" ) output_drivers = [ps, png, svg, kml] setoutput(output_drivers) data = read("z500.grib") plot(data) |
...
Importing graphical layers through OGC Web Map Services (WMS)
Metview provides a module to request maps from a Web Map Services (WMS (Web Map Service) module which ). The WMS standard is defined by the Open Geospatial Consortium (OGC), which is very popular in the GIS community. The WMS module can be used to query an OGC-compliant WMS server, retrieve maps from it and overlay them with other data. The following material describes the use of WMS within Metview.
- WMS Tutorial : mv_wms_tutorial.pdf
- Files required for the WMS tutorial: wms_tutorial.tar
Extra tasks
- Try the following WMS services:
- NASA: http://neowms.sci.gsfc.nasa.gov/wms/wms
- NOAA: