欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程语言 > python >内容正文

python

python中output使用_Python output.Output方法代码示例

发布时间:2025/4/5 python 45 豆豆
生活随笔 收集整理的这篇文章主要介绍了 python中output使用_Python output.Output方法代码示例 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

# 需要导入模块: 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)

总结

以上是生活随笔为你收集整理的python中output使用_Python output.Output方法代码示例的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。