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 :
- arithmetic operations provided as ‘object functions’ :
- climate data operators:
- spatial operations:
- regridding:
- object functions computing a difference with regridding (typically to compute model biases):
- temporal operations:
- time_average : compute time average for all time steps
- object function clim_average()
- object function annual_cycle()
- statistical operators:
operators for creating figures :
Note
Overview on the output format to be used for ‘plot’ and ‘curves’ operators w.r.t. figure trimming :
- If you want a PNG figure, you just have to call ‘plot’ or ‘curves’, and argument ‘trim’ allows to remove extra white space. Note that resolution unit is in pixels
- If you want a PDF or EPS output figure, you may need a further step to remove extra white space: you have to use ‘cpdfcrop’ or ‘cepscrop’ operator (which are slow) respectively, after the figure plot. Note that resolution unit is in inches or using a standard paper size by name
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
- plot : map, cross-section and profile plot of one or two fields, and vectors plot over a map
- plot_params()
- curves : plot multiple profiles (along p, lat, lon, time, ...)
- ensemble_ts_plot : plot time series
- :py:func::~climaf.function.ts_plot
- hovm : plot Hovmöller diagrams on a given or global domain (SST/climate boxes, ... )
- hovm_params()
- cpdfcrop : crop pdf figures to their minimal size
- cepscrop : crop eps figures to their minimal size
- example for two outputs :
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 :