如何在Flopy MF6中绘制横断面图中的流量矢量?
我知道这是平面视图的地块:
quiver = mapview.plot_specific_discharge(spdis[0])我尝试使用以下代码获取特定的放电,但得到错误:
AttributeError: module 'flopy.utils.postprocessing' has no attribute 'get_specific_discharge'代码:
hds_file = os.path.join(workspace, headfile)
hds = flopy.utils.binaryfile.HeadFile(hds_file)
cbb_file = os.path.join(workspace, budgetfile)
cbb = flopy.utils.CellBudgetFile(fname, precision='double')
q = flopy.utils.postprocessing.get_specific_discharge(gwf,cbb_file, precision='single', kstpkper=(0,1),
hdsfile=hds_file, position='centers')发布于 2021-02-03 22:55:52
对我来说(使用mf6)在横截面上绘制特定流量的工作原理如下:
读取cbc输出:
cbcdobj = flopy.utils.binaryfile.CellBudgetFile(path, precision='double', verbose=True)
SPDIS = cbcdobj.get_data(kstpkper=kstpkper, text='DATA-SPDIS')[0]在使用mf2005时,您可能需要使用'verbose=False‘和'precision=single’。
然后横截面:
cros_mp=flopy.plot.PlotCrossSection(model=gwf, line={'row': 200})
cros_mp.plot_specific_discharge(SPDIS) 请注意,在不规则截面('line',而不是'row‘或'column')上绘制特定放电是不可能的。
https://stackoverflow.com/questions/64039827
复制相似问题