Versions Compared

Key

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

...

In order to plot something, an action routine must be called. In the example program, three plotting commands are called: PCOAST, PCONT and PTEXT. The following table shows all of the available action routines.

 

...

Table 2.1.

...

 Magics Action Routines

 

SyntaxDescription
CALL PCOASTPlots coastlines and grids
CALL PCONTPlots contour fields
CALL PWINDPlots wind fields
CALL POBSPlots observations
CALL PIMAGEPlots images, for example satellite
CALL PTEXTPlots text
CALL PGRAPHPlots graphs
CALL PAXISPlots axes
CALL PSYMBPlots marker symbols
CALL PLINEPlots lines and shapes over geographic areas
CALL PBOXPLOTPlots boxplots

 

 

 

 

 

 

 

 

 

 

 

 

Each action routine has its own set of parameters which have a unique prefix to identify them. For instance, the parameter CONTOUR_LINE_STYLE affects the operation of PCONT. These parameters can be set by the user and, if not set, the default values will be used. 

Info

Tip

 

Even though parameters can be set anywhere in the user program, action routines will always use the

...

last value assigned to a parameter before the action routine is called.

...

Magics Parameter Setting in FORTRAN

...

Table 2-2. Magics Single Parameter Setting Routines

Magics Parameter Setting in FORTRAN

In Magics, plots generated using action routines will be drawn using information from the relevant Magics parameters. These parameter values can be changed dynamically by calling parameter-setting routines. There are only a few parameter-setting routines in Magics, one for each data type.

The names of the parameters are passed as parameters using FORTRAN character strings. This method allows easy-to-remember, English language keywords and the list of keywords can be easily extended. The set of routines for parameter setting is divided into four subsets: single parameter setting, single parameter resetting, array parameter setting and multiple parameter setting.

Values of Magics parameters can also be retrieved by using the function ENQR and passing it the parameter name as an input parameter.

Single Parameter Setting and Resetting

There are three subroutines to assign a single value to a parameter, each postfixed with a C , I or R , corresponding to a different argument type:

Table 2.2. Magics Single Parameter Setting Routines

 

Function Call SyntaxDescription
CALL

...

PSETC ( MAGICS_PARAMETER, CVALUE )

...

For setting character arguments
CALL PSETI ( MAGICS_PARAMETER, IVALUE )For setting integer arguments
CALL

...

PSETR ( MAGICS_PARAMETER, RVALUE )For setting real arguments

 

The first argument should be a character variable or constant specifying the Magics parameter to be set.The VALUE argument should be of the corresponding type for the chosen subroutine.

...

There are three subroutines to assign a single value to a parameter, each postfixed with a C, I or R , corresponding to a different argument type:

 

...

Table 2.3.

...

 Magics Single Parameter Resetting Routine

 

Function Call SyntaxDescription
CALL PRESET( MAGICS_PARAMETER )

 

...

For resetting a parameter of any data type

 

There are seven subroutines for passing information to Magics in the form of arrays:

 

...

Table 2.4.

...

 Magics Array Parameter Setting Routines

 

SyntaxDescription
CALL PSET1C ( MAGICS_PARAMETER, CARRAY, N1 )

...

For 1-dimensional character array arguments
CALL PSET1I ( MAGICS_PARAMETER, IARRAY, N1 )

...

For 1-dimensional integer array arguments
CALL PSET2I ( MAGICS_PARAMETER, IARRAY, N1, N2 )

...

For 2-dimensional integer array arguments
CALL PSET3I ( MAGICS_PARAMETER, IARRAY, N1, N2, N3 )

 

Using Magics

 

Syntax

For 3-dimensional integer array arguments
CALL PSET1R ( MAGICS_PARAMETER, RARRAY, N1 )

...

For 1-dimensional real array arguments
CALL PSET2R ( MAGICS_PARAMETER, RARRAY, N1, N2 )

...

For 2-dimensional real array arguments
CALL PSET3R ( MAGICS_PARAMETER, RARRAY, N1, N2, N3 )For 3-dimensional real array arguments

 

The fifth character of the subroutine name indicates that an array is being passed and also indicates its dimen-

...