Beispiel #1
0
if __name__ == '__main__':
    ela_elevations = np.arange(4000, 5100, 100)
    ela_changes = np.arange(100, 510, 100)
    slopes = np.arange(0.05, 0.30, 0.05)

    glacier = Glacier(max_bed_height=5500)

    fig, ((ax1, ax2), (ax3, ax4), (ax5, ax6)) = plt.subplots(nrows=3,
                                                             ncols=2,
                                                             figsize=(14, 10))

    # Length change with varying ELA
    for slope in slopes:
        glacier.slope = slope
        length_change = [
            glacier.linear_equilibrium_length(elevation)
            for elevation in ela_elevations
        ]
        ax1.plot(ela_elevations, length_change, label=slope.round(2))
    ax1.set_title('Length change with varying ELA')
    ax1.legend(title='Slope')

    # Change of length over change of ELA
    for slope in slopes:
        lengths = [
            glacier.length_change(ela_change, slope)
            for ela_change in ela_changes
        ]
        ax3.plot(ela_changes, lengths, label=slope.round(2))
    ax3.set_title('Length change with varying ELA change')
    ax3.legend(title='Slope')
Beispiel #2
0
    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())

    fig, (ax1, ax2, ax3) = plt.subplots(nrows=1, ncols=3, figsize=(14, 6))
    x_axis = [1, 2, 3, 4]

    labels = dict(textcoords='offset points',
                  ha='right',
                  va='bottom',
                  bbox=dict(boxstyle='round,pad=0.4', fc='wheat', alpha=0.8))

    ax1.scatter(x_axis, critical_ela, label='critical ELA', s=100)
    ax1.scatter(x_axis, ela, label='ELA from Length', marker='*', s=100)