Beispiel #1
0
    def on_load_grid(self, event):
        
        dlg = wx.DirDialog(
            self, 
            message="Open SUNTANS grid from folder...",
            defaultPath=os.getcwd(),
            style= wx.DD_DEFAULT_STYLE)
        
        if dlg.ShowModal() == wx.ID_OK:
            path = dlg.GetPath()

            # Initialise the class
            self.flash_status_message("Opening SUNTANS grid from folder: %s" % path)
            Grid.__init__(self,path)

            # Plot the Grid
            if self.__dict__.has_key('collection'):
                self.axes.collections.remove(self.collection)

            self.axes,self.collection = self.plotmesh(ax=self.axes,edgecolors='y')

            # redraw the figure
            self.canvas.draw()
Beispiel #2
0
    def on_load_grid(self, event):

        dlg = wx.DirDialog(self,
                           message="Open SUNTANS grid from folder...",
                           defaultPath=os.getcwd(),
                           style=wx.DD_DEFAULT_STYLE)

        if dlg.ShowModal() == wx.ID_OK:
            path = dlg.GetPath()

            # Initialise the class
            self.flash_status_message("Opening SUNTANS grid from folder: %s" %
                                      path)
            Grid.__init__(self, path)

            # Plot the Grid
            if 'collection' in self.__dict__:
                self.axes.collections.remove(self.collection)

            self.axes, self.collection = self.plotmesh(ax=self.axes,
                                                       edgecolors='y')

            # redraw the figure
            self.canvas.draw()
Beispiel #3
0
 def __init__(self,ncfile):
     self.ncfile=ncfile
     Grid.__init__(self,ncfile,gridvars=untrim_gridvars,griddims=untrim_griddims)
Beispiel #4
0
 def __init__(self, ncfile):
     self.ncfile = ncfile
     Grid.__init__(self,
                   ncfile,
                   gridvars=untrim_gridvars,
                   griddims=untrim_griddims)