epygram.formats.DDHLFA — Interface-Class to the DDHLFA format

Contains the class for DDH-in-LFA format.

class epygram.formats.DDHLFA.DDHLFA(*args, **kwargs)[source]

Bases: epygram.formats.LFA.LFA

Class implementing all specificities for DDHLFA resource format.

Note

This class is managed by footprint.

  • info: Not documented
  • priority: PriorityLevel::DEFAULT (rank=1)

Automatic parameters from the footprint:

  • domains (footprints.stdtypes.FPDict) - rxx - Describes the domains covered by the resource.
    • Optional. Default is None.
  • filename (str) - rxx - File name (absolute or relative) of the resource.
  • fmtdelayedopen (bool) - rxx - Opening of the resource delayed (not at time of construction).
    • Optional. Default is False.
  • format (str) - rxx - Format of the resource.
    • Optional. Default is ‘DDHLFA’.
    • Values: set([‘DDHLFA’])
  • levels (footprints.stdtypes.FPDict) - rxx - Number of levels for variables/tendencies (‘VT’) and fluxes (‘F’).
    • Optional. Default is None.
  • openmode (str) - rxx - Opening mode.
    • Values: set([‘a’, ‘write’, ‘r’, ‘w’, ‘read’, ‘append’])
    • Remap: dict(append = ‘a’, read = ‘r’, write = ‘w’,)
  • validity (epygram.base.FieldValidityList) - rwx - Describes the temporal validity of the resource.
    • Optional. Default is None.
  • xpid (str) - rxx - Experiment identifier.
    • Optional. Default is None.
find_fields_in_resource(seed=None, fieldtype=None, generic=False, **_)[source]

Returns a list of the fields from resource whose name match the given seed.

Parameters:
  • seed – might be a regular expression, a list of regular expressions or None. If None (default), returns the list of all fields in resource.
  • fieldtype – optional, among (‘V1D’, ‘Point’, ‘Misc’). If provided, filters out the fields not of the given type.
open(openmode=None)[source]

Opens the DDHLFA in Fortran sense, and initializes domains, validity and vertical geometry.

Parameters:openmode – optional, to open with a specific openmode, eventually different from the one specified at initialization.
readfield(*args, **kwargs)

Reads a field in resource.

  • Documentation fields (‘INDICE EXPERIENCE’, ‘DATE’, ‘DOCFICHIER’, ‘ECHEANCE’, ‘DOCDnnn’) are returned as epygram.formats.LFA returns.
  • Profile/surface fields are returned as a epygram.base.FieldSet of 1D/Point fields, one for each domain.
Parameters:
  • getdata – if False, do not read data but only metadata
  • footprints_proxy_as_builder – if True, uses footprints.proxy to build fields and geometry.
readfields(requestedfields, **kwargs)[source]

Inactivation of readfields because readfield already returns a FieldSet.

what(*args, **kwargs)

Writes in file a summary of the contents of the DDHLFA.

Parameters:
  • out – the output open file-like object (duck-typing: out.write() only is needed).
  • sortfieldsTrue if the fields have to be sorted by type.