Exemple #1
0
 def _dumpic(self):
     """
     Dump initial condition plots
     
     For each variable (uc,vc,T,S,eta):
         - surface plot
         - seabed plot
     """
     
     varnames = ['uc','vc','temp','salt','eta']
     
     sun = Spatial(self.suntanspath+'/'+self.icfile,klayer=[0])
     
     # Plot the surface variables
     for vv in varnames:
         h=plt.figure()
         sun.variable=vv
         sun.loadData()
         sun.clim = [sun.data.min(),sun.data.max()]
         sun.plot()            
         outfile = '%s/IC_%s_surface.png'%(self.plotdir,vv)
         sun.savefig(outfile)
         del h
         
     # Plot the seabed variables
     sun.klayer=[-1]
     for vv in varnames:
         h=plt.figure()
         sun.variable=vv
         sun.loadData()
         sun.clim = [sun.data.min(),sun.data.max()]
         sun.plot()
         outfile = '%s/IC_%s_seabed.png'%(self.plotdir,vv)
         sun.savefig(outfile)  
         del h
Exemple #2
0
    def _dumpic(self):
        """
        Dump initial condition plots
        
        For each variable (uc,vc,T,S,eta):
            - surface plot
            - seabed plot
        """

        varnames = ['uc', 'vc', 'temp', 'salt', 'eta']

        sun = Spatial(self.suntanspath + '/' + self.icfile, klayer=[0])

        # Plot the surface variables
        for vv in varnames:
            h = plt.figure()
            sun.variable = vv
            sun.loadData()
            sun.clim = [sun.data.min(), sun.data.max()]
            sun.plot()
            outfile = '%s/IC_%s_surface.png' % (self.plotdir, vv)
            sun.savefig(outfile)
            del h

        # Plot the seabed variables
        sun.klayer = [-1]
        for vv in varnames:
            h = plt.figure()
            sun.variable = vv
            sun.loadData()
            sun.clim = [sun.data.min(), sun.data.max()]
            sun.plot()
            outfile = '%s/IC_%s_seabed.png' % (self.plotdir, vv)
            sun.savefig(outfile)
            del h