Overview
Introduction to Magics
The Meteorological Applications Graphics Integrated Colour System
(MAGICS) is a software system that permits the
plotting of contours, wind fields, observations, satellite images,
symbols, streamlines, isotachs, text, axis and graphs and pie charts.
Magics is developed by the Meteorological Visualisation Section at ECMWF
and is used to generate many of its plots - on the
web, in the MetOps room, for data monitoring and verification. Magics
is the graphics engine used in ECMWF's meteorological workstation Metview and
Meteo-France's Synergie meteorological workstation. It is used within many
ECMWF's Member States and other organisations around the world.
Magics contouring is based on
CONICON, developed by the University of Bath in the United Kingdom. Linear
contouring is also available.
Magics observation plotting is
based on a package developed by the Meteorological services of
Denmark and Sweden. Magics streamline plotting is based on an
algorithm supplied by Florida State University, Florida,
USA.
Magics is meteorological oriented and forecasts and analysis fields may be read in various formats, for
instance GRIB and NetCDF. Observations can be read from BUFR files or retrieved from an ODB
database. For more details, see .
The following diagram shows the top-level architecture of Magics++:
MAGICS History
The first pre-release of MAGICS,
version 0.3, was released as a FORTRAN library in July 1985 on a trial
basis. This release contained facilities for plot layout as well as
contouring, coastlines and text headings. At the same time the first
versions of the
MAGICS manuals
were released. With minor enhancements, this version became operational
in December 1985. The first full release of
MAGICS, version
1.0, became available in December 1987 and incorporated many new
features. Subsequent releases have introduced extra features as they
became available, such as linear contouring, axis plotting, streamlines
and isotachs, graph and pie charts, symbol plotting and satellite image
plotting.
Development of MAGICS 6 was frozen in 2008;
development of Magics++ started in 2004.
Magics++
Magics++ represents a
complete re-write of the Magics source code.
Whereas previous versions were
written mainly in FORTRAN with some C++ code for the output drivers,
Magics++ is written entirely in C++. This development makes
Magics more flexible, allowing new features
to be added more easily. Although Magics++ is
intended to be as backwardly compatible as possible with the previous
Fortran interface, there are new ways of doing some things - these will be
highlighted in the text of this manual with the following notation:
Magics++This is new to, or has been changed in Magics++.
Perhaps the biggest change is that
Magics is no longer just a FORTRAN library.
Plot descriptions can now also be written in an XML-based format called
MagML and programs can now also be written in
C and Python.
Magics can now read data from a wider
variety of sources.
NetCDF data is supported (see
).
By using the new GRIB_API library, Magics
is able to read GRIB 2 files as well as GRIB 1 files.
Note that Magics currently does not support
interpolation of grids - all GRIB data must be in regular or reduced Gaussian or Lat/Long grid.
WHEN WILL WE HAVE INTERPOLATION?
The output drivers have also been expanded. PostScript remains,
and in addition there are drivers that can produce plots in PDF, EPS,
PNG, GIF and SVG formats amongst others. Magics
now has the ability to produce multiple outputs from a single program by
using multiple drivers 'simultaneously', delivering significant speed
benefits over using an external tool to convert PostScript output or
running a program twice to produce different outputs.
The CONICON contouring package formerly used by
Magics has been replaced with a method using
the Akima interpolation algorithms. By default,
Magics will try to choose a level of
interpolation that gives good quality results without sacrificing
performance; the user can also set the interpolation level manually if
needed. Linear contouring is still available.
The user now has more flexibility in determining the resolution of
coastlines used in plots. Magics++ comes with
higher resolution coastline files than previous versions but uses
lower-resolution files where appropriate in order to save time and
reduce the size of the output file; this behaviour is
user-configurable. These coastline files now include basic
support for rivers and lakes.
Legend? Text & annotation?
Magics webpage
Magics++ Overview
Magics++ 2.8 - New developments
Magics Features
Magics contains many powerful features:
Comprehensive list of simple English language parameters
Extensive use of colour
Flexible programming interface (API) for multiple languages (Fortran, C, Python, XML)
Selection of geographical area and direct projection of
data
Matrix, GRIB, BUFR, ODB and NetCDF data input(see )
Coastline rendering with automatic quality-selection for
high quality with minimal output file size.
High quality contouring based on Akima interpolation and lower
quality linear contouring (see )
Shading between contour lines
Wind fields directly projected, as arrows or WMO flags (see )
Streamline and Isotach plotting
Observation plotting
Graph and Axis plotting, with advanced features such as Boxplots
Symbol plotting
Satellite image plotting
High quality text plotting (see )
Advanced legend plotting
Page Layout
To make the positioning of user's plots simple,
Magics has introduced the concepts of
subpage, page and super-page.
A super-page corresponds to the plotting area to be used on a
plotting device. With the plot layout facilities, pages can be
positioned automatically or by the user inside the super-page.
Similarly, one or more subpages can be plotted inside a page.
Page Layout is fully described in
.
Programming Interfaces
A typical FORTRAN Magics program
consists of a series of parameter-setting, action and pseudo action
routines. The parameters required by an action routine should be set, if
required, before that action routine is called.
An alternative, XML-based plot description language is also available.
It is called MagML and permits simple yet powerful plot
descriptions to be used to generate plots without the need for a compile/link
cycle.
The programming interfaces offered by Magics are
fully described in .