There are four interfaces to Magics. The FORTRAN Interface provides the usage familiar to users of MAGICS 6; C and Python interfaces provide identical functionality for C and Python programmers; and an XML- and JSON-based interface  MagJSON, is interpreted plot descriptions that can be parsed and run without the need for a compile/link cycle.

A Magics program consists of calls to action routines, each of which is configured by changing zero or more parameters. Parameters in Magics are the attributes to be assigned to the various items that make up plotted output, such as line style, colour and size of plot. They can also be used to define such items as map projection, contouring minimum/maximum levels. Sensible default values for most parameters exist, so it may be the case that very few parameters need to be set in order to obtain meaningful output. An example of a parameter that has no default value is GRIB_INPUT_FILE_NAME - if loading a GRIB file, this parameter must first be set.

Exactly how parameters are set and action routines are called depends on which interface is used. Most examples in this manual will use the FORTRAN or Python interfaces, but enough information will be given to enable the user to perform all tasks using MagML, MagJSON and C.

More information


  1. How to access the data loaded from files, and then plot in Fortran? Thanks in advance!

  2. For an example program to plot GRIB data from Fortran, please have a look at FORTRAN Interface page.