improver.psychrometric_calculations.significant_phase_mask module
Module for calculating the significant phase mask.
- class SignificantPhaseMask(model_id_attr=None)[source]
Bases:
BasePlugin
Derives a categorical field for the specified precipitation phase indicating whether that phase is the dominant phase at each point (1 where true, else 0) based on input snow-fraction data. The decision is: snow-fraction <= 0.01: Rain; snow-fraction >= 0.99: Snow; Sleet in between.
- _abc_impl = <_abc_data object>
- static _validate_snow_fraction(snow_fraction)[source]
Ensures that the input snow-fraction field has appropriate name (snow_fraction), units (1) and data (between 0 and 1 inclusive).
- Raises
- ValueError:
If any of the above are not True.