pytmosph3r.interface.hdf5

Module Contents

class HDF5Input(filename)[source]

Bases: pytmosph3r.interface.io.Input

Base class to read input data. HDF5Input and ncInput inherit from it.

variable
property attrs
getclass(path: str) str[source]
getunit(path: str) astropy.units.Unit | None[source]
get(path)[source]
class HDF5Output(filename, append=False)[source]

Bases: pytmosph3r.interface.io.Output, HDF5Input

Base class to write outputs. HDF5Output and ncOutput inherit from it.

group_func

Function pointer to the method creating a group

group_class

Class pointer to the subclass handling groups

abstract get(path)[source]
abstract getclass(path)[source]
write_string_array(string_array, string_name=None, metadata=None)[source]
class HDF5Group(f)[source]

Bases: HDF5Output, abc.ABC

Base class to write outputs. HDF5Output and ncOutput inherit from it.

f
write_hdf5(h5_output, model, group_name='Model', items=None)[source]

Write model into group group_name in HDF5 h5_output. The output file is separated into a group “Model” with the inputs, and a group “Output” with the outputs.

Parameters:
  • h5_output (string) – Name of HDF5 output file.

  • model (Model) – Model to write.

  • group_name (str, optional) – Either “Model”, “Output”, or “All”. Decides which data to write to group_name: “Model” writes the input model only, “Output” writes the output data, and “All” writes everything. Defaults to “Model”.

  • items (list) – items to write into group.