Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

FormatparameterHow to visualiseWhat to use for
Qt/screen Metview display windowInteractive usage within Metview
PostScriptps/epsokular, ghostscript/gvPrinting, publications
PDFpdfokular, acroreadWeb, archiving, printing
PNGpngweb browsers, display, xvWeb, presentations -> animations
SVGsvgweb browsers, vector graphics editor (e.g. Inkscape)Web HTML5, for further editing in drawing programs
KML/KMZkmlGoogle Earth, Google Maps, OpenLayersInteractive (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: PostScriptSVG, PNG and KML.

Code Block
languagepy
titleSeeting multiple outputs in Metview Macro
linenumberstrue
#
# Setting common output options for multiple formats
#
output_common = ( 
      output_name            : "myOutputTest",   # specify relative or full path
      output_title           : "Map of Z500",    # title used by a viewer
      output_debug           : "ON"              # print extra information
)

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.

Image RemovedImage Added

If you have extra time

...