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.

Footprint:

dict(
    attr = dict(
        domains = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Describes the domains covered by the resource.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = footprints.stdtypes.FPDict, 
            values = set([]),
        ), 
        filename = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'File name (absolute or relative) of the resource.', 
            optional = False, 
            outcast = set([]), 
            remap = dict(), 
            values = set([]),
        ), 
        fmtdelayedopen = dict(
            access = 'rxx', 
            alias = set([]), 
            default = False, 
            info = 'Opening of the resource delayed (not at time of construction).', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = bool, 
            values = set([]),
        ), 
        format = dict(
            access = 'rxx', 
            alias = set([]), 
            default = 'DDHLFA', 
            info = 'Format of the resource.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            values = set(['DDHLFA']),
        ), 
        levels = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Number of levels for variables/tendencies ('VT') and                      fluxes ('F').', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = footprints.stdtypes.FPDict, 
            values = set([]),
        ), 
        openmode = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Opening mode.', 
            optional = False, 
            outcast = set([]), 
            remap = dict(
                append = 'a', 
                read = 'r', 
                write = 'w',
            ), 
            values = set(['a', 'write', 'r', 'w', 'read', 'append']),
        ), 
        validity = dict(
            access = 'rwx', 
            alias = set([]), 
            default = None, 
            info = 'Describes the temporal validity of the resource.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            type = epygram.base.FieldValidityList, 
            values = set([]),
        ), 
        xpid = dict(
            access = 'rxx', 
            alias = set([]), 
            default = None, 
            info = 'Experiment identifier.', 
            optional = True, 
            outcast = set([]), 
            remap = dict(), 
            values = set([]),
        ),
    ), 
    bind = [], 
    info = 'Not documented', 
    only = dict(), 
    priority = dict(
        level = footprints.priorities.PriorityLevel::DEFAULT,
    ),
)
find_fields_in_resource(seed=None, fieldtype=None, generic=False, **kwargs)[source]

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

Args:

  • 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.

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

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.
  • footprints_builder: if True, uses footprints.proxy to build fields. Defaults to False for performance reasons.
readfields(requestedfields, getdata=True)[source]

Inactivation of readfields because readfield already returns a FieldSet.

what(*args, **kwargs)[source]

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

Args:

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

Previous topic

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

Next topic

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

This Page