...
All graphical output formats are generated through ECMWF's graphics library Magics. This means that all graphical capabilities in Metview depend 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 that Magics/Metview support and how you can use them.
Format | parameter | How to visualise | What to use for |
---|---|---|---|
Qt/screen | Metview display window | Interactive usage within Metview | |
PostScript | ps/eps | okular, ghostscript/gv | Printing, publications |
okular, acroread | Web, archiving, printing | ||
PNG | png | web browsers, display, xv | Web, presentations -> animations |
SVG | svg | web browsers, vector graphics editor (e.g. Inkscape) | Web HTML5, for further editing in drawing programs |
KML/KMZ | kml | Google Earth, Google Maps, OpenLayers | Interactive (non-scientific) publications |
...
The following code example shows how to set multiple output formats at the same time and also set various parameters for the different output formats. Note that in most cases the default values are sufficient. A list of all options can found in the Magics documentation for each format at: PostScript, SVG, PNG and KML.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# # Setting common output options for multiple formats # output_common = ( output_name : "/tmp/myOutputTest", # specify relative or full path output_title : "Map of Z500", # title used by a viewer output_debug : "ON", # print extra information output_filelist : "ON", # save list of files generated output_filelist_name : "/tmp/filelist.txt" # where to save the list ) ps = ps_output( output_common, output_ps_scale : 0.9, # scale content to 90%, for some printers output_ps_colour_model : "CMYK" # set colour model to CYMK ) png = png_output( output_common, output_width : 1000, # set width in pixels output_cairo_transparent_background : "ON" # to get transparent PNGs ) svg = svg_output( output_common, output_width : 1000, # set width in pixels output_svg_fix_size : "ON", # this fixes the size to 'output_width' 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, # latitude where Google Earth centres the view kml_longitude : 120, # longitude where Google Earth centres the view kml_coastlines : "OFF" ) output_drivers = [ps, png, svg, kml] setoutput(output_drivers) data = read("z500.grib") plot(data) |
...
Of course you can do further processing of plots outside Metview. The page Generating animated GIFs from Metview plots gives you some helpful advice if you want to build animations.
Metview/Magics also supports special tags in SVG for the Inkscape graphical editor. This open source editor is great for when you need to further annotate your maps.
If you have extra time
...