Emoslib is now deprecated

Interpolation coefficients are needed for spectral to grid transformations. They are generated automatically if they do not exist.

The coefficients may be handled in a number of ways depending on the computer platform and on operating system environment settings.

  • Coefficients may be generated one latitude at a time at run-time in a program array.
  • They may be generated for all latitudes at run-time in a dynamically allocated memory array and written to a new file.
  • They may be generated for all latitudes at run-time in a shared memory segment.
  • They may already exist in a file and can be accessed in a number of ways.
    • The file may be part of a memory resident file system.
    • The file may be read into a dynamically allocated memory array.
    • The file may be memory-mapped.
    • The file may be read one latitude at a time into a program array.
    The size of coefficient files depends on the spectral resolution and the grid spacing; they may be tens or hundreds of megabytes.

The way in which the coefficients are handled can be configured using the environment variable CONFIG_INTERP; the default method for handling coefficients depends on the computer platform (AIX defaults to MAPPED, other platforms to FILEIO). CONFIG_INTERP can take the following values (entries start in column one):

  • FILEIO to read coefficients from a file one latitude at a time.
  • MEMORY to read all coefficients from a file into memory.
  • SHARED to read coefficients from a shared memory segment.
  • ON_FLY to generate coefficients for one latitude at a time - 'on the fly'.
  • MAPPED to map a file into memory.

The environment variable PPDIR gives the pathname of a directory to hold interpolation coefficients. If PPDIR is not defined, coefficient files are created in the application program's current working directory.

FILEIO, MEMORY and MAPPED cause a file to be generated if it does not already exist in PPDIR. SHARED causes a shared memory segment to be generated if it does not already exist. Note that shared memory segments continue to exist after the generating application terminates.

For common transformations, files often already exist, having been generated by other users of the interpolation software (such as MARS, Metview, ...).