Beispiel #1
0
if __name__ == '__main__':
    initial_length = 22000
    glacier = Glacier(max_bed_height=3900, length=initial_length, slope=0.1)
    elas = [2900, 3100, 2800, 2700, 3000, 2800, 3400, 3300, 3200, 3500]
    time = np.arange(0, 501, step=1)
    lengths = []
    ela_index = 0
    time_delta = 1

    e_folding = 1 / math.e
    e_year = None
    e_length = None

    for year in time:
        lengths.append(glacier.length_over_time(time_delta, elas[ela_index]))
        glacier.length = lengths[-1]

        if 1 < year < 99 and (year % 10 == 9):
            ela_index += 1
        elif e_folding and (1 - (lengths[-1] / initial_length)) > e_folding:
            e_year = year
            e_length = lengths[-1]
            e_folding = None

    plt.figure(figsize=(12, 8))
    plt.plot(time, lengths)
    plt.scatter(e_year,
                e_length,
                marker='+',
                s=300,
                color='orange',
Beispiel #2
0
    glacier = Glacier()

    measured_length = []
    linear_equilibrium_length = []

    max_surfaces = []
    ela = []
    critical_ela = []

    measured_thickness = []
    mean_thickness = []
    static_thickness = []

    for basin, data in BASINS.items():
        glacier.max_bed_height = data['bed_height']
        glacier.length = data['length_of_segment']
        glacier.slope = calc_slope(data['min_surface'], data['max_surface'],
                                   data['length_of_segment'])

        max_surfaces.append(data['max_surface'])
        ela.append(glacier.ela_from_length())
        critical_ela.append(glacier.critical_ela())

        measured_length.append(data['length_of_segment'] / 1000)
        linear_equilibrium_length.append(
            glacier.linear_equilibrium_length(
                ela[-1], thickness=data['mean_ice_thickness']) / 1000)

        measured_thickness.append(data['mean_ice_thickness'])
        mean_thickness.append(glacier.mean_thickness())
        static_thickness.append(glacier.static_mean_thickness())