Standard operators and functions

CliMAF includes a number of ‘Standard Operators’ and of ‘Object Functions’, which implement more or less basic climate diagnostics or utilities:

  • All do return CliMAF objects.
  • Operators are implemented as external scripts or binaries, while ‘object functions’ are implemented as python functions.
  • operators can be used to define derived variables using function derive(), while ‘object functions’ cannot

Other functions exists, which do not return CliMAF objects (and are not called ‘object functions’) - see Available functions

The set of standard operators grows with scientists contributions (see ..contribute a diagnostic module). They are documented here, through individual documentation files in REStructured Text format and following this example which renders as shows here. For each operator, the content of the doc file is also made available in the Python on-line help (see ..know which CliMAF operators are available and what they do).

Documented operators and ‘object functions’ as of today:

Note

Overview on method to create a page with several CliMAF figures:

  • cpage(): this operator creates a PNG or PDF page of figures array using

‘ImageMagick’, figures adjustment in the page is adapted to figures size. If you use ‘cpage’, you don’t need any pre-processing because:

  • 1/ argument ‘fig_trim’ allows to trim extra white space of each figure;
  • 2/ argument ‘page_trim’ allows to trim extra white space for the page
    • cpage_pdf(): this operator creates a PDF page of figures array using ‘pdfjam’,

figures adjustment in each array cell is automatically centered, you can’t adjust figures differently. So if you use ‘cpage_pdf’, you may need to do pre and post-treatment because:

  • 1/ there is no argument ‘fig_trim’ allowing you to trim extra white space when generating pdf figures, so you must apply ‘cpdfcrop’ before cpage_pdf (on all figures)
  • 2/ there is no argument ‘page_trim’ allowing you to trim extra white space when generating the page, so you must use ‘cpdfcrop’ on its output

So, to create an array of figures:

  • If you want an PNG output figure: you should use ‘cpage’. If quality is not sufficient, increase

resolution of each figure (with argument ‘resolution’ of ‘curves’ or ‘plot’ operator) and also page resolution (with arguments ‘page_width’ and ‘page_height’ of ‘cpage’)

  • If you want an PDF output figure: you can use either ‘cpage_pdf’ or ‘cpage’:
  • ‘cpage_pdf’ is highly recommended
  • if you want to have more control on figures adjustment in the page, use ‘cpage’ and increase resolution of each figure and also of output page

Albeit this is not a proper practice, some more operators may exist in your CliMAF release which would not be documented here. Please see ..know which CliMAF operators are available and what they do for such cases

A name-sorted list: