Ejemplo n.º 1
0
 def storm_track_info(self, filepath: str):
     r'''
     Add storm tracks from Nexrad Level III (PUP) STI product file
     '''
     sti = StormTrackInfo(filepath)
     if len(sti.info.keys()) == 0:
         warnings.warn('No storm track to plot', RuntimeWarning)
         return
     else:
         stlist = sti.storm_list
         #extent = self.geoax.get_extent()
         for st in stlist:
             past = sti.track(st, 'past')
             fcs = sti.track(st, 'forecast')
             current = sti.current(st)
             if past:
                 self.geoax.plot(*past,
                                 marker='.',
                                 color='white',
                                 zorder=4,
                                 markersize=5,
                                 transform=self.data_crs)
             if fcs:
                 self.geoax.plot(*fcs,
                                 marker='+',
                                 color='white',
                                 zorder=4,
                                 markersize=5,
                                 transform=self.data_crs)
             self.geoax.scatter(*current,
                                marker='o',
                                s=15,
                                zorder=5,
                                color='lightgrey',
                                transform=self.data_crs)
Ejemplo n.º 2
0
 def storm_track_info(self, filepath: str):
     r"""
     Add storm tracks from Nexrad Level III (PUP) STI product file
     """
     sti = StormTrackInfo(filepath)
     if len(sti.info.keys()) == 0:
         warnings.warn("No storm track to plot", RuntimeWarning)
         return
     else:
         stlist = sti.storm_list
         # extent = self.geoax.get_extent()
         for st in stlist:
             past = sti.track(st, "past")
             fcs = sti.track(st, "forecast")
             current = sti.current(st)
             if past:
                 self.geoax.plot(*past,
                                 marker=".",
                                 color="white",
                                 zorder=4,
                                 markersize=5,
                                 transform=self.data_crs)
             if fcs:
                 self.geoax.plot(*fcs,
                                 marker="+",
                                 color="white",
                                 zorder=4,
                                 markersize=5,
                                 transform=self.data_crs)
             self.geoax.scatter(*current,
                                marker="o",
                                s=15,
                                zorder=5,
                                color="lightgrey",
                                transform=self.data_crs)