Deriving pre-defined atmospheric quantities
Computation of several derived atmospheric quantities (e.g., potential temperature, equivalent potential temperature) is implemented in Met.3D. Prerequisite is that corresponding input variables are specified by the user for the dataset for which derived quantities shall be computed. Below we provide a (possibly incomplete) list of available derived variables and potential restrictions to grid types on which the variables can be computed. If you are interested in the specific definitions, please refer to the corresponding source code referenced below.
Defining input variables for computations
Available derived quantities
As of Met.3D v1.7, the following derived variables are implemented (all input variable names follow the CF standard names):
Supported grid types
he variables in the following list support all grid and vertical level types unless otherwise noted.
- Horizontal wind speed ("wind_speed")
- Requires eastward_wind, northward_wind
- 3D wind velocity ("magnitude_of_air_velocity")
- Requires eastward_wind, northward_wind, upward_air_velocity
- Potential temperature ("air_potential_temperature")
- Requires air_temperature
- Equivalent potential temperature ("equivalent_potential_temperature")
- Requires air_temperature, specific_humidity
- Computed using equation (43) of Bolton (MWR, 1980), "The Computation of Equivalent Potential Temperature".
- Relative humidity ("relative_humidity")
- Requires air_temperature, specific_humidity
- Computed using saturation vapour pressure by Huang (JAMC, 2018), "A Simple Accurate Formula for Calculating Saturation VaporPressure of Water and Ice", DOI: 10.1175/JAMC-D-17-0334.1
- Potential vorticity ("ertel_potential_vorticity")
Requires eastward_wind, northward_wind, air_temperature, surface_air_pressure
- NOTE: Only available for regular lon-lat grids defined on hybrid sigma-pressure levels (e.g. ECMWF, ERA-5)
- Computed using the ETH Lagranto formulation
- Geopotential height ("geopotential_height")
- Requires air_temperature, specific_humidity, surface_geopotential, surface_air_pressure, surface_temperature
- Geopotential height ("geopotential_height_from_geopotential")
- Requires geopotential
- Simply divides input by 9.81m^2/s^2
- Dew point temperature ("dew_point_temperature")
- Requires specific_humidity
- Hourly total precipitation ("lwe_thickness_of_precipitation_amount_Nh")
- Requires lwe_thickness_of_precipitation_amount
- Computes N-hourly precipitation from accumulated total precipitation (i.e., difference in the accumulated amount over N hours)
- Vertically integrated horizontal moisture flux ("magnitude_of_vertically_integrated_horizontal_transport_of_moisture")
- Requires surface_air_pressure, eastward_wind, northward_wind, specific_humidity
- Air pressure ("air_pressure")
- Requires air_temperature
- Reconstructs 3D pressure field from grid level specification
Source code links
Computation of derived variables is implemented in the "derivedvars" source code subdirectory:
Variable computation is implemented for each derived variable in a class derived from MDerivedDataFieldProcessor.
The actual implementations are distributed over multiple files. A basic set of common quantities is implemented in
- https://gitlab.com/wxmetvis/met.3d/-/blob/master/src/data/derivedvars/derivedmetvars_standard.h
- https://gitlab.com/wxmetvis/met.3d/-/blob/master/src/data/derivedvars/derivedmetvars_standard.cpp
For each quantity, the implementation lists which input variables are required for computation. For example, the computation of horizontal wind speed requires the eastward and northward wind components as inputs.
MHorizontalWindSpeedProcessor::MHorizontalWindSpeedProcessor() : MDerivedDataFieldProcessor( "wind_speed", QStringList() << "eastward_wind" << "northward_wind") {}
All derived variables available are listed in the constructor of MDerivedMetVarsDataSource
:
Generic derivation of quantities (to come)
We are working on a Python interface to allow the computation of arbitrary quantities on-the-fly in Python scripts executed by Met.3D. Help with the implementation is appreciated!