def Calc_Bulk_surface_resistance(sl_es_24, Rn_24, Refl_rad_water, air_dens,
    esat_24, eact_24, rah_pm_act, ETA_24, Lhv, Psychro_c):
    """
    Function to calculate the bulk surface resistance
    """
    bulk_surf_resis_24 = (((sl_es_24 * (Rn_24 - Refl_rad_water) + air_dens *
        1004 * (esat_24 - eact_24) / rah_pm_act) / (ETA_24 * Lhv / 86400) -
        sl_es_24) / Psychro_c - 1.0) * rah_pm_act
    bulk_surf_resis_24[ETA_24 <= 0.0] = 100000.0
    bulk_surf_resis_24 = bulk_surf_resis_24.clip(0.0, 100000.0)
    return bulk_surf_resis_24
