pub fn clearness_category(clearness_index: Float) -> usize {
        if clearness_index < 1. {
            panic!(
                "A clearness index of {} is too low for Perez's Sky",
                clearness_index
            );
        } else if clearness_index < 1.065 {
            0
        } else if clearness_index < 1.230 {
            1
        } else if clearness_index < 1.5 {
            2
        } else if clearness_index < 1.95 {
            3
        } else if clearness_index < 2.8 {
            4
        } else if clearness_index < 4.5 {
            5
        } else if clearness_index < 6.2 {
            6
        } else if clearness_index < 12.01 {
            7
        } else {
            panic!(
                "A clearness index of {} is too high for Perez's Sky",
                clearness_index
            );
        }
    }
/// Get the sky clearness category (Table 1 in the 1990 paper)
Get the sky clearness category (Table 1 in the 1990 paper)
Get the sky clearness category ( Table 1 in the 1990 paper )
pub fn clearness_category(clearness_index: Float) -> usize {
        if clearness_index < 1. {
            panic!(
                "A clearness index of {} is too low for Perez's Sky",
                clearness_index
            );
        } else if clearness_index < 1.065 {
            0
        } else if clearness_index < 1.230 {
            1
        } else if clearness_index < 1.5 {
            2
        } else if clearness_index < 1.95 {
            3
        } else if clearness_index < 2.8 {
            4
        } else if clearness_index < 4.5 {
            5
        } else if clearness_index < 6.2 {
            6
        } else if clearness_index < 12.01 {
            7
        } else {
            panic!(
                "A clearness index of {} is too high for Perez's Sky",
                clearness_index
            );
        }
    }
pub fn clearness_category ( clearness_index : Float ) -> usize { if clearness_index < 1. { panic ! ( " " clearness_index ) ; } else if clearness_index < 1.065 { 0 } else if clearness_index < 1.230 { 1 } else if clearness_index < 1.5 { 2 } else if clearness_index < 1.95 { 3 } else if clearness_index < 2.8 { 4 } else if clearness_index < 4.5 { 5 } else if clearness_index < 6.2 { 6 } else if clearness_index < 12.01 { 7 } else { panic ! ( " " clearness_index ) ; } }
Get the sky clearness category (Table 1 in the 1990 paper)
Get the sky clearness category ( Table 1 in the 1990 paper )
clearness_index
Float
clearness_index
Float