metobs_toolkit.obstypes.Obstype#

class Obstype(name: str, std_unit: str | Unit, description: str)[source]#

Class representing an observation type with standard unit and description.

Parameters:
  • name (str) – Name of the observation type.

  • std_unit (str or pint.Unit) – Standard unit for the observation type.

  • description (str) – Description of the observation type.

__init__(name: str, std_unit: str | Unit, description: str)[source]#

Initialize an Obstype with a name, standard unit and description.

Parameters:
  • name (str) – Name of the observation type (e.g. 'temp').

  • std_unit (str or pint.Unit) – Standard unit for storing and reporting observations (e.g. 'degree_Celsius').

  • description (str) – Human-readable description of the observation type.

Methods

__init__(name, std_unit, description)

Initialize an Obstype with a name, standard unit and description.

convert_to_standard_units(input_data, input_unit)

Convert input data to the standard unit.

get_compatible_units()

Get all units compatible with the standard unit.

get_info([printout])

Print or return detailed information of the observation type.

is_compatible_with(other)

Test if the other Obstype is compatible with this one.

Attributes

description

Return the description of the observation type.

name

Return the name of the observation type.

original_name

Return the original name of the observation type.

original_unit

Return the original unit as string.

std_unit

Return the standard unit as string.