code: def conv_precip_frac(precip_largescale, precip_convective):
      
      total = total_precip(precip_largescale, precip_convective)
      # Mask using xarray's `where` method to prevent divide-by-zero.
      return precip_convective / total.where(total)
docs: Fraction of total precip that is from convection parameterization.
  
      Parameters
      ----------
      precip_largescale, precip_convective : xarray.DataArrays
          Precipitation from grid-scale condensation and from convective
          parameterization, respectively.
  
      Returns
      -------
      xarray.DataArray