Metview's documentation is now on readthedocs!

The remainder of this section provides a reference guide for the operators and functions available in the Metview Macro language, detailing their function, input and output types.

Operators and functions are organised by the variable type they conceptually relate to (which may not be the same type as they return).

The notation used conveys information about the usage of operators and functions - Operators and functions are represented in bold font with input and output types in normal font. Output type designation precedes an expression enclosed in brackets containing an operator action or a function declaration (name followed by input arguments type). The following examples make the notation clear :

 

output_type (op input_type)

An operator op acting on an expression of type input_type returns a quantity of type output_type , e.g.

fieldset (not fieldset)

means : Operator not acting on a fieldset results in another fieldset

 

output_type (input_type_1 op input_type_2)

An operator op acting on two expressions of type input_type_1 and input_type_2 returns a quantity of type output_type , e.g.

date (date + number)

means : Operator + acting on a date and a number (adding a number to a date) results in a date

 

output_type function ( input_type_1,..., input_type_n)

A function function acting on n arguments of type input_type_1 to input_type_n, ... returns a quantity of type output_type , e.g.

date date( number )

means : Function date() accepts a number as its single argument and returns a date.