improver.psychrometric_calculations.precipitable_water module#
Module to generate precipitable water
- class PrecipitableWater[source]#
Bases:
BasePluginPlugin to calculate precipitable water from a humidity mixing ratio cube.
This plugin integrates the humidity mixing ratio over pressure levels to compute the precipitable water in metres. It assumes pressure levels are in Pascals and uses constants for gravity and water density to convert the result into liquid water equivalent thickness.
- _abc_impl = <_abc._abc_data object>#
- calculate_layer_bounds(sorted_pressure)[source]#
Calculate pressure layer boundaries from a 1D array of pressure levels.
This method estimates the boundaries between pressure levels by computing midpoints between adjacent levels. It assumes that the topmost and bottommost layers are half as thick as the internal layers, and extrapolates their bounds accordingly.
- static calculate_precipitable_water(humidity_data, delta_p)[source]#
Calculate precipitable water using sorted humidity data and pressure thickness.
- static calculate_pressure_thickness(layer_bounds, cube_data)[source]#
Calculate the pressure thickness of each atmospheric layer.