libera_utils.scene_identification.scene_id.calculate_cloud_fraction_weighted_optical_depth#
- libera_utils.scene_identification.scene_id.calculate_cloud_fraction_weighted_optical_depth(optical_depth_lower: float | NDArray[floating], optical_depth_upper: float | NDArray[floating], cloud_fraction_lower: float | NDArray[floating], cloud_fraction_upper: float | NDArray[floating], cloud_fraction: float | NDArray[floating]) float | NDArray[floating]#
Calculate weighted optical depth from upper and lower cloud layers.
Combines optical depth measurements from two atmospheric layers using cloud fraction weighting to produce a single representative optical depth value.
- Parameters:
optical_depth_lower (float or ndarray) – Optical depth for lower cloud layer (dimensionless)
optical_depth_upper (float or ndarray) – Optical depth for upper cloud layer (dimensionless)
cloud_fraction_lower (float or ndarray) – Cloud fraction for lower layer (0-100)
cloud_fraction_upper (float or ndarray) – Cloud fraction for upper layer (0-100)
cloud_fraction (float or ndarray) – Total cloud fraction (0-100)
- Returns:
Optical depth weighted by cloud fraction and summed across layers, or np.nan if no valid data or zero total cloud fraction
- Return type:
float or ndarray