pub fn ice_fraction(hydrosphere_fraction: &f64, surface_temp_kelvin: &f64) -> f64 {
    let surface_temp_kelvin = match *surface_temp_kelvin > 328.0 {
        true => 328.0,
        false => *surface_temp_kelvin,
    };
    let mut temp = ((328.0 - surface_temp_kelvin) / 70.0).powf(5.0);

    if temp > 1.5 * hydrosphere_fraction {
        temp = 1.5 * hydrosphere_fraction;
    }

    if temp >= 1.0 {
        return 1.0;
    }

    temp
}
/// Given the surface temperature of a planet (in Kelvin), this function returns the fraction of the planet's surface covered by ice. This is Fogg's eq.24. See Hart[24] in Icarus vol.33, p.28 for an explanation.
Given the surface temperature of a planet (in Kelvin), this function returns the fraction of the planet's surface covered by ice.
Given the surface temperature of a planet ( in Kelvin ) this function returns the fraction of the planet ' s surface covered by ice .
pub fn ice_fraction(hydrosphere_fraction: &f64, surface_temp_kelvin: &f64) -> f64 {
    let surface_temp_kelvin = match *surface_temp_kelvin > 328.0 {
        true => 328.0,
        false => *surface_temp_kelvin,
    };
    let mut temp = ((328.0 - surface_temp_kelvin) / 70.0).powf(5.0);
    if temp > 1.5 * hydrosphere_fraction {
        temp = 1.5 * hydrosphere_fraction;
    }
    if temp >= 1.0 {
        return 1.0;
    }
    temp
}
pub fn ice_fraction ( hydrosphere_fraction : & f64 , surface_temp_kelvin : & f64 ) -> f64 { let surface_temp_kelvin = match * surface_temp_kelvin > 328.0 { true => 328.0 , false => * surface_temp_kelvin , } ; let mut temp = ( ( 328.0 - surface_temp_kelvin ) / 70.0 ) . powf ( 5.0 ) ; if temp > 1.5 * hydrosphere_fraction { temp = 1.5 * hydrosphere_fraction ; } if temp >= 1.0 { return 1.0 ; } temp }
Given the surface temperature of a planet (in Kelvin), this function returns the fraction of the planet's surface covered by ice.
Given the surface temperature of a planet ( in Kelvin ) this function returns the fraction of the planet ' s surface covered by ice .
hydrosphere_fraction
&f64
surface_temp_kelvin
&f64
hydrosphere_fraction
&f64
surface_temp_kelvin
&f64