python中output使用_Python output.Output方法代码示例
# 需要導(dǎo)入模塊: import output [as 別名]
# 或者: from output import Output [as 別名]
def __init__(self,param,grid):
self.list_param=['modelname','tend','fixed_dt','dt','cfl',
'plot_var','cax','colorscheme',
'plot_interactive','fixed_dt','dtmax',
'freq_save','freq_plot']
param.copy(self,self.list_param)
self.list_grid=['dx','nh','msk']
grid.copy(self,self.list_grid)
if param.modelname=='euler':
from euler import Euler
self.model = Euler(param,grid)
if param.modelname=='advection':
from advection import Advection
self.model = Advection(param,grid)
if param.modelname=='boussinesq':
from boussinesq import Boussinesq
self.model = Boussinesq(param,grid)
if param.modelname=='quasigeostrophic':
from quasigeostrophic import QG
self.model = QG(param,grid)
self.diag = Diag(param,grid)
self.plotting = Plotting(param)
# here's a shortcut to the model state
self.state = self.model.var.state
self.t = 0.
self.kt = 0
self.output=Output(param,grid,self.diag)
總結(jié)
以上是生活随笔為你收集整理的python中output使用_Python output.Output方法代码示例的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python中的类属性和类方法_pyth
- 下一篇: css 横线_CSS-画一个太极阴阳图