Beispiel #1
0
    def gauge_afteraxes(cd):

        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)

        # fetch real data
        noaaArr = [
            "8557380", "8639348", "8662245", "2695540", "8531680", "8510560"
        ]
        gaugeNumber = cd.gaugeno
        if (gaugeNumber < 7):
            # only looking at gauge 1-6 because rest of data not from NOAA Gauges
            realData = geoutil.fetch_noaa_tide_data(
                noaaArr[gaugeNumber - 1],
                datetime.datetime(2015, 9, 30, hour=12),
                datetime.datetime(2015, 10, 6, hour=6))
            values = realData[1] - realData[2]  # de-tide NOAA data
            times = []
            for time in realData[0]:
                times.append(
                    (time - numpy.datetime64("2015-10-02T12:00")).astype(float)
                    / 1440)

            plt.plot(times, values, color="g", label="real")

        # Fix up plot - in particular fix time labels
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-2, 3.75])
        axes.set_ylim([0, 4])
        axes.set_xticks([-2, -1, 0, 1, 2, 3])
        axes.set_xticklabels(
            [r"$-2$", r"$-1$", r"$0$", r"$1$", r"$2$", r"$3$"])
        axes.grid(True)
Beispiel #2
0
    def gauge_afteraxes(cd):
        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)

        # Fix up plot - in particular fix time labels
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-3, 3])
        axes.set_ylim([0,1.5])
        axes.set_xticks([-3, -2, -1, 0, 1, 2, 3])
        axes.set_xticklabels([r"$-3$",r"$-2$",r"$-1$", r"$0$", r"$1$", r"$2$", r"$3$"])
        axes.grid(True)
Beispiel #3
0
    def gauge_afteraxes(cd):

        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes, landfall=landfall)

        # Fix up plot - in particular fix time labels
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-2, 1])
        axes.set_ylim([-1, 5])
        axes.set_xticks([-2, -1, 0, 1])
        axes.set_xticklabels([r"$-2$", r"$-1$", r"$0$", r"$1$"])
        axes.grid(True)
Beispiel #4
0
    def gauge_afteraxes(cd):

        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)

        # Fix up plot - in particular fix time labels
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-2.25, 0.75])
        axes.set_ylim([-1, 4])
        axes.set_xticks([-2.25, -1.25, -0.25, 0.75])
        axes.set_xticklabels([r"$-2.25$", r"$-1.25$", r"$-0.25$", r"$0.75$"])
        axes.grid(True)
Beispiel #5
0
    def gauge_afteraxes(cd):
        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)

        # Fix up plot - in particular fix time labels
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([0, 8])
        axes.set_ylim([0, 4])
        axes.set_xticks([0, 1, 2, 3, 4, 5, 6, 7, 8])
        axes.set_xticklabels([
            r"$0$", r"$1$", r"$2$", r"$3$", r"$4$", r"$5$", r"$6$", r"$7$",
            r"$8$"
        ])
        axes.grid(True)
Beispiel #6
0
    def gauge_afteraxes(cd):

        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)

        #t, surge = get_actual_water_levels(cd.gaugeno)
        #axes.plot(t, surge, color="g", label="Observed")

        # Fix up plot - in particular fix time labels
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-2, 2])
        axes.set_ylim([-.25, .75])
        axes.set_xticks([-2, -1, 0, 1, 2])
        axes.set_xticklabels([r"$-2$", r"$-1$", r"$0$", r"$1$", r"$2$"])
        axes.grid(True)
Beispiel #7
0
    def gauge_afteraxes(cd):
        station_id, station_name = stations[cd.gaugeno - 1]
        days_rel_landfall, actual_level = get_actual_water_levels(station_id)

        axes = plt.gca()
        surge.plot_landfall_gauge(cd.gaugesoln, axes, landfall=landfall)
        axes.plot(days_rel_landfall, actual_level, 'g')

        # Fix up plot - in particular fix time labels
        axes.set_title(station_name)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-3, 1])
        axes.set_ylim([-0.5, 2.5])
        axes.set_xticks([-3, -2, -1, 0, 1])
        axes.set_xticklabels([r"$-3$", r"$-2$", r"$-1$", r"$0$", r"$1$"])
        axes.grid(True)
Beispiel #8
0
    def gauge_afteraxes(cd):

        station_id, station_name = stations[cd.gaugeno - 1]
        seconds_rel_landfall, actual_level = get_actual_water_levels(
            station_id)

        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)
        axes.plot(seconds_rel_landfall, actual_level, 'g')

        # Fix up plot - in particular fix time labels
        axes.set_title(station_name)
        axes.set_xlabel('Seconds relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([days2seconds(-1), days2seconds(3)])
        axes.set_ylim([-1, 5])
        axes.set_xticks([
            -days2seconds(-1), 0,
            days2seconds(1),
            days2seconds(2),
            days2seconds(3)
        ])
    def gauge_afteraxes(cd):
        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)
        gauge_id = ['8770822', '8768094', '8764227', '8761305', '8760922']
        gauge_title = [
            'Texas Point, Sabine Pass, TX', 'Calcasieu Pass, LA',
            'LAWMA, Amerada Pass, LA', 'Shell Beach, LA',
            'Pilots Station East, S.W. Pass, LA'
        ]
        if (cd.gaugeno < 6):
            realData = util.fetch_noaa_tide_data(gauge_id[cd.gaugeno - 1],
                                                 datetime.datetime(2019,
                                                                   7,
                                                                   10,
                                                                   hour=12),
                                                 datetime.datetime(2019,
                                                                   7,
                                                                   16,
                                                                   hour=12),
                                                 datum='MLLW')
            values = realData[1] - realData[2]
            times = []
            for time in realData[0]:
                times.append(
                    (time - numpy.datetime64("2019-07-13T15:00")).astype(float)
                    / 1440)
        plt.plot(times, values, color='orange', label='real')

        axes.set_title('Gauge %s: %s' %
                       (cd.gaugeno,
                        gauge_title[cd.gaugeno - 1]))  # i for i in gauge_title
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-2, 1])
        axes.set_ylim([-1.0, 2.5])
        axes.set_xticks([-2, -1, 0, 1])
        axes.set_xticklabels([r"$-2$", r"$-1$", r"$0$", r"$1$"])
        axes.grid(True)
Beispiel #10
0
    def gauge_afteraxes(cd):

        axes = plt.gca()
        surgeplot.plot_landfall_gauge(cd.gaugesoln, axes)

        # Fix up plot - in particular fix time labels
        # axes.legend()
        axes.set_title('Station %s' % cd.gaugeno)
        axes.set_xlabel('Days relative to landfall')
        axes.set_ylabel('Surface (m)')
        axes.set_xlim([-3, 5])
        axes.set_ylim([-2, 3])
        axes.set_xticks([-3, -2, -1, 0, 1, 2, 3, 4, 5])
        axes.set_xticklabels([r"$-3$", r"$-2$", r"$-1$", r"$0$", r"$1$", r"$2$", r"$3$", r"$4$", r"$5$"])
        axes.grid(True)

        try:

            # gauge 5 and 6 are in the Bahamas, and there's no water level data,
            # comparison data is estimate flood heights from newspapers
            if(cd.gaugeno == 5 or cd.gaugeno == 6):
                if(cd.gaugeno == 5):
            	    axes.axhline(y=4*0.3040, color = 'r', label = data_names[4]) # flood height was 4 feet
                else:
                    axes.axhline(y=5*0.3040, color = 'r', label = data_names[5]) # flood height was 5 feet

            # the rest have NOAA water level files
            else:
                # read water level data
                gauge_data = gauges[cd.gaugeno - 1]

                axes.plot(gauge_data[:, 1], gauge_data[:, 0], label = data_names[cd.gaugeno - 1])

            axes.legend()
        except:
            pass