External functions are user-written Fortran routines which are called from the Ferret command line just as internal Ferret functions (e.g. SIN, COS) are invoked. For example, you might create a routine to compute the amplitudes of the Fourier transform of a time series (the periodogram) and name your function "FFT_AMP". In Ferret you would use it like this:
LET my_fft = FFT_AMP(my_time_series)
Once the variable my_fft is defined, it can be used in other expressions, plotted, etc. External functions can be used in every way that Ferret internal functions are used and are distinguished only by their appearance after internal functions when the user issues a SHOW FUNC command.
A Ferret external function uses input arguments defined in a Ferret session and computes a result with user-supplied Fortran or C code. The external function specifies how the grid for the result will be generated. The axes can be inherited from the input arguments or specified in the external function code.
Utility functions, linked in when the external function is compiled, obtain information from Ferret about variables and grids. The utility functions are described in section 11.6.
Ferret external functions are compiled individually to create shared object (.so) files. These are dynamically linked with Ferret at run time. Ferret looks for shared object files in the directories specified in the FER_EXTERNAL_FUNCTIONS environment variable.