libera_utils.scene_id.calculate_cloud_fraction_weighted_optical_depth#

libera_utils.scene_id.calculate_cloud_fraction_weighted_optical_depth(optical_depth_lower: float | ndarray[Any, dtype[floating]], optical_depth_upper: float | ndarray[Any, dtype[floating]], cloud_fraction_lower: float | ndarray[Any, dtype[floating]], cloud_fraction_upper: float | ndarray[Any, dtype[floating]], cloud_fraction: float | ndarray[Any, dtype[floating]]) float | ndarray[Any, dtype[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