Logo Iris 1.12

Previous topic

iris.fileformats.dot

Next topic

iris.fileformats.grib

This Page

iris.fileformats.ff

Provides UK Met Office Fields File (FF) format specific capabilities.

Deprecated since version 1.10: This module has now been deprecated. Please use iris.fileformats.um instead : That contains equivalents for the key features of this module.

The following replacements may be used.

In this module:

iris.fileformats.ff.load_cubes(filenames, callback, constraints=None)

Loads cubes from a list of fields files filenames.

Args:

  • filenames - list of fields files filenames to load

Kwargs:

Note

The resultant cubes may not be in the order that they are in the file (order is not preserved when there is a field with orography references).

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated. Please use iris.fileformats.um.load_cubes() in place of iris.fileformats.ff.load_cubes().

↑ top ↑

iris.fileformats.ff.load_cubes_32bit_ieee(filenames, callback, constraints=None)

Loads cubes from a list of 32bit ieee converted fieldsfiles filenames.

See also

load_cubes() for keyword details

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated. Please use iris.fileformats.um.load_cubes_32bit_ieee() in place of iris.fileformats.ff.load_cubes_32bit_ieee().

↑ top ↑

A class to extract the individual PPFields from within a FieldsFile.

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated.

class iris.fileformats.ff.FF2PP(filename, read_data=False, word_depth=8)

Bases: object

Create a FieldsFile to Post Process instance that returns a generator of PPFields contained within the FieldsFile.

Args:

  • filename (string):

    Specify the name of the FieldsFile.

Kwargs:

  • read_data (boolean):

    Specify whether to read the associated PPField data within the FieldsFile. Default value is False.

Returns:
PPField generator.

For example:

>>> for field in ff.FF2PP(filename):
...     print(field)

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated. Please use iris.fileformats.um.um_to_pp() in place of iris.fileformats.ff.FF2PP.

↑ top ↑

An abstract class representing the default/file-level grid definition for a FieldsFile.

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated.

class iris.fileformats.ff.Grid(column_dependent_constants, row_dependent_constants, real_constants, horiz_grid_type)

Bases: object

Create a Grid from the relevant sections of the FFHeader.

Args:

  • column_dependent_constants (numpy.ndarray):

    The column_dependent_constants from a FFHeader.

  • row_dependent_constants (numpy.ndarray):

    The row_dependent_constants from a FFHeader.

  • real_constants (numpy.ndarray):

    The real_constants from a FFHeader.

  • horiz_grid_type (integer):

    horiz_grid_type from a FFHeader.

Deprecated since version 1.10.

regular_x(subgrid)
regular_y(subgrid)
vectors(subgrid)

Return the X and Y coordinate vectors for the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of X-vector, Y-vector.

↑ top ↑

An abstract class representing an Arakawa C-grid.

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated.

class iris.fileformats.ff.ArakawaC(column_dependent_constants, row_dependent_constants, real_constants, horiz_grid_type)

Bases: iris.fileformats._ff.Grid

Create a Grid from the relevant sections of the FFHeader.

Args:

  • column_dependent_constants (numpy.ndarray):

    The column_dependent_constants from a FFHeader.

  • row_dependent_constants (numpy.ndarray):

    The row_dependent_constants from a FFHeader.

  • real_constants (numpy.ndarray):

    The real_constants from a FFHeader.

  • horiz_grid_type (integer):

    horiz_grid_type from a FFHeader.

Deprecated since version 1.10.

regular_x(subgrid)

Return the “zeroth” value and step for the X coordinate on the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of BZX, BDX.
regular_y(subgrid)

Return the “zeroth” value and step for the Y coordinate on the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of BZY, BDY.
vectors(subgrid)

Return the X and Y coordinate vectors for the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of X-vector, Y-vector.

↑ top ↑

An Arakawa C-grid as used by UM New Dynamics.

The theta and u points are at the poles.

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated.

class iris.fileformats.ff.NewDynamics(column_dependent_constants, row_dependent_constants, real_constants, horiz_grid_type)

Bases: iris.fileformats._ff.ArakawaC

Create a Grid from the relevant sections of the FFHeader.

Args:

  • column_dependent_constants (numpy.ndarray):

    The column_dependent_constants from a FFHeader.

  • row_dependent_constants (numpy.ndarray):

    The row_dependent_constants from a FFHeader.

  • real_constants (numpy.ndarray):

    The real_constants from a FFHeader.

  • horiz_grid_type (integer):

    horiz_grid_type from a FFHeader.

Deprecated since version 1.10.

regular_x(subgrid)

Return the “zeroth” value and step for the X coordinate on the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of BZX, BDX.
regular_y(subgrid)

Return the “zeroth” value and step for the Y coordinate on the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of BZY, BDY.
vectors(subgrid)

Return the X and Y coordinate vectors for the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of X-vector, Y-vector.

↑ top ↑

An Arakawa C-grid as used by UM ENDGame.

The v points are at the poles.

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated.

class iris.fileformats.ff.ENDGame(column_dependent_constants, row_dependent_constants, real_constants, horiz_grid_type)

Bases: iris.fileformats._ff.ArakawaC

Create a Grid from the relevant sections of the FFHeader.

Args:

  • column_dependent_constants (numpy.ndarray):

    The column_dependent_constants from a FFHeader.

  • row_dependent_constants (numpy.ndarray):

    The row_dependent_constants from a FFHeader.

  • real_constants (numpy.ndarray):

    The real_constants from a FFHeader.

  • horiz_grid_type (integer):

    horiz_grid_type from a FFHeader.

Deprecated since version 1.10.

regular_x(subgrid)

Return the “zeroth” value and step for the X coordinate on the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of BZX, BDX.
regular_y(subgrid)

Return the “zeroth” value and step for the Y coordinate on the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of BZY, BDY.
vectors(subgrid)

Return the X and Y coordinate vectors for the given sub-grid of this grid.

Args:

  • subgrid (integer):

    A “grid type code” as described in UM documentation paper C4.

Returns:
A 2-tuple of X-vector, Y-vector.

↑ top ↑

A class to represent the FIXED_LENGTH_HEADER section of a FieldsFile.

Deprecated since version 1.10: The module iris.fileformats.ff is deprecated.

class iris.fileformats.ff.FFHeader(filename, word_depth=8)

Bases: object

Create a FieldsFile header instance by reading the FIXED_LENGTH_HEADER section of the FieldsFile, making the names defined in FF_HEADER available as attributes of a FFHeader instance.

Args:

  • filename (string):

    Specify the name of the FieldsFile.

Returns:
FFHeader object.

Deprecated since version 1.10.

grid()

Return the Grid definition for the FieldsFile.

shape(name)

Return the dimension shape of the FieldsFile FIXED_LENGTH_HEADER pointer attribute.

Args:

  • name (string):

    Specify the name of the FIXED_LENGTH_HEADER attribute.

Returns:
Dimension tuple.
GRID_STAGGERING_CLASS = {3: <class 'iris.fileformats._ff.NewDynamics'>, 6: <class 'iris.fileformats._ff.ENDGame'>}
ff_filename = None

File name of the FieldsFile.