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 (
builtins.str
) - rxx - File name (absolute or relative) of the resource.fmtdelayedopen (
builtins.bool
) - rxx - Opening of the resource delayed (not at time of construction).Optional. Default is False.
format (
builtins.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 (
builtins.str
) - rxx - Opening mode.Values: set([‘append’, ‘r’, ‘read’, ‘w’, ‘a’, ‘write’])
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 (
builtins.str
) - rxx - Experiment identifier.Optional. Default is None.
Constructor. See its footprint for arguments.
- domains¶
Describes the domains covered by the resource (see the documentation above for more details).
- filename¶
File name (absolute or relative) of the resource (see the documentation above for more details).
- 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.
- fmtdelayedopen¶
Opening of the resource delayed (not at time of construction) (see the documentation above for more details).
- format¶
Format of the resource (see the documentation above for more details).
- levels¶
Number of levels for variables/tendencies (‘VT’) and fluxes (‘F’) (see the documentation above for more details).
- 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.
- openmode¶
Opening mode (see the documentation above for more details).
- 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.
- validity¶
Describes the temporal validity of the resource (see the documentation above for more details).
- 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).
sortfields – True if the fields have to be sorted by type.
- xpid¶
Experiment identifier (see the documentation above for more details).