You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

Introduction

There are four interfaces to Magics. A FORTRAN interface (see section “FORTRAN Interface”) provides the usage familiar to users of MAGICS 6; C and Python interfaces (see section “C Interface” and section “Python Interfaces”) provide identical functionality for C and Python programmers; and an XML- and JSON-based interfaces, MagML and MagJSON (see section “MagML Interface”), are 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 interface, but enough information will be given to enable the user to perform all tasks using MagML, C and Python.

This chapter also describes various tools Magics++ provides to work with the Magics library. These tools are the interpreters magmlx and magjson and the magicsCompatibilityChecker.

More information

  • No labels