{ "cells": [ { "cell_type": "markdown", "id": "e10d29eb-bc3e-4373-8f56-e47efbb05781", "metadata": {}, "source": [ "# Standard Name Convention\n", "\n", "The \"Standard Name Convention\" is one realization of a convention promoted by the toolbox. It is based on the idea, that every dataset must have a physical unit (or none if it is dimensionless) and that datasets must be identifiable via an identifier attribute rather than the dataset name itself.\n", "\n", "The key standard attributes are \n", "\n", " - `standard_name`: A human- and machine-readable dataset identifier based on construction rules and listed in a \"Standard Name Table\",\n", " - `standard_name_table`: List of `standard_name` together with the base unit (SI) and a comprehensive description. It also includes additional information about how a `standard_name` can be transformed into a new `standard_name`\n", " - `units`: The unit attribute of a dataset. Must not be SI-unit, but must be convertible to it and then match the registered SI-unit in the Standard name table,\n", " - `long_name`: An alternative name if no `standard_name` is applicable." ] }, { "cell_type": "markdown", "id": "3c8617b6-48de-4065-84b9-022a3b0dff7b", "metadata": {}, "source": [ "This concept is first introduced by the Climate and Forecast community and is called [CF-convention](http://cfconventions.org/). The `h5RDMtoolbox` adopts the concept and implements a general version of it, so that users can define their own discipline- or problem-specific standard name convention.\n", "\n", "Main benefits of the convention are:\n", "- achieving self-describing files, which are human and machine interpretation interpretable,\n", "- validating correctness of dataset identifiers (standard_name) and their units\n", "- allowing unit-aware processing of data.\n", "\n", "This chapter walks you through the concept and shows how to apply it" ] }, { "cell_type": "code", "execution_count": 1, "id": "2ae9884b-2609-471a-ab4c-97e300ca804d", "metadata": {}, "outputs": [], "source": [ "import h5rdmtoolbox as h5tbx\n", "import warnings\n", "warnings.filterwarnings('ignore')\n", "\n", "from h5rdmtoolbox.convention.standard_names.table import StandardNameTable" ] }, { "cell_type": "markdown", "id": "8fe8adf7-f44c-4f1a-8fe2-3c1272cfa0ac", "metadata": {}, "source": [ "## Standard Name Tables" ] }, { "cell_type": "markdown", "id": "c82acdaa-9075-4c3d-a511-d8c7fc6f36e5", "metadata": {}, "source": [ "### Example 1: cf-convention" ] }, { "cell_type": "markdown", "id": "e9e3b996-8114-43e0-935b-b1fc8b2385f2", "metadata": {}, "source": [ "The Standard name table should be defined in documents (typically XML or YAML). The corresponding object then can be initialized by the respective constructor methods (`from_yaml`, `from_web`, ...).\n", "\n", "For reading the original CF-convention table, do the following:" ] }, { "cell_type": "code", "execution_count": 2, "id": "66808089-b59f-4dd2-86ab-a1c1904ebf44", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
| \n", " | description | \n", "units | \n", "vector | \n", "alias | \n", "
|---|---|---|---|---|
| absolute_pressure | \n", "Pressure is force per unit area. Absolute air pressure is pressure deviation to a total vacuum. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| ambient_static_pressure | \n", "Static air pressure is the amount of pressure exerted by air that is not moving. Ambient static air pressure is the static air pressure of the surrounding air. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| ambient_temperature | \n", "Air temperature is the bulk temperature of the air, not the surface (skin) temperature. Ambient air temperature is the temperature of the surrounding air. | \n", "K | \n", "NaN | \n", "NaN | \n", "
| auxiliary_fan_rotational_speed | \n", "Number of revolutions of an auxiliary fan. | \n", "1/s | \n", "NaN | \n", "NaN | \n", "
| blade_inlet_angle | \n", "Angle of blade at inlet. | \n", "rad | \n", "NaN | \n", "NaN | \n", "
| blade_inlet_diameter | \n", "The inner diameter of the test fan (D1). | \n", "m | \n", "NaN | \n", "NaN | \n", "
| blade_number | \n", "The blade number is the number of blades of the test fan. | \n", "\n", " | NaN | \n", "NaN | \n", "
| blade_outlet_angle | \n", "Angle of blade at inlet. | \n", "rad | \n", "NaN | \n", "NaN | \n", "
| blade_outlet_diameter | \n", "The outer diameter of the test fan (D2). | \n", "m | \n", "NaN | \n", "NaN | \n", "
| coordinate | \n", "The spatial coordinate. | \n", "m | \n", "True | \n", "NaN | \n", "
| density | \n", "Air density is defined as the mass of air divided by its volume. | \n", "kg/m**3 | \n", "NaN | \n", "NaN | \n", "
| difference_of_total_pressure_to_static_pressure_between_across_fan | \n", "The difference of static pressure at fan outlet w.r.t. the total pressure upstream of the fan. The total pressure generally is not known at the fan inlet pipe but further upstream, e.g. in a settling chamber. The dataset must provide detailed information, e.g. referencing to the respective pressure measurement device containing the exact location in the setup. | \n", "Pa | \n", "NaN | \n", "difference_of_total_pressure_to_static_pressure_between_fan_outlet_and_fan_inlet | \n", "
| difference_of_wall_static_pressure_across_fan | \n", "Static air pressure is the amount of pressure exerted by air that is not moving. Difference of wall static air pressure across a fan is the difference between the static air pressure downstream (at fan_outlet) of the fan and the total air pressure upstream of the fan at the wall (at fan_inlet). | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| difference_of_wall_static_pressure_across_orifice | \n", "Differnece of static air pressure across orifice to compute volume flow rate according to DIN EN ISO 5167. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| dynamic_pressure | \n", "Dynamic air pressure is a measure for kinetic energy per unit volume of moving air. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| dynamic_viscosity | \n", "Dynamic air viscosity indicates the resistance of air towards deformation under shear stress. (https://doi.org/10.1016/B978-0-08-096949-7.00020-0). | \n", "Pa*s | \n", "NaN | \n", "NaN | \n", "
| fan_efficiency | \n", "Total fan efficiency as defined in (CAROLUS, Thomas. Ventilatoren-Aerodynamischer Entwurf, Schallvorhersage. Konstruktion, 2013, 2. Jg., p.5, eq.1.16). | \n", "\n", " | NaN | \n", "NaN | \n", "
| fan_flow_coefficient | \n", "Air flow coefficient is a dimensionless number as defined in (CAROLUS, Thomas. Ventilatoren-Aerodynamischer Entwurf, Schallvorhersage. Konstruktion, 2013, 2. Jg., p.2, eq.1.3). The addition \"of_fan\" indicates that this coefficient applies to the deployed fan. | \n", "\n", " | NaN | \n", "NaN | \n", "
| fan_inlet_area | \n", "The fan cross-sectional area at the location \"fan_inlet\" for fans with a casing. The position of the referred cross-sectional area is in the pipe upstream of the fan. The area is generally taken to compute the dynamic pressure at the inlet of the fan based on the volume flow rate. | \n", "m**2 | \n", "NaN | \n", "NaN | \n", "
| fan_outlet_area | \n", "The fan cross-sectional area at the location \"fan_outlet\" for fans with a casing. The position of the referred cross-sectional area is in the pipe downstream of the fan. The area is generally taken to compute the dynamic pressure at the outlet of the fan based on the volume flow rate. | \n", "m**2 | \n", "NaN | \n", "NaN | \n", "
| fan_power_coefficient | \n", "Power coefficient is a dimensionless number as defined in (CAROLUS, Thomas. Ventilatoren-Aerodynamischer Entwurf, Schallvorhersage. Konstruktion, 2013, 2. Jg., p.2, eq.1.5). The addition \"of_fan\" indicates that this coefficient applies for the deployed fan. | \n", "\n", " | NaN | \n", "NaN | \n", "
| fan_pressure_coefficient | \n", "Total pressure coefficient is a dimensionless number as defined in (CAROLUS, Thomas. Ventilatoren-Aerodynamischer Entwurf, Schallvorhersage. Konstruktion, 2013, 2. Jg., p.2, eq.1.4). The addition \"of_fan\" indicates that this coefficient applies for the deployed fan. | \n", "\n", " | NaN | \n", "NaN | \n", "
| fan_rotational_speed | \n", "Number of revolutions of the test fan. | \n", "1/s | \n", "NaN | \n", "NaN | \n", "
| fan_shaft_power | \n", "Power of fan drive shaft. | \n", "W | \n", "NaN | \n", "NaN | \n", "
| fan_specific_speed | \n", "Specific speed of the fan as defined in (CAROLUS, Thomas. Ventilatoren-Aerodynamischer Entwurf, Schallvorhersage. Konstruktion, 2013, 2. Jg., p.2, eq.1.6). | \n", "\n", " | NaN | \n", "NaN | \n", "
| fan_torque | \n", "The torque acting on the impeller of the fan. | \n", "Nm | \n", "NaN | \n", "NaN | \n", "
| fan_volume_flow_rate | \n", "Air volume flow rate is the volume of air that passes a cross section per unit time. The volume flow rate of the fan is the volume flow entering and leaving the fan. Due to gaps between the impeller and the housing, the volume flow rate is lower than the volume flow rate through the impeller (see impeller_volume_flow_rate). | \n", "m**3/s | \n", "NaN | \n", "NaN | \n", "
| impeller_diameter | \n", "The diameter of the impeller of the test fan, also D3. For some fans D2 is equal to D3. | \n", "m | \n", "NaN | \n", "NaN | \n", "
| impeller_inlet_width | \n", "The width of the impeller inlet. | \n", "m | \n", "NaN | \n", "NaN | \n", "
| impeller_outlet_width | \n", "The width of the impeller outlet. | \n", "m | \n", "NaN | \n", "NaN | \n", "
| impeller_volume_flow_rate | \n", "Air volume flow rate is the volume of air that passes a cross section per unit time. The volume flow rate of the impeller is the volume flow entering and leaving the impeller. Due to gaps between the impeller and the housing, this volume flow rate is higher than the volume flow rate through the fan (see fan_volume_flow_rate). | \n", "m**3/s | \n", "NaN | \n", "NaN | \n", "
| impeller_weight | \n", "Weight of the impeller. | \n", "kg | \n", "NaN | \n", "NaN | \n", "
| inner_diameter_of_orifice | \n", "Inner diameter of an orifice. | \n", "m | \n", "NaN | \n", "NaN | \n", "
| kinematic_viscosity | \n", "Dynamic air viscosity indicates the resistance of air towards deformation under shear stress. Kinematic viscosity. Dynamic air viscosity divided by air denisity equals kinematic air viscosity. (https://doi.org/10.1016/B978-0-12-410461-7.00007-9). | \n", "m**2/s | \n", "NaN | \n", "NaN | \n", "
| mass_flow_rate | \n", "Air mass flow rate is the mass of air that passes a certain cross sectiont per unit time. | \n", "kg/s | \n", "NaN | \n", "NaN | \n", "
| outer_diameter_of_orifice | \n", "Outer diameter of an orifice. | \n", "m | \n", "NaN | \n", "NaN | \n", "
| pulse_delay | \n", "Time between two laser pulses. | \n", "s | \n", "NaN | \n", "NaN | \n", "
| relative_humidity | \n", "Relative humidity is a measure of the water vapor content of air. | \n", "\n", " | NaN | \n", "NaN | \n", "
| static_pressure | \n", "Static air pressure is the amount of pressure exerted by air that is not moving. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| temperature | \n", "Air temperature is the bulk temperature of the air, not the surface (skin) temperature. (CF Conventions). | \n", "degC | \n", "NaN | \n", "NaN | \n", "
| time | \n", "Recording time since start of experiment. | \n", "s | \n", "NaN | \n", "NaN | \n", "
| total_pressure | \n", "The sum of dynamic and static air pressure. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| turbulent_kinetic_energy | \n", "The kinetic energy per unit mass of a fluid. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| velocity | \n", "Velocity. | \n", "m/s | \n", "True | \n", "NaN | \n", "
| vorticity | \n", "Vorticity. | \n", "1/s | \n", "True | \n", "NaN | \n", "
| wall_static_pressure | \n", "Static air pressure is the amount of pressure exerted by air that is not moving. Wall static air pressure is the static air pressure at the wall. | \n", "Pa | \n", "NaN | \n", "NaN | \n", "
| xx_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"xx\" indicates that the variations of x-velocity is used. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| yx_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"yx\" indicates that the variations of x- and y-velocity are used. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| yy_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"yy\" indicates that the variations of y-velocity is used. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| yz_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"yz\" indicates that the variations of y- and z-velocity are used. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| zx_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"zx\" indicates that the variations of z- and x-velocity are used. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| zy_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"zy\" indicates that the variations of z- and y-velocity are used. in y-axis direction. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "
| zz_reynolds_stress | \n", "Reynolds stress is a tensor quantity. \"zy\" indicates that the variations of z-velocity is used. | \n", "m**2/s**2 | \n", "NaN | \n", "NaN | \n", "