feat(mf6 plotting/exporting): generalized plotting and exporting code to work both with mf2005 and mf6 (#462)
This PR is in relation to issue #368. There are quite a few changes here, but it should all be backward compatible. With these changes comes a move toward a modelgrid object, instead of the spatial reference object (which is still supported for now). The modelgrid object has structured and unstructured variants that should move the plotting and exporting capabilities forward in a more general manner. This update includes changes to flopy exporting, plotting, spatialreference, and model grids. Exporting and plotting are now implemented using the grid class instead of spatial reference and dis. Both exporting and plotting work the same way on mf2005 and mf6. Backward compatibility has been maintained for both exporting and plotting. Exporting and plotting now also support both structured and vertex grids, with plotting having limited support for unstructured grids. The exporting interface is mostly unchanged (grid object swapped for a spatial reference object), while a new simplified plotting interface has been implemented (the old plotting interface is also still available).develop
parent
1f22e5ef15
commit
0575a44716
|
@ -20,9 +20,8 @@ def test_binaryfile_reference():
|
|||
h = flopy.utils.HeadFile(
|
||||
os.path.join('..', 'examples', 'data', 'freyberg', 'freyberg.githds'))
|
||||
assert isinstance(h, flopy.utils.HeadFile)
|
||||
h.sr.xul = 1000.0
|
||||
h.sr.yul = 200.0
|
||||
h.sr.rotation = 15.0
|
||||
h.mg.set_coord_info(xoff=1000.0, yoff=200.0, angrot=15.0)
|
||||
|
||||
if matplotlib is not None:
|
||||
assert isinstance(h.plot(), matplotlib.axes.Axes)
|
||||
return
|
||||
|
@ -33,9 +32,8 @@ def test_formattedfile_reference():
|
|||
os.path.join('..', 'examples', 'data', 'mf2005_test',
|
||||
'test1tr.githds'))
|
||||
assert isinstance(h, flopy.utils.FormattedHeadFile)
|
||||
h.sr.xul = 1000.0
|
||||
h.sr.yul = 200.0
|
||||
h.sr.rotation = 15.0
|
||||
h.mg.set_coord_info(xoff=1000.0, yoff=200.0, angrot=15.0)
|
||||
|
||||
if matplotlib is not None:
|
||||
assert isinstance(h.plot(masked_values=[6999.000]), matplotlib.axes.Axes)
|
||||
return
|
||||
|
@ -101,7 +99,7 @@ if __name__ == '__main__':
|
|||
# test_mbase_sr()
|
||||
# test_sr()
|
||||
# test_dis_reference()
|
||||
#test_mflist_reference()
|
||||
test_cbc_ts()
|
||||
test_mflist_reference()
|
||||
# test_cbc_ts()
|
||||
# test_formattedfile_reference()
|
||||
# test_binaryfile_reference()
|
||||
|
|
|
@ -13,7 +13,6 @@ namfiles = [namfile for namfile in os.listdir(pth) if namfile.endswith('.nam')]
|
|||
# skip = ["MNW2-Fig28.nam", "testsfr2.nam", "testsfr2_tab.nam"]
|
||||
skip = []
|
||||
|
||||
|
||||
tpth = os.path.join('temp', 't007')
|
||||
# make the directory if it does not exist
|
||||
if not os.path.isdir(tpth):
|
||||
|
@ -38,13 +37,20 @@ def remove_shp(shpname):
|
|||
if os.path.exists(fname):
|
||||
os.remove(fname)
|
||||
|
||||
def export_netcdf(namfile):
|
||||
|
||||
def export_mf6_netcdf(path):
|
||||
sim = flopy.mf6.modflow.mfsimulation.MFSimulation.load(sim_ws=path)
|
||||
for name, model in sim.get_model_itr():
|
||||
export_netcdf(model)
|
||||
|
||||
|
||||
def export_mf2005_netcdf(namfile):
|
||||
if namfile in skip:
|
||||
return
|
||||
print(namfile)
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=pth, verbose=False)
|
||||
if m.sr.lenuni == 0:
|
||||
m.sr.lenuni = 1
|
||||
if m.dis.lenuni == 0:
|
||||
m.dis.lenuni = 1
|
||||
# print('skipping...lenuni==0 (undefined)')
|
||||
# return
|
||||
# if sum(m.dis.laycbd) != 0:
|
||||
|
@ -53,7 +59,9 @@ def export_netcdf(namfile):
|
|||
return
|
||||
assert m, 'Could not load namefile {}'.format(namfile)
|
||||
assert isinstance(m, flopy.modflow.Modflow)
|
||||
export_netcdf(m)
|
||||
|
||||
def export_netcdf(m):
|
||||
# Do not fail if netCDF4 not installed
|
||||
try:
|
||||
import netCDF4
|
||||
|
@ -110,7 +118,7 @@ def export_shapefile(namfile):
|
|||
return
|
||||
|
||||
def test_freyberg_export():
|
||||
from flopy.utils.reference import SpatialReference
|
||||
from flopy.discretization import StructuredGrid
|
||||
namfile = 'freyberg.nam'
|
||||
|
||||
# steady state
|
||||
|
@ -138,14 +146,23 @@ def test_freyberg_export():
|
|||
m.drn.stress_period_data.export(outshp, sparse=True)
|
||||
assert os.path.exists(outshp)
|
||||
remove_shp(outshp)
|
||||
m.sr = SpatialReference(delr=m.dis.delr.array, delc=m.dis.delc.array,
|
||||
epsg=5070)
|
||||
m.modelgrid = StructuredGrid(delc=m.dis.delc.array,
|
||||
delr=m.dis.delr.array,
|
||||
epsg=5070)
|
||||
# test export with an sr, regardless of whether or not wkt was found
|
||||
m.drn.stress_period_data.export(outshp, sparse=True)
|
||||
assert os.path.exists(outshp)
|
||||
remove_shp(outshp)
|
||||
m.sr = SpatialReference(delr=m.dis.delr.array, delc=m.dis.delc.array,
|
||||
epsg=3070)
|
||||
m.modelgrid = StructuredGrid(delc=m.dis.delc.array,
|
||||
delr=m.dis.delr.array,
|
||||
epsg=3070)
|
||||
# verify that attributes have same sr as parent
|
||||
assert m.drn.stress_period_data.mg.epsg == m.modelgrid.epsg
|
||||
assert m.drn.stress_period_data.mg.proj4 == m.modelgrid.proj4
|
||||
assert m.drn.stress_period_data.mg.xoffset == m.modelgrid.xoffset
|
||||
assert m.drn.stress_period_data.mg.yoffset == m.modelgrid.yoffset
|
||||
assert m.drn.stress_period_data.mg.angrot == m.modelgrid.angrot
|
||||
|
||||
# if wkt text was fetched from spatialreference.org
|
||||
if m.sr.wkt is not None:
|
||||
# test default package export
|
||||
|
@ -158,7 +175,7 @@ def test_freyberg_export():
|
|||
remove_shp(outshp)
|
||||
|
||||
# test default package export to higher level dir
|
||||
outshp = os.path.join('..', namfile[:-4] + '_dis.shp')
|
||||
outshp = os.path.join(spth, namfile[:-4] + '_dis.shp')
|
||||
m.dis.export(outshp)
|
||||
prjfile = outshp.replace('.shp', '.prj')
|
||||
with open(prjfile) as src:
|
||||
|
@ -171,6 +188,7 @@ def test_freyberg_export():
|
|||
m.drn.stress_period_data.export(outshp,
|
||||
sparse=True)
|
||||
prjfile = outshp.replace('.shp', '.prj')
|
||||
assert os.path.exists(prjfile)
|
||||
with open(prjfile) as src:
|
||||
prjtxt = src.read()
|
||||
assert prjtxt == m.sr.wkt
|
||||
|
@ -203,23 +221,19 @@ def test_export_output():
|
|||
assert np.array_equal(ibound_mask, arr_mask)
|
||||
|
||||
def test_write_shapefile():
|
||||
from flopy.utils.reference import SpatialReference
|
||||
from flopy.discretization import StructuredGrid
|
||||
from flopy.export.shapefile_utils import shp2recarray
|
||||
from flopy.export.shapefile_utils import write_grid_shapefile, write_grid_shapefile2
|
||||
|
||||
sr = SpatialReference(delr=np.ones(10) *1.1, # cell spacing along model rows
|
||||
delc=np.ones(10) *1.1, # cell spacing along model columns
|
||||
epsg=26715,
|
||||
lenuni=1 # MODFLOW length units
|
||||
)
|
||||
vrts = copy.deepcopy(sr.vertices)
|
||||
sg = StructuredGrid(delr=np.ones(10) *1.1, # cell spacing along model rows
|
||||
delc=np.ones(10) *1.1, # cell spacing along model columns
|
||||
epsg=26715)
|
||||
outshp1 = os.path.join(tpth, 'junk.shp')
|
||||
outshp2 = os.path.join(tpth, 'junk2.shp')
|
||||
write_grid_shapefile(outshp1, sr, array_dict={})
|
||||
write_grid_shapefile2(outshp2, sr, array_dict={})
|
||||
write_grid_shapefile(outshp1, sg, array_dict={})
|
||||
write_grid_shapefile2(outshp2, sg, array_dict={})
|
||||
|
||||
# test that vertices aren't getting altered by writing shapefile
|
||||
assert np.array_equal(vrts, sr.vertices)
|
||||
for outshp in [outshp1, outshp2]:
|
||||
# check that pyshp reads integers
|
||||
# this only check that row/column were recorded as "N"
|
||||
|
@ -249,7 +263,7 @@ def test_write_shapefile():
|
|||
|
||||
|
||||
def test_export_array():
|
||||
|
||||
from flopy.export import utils
|
||||
try:
|
||||
from scipy.ndimage import rotate
|
||||
except:
|
||||
|
@ -260,12 +274,13 @@ def test_export_array():
|
|||
model_ws = '../examples/data/freyberg_multilayer_transient/'
|
||||
m = flopy.modflow.Modflow.load(namfile, model_ws=model_ws, verbose=False,
|
||||
load_only=['DIS', 'BAS6'])
|
||||
m.sr.rotation = 45.
|
||||
m.modelgrid.set_coord_info(angrot=45)
|
||||
nodata = -9999
|
||||
m.sr.export_array(os.path.join(tpth, 'fb.asc'), m.dis.top.array, nodata=nodata)
|
||||
utils.export_array(m.modelgrid, os.path.join(tpth, 'fb.asc'),
|
||||
m.dis.top.array, nodata=nodata)
|
||||
arr = np.loadtxt(os.path.join(tpth, 'fb.asc'), skiprows=6)
|
||||
|
||||
m.sr.write_shapefile(os.path.join(tpth, 'grid.shp'))
|
||||
m.modelgrid.write_shapefile(os.path.join(tpth, 'grid.shp'))
|
||||
# check bounds
|
||||
with open(os.path.join(tpth, 'fb.asc')) as src:
|
||||
for line in src:
|
||||
|
@ -273,24 +288,24 @@ def test_export_array():
|
|||
val = float(line.strip().split()[-1])
|
||||
# ascii grid origin will differ if it was unrotated
|
||||
if rotate:
|
||||
assert np.abs(val - m.sr.bounds[0]) < 1e-6
|
||||
assert np.abs(val - m.modelgrid.extent[0]) < 1e-6
|
||||
else:
|
||||
assert np.abs(val - m.sr.xll) < 1e-6
|
||||
assert np.abs(val - m.modelgrid.xoffset) < 1e-6
|
||||
if 'yllcorner' in line.lower():
|
||||
val = float(line.strip().split()[-1])
|
||||
if rotate:
|
||||
assert np.abs(val - m.sr.bounds[1]) < 1e-6
|
||||
assert np.abs(val - m.modelgrid.extent[1]) < 1e-6
|
||||
else:
|
||||
assert np.abs(val - m.sr.yll) < 1e-6
|
||||
assert np.abs(val - m.modelgrid.yoffset) < 1e-6
|
||||
if 'cellsize' in line.lower():
|
||||
val = float(line.strip().split()[-1])
|
||||
rot_cellsize = np.cos(np.radians(m.sr.rotation)) * m.sr.delr[0] * m.sr.length_multiplier
|
||||
#assert np.abs(val - rot_cellsize) < 1e-6
|
||||
rot_cellsize = np.cos(np.radians(m.modelgrid.angrot)) * m.modelgrid.delr[0] # * m.sr.length_multiplier
|
||||
# assert np.abs(val - rot_cellsize) < 1e-6
|
||||
break
|
||||
rotate = False
|
||||
rasterio = None
|
||||
if rotate:
|
||||
rotated = rotate(m.dis.top.array, m.sr.rotation, cval=nodata)
|
||||
rotated = rotate(m.dis.top.array, m.modelgrid.angrot, cval=nodata)
|
||||
|
||||
if rotate:
|
||||
assert rotated.shape == arr.shape
|
||||
|
@ -301,37 +316,38 @@ def test_export_array():
|
|||
except:
|
||||
pass
|
||||
if rasterio is not None:
|
||||
m.sr.export_array(os.path.join(tpth, 'fb.tif'), m.dis.top.array,
|
||||
nodata=nodata)
|
||||
utils.export_array(m.modelgrid,
|
||||
os.path.join(tpth, 'fb.tif'),
|
||||
m.dis.top.array,
|
||||
nodata=nodata)
|
||||
with rasterio.open(os.path.join(tpth, 'fb.tif')) as src:
|
||||
arr = src.read(1)
|
||||
assert src.shape == (m.nrow, m.ncol)
|
||||
assert np.abs(src.bounds[0] - m.sr.bounds[0]) < 1e-6
|
||||
assert np.abs(src.bounds[1] - m.sr.bounds[1]) < 1e-6
|
||||
assert src.shape == (m.nrow, m.ncol)
|
||||
assert np.abs(src.bounds[0] - m.modelgrid.extent[0]) < 1e-6
|
||||
assert np.abs(src.bounds[1] - m.modelgrid.extent[1]) < 1e-6
|
||||
|
||||
def test_mbase_sr():
|
||||
def test_mbase_modelgrid():
|
||||
import numpy as np
|
||||
import flopy
|
||||
|
||||
ml = flopy.modflow.Modflow(modelname="test", xul=1000.0,
|
||||
ml = flopy.modflow.Modflow(modelname="test", xll=500.0,
|
||||
rotation=12.5, start_datetime="1/1/2016")
|
||||
try:
|
||||
print(ml.sr.xcentergrid)
|
||||
print(ml.modelgrid.xcentergrid)
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
raise Exception("should have failed")
|
||||
|
||||
dis = flopy.modflow.ModflowDis(ml, nrow=10, ncol=5, delr=np.arange(5),
|
||||
xul=500)
|
||||
print(ml.sr)
|
||||
assert ml.sr.xul == 500
|
||||
assert ml.sr.yll == -10
|
||||
dis = flopy.modflow.ModflowDis(ml, nrow=10, ncol=5, delr=np.arange(5))
|
||||
|
||||
assert ml.modelgrid.xoffset == 500
|
||||
assert ml.modelgrid.yoffset == 0.0
|
||||
ml.model_ws = tpth
|
||||
|
||||
ml.write_input()
|
||||
ml1 = flopy.modflow.Modflow.load("test.nam", model_ws=ml.model_ws)
|
||||
assert ml1.sr == ml.sr
|
||||
assert str(ml1.modelgrid) == str(ml.modelgrid)
|
||||
assert ml1.start_datetime == ml.start_datetime
|
||||
|
||||
def test_free_format_flag():
|
||||
|
@ -372,8 +388,9 @@ def test_free_format_flag():
|
|||
assert ms1.free_format_input == ms1.bas6.ifrefm
|
||||
|
||||
|
||||
def test_sr():
|
||||
def test_mg():
|
||||
import flopy
|
||||
from flopy.utils import geometry
|
||||
Lx = 100.
|
||||
Ly = 100.
|
||||
nlay = 1
|
||||
|
@ -383,105 +400,90 @@ def test_sr():
|
|||
delc = Ly / nrow
|
||||
top = 0
|
||||
botm = [-1]
|
||||
ms = flopy.modflow.Modflow(rotation=20.)
|
||||
ms = flopy.modflow.Modflow()
|
||||
dis = flopy.modflow.ModflowDis(ms, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
delr=delr, delc=delc, top=top, botm=botm)
|
||||
bas = flopy.modflow.ModflowBas(ms, ifrefm=True)
|
||||
|
||||
# test instantiation of an empty sr object
|
||||
sr = flopy.utils.reference.SpatialReference()
|
||||
# test instantiation of an empty basic Structured Grid
|
||||
mg = flopy.discretization.StructuredGrid(dis.delc.array, dis.delr.array)
|
||||
|
||||
# test instantiation of SR with xul, yul and no grid
|
||||
sr = flopy.utils.reference.SpatialReference(xul=1, yul=1)
|
||||
|
||||
xul, yul = 321., 123.
|
||||
sr = flopy.utils.SpatialReference(delr=ms.dis.delr.array,
|
||||
delc=ms.dis.delc.array, lenuni=3,
|
||||
xul=xul, yul=yul, rotation=20)
|
||||
# test instantiation of Structured grid with offsets
|
||||
mg = flopy.discretization.StructuredGrid(dis.delc.array, dis.delr.array,
|
||||
xoff=1, yoff=1)
|
||||
|
||||
#txt = 'yul does not approximately equal 100 - ' + \
|
||||
# '(xul, yul) = ({}, {})'.format( ms.sr.yul, ms.sr.yul)
|
||||
assert abs(ms.sr.yul - Ly) < 1e-3#, txt
|
||||
ms.sr.xul = 111
|
||||
assert ms.sr.xul == 111
|
||||
assert abs(ms.modelgrid.extent[-1] - Ly) < 1e-3#, txt
|
||||
ms.modelgrid.set_coord_info(xoff=111, yoff=0)
|
||||
assert ms.modelgrid.xoffset == 111
|
||||
ms.modelgrid.set_coord_info()
|
||||
|
||||
xll, yll = 321., 123.
|
||||
angrot = 20
|
||||
ms.modelgrid = flopy.discretization.StructuredGrid(delc=ms.dis.delc.array,
|
||||
delr=ms.dis.delr.array,
|
||||
xoff=xll, yoff=xll,
|
||||
angrot=angrot,
|
||||
lenuni=2)
|
||||
|
||||
# test that transform for arbitrary coordinates
|
||||
# is working in same as transform for model grid
|
||||
x, y = ms.sr.xcenter, ms.sr.ycenter[0]
|
||||
xt, yt = sr.transform(x, y)
|
||||
assert np.sum(xt - sr.xcentergrid[0]) < 1e-3
|
||||
x, y = ms.sr.xcenter[0], ms.sr.ycenter
|
||||
xt, yt = sr.transform(x, y)
|
||||
assert np.sum(yt - sr.ycentergrid[:, 0]) < 1e-3
|
||||
mg2 = flopy.discretization.StructuredGrid(delc=ms.dis.delc.array,
|
||||
delr=ms.dis.delr.array,
|
||||
lenuni=2)
|
||||
x = mg2.xcellcenters[0]
|
||||
y = mg2.ycellcenters[0]
|
||||
mg2.set_coord_info(xoff=xll, yoff=yll, angrot=angrot)
|
||||
xt, yt = geometry.transform(x, y, xll, yll, mg2.angrot_radians)
|
||||
|
||||
assert np.sum(xt - ms.modelgrid.xcellcenters[0]) < 1e-3
|
||||
assert np.sum(yt - ms.modelgrid.ycellcenters[0]) < 1e-3
|
||||
|
||||
# test inverse transform
|
||||
x0, y0 = 9.99, 2.49
|
||||
x1, y1 = sr.transform(x0, y0)
|
||||
x2, y2 = sr.transform(x1, y1, inverse=True)
|
||||
x1, y1 = geometry.transform(x0, y0, xll, yll, angrot)
|
||||
x2, y2 = geometry.transform(x1, y1, xll, yll, angrot, inverse=True)
|
||||
assert np.abs(x2-x0) < 1e-6
|
||||
assert np.abs(y2-y0) < 1e6
|
||||
|
||||
# test input using ul vs ll
|
||||
xll, yll = sr.xll, sr.yll
|
||||
sr2 = flopy.utils.SpatialReference(delr=ms.dis.delr.array,
|
||||
delc=ms.dis.delc.array, lenuni=3,
|
||||
xll=xll, yll=yll, rotation=20)
|
||||
assert sr2.xul == sr.xul
|
||||
assert sr2.yul == sr.yul
|
||||
assert np.array_equal(sr.xcentergrid, sr2.xcentergrid)
|
||||
assert np.array_equal(sr.ycentergrid, sr2.ycentergrid)
|
||||
|
||||
ms.sr.lenuni = 1
|
||||
assert ms.sr.lenuni == 1
|
||||
|
||||
ms.sr.units = "feet"
|
||||
assert ms.sr.units == "feet"
|
||||
|
||||
ms.sr = sr
|
||||
assert ms.sr == sr
|
||||
assert ms.sr.lenuni != ms.dis.lenuni
|
||||
|
||||
try:
|
||||
ms.sr.units = "junk"
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
raise Exception("should have failed")
|
||||
|
||||
ms.start_datetime = "1-1-2016"
|
||||
assert ms.start_datetime == "1-1-2016"
|
||||
assert ms.dis.start_datetime == "1-1-2016"
|
||||
|
||||
ms.model_ws = tpth
|
||||
|
||||
ms.write_input()
|
||||
ms1 = flopy.modflow.Modflow.load(ms.namefile, model_ws=ms.model_ws)
|
||||
assert ms1.sr == ms.sr
|
||||
assert ms1.dis.sr == ms.dis.sr
|
||||
print(ms.modelgrid.lenuni)
|
||||
print(ms1.modelgrid.lenuni)
|
||||
assert str(ms1.modelgrid) == str(ms.modelgrid)
|
||||
assert ms1.start_datetime == ms.start_datetime
|
||||
assert ms1.sr.units == ms.sr.units
|
||||
assert ms1.dis.lenuni == ms1.sr.lenuni
|
||||
assert ms1.modelgrid.lenuni == ms.modelgrid.lenuni
|
||||
#assert ms1.sr.lenuni != sr.lenuni
|
||||
ms1.sr = sr
|
||||
assert ms1.sr == ms.sr
|
||||
|
||||
def test_epsgs():
|
||||
import flopy.export.shapefile_utils as shp
|
||||
# test setting a geographic (lat/lon) coordinate reference
|
||||
# (also tests sr.crs parsing of geographic crs info)
|
||||
delr = np.ones(10)
|
||||
delc = np.ones(10)
|
||||
sr = flopy.utils.SpatialReference(delr=delr,
|
||||
delc=delc,
|
||||
)
|
||||
sr = flopy.discretization.StructuredGrid(delr=delr, delc=delc)
|
||||
sr.epsg = 102733
|
||||
assert sr.epsg == 102733
|
||||
|
||||
sr.epsg = 4326 # WGS 84
|
||||
assert sr.crs.crs['proj'] == 'longlat'
|
||||
assert sr.crs.grid_mapping_attribs['grid_mapping_name'] == 'latitude_longitude'
|
||||
crs = shp.CRS(epsg=4326)
|
||||
assert crs.crs['proj'] == 'longlat'
|
||||
assert crs.grid_mapping_attribs['grid_mapping_name'] == 'latitude_longitude'
|
||||
|
||||
# scaling has not been implemented on the modelgrid class
|
||||
"""
|
||||
def test_sr_scaling():
|
||||
nlay, nrow, ncol = 1, 10, 5
|
||||
delr, delc = 250, 500
|
||||
top = 100
|
||||
botm = 50
|
||||
xll, yll = 286.80, 29.03
|
||||
|
||||
print(np.__version__)
|
||||
|
@ -490,35 +492,39 @@ def test_sr_scaling():
|
|||
dis = flopy.modflow.ModflowDis(ms2, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
delr=delr,
|
||||
delc=delc)
|
||||
ms2.sr = flopy.utils.SpatialReference(delr=ms2.dis.delr.array,
|
||||
delc=ms2.dis.delc.array, lenuni=3,
|
||||
xll=xll, yll=yll, rotation=0)
|
||||
ms2.sr.epsg = 26715
|
||||
ms2.sr = flopy.discretization.StructuredGrid(delc=ms2.dis.delc.array,
|
||||
delr=ms2.dis.delr.array,
|
||||
xoff=xll,
|
||||
yoff=yll, angrot=0)
|
||||
ms2.modelgrid.epsg = 26715
|
||||
ms2.dis.export(os.path.join(spth, 'dis2.shp'))
|
||||
ms3 = flopy.modflow.Modflow()
|
||||
dis = flopy.modflow.ModflowDis(ms3, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
delr=delr,
|
||||
delc=delc)
|
||||
ms3.sr = flopy.utils.SpatialReference(delr=ms3.dis.delr.array,
|
||||
delc=ms2.dis.delc.array, lenuni=2,
|
||||
length_multiplier=2.,
|
||||
xll=xll, yll=yll, rotation=0)
|
||||
delc=delc, top=top, botm=botm)
|
||||
ms3.sr = flopy.discretization.StructuredGrid(delc=ms2.dis.delc.array,
|
||||
delr=ms2.dis.delr.array,
|
||||
xoff=xll, yoff=yll,
|
||||
angrot=0)
|
||||
ms3.dis.export(os.path.join(spth, 'dis3.shp'), epsg=26715)
|
||||
|
||||
# check that the origin(s) are maintained
|
||||
assert np.array_equal(ms3.sr.get_vertices(nrow - 1, 0)[1],
|
||||
[ms3.sr.xll, ms3.sr.yll])
|
||||
|
||||
assert np.allclose(ms3.sr.get_vertices(nrow - 1, 0)[1],
|
||||
ms2.sr.get_vertices(nrow - 1, 0)[1])
|
||||
mg3 = ms3.modelgrid
|
||||
assert np.array_equal(mg3.get_cell_vertices(nrow - 1, 0)[1],
|
||||
[ms3.modelgrid.xoffset, ms3.modelgrid.yoffset])
|
||||
mg2 = ms2.modelgrid
|
||||
assert np.allclose(mg3.get_cell_vertices(nrow - 1, 0)[1],
|
||||
mg2.get_cell_vertices(nrow - 1, 0)[1])
|
||||
|
||||
# check that the upper left corner is computed correctly
|
||||
# in this case, length_multiplier overrides the given units
|
||||
def check_size(sr):
|
||||
xur, yur = sr.get_vertices(0, ncol - 1)[3]
|
||||
assert np.abs(xur - (xll + sr.length_multiplier * delr * ncol)) < 1e-4
|
||||
assert np.abs(yur - (yll + sr.length_multiplier * delc * nrow)) < 1e-4
|
||||
check_size(ms3.sr)
|
||||
def check_size(mg):
|
||||
xur, yur = mg.get_cell_vertices(0, ncol - 1)[3]
|
||||
assert np.abs(xur - (xll + mg.sr.length_multiplier * delr * ncol)) < \
|
||||
1e-4
|
||||
assert np.abs(yur - (yll + mg.sr.length_multiplier * delc * nrow)) < \
|
||||
1e-4
|
||||
check_size(mg3)
|
||||
|
||||
# run the same tests but with units specified instead of a length multiplier
|
||||
ms2 = flopy.modflow.Modflow()
|
||||
|
@ -527,33 +533,36 @@ def test_sr_scaling():
|
|||
lenuni=1 # feet; should have no effect on SR
|
||||
# (model not supplied to SR)
|
||||
)
|
||||
ms2.sr = flopy.utils.SpatialReference(delr=ms2.dis.delr.array,
|
||||
delc=ms2.dis.delc.array,
|
||||
lenuni=2, # meters
|
||||
epsg=26715, # meters, listed on spatialreference.org
|
||||
xll=xll, yll=yll, rotation=0)
|
||||
ms2.sr = flopy.discretization.reference.SpatialReference(delc=ms2.dis.delc.array,
|
||||
lenuni=2, # meters
|
||||
epsg=26715, # meters,
|
||||
# listed
|
||||
# on spatialreference.org
|
||||
xll=xll, yll=yll,
|
||||
rotation=0)
|
||||
assert ms2.sr.model_length_units == 'meters'
|
||||
assert ms2.sr.length_multiplier == 1.
|
||||
ms2.sr.lenuni = 1 # feet; test dynamic setting
|
||||
assert ms2.sr.model_length_units == 'feet'
|
||||
check_size(ms2.sr)
|
||||
check_size(mg2)
|
||||
assert ms2.sr.length_multiplier == .3048
|
||||
ms2.sr.lenuni = 3 # centimeters
|
||||
assert ms2.sr.model_length_units == 'centimeters'
|
||||
check_size(ms2.sr)
|
||||
check_size(mg2)
|
||||
assert ms2.sr.length_multiplier == 0.01
|
||||
ms2.sr.lenuni = 2 # meters
|
||||
check_size(ms2.sr)
|
||||
check_size(mg2)
|
||||
ms2.sr.units = 'meters'
|
||||
ms2.sr.proj4_str = '+proj=utm +zone=16 +datum=NAD83 +units=us-ft +no_defs'
|
||||
assert ms2.sr.proj4_str == '+proj=utm +zone=16 +datum=NAD83 +units=us-ft +no_defs'
|
||||
assert ms2.sr.units == 'feet'
|
||||
assert ms2.sr.length_multiplier == 1/.3048
|
||||
check_size(ms2.sr)
|
||||
check_size(mg2)
|
||||
ms2.sr.epsg = 6610 # meters, not listed on spatialreference.org but understood by pyproj
|
||||
assert ms2.sr.units == 'meters'
|
||||
assert ms2.sr.proj4_str is not None
|
||||
check_size(ms2.sr)
|
||||
check_size(mg2)
|
||||
"""
|
||||
|
||||
def test_dynamic_xll_yll():
|
||||
nlay, nrow, ncol = 1, 10, 5
|
||||
|
@ -634,25 +643,29 @@ def test_namfile_readwrite():
|
|||
m = fm.Modflow(modelname='junk', model_ws=os.path.join('temp', 't007'))
|
||||
dis = fm.ModflowDis(m, nlay=nlay, nrow=nrow, ncol=ncol, delr=delr,
|
||||
delc=delc)
|
||||
m.sr = flopy.utils.SpatialReference(delr=m.dis.delr.array,
|
||||
delc=m.dis.delc.array, lenuni=3,
|
||||
length_multiplier=.3048,
|
||||
xll=xll, yll=yll, rotation=30)
|
||||
m.modelgrid = flopy.discretization.StructuredGrid(delc=m.dis.delc.array,
|
||||
delr=m.dis.delr.array,
|
||||
top=m.dis.top.array,
|
||||
botm=m.dis.botm.array,
|
||||
# lenuni=3,
|
||||
# length_multiplier=.3048,
|
||||
xoff=xll, yoff=yll,
|
||||
angrot=30)
|
||||
|
||||
# test reading and writing of SR information to namfile
|
||||
m.write_input()
|
||||
m2 = fm.Modflow.load('junk.nam', model_ws=os.path.join('temp', 't007'))
|
||||
assert abs(m2.sr.xll - xll) < 1e-2
|
||||
assert abs(m2.sr.yll - yll) < 1e-2
|
||||
assert m2.sr.rotation == 30
|
||||
assert abs(m2.sr.length_multiplier - .3048) < 1e-10
|
||||
assert abs(m2.modelgrid.xoffset - xll) < 1e-2
|
||||
assert abs(m2.modelgrid.yoffset - yll) < 1e-2
|
||||
assert m2.modelgrid.angrot == 30
|
||||
# assert abs(m2.sr.length_multiplier - .3048) < 1e-10
|
||||
|
||||
model_ws = os.path.join("..", "examples", "data", "freyberg_multilayer_transient")
|
||||
ml = flopy.modflow.Modflow.load("freyberg.nam", model_ws=model_ws, verbose=False,
|
||||
check=False, exe_name="mfnwt")
|
||||
assert ml.sr.xul == 619653
|
||||
assert ml.sr.yul == 3353277
|
||||
assert ml.sr.rotation == 15.
|
||||
assert ml.modelgrid.xoffset == ml.modelgrid._xul_to_xll(619653)
|
||||
assert ml.modelgrid.yoffset == ml.modelgrid._yul_to_yll(3353277)
|
||||
assert ml.modelgrid.angrot == 15.
|
||||
|
||||
def test_read_usgs_model_reference():
|
||||
nlay, nrow, ncol = 1, 30, 5
|
||||
|
@ -670,27 +683,29 @@ def test_read_usgs_model_reference():
|
|||
|
||||
# test reading of SR information from usgs.model.reference
|
||||
m2 = fm.Modflow.load('junk.nam', model_ws=os.path.join('temp', 't007'))
|
||||
from flopy.utils.reference import SpatialReference
|
||||
d = SpatialReference.read_usgs_model_reference_file(mrf)
|
||||
assert m2.sr.xul == d['xul']
|
||||
assert m2.sr.yul == d['yul']
|
||||
assert m2.sr.rotation == d['rotation']
|
||||
assert m2.sr.lenuni == d['lenuni']
|
||||
assert m2.sr.epsg == d['epsg']
|
||||
from flopy.discretization import StructuredGrid
|
||||
mg = StructuredGrid(delr=dis.delr.array, delc=dis.delc.array)
|
||||
mg.read_usgs_model_reference_file(mrf)
|
||||
m2.modelgrid = mg
|
||||
|
||||
assert m2.modelgrid.xoffset == mg.xoffset
|
||||
assert m2.modelgrid.yoffset == mg.yoffset
|
||||
assert m2.modelgrid.angrot == mg.angrot
|
||||
assert m2.modelgrid.epsg == mg.epsg
|
||||
|
||||
# test reading non-default units from usgs.model.reference
|
||||
shutil.copy(mrf, mrf+'_copy')
|
||||
with open(mrf+'_copy') as src:
|
||||
with open(mrf, 'w') as dst:
|
||||
for line in src:
|
||||
if 'time_unit' in line:
|
||||
line = line.replace('days', 'seconds')
|
||||
elif 'length_units' in line:
|
||||
line = line.replace('feet', 'meters')
|
||||
if 'epsg' in line:
|
||||
line = line.replace("102733", '4326')
|
||||
dst.write(line)
|
||||
|
||||
m2 = fm.Modflow.load('junk.nam', model_ws=os.path.join('temp', 't007'))
|
||||
assert m2.tr.itmuni == 1
|
||||
assert m2.sr.lenuni == 2
|
||||
m2.modelgrid.read_usgs_model_reference_file(mrf)
|
||||
|
||||
assert m2.modelgrid.epsg == 4326
|
||||
# have to delete this, otherwise it will mess up other tests
|
||||
to_del = glob.glob(mrf + '*')
|
||||
for f in to_del:
|
||||
|
@ -700,34 +715,41 @@ def test_read_usgs_model_reference():
|
|||
|
||||
|
||||
def test_rotation():
|
||||
|
||||
m = flopy.modflow.Modflow(rotation=20.)
|
||||
dis = flopy.modflow.ModflowDis(m, nlay=1, nrow=40, ncol=20,
|
||||
delr=250.,
|
||||
delc=250., top=10, botm=0)
|
||||
xul, yul = 500000, 2934000
|
||||
m.sr = flopy.utils.SpatialReference(delr=m.dis.delr.array,
|
||||
delc=m.dis.delc.array,
|
||||
xul=xul, yul=yul, rotation=45.)
|
||||
xll, yll = m.sr.xll, m.sr.yll
|
||||
assert np.abs(m.dis.sr.xgrid[0, 0] - xul) < 1e-4
|
||||
assert np.abs(m.dis.sr.ygrid[0, 0] - yul) < 1e-4
|
||||
m.sr = flopy.utils.SpatialReference(delr=m.dis.delr.array,
|
||||
delc=m.dis.delc.array,
|
||||
xul=xul, yul=yul, rotation=-45.)
|
||||
assert m.dis.sr.xgrid[0, 0] == xul
|
||||
assert m.dis.sr.ygrid[0, 0] == yul
|
||||
xll2, yll2 = m.sr.xll, m.sr.yll
|
||||
m.sr = flopy.utils.SpatialReference(delr=m.dis.delr.array,
|
||||
delc=m.dis.delc.array,
|
||||
xll=xll2, yll=yll2, rotation=-45.)
|
||||
assert m.dis.sr.xgrid[0, 0] == xul
|
||||
assert m.dis.sr.ygrid[0, 0] == yul
|
||||
m.sr = flopy.utils.SpatialReference(delr=m.dis.delr.array,
|
||||
delc=m.dis.delc.array,
|
||||
xll=xll, yll=yll, rotation=45.)
|
||||
assert m.dis.sr.xgrid[0, 0] == xul
|
||||
assert m.dis.sr.ygrid[0, 0] == yul
|
||||
mg = flopy.discretization.StructuredGrid(delc=m.dis.delc.array, delr=m.dis.delr.array)
|
||||
mg._angrot = 45.
|
||||
mg.set_coord_info(mg._xul_to_xll(xul), mg._yul_to_yll(yul),
|
||||
angrot=45.)
|
||||
|
||||
xll, yll = mg.xoffset, mg.yoffset
|
||||
assert np.abs(mg.xvertices[0, 0] - xul) < 1e-4
|
||||
assert np.abs(mg.yvertices[0, 0] - yul) < 1e-4
|
||||
|
||||
mg2 = flopy.discretization.StructuredGrid(delc=m.dis.delc.array, delr=m.dis.delr.array)
|
||||
mg2._angrot = -45.
|
||||
mg2.set_coord_info(mg2._xul_to_xll(xul), mg2._yul_to_yll(yul),
|
||||
angrot=-45.)
|
||||
|
||||
xll2, yll2 = mg2.xoffset, mg2.yoffset
|
||||
assert np.abs(mg2.xvertices[0, 0] - xul) < 1e-4
|
||||
assert np.abs(mg2.yvertices[0, 0] - yul) < 1e-4
|
||||
|
||||
mg3 = flopy.discretization.StructuredGrid(delc=m.dis.delc.array, delr=m.dis.delr.array,
|
||||
xoff=xll2, yoff=yll2, angrot=-45.)
|
||||
|
||||
assert np.abs(mg3.xvertices[0, 0] - xul) < 1e-4
|
||||
assert np.abs(mg3.yvertices[0, 0] - yul) < 1e-4
|
||||
|
||||
mg4 = flopy.discretization.StructuredGrid(delc=m.dis.delc.array, delr=m.dis.delr.array,
|
||||
xoff=xll, yoff=yll, angrot=45.)
|
||||
|
||||
assert np.abs(mg4.xvertices[0, 0] - xul) < 1e-4
|
||||
assert np.abs(mg4.yvertices[0, 0] - yul) < 1e-4
|
||||
|
||||
def test_sr_with_Map():
|
||||
import matplotlib.pyplot as plt
|
||||
|
@ -740,7 +762,7 @@ def test_sr_with_Map():
|
|||
modelmap = flopy.plot.ModelMap(model=m, xul=xul, yul=yul,
|
||||
rotation=rotation)
|
||||
lc = modelmap.plot_grid()
|
||||
xll, yll = modelmap.sr.xll, modelmap.sr.yll
|
||||
xll, yll = modelmap.mg.xoffset, modelmap.mg.yoffset
|
||||
plt.close()
|
||||
|
||||
def check_vertices():
|
||||
|
@ -789,22 +811,97 @@ def test_sr_with_Map():
|
|||
linecollection = modelxsect.plot_grid()
|
||||
plt.close()
|
||||
|
||||
|
||||
def test_modelgrid_with_PlotMapView():
|
||||
import matplotlib.pyplot as plt
|
||||
m = flopy.modflow.Modflow(rotation=20.)
|
||||
dis = flopy.modflow.ModflowDis(m, nlay=1, nrow=40, ncol=20,
|
||||
delr=250.,
|
||||
delc=250., top=10, botm=0)
|
||||
# transformation assigned by arguments
|
||||
xll, yll, rotation = 500000., 2934000., 45.
|
||||
|
||||
def check_vertices():
|
||||
#vertices = modelmap.mg.xyvertices
|
||||
xllp, yllp = lc._paths[0].vertices[0]
|
||||
#xulp, yulp = lc._paths[0].vertices[1]
|
||||
assert np.abs(xllp - xll) < 1e-6
|
||||
assert np.abs(yllp - yll) < 1e-6
|
||||
#assert np.abs(xulp - xul) < 1e-6
|
||||
#assert np.abs(yulp - yul) < 1e-6
|
||||
|
||||
# check_vertices()
|
||||
m.modelgrid.set_coord_info(xoff=xll, yoff=yll, angrot=rotation)
|
||||
modelmap = flopy.plot.PlotMapView(model=m)
|
||||
lc = modelmap.plot_grid()
|
||||
check_vertices()
|
||||
plt.close()
|
||||
|
||||
modelmap = flopy.plot.PlotMapView(modelgrid=m.modelgrid)
|
||||
lc = modelmap.plot_grid()
|
||||
check_vertices()
|
||||
plt.close()
|
||||
|
||||
mf = flopy.modflow.Modflow()
|
||||
|
||||
# Model domain and grid definition
|
||||
dis = flopy.modflow.ModflowDis(mf, nlay=1, nrow=10, ncol=20, delr=1., delc=1., xul=100, yul=210)
|
||||
#fig, ax = plt.subplots()
|
||||
verts = [[101., 201.], [119., 209.]]
|
||||
# modelxsect = flopy.plot.ModelCrossSection(model=mf, line={'line': verts},
|
||||
# xul=mf.dis.sr.xul, yul=mf.dis.sr.yul)
|
||||
mf.modelgrid.set_coord_info(xoff=mf.dis.sr.xll, yoff=mf.dis.sr.yll)
|
||||
modelxsect = flopy.plot.PlotCrossSection(model=mf, line={'line': verts})
|
||||
linecollection = modelxsect.plot_grid()
|
||||
plt.close()
|
||||
|
||||
|
||||
def test_get_vertices():
|
||||
from flopy.utils.reference import SpatialReference
|
||||
from flopy.discretization import StructuredGrid
|
||||
m = flopy.modflow.Modflow(rotation=20.)
|
||||
nrow, ncol = 40, 20
|
||||
dis = flopy.modflow.ModflowDis(m, nlay=1, nrow=nrow, ncol=ncol,
|
||||
delr=250.,
|
||||
delc=250., top=10, botm=0)
|
||||
xul, yul = 500000, 2934000
|
||||
m.sr = flopy.utils.SpatialReference(delr=m.dis.delr.array,
|
||||
delc=m.dis.delc.array,
|
||||
xul=xul, yul=yul, rotation=45.)
|
||||
a1 = np.array(m.sr.vertices)
|
||||
j = np.array(list(range(ncol)) * nrow)
|
||||
i = np.array(sorted(list(range(nrow)) * ncol))
|
||||
a2 = np.array(m.sr.get_vertices(i, j))
|
||||
sr = SpatialReference(delc=m.dis.delc.array,
|
||||
xul=xul, yul=yul, rotation=45.)
|
||||
mg = StructuredGrid(delc=m.dis.delc.array,
|
||||
delr=m.dis.delr.array,
|
||||
xoff=sr.xll, yoff=sr.yll,
|
||||
angrot=sr.rotation)
|
||||
|
||||
xgrid = mg.xvertices
|
||||
ygrid = mg.yvertices
|
||||
# a1 = np.array(mg.xyvertices)
|
||||
a1 = np.array([[xgrid[0, 0], ygrid[0,0]],
|
||||
[xgrid[0, 1], ygrid[0,1]],
|
||||
[xgrid[1, 1], ygrid[1, 1]],
|
||||
[xgrid[1, 0], ygrid[1, 0]]])
|
||||
|
||||
a2 = np.array(mg.get_cell_vertices(0, 0))
|
||||
assert np.array_equal(a1, a2)
|
||||
|
||||
def test_vertex_model_dot_plot():
|
||||
# load up the vertex example problem
|
||||
sim_name = "mfsim.nam"
|
||||
sim_path = "../examples/data/mf6/test003_gwftri_disv"
|
||||
disv_sim = flopy.mf6.MFSimulation.load(sim_name=sim_name, version="mf6", exe_name="mf6",
|
||||
sim_ws=sim_path)
|
||||
disv_ml = disv_sim.get_model('gwf_1')
|
||||
|
||||
ax = disv_ml.plot()
|
||||
|
||||
assert ax
|
||||
|
||||
def test_model_dot_plot():
|
||||
loadpth = os.path.join('..', 'examples', 'data', 'secp')
|
||||
ml = flopy.modflow.Modflow.load('secp.nam', model_ws=loadpth)
|
||||
|
||||
ax = ml.plot()
|
||||
assert ax
|
||||
|
||||
def test_get_rc_from_node_coordinates():
|
||||
m = flopy.modflow.Modflow(rotation=20.)
|
||||
nrow, ncol = 10, 10
|
||||
|
@ -920,7 +1017,7 @@ def test_shapefile_ibound():
|
|||
ml.export(shape_name)
|
||||
shp = shapefile.Reader(shape_name)
|
||||
field_names = [item[0] for item in shp.fields][1:]
|
||||
ib_idx = field_names.index("ibound_001")
|
||||
ib_idx = field_names.index("ibound_1")
|
||||
txt = "should be int instead of {0}".format(type(shp.record(0)[ib_idx]))
|
||||
assert type(shp.record(0)[ib_idx]) == int, txt
|
||||
|
||||
|
@ -932,46 +1029,48 @@ def test_shapefile():
|
|||
|
||||
def test_netcdf():
|
||||
for namfile in namfiles:
|
||||
yield export_netcdf, namfile
|
||||
yield export_mf2005_netcdf, namfile
|
||||
|
||||
return
|
||||
|
||||
|
||||
def build_netcdf():
|
||||
for namfile in namfiles:
|
||||
export_netcdf(namfile)
|
||||
export_mf2005_netcdf(namfile)
|
||||
return
|
||||
|
||||
|
||||
def build_sfr_netcdf():
|
||||
namfile = 'testsfr2.nam'
|
||||
export_netcdf(namfile)
|
||||
export_mf2005_netcdf(namfile)
|
||||
return
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
#test_shapefile()
|
||||
# test_shapefile_ibound()
|
||||
#test_netcdf()
|
||||
# test_netcdf_overloads()
|
||||
#test_netcdf_classmethods()
|
||||
# test_netcdf_classmethods()
|
||||
# build_netcdf()
|
||||
# build_sfr_netcdf()
|
||||
#test_sr()
|
||||
#test_mbase_sr()
|
||||
#test_rotation()
|
||||
# test_mg()
|
||||
# test_mbase_modelgrid()
|
||||
# test_rotation()
|
||||
# test_model_dot_plot()
|
||||
# test_vertex_model_dot_plot()
|
||||
#test_sr_with_Map()
|
||||
#test_epsgs()
|
||||
#test_sr_scaling()
|
||||
#test_read_usgs_model_reference()
|
||||
#test_modelgrid_with_PlotMapView()
|
||||
# test_epsgs()
|
||||
# test_sr_scaling()
|
||||
# test_read_usgs_model_reference()
|
||||
#test_dynamic_xll_yll()
|
||||
#test_namfile_readwrite()
|
||||
# test_free_format_flag()
|
||||
#test_get_vertices()
|
||||
# test_get_vertices()
|
||||
#test_export_output()
|
||||
#for namfile in namfiles:
|
||||
# for namfile in ["fhb.nam"]:
|
||||
# export_netcdf(namfile)
|
||||
# test_freyberg_export()
|
||||
#test_freyberg_export()
|
||||
#test_export_array()
|
||||
test_write_shapefile()
|
||||
#test_wkt_parse()
|
||||
|
|
|
@ -18,6 +18,7 @@ except:
|
|||
import flopy
|
||||
fm = flopy.modflow
|
||||
from flopy.utils.sfroutputfile import SfrFile
|
||||
from flopy.discretization import StructuredGrid
|
||||
from flopy.utils.reference import SpatialReference
|
||||
|
||||
if os.path.split(os.getcwd())[-1] == 'flopy3':
|
||||
|
@ -256,7 +257,8 @@ def test_const():
|
|||
fm = flopy.modflow
|
||||
m = fm.Modflow()
|
||||
dis = fm.ModflowDis(m, 1, 10, 10, lenuni=2, itmuni=4)
|
||||
m.sr = SpatialReference()
|
||||
m.modelgrid = StructuredGrid(delc=dis.delc.array,
|
||||
delr=dis.delr.array,)
|
||||
r, d = create_sfr_data()
|
||||
sfr = flopy.modflow.ModflowSfr2(m, reach_data=r, segment_data={0: d})
|
||||
assert sfr.const == 86400.
|
||||
|
@ -275,8 +277,12 @@ def test_export():
|
|||
fm = flopy.modflow
|
||||
m = fm.Modflow()
|
||||
dis = fm.ModflowDis(m, 1, 10, 10, lenuni=2, itmuni=4)
|
||||
m.sr = SpatialReference(delr=m.dis.delr.array, delc=m.dis.delc.array)
|
||||
m.sr.write_shapefile(os.path.join(outpath, 'grid.shp'))
|
||||
sr = SpatialReference(xul=0.0, yul=0.0, delc=m.dis.delc.array)
|
||||
m.modelgrid = StructuredGrid(delc=m.dis.delc.array,
|
||||
delr=m.dis.delr.array,
|
||||
xoff=sr.xll, yoff=sr.yll)
|
||||
# m.sr.origin_loc = "ll"
|
||||
m.export(os.path.join(outpath, 'grid.shp'))
|
||||
r, d = create_sfr_data()
|
||||
sfr = flopy.modflow.ModflowSfr2(m, reach_data=r, segment_data={0: d})
|
||||
sfr.segment_data[0]['flow'][-1] = 1e4
|
||||
|
@ -299,7 +305,8 @@ def test_export():
|
|||
assert ra.ireach0.sum() == sfr.reach_data.ireach.sum()
|
||||
y = np.concatenate([np.array(g.exterior)[:, 1] for g in ra.geometry])
|
||||
x = np.concatenate([np.array(g.exterior)[:, 0] for g in ra.geometry])
|
||||
assert (x.min(), y.min(), x.max(), y.max()) == m.sr.bounds
|
||||
|
||||
assert (x.min(), x.max(), y.min(), y.max()) == m.modelgrid.extent
|
||||
assert ra[(ra.iseg0 == 2) & (ra.ireach0 == 1)]['geometry'][0].bounds \
|
||||
== (6.0, 2.0, 7.0, 3.0)
|
||||
|
||||
|
@ -450,12 +457,12 @@ def test_sfr_plot():
|
|||
|
||||
if __name__ == '__main__':
|
||||
#test_sfr()
|
||||
test_sfr_renumbering()
|
||||
# test_sfr_renumbering()
|
||||
#test_example()
|
||||
#test_export()
|
||||
# test_export()
|
||||
#test_transient_example()
|
||||
#test_sfr_plot()
|
||||
test_assign_layers()
|
||||
test_SfrFile()
|
||||
test_const()
|
||||
# test_assign_layers()
|
||||
# test_SfrFile()
|
||||
# test_const()
|
||||
pass
|
||||
|
|
|
@ -395,8 +395,8 @@ if __name__ == '__main__':
|
|||
#test_mf2000_MultiDiffusion()
|
||||
#test_mf2000_reinject()
|
||||
#test_mf2000_SState()
|
||||
test_mf2000_tob()
|
||||
#test_mf2000_tob()
|
||||
#test_mf2000_zeroth()
|
||||
#test_mfnwt_CrnkNic()
|
||||
test_mfnwt_LKT()
|
||||
test_mfnwt_CrnkNic()
|
||||
#test_mfnwt_LKT()
|
||||
#test_mfnwt_keat_uzf()
|
||||
|
|
|
@ -10,15 +10,15 @@ def test_mfgrddis():
|
|||
dis = flopy.utils.MfGrdFile(fn, verbose=True)
|
||||
|
||||
iverts, verts = dis.get_verts()
|
||||
sr = dis.get_spatialreference()
|
||||
extents = sr.get_extent()
|
||||
mg = dis.mg
|
||||
extents = mg.extent
|
||||
vertc = dis.get_centroids()
|
||||
errmsg = 'extents {} of {} '.format(extents, grbnam) + \
|
||||
'does not equal (0.0, 8000.0, 0.0, 8000.0)'
|
||||
assert extents == (0.0, 8000.0, 0.0, 8000.0), errmsg
|
||||
errmsg = 'shape of {} {} '.format(grbnam, verts.shape) + \
|
||||
'not equal to (32000, 2).'
|
||||
assert verts.shape == (32000, 2), errmsg
|
||||
assert verts.shape == (25600, 2), errmsg
|
||||
errmsg = 'ncells of {} {} '.format(grbnam, len(iverts)) + \
|
||||
'not equal to 6400.'
|
||||
assert len(iverts) == 6400, errmsg
|
||||
|
|
|
@ -9,9 +9,10 @@ import shutil
|
|||
import os
|
||||
import flopy
|
||||
import numpy as np
|
||||
from flopy.utils.reference import SpatialReference
|
||||
from flopy.discretization import StructuredGrid
|
||||
from flopy.utils.modpathfile import EndpointFile, PathlineFile
|
||||
from flopy.utils.recarray_utils import ra_slice
|
||||
from flopy.utils.reference import SpatialReference
|
||||
from flopy.modpath.mpsim import StartingLocationsFile
|
||||
|
||||
mffiles = glob.glob('../examples/data/mp6/EXAMPLE*')
|
||||
|
@ -96,11 +97,19 @@ def test_mpsim():
|
|||
def test_get_destination_data():
|
||||
m = flopy.modflow.Modflow.load('EXAMPLE.nam', model_ws=path)
|
||||
|
||||
m.sr = SpatialReference(delr=m.dis.delr, delc=m.dis.delc, xul=0, yul=0,
|
||||
rotation=30)
|
||||
sr = SpatialReference(delr=list(m.dis.delr), delc=list(m.dis.delc),
|
||||
xul=1000, yul=1000, rotation=30)
|
||||
sr2 = SpatialReference(xll=sr.xll, yll=sr.yll, rotation=-30)
|
||||
mg1 = m.modelgrid
|
||||
mg1.set_coord_info(xoff=mg1._xul_to_xll(0.0, 30.0),
|
||||
yoff=mg1._yul_to_yll(0.0, 30.0),
|
||||
angrot=30.0)
|
||||
|
||||
mg = StructuredGrid(delc=m.dis.delc.array,
|
||||
delr=m.dis.delr.array)
|
||||
mg.set_coord_info(xoff=mg._xul_to_xll(1000.0, 30.0),
|
||||
yoff=mg._yul_to_yll(1000.0, 30.0),
|
||||
angrot=30.0)
|
||||
|
||||
# test deprecation
|
||||
sr2 = SpatialReference(xll=mg.xoffset, yll=mg.yoffset, rotation=-30)
|
||||
m.dis.export(path + '/dis.shp')
|
||||
|
||||
pthld = PathlineFile(os.path.join(path, 'EXAMPLE-3.pathline'))
|
||||
|
@ -125,39 +134,39 @@ def test_get_destination_data():
|
|||
# test writing a shapefile of endpoints
|
||||
epd.write_shapefile(well_epd, direction='starting',
|
||||
shpname=os.path.join(path, 'starting_locs.shp'),
|
||||
sr=m.sr)
|
||||
mg=m.modelgrid)
|
||||
|
||||
# test writing shapefile of pathlines
|
||||
fpth = os.path.join(path, 'pathlines_1per.shp')
|
||||
pthld.write_shapefile(well_pthld, one_per_particle=True,
|
||||
direction='starting', sr=m.sr,
|
||||
direction='starting', mg=m.modelgrid,
|
||||
shpname=fpth)
|
||||
fpth = os.path.join(path, 'pathlines_1per_end.shp')
|
||||
pthld.write_shapefile(well_pthld, one_per_particle=True,
|
||||
direction='ending', sr=m.sr,
|
||||
direction='ending', mg=m.modelgrid,
|
||||
shpname=fpth)
|
||||
# test writing shapefile of pathlines
|
||||
fpth = os.path.join(path, 'pathlines_1per2.shp')
|
||||
pthld.write_shapefile(well_pthld, one_per_particle=True,
|
||||
direction='starting', sr=sr,
|
||||
direction='starting', mg=mg,
|
||||
shpname=fpth)
|
||||
# test writing shapefile of pathlines
|
||||
fpth = os.path.join(path, 'pathlines_1per2_ll.shp')
|
||||
pthld.write_shapefile(well_pthld, one_per_particle=True,
|
||||
direction='starting', sr=sr2,
|
||||
direction='starting', mg=sr2,
|
||||
shpname=fpth)
|
||||
fpth = os.path.join(path, 'pathlines.shp')
|
||||
pthld.write_shapefile(well_pthld, one_per_particle=False,
|
||||
sr=m.sr,
|
||||
mg=m.modelgrid,
|
||||
shpname=fpth)
|
||||
|
||||
# test that endpoints were rotated and written correctly
|
||||
from flopy.export.shapefile_utils import shp2recarray
|
||||
ra = shp2recarray(os.path.join(path, 'starting_locs.shp'))
|
||||
p3 = ra.geometry[ra.particleid == 4][0]
|
||||
xorig, yorig = m.sr.transform(well_epd.x0[0], well_epd.y0[0])
|
||||
xorig, yorig = m.modelgrid.get_coords(well_epd.x0[0], well_epd.y0[0])
|
||||
assert p3.x - xorig + p3.y - yorig < 1e-4
|
||||
xorig, yorig = m.sr.xcentergrid[3, 4], m.sr.ycentergrid[3, 4]
|
||||
xorig, yorig = mg1.xcellcenters[3, 4], mg1.ycellcenters[3, 4]
|
||||
assert np.abs(
|
||||
p3.x - xorig + p3.y - yorig) < 1e-4 # this also checks for 1-based
|
||||
|
||||
|
@ -175,19 +184,24 @@ def test_get_destination_data():
|
|||
assert ra.i[0] == 13, ra.j[0] == 13
|
||||
|
||||
# test use of arbitrary spatial reference and offset
|
||||
mg1.set_coord_info(xoff=mg.xoffset, yoff=mg.yoffset, angrot=mg.angrot,
|
||||
epsg=mg.epsg, proj4=mg.proj4)
|
||||
ra = shp2recarray(os.path.join(path, 'pathlines_1per2.shp'))
|
||||
p3_2 = ra.geometry[ra.particleid == 4][0]
|
||||
test1 = mg1.xcellcenters[3, 4]
|
||||
test2 = mg1.ycellcenters[3, 4]
|
||||
assert np.abs(
|
||||
p3_2.x[0] - sr.xcentergrid[3, 4] + p3_2.y[0] - sr.ycentergrid[
|
||||
p3_2.x[0] - mg1.xcellcenters[3, 4] + p3_2.y[0] - mg1.ycellcenters[
|
||||
3, 4]) < 1e-4
|
||||
|
||||
# arbitrary spatial reference with ll specified instead of ul
|
||||
ra = shp2recarray(os.path.join(path, 'pathlines_1per2_ll.shp'))
|
||||
p3_2 = ra.geometry[ra.particleid == 4][0]
|
||||
sr3 = SpatialReference(xll=sr.xll, yll=sr.yll, rotation=-30,
|
||||
delr=list(m.dis.delr), delc=list(m.dis.delc))
|
||||
#sr3 = SpatialReference(xll=sr.xll, yll=sr.yll, rotation=-30,
|
||||
# delc=list(m.dis.delc))
|
||||
mg.set_coord_info(xoff=mg.xoffset, yoff=mg.yoffset, angrot=-30.0)
|
||||
assert np.abs(
|
||||
p3_2.x[0] - sr3.xcentergrid[3, 4] + p3_2.y[0] - sr3.ycentergrid[
|
||||
p3_2.x[0] - mg.xcellcenters[3, 4] + p3_2.y[0] - mg.ycellcenters[
|
||||
3, 4]) < 1e-4
|
||||
|
||||
xul = 3628793
|
||||
|
@ -195,17 +209,18 @@ def test_get_destination_data():
|
|||
|
||||
m = flopy.modflow.Modflow.load('EXAMPLE.nam', model_ws=path)
|
||||
|
||||
m.sr = flopy.utils.reference.SpatialReference(delr=m.dis.delr,
|
||||
delc=m.dis.delc, lenuni=1,
|
||||
xul=xul, yul=yul,
|
||||
rotation=0.0)
|
||||
mg4 = m.modelgrid
|
||||
mg4.set_coord_info(xoff=mg4._xul_to_xll(xul, 0.0),
|
||||
yoff=mg4._yul_to_yll(yul, 0.0),
|
||||
angrot=0.0, epsg=mg4.epsg, proj4=mg4.proj4)
|
||||
|
||||
fpth = os.path.join(path, 'dis2.shp')
|
||||
m.dis.export(fpth)
|
||||
pthobj = flopy.utils.PathlineFile(os.path.join(path, 'EXAMPLE-3.pathline'))
|
||||
fpth = os.path.join(path, 'pathlines_1per3.shp')
|
||||
pthobj.write_shapefile(shpname=fpth,
|
||||
direction='ending',
|
||||
sr=m.sr)
|
||||
mg=mg4)
|
||||
|
||||
|
||||
def test_loadtxt():
|
||||
|
@ -222,6 +237,6 @@ def test_loadtxt():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_mpsim()
|
||||
# test_mpsim()
|
||||
test_get_destination_data()
|
||||
test_loadtxt()
|
||||
# test_loadtxt()
|
||||
|
|
|
@ -6,8 +6,8 @@ import shutil
|
|||
import numpy as np
|
||||
import flopy
|
||||
from flopy.utils.geometry import Polygon
|
||||
from flopy.utils.reference import SpatialReference
|
||||
from flopy.export.shapefile_utils import recarray2shp, shp2recarray
|
||||
from flopy.export.netcdf import NetCdf
|
||||
from flopy.utils.reference import getprj, epsgRef
|
||||
|
||||
mpth = os.path.join('temp', 't032')
|
||||
|
@ -27,9 +27,16 @@ def test_polygon_from_ij():
|
|||
nlay=2, delr=100, delc=100,
|
||||
top=3, botm=botm, model=m)
|
||||
|
||||
m.sr = SpatialReference(delr=m.dis.delr * .3048, delc=m.dis.delc * .3048,
|
||||
xul=600000, yul=5170000,
|
||||
proj4_str='EPSG:26715', rotation=-45)
|
||||
ncdf = NetCdf('toy.model.nc', m)
|
||||
ncdf.write()
|
||||
|
||||
m.export('toy_model_two.nc')
|
||||
dis.export('toy_model_dis.nc')
|
||||
|
||||
mg = m.modelgrid
|
||||
mg.set_coord_info(xoff=mg._xul_to_xll(600000.0, -45.0),
|
||||
yoff=mg._yul_to_yll(5170000, -45.0),
|
||||
angrot=-45.0, proj4='EPSG:26715')
|
||||
|
||||
recarray = np.array([(0, 5, 5, .1, True, 's0'),
|
||||
(1, 4, 5, .2, False, 's1'),
|
||||
|
@ -38,12 +45,12 @@ def test_polygon_from_ij():
|
|||
('stuff', '<f4'), ('stuf', '|b1'),
|
||||
('stf', np.object)]).view(np.recarray)
|
||||
|
||||
get_vertices = m.sr.get_vertices # function to get the referenced vertices for a model cell
|
||||
geoms = [Polygon(get_vertices(i, j)) for i, j in
|
||||
# vertices for a model cell
|
||||
geoms = [Polygon(m.modelgrid.get_cell_vertices(i, j)) for i, j in
|
||||
zip(recarray.i, recarray.j)]
|
||||
|
||||
assert geoms[0].type == 'Polygon'
|
||||
assert np.abs(geoms[0].bounds[-1] - 5169784.473861726) < 1e-4
|
||||
assert np.abs(geoms[0].bounds[-1] - 5169292.893203464) < 1e-4
|
||||
fpth = os.path.join(mpth, 'test.shp')
|
||||
recarray2shp(recarray, geoms, fpth, epsg=26715)
|
||||
ep = epsgRef()
|
||||
|
|
|
@ -158,12 +158,12 @@ def test_pathline_plot():
|
|||
|
||||
# determine version
|
||||
ver = pthobj.version
|
||||
assert ver == 6, '{} is not a MODPATH version 6 pathline file'.format(fpth)
|
||||
assert ver == 6, '{} is not a MODPATH version 6 pathline file'.format(pthfile)
|
||||
|
||||
# get all pathline data
|
||||
plines = pthobj.get_alldata()
|
||||
|
||||
mm = flopy.plot.ModelMap(model=m)
|
||||
mm = flopy.plot.PlotMapView(model=m)
|
||||
try:
|
||||
mm.plot_pathline(plines, colors='blue', layer='all')
|
||||
except:
|
||||
|
@ -183,7 +183,7 @@ def test_pathline_plot():
|
|||
except:
|
||||
assert False, 'could not save plot as {}'.format(fpth)
|
||||
|
||||
mm = flopy.plot.ModelMap(model=m)
|
||||
mm = flopy.plot.PlotMapView(model=m)
|
||||
try:
|
||||
mm.plot_pathline(plines, colors='green', layer=0)
|
||||
except:
|
||||
|
@ -203,7 +203,7 @@ def test_pathline_plot():
|
|||
except:
|
||||
assert False, 'could not save plot as {}'.format(fpth)
|
||||
|
||||
mm = flopy.plot.ModelMap(model=m)
|
||||
mm = flopy.plot.PlotMapView(model=m)
|
||||
try:
|
||||
mm.plot_pathline(plines, colors='red')
|
||||
except:
|
||||
|
@ -263,7 +263,7 @@ def test_mp5_load():
|
|||
colors = hsv(np.linspace(0, 1.0, nptl))
|
||||
|
||||
# plot the pathlines one pathline at a time
|
||||
mm = flopy.plot.ModelMap(model=m)
|
||||
mm = flopy.plot.PlotMapView(model=m)
|
||||
for n in pthobj.nid:
|
||||
p = pthobj.get_data(partid=n)
|
||||
e = endobj.get_data(partid=n)
|
||||
|
@ -392,8 +392,8 @@ def eval_timeseries(file):
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# test_modpath()
|
||||
# test_pathline_plot()
|
||||
# test_mp5_load()
|
||||
test_modpath()
|
||||
test_pathline_plot()
|
||||
test_mp5_load()
|
||||
test_mp5_timeseries_load()
|
||||
test_mp6_timeseries_load()
|
||||
|
|
|
@ -4,7 +4,7 @@ import numpy as np
|
|||
|
||||
import flopy
|
||||
import flopy.utils.binaryfile as bf
|
||||
from flopy.mf6.data.mfdatautil import ArrayUtil
|
||||
from flopy.utils.datautil import PyListUtil
|
||||
from flopy.mf6.modflow.mfsimulation import MFSimulation
|
||||
from flopy.mf6.mfbase import VerbosityLevel
|
||||
|
||||
|
@ -45,13 +45,18 @@ def test001a_tharmonic():
|
|||
expected_cbc_file_a = os.path.join(expected_output_folder, 'flow15_flow_unch.cbc')
|
||||
expected_cbc_file_b = os.path.join(expected_output_folder, 'flow15_flow_adj.cbc')
|
||||
|
||||
array_util = ArrayUtil()
|
||||
array_util = PyListUtil()
|
||||
|
||||
# load simulation
|
||||
sim = MFSimulation.load(model_name, 'mf6', exe_name, pth,
|
||||
verbosity_level=0)
|
||||
sim.simulation_data.mfpath.set_sim_path(run_folder)
|
||||
|
||||
model = sim.get_model(model_name)
|
||||
model.export('{}/tharmonic.nc'.format(model.model_ws))
|
||||
model.export('{}/tharmonic.shp'.format(model.model_ws))
|
||||
model.dis.botm.export('{}/botm.shp'.format(model.model_ws))
|
||||
|
||||
# write simulation to new location
|
||||
sim.write_simulation()
|
||||
|
||||
|
@ -140,7 +145,7 @@ def test003_gwfs_disv():
|
|||
expected_cbc_file_a = os.path.join(expected_output_folder, 'model_unch.cbc')
|
||||
expected_cbc_file_b = os.path.join(expected_output_folder, 'model_adj.cbc')
|
||||
|
||||
array_util = ArrayUtil()
|
||||
array_util = PyListUtil()
|
||||
|
||||
# load simulation
|
||||
sim = MFSimulation.load(model_name, 'mf6', exe_name, pth)
|
||||
|
@ -168,8 +173,10 @@ def test003_gwfs_disv():
|
|||
budget_frf = sim.simulation_data.mfdata[(model_name, 'CBC', 'FLOW-JA-FACE')]
|
||||
assert array_util.array_comp(budget_fjf_valid, budget_frf)
|
||||
|
||||
# change some settings
|
||||
model = sim.get_model(model_name)
|
||||
model.export('{}/{}.shp'.format(pth, test_ex_name))
|
||||
|
||||
# change some settings
|
||||
chd_head_left = model.get_package('CHD_LEFT')
|
||||
chd_left_period = chd_head_left.stress_period_data.array
|
||||
chd_left_period[0][4][1] = 15.0
|
||||
|
@ -292,7 +299,7 @@ def test006_gwf3():
|
|||
expected_cbc_file_a = os.path.join(expected_output_folder, 'flow_unch.cbc')
|
||||
expected_cbc_file_b = os.path.join(expected_output_folder, 'flow_adj.cbc')
|
||||
|
||||
array_util = ArrayUtil()
|
||||
array_util = PyListUtil()
|
||||
|
||||
# load simulation
|
||||
sim = MFSimulation.load(model_name, 'mf6', exe_name, pth)
|
||||
|
|
|
@ -5,7 +5,7 @@ import numpy as np
|
|||
import flopy
|
||||
import flopy.utils.binaryfile as bf
|
||||
from flopy.mf6.data.mfdata import DataStorageType
|
||||
from flopy.mf6.data.mfdatautil import ArrayUtil
|
||||
from flopy.utils.datautil import PyListUtil
|
||||
from flopy.mf6.mfbase import FlopyException
|
||||
from flopy.mf6.modflow.mfgwf import ModflowGwf
|
||||
from flopy.mf6.modflow.mfgwfchd import ModflowGwfchd
|
||||
|
@ -209,7 +209,7 @@ def np001():
|
|||
|
||||
|
||||
# verify external file contents
|
||||
array_util = ArrayUtil()
|
||||
array_util = PyListUtil()
|
||||
ic_data = ic_package.strt
|
||||
ic_array = ic_data.get_data()
|
||||
assert array_util.array_comp(ic_array, [[[100.0, 100.0, 100.0, 100.0,
|
||||
|
@ -351,7 +351,7 @@ def np002():
|
|||
assert pymake.compare_heads(None, None, files1=head_file,
|
||||
files2=head_new, outfile=outfile)
|
||||
|
||||
array_util = ArrayUtil()
|
||||
array_util = PyListUtil()
|
||||
budget_frf = sim.simulation_data.mfdata[
|
||||
(model_name, 'CBC', 'FLOW-JA-FACE')]
|
||||
assert array_util.array_comp(budget_frf_valid, budget_frf)
|
||||
|
@ -1174,6 +1174,11 @@ def test006_gwf3_disv():
|
|||
assert pymake.compare_heads(None, None, files1=head_file, files2=head_new,
|
||||
outfile=outfile)
|
||||
|
||||
# export to netcdf - temporarily disabled
|
||||
#model.export(os.path.join(run_folder, "test006_gwf3.nc"))
|
||||
# export to shape file
|
||||
model.export(os.path.join(run_folder, "test006_gwf3.shp"))
|
||||
|
||||
# clean up
|
||||
sim.delete_output_files()
|
||||
|
||||
|
@ -1578,12 +1583,12 @@ def test028_sfr():
|
|||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test006_gwf3_disv()
|
||||
np001()
|
||||
np002()
|
||||
test004_bcfss()
|
||||
test005_advgw_tidal()
|
||||
test006_2models_gnc()
|
||||
test006_gwf3_disv()
|
||||
test021_twri()
|
||||
test028_sfr()
|
||||
test035_fhb()
|
||||
|
|
|
@ -0,0 +1,141 @@
|
|||
import os, math
|
||||
import numpy as np
|
||||
import flopy
|
||||
fm = flopy.modflow
|
||||
fp6 = flopy.mf6
|
||||
from flopy.discretization import StructuredGrid
|
||||
from flopy.utils import SpatialReference as OGsr
|
||||
from flopy.export.shapefile_utils import shp2recarray
|
||||
|
||||
tmpdir = 'temp/t550/'
|
||||
if not os.path.isdir(tmpdir):
|
||||
os.makedirs(tmpdir)
|
||||
|
||||
def test_mf6_grid_shp_export():
|
||||
nlay = 2
|
||||
nrow = 10
|
||||
ncol = 10
|
||||
top = 1
|
||||
nper = 2
|
||||
perlen = 1
|
||||
nstp = 1
|
||||
tsmult = 1
|
||||
perioddata = [[perlen, nstp, tsmult]]*2
|
||||
botm=np.zeros((2, 10, 10))
|
||||
|
||||
ogsr = OGsr(delc=np.ones(nrow), delr=np.ones(ncol),
|
||||
xll=10, yll=10
|
||||
)
|
||||
m = fm.Modflow('junk', version='mfnwt', model_ws=tmpdir)
|
||||
dis = fm.ModflowDis(m, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
nper=nper, perlen=perlen, nstp=nstp,
|
||||
tsmult=tsmult,
|
||||
top=top, botm=botm)
|
||||
|
||||
smg = StructuredGrid(delc=np.ones(nrow), delr=np.ones(ncol),
|
||||
top=dis.top.array, botm=botm, idomain=1,
|
||||
xoff=10, yoff=10)
|
||||
|
||||
|
||||
# River package (MFlist)
|
||||
spd = fm.ModflowRiv.get_empty(10)
|
||||
spd['i'] = np.arange(10)
|
||||
spd['j'] = [5, 5, 6, 6, 7, 7, 7, 8, 9, 9]
|
||||
spd['stage'] = np.linspace(1, 0.7, 10)
|
||||
spd['rbot'] = spd['stage'] - 0.1
|
||||
spd['cond'] = 50.
|
||||
riv = fm.ModflowRiv(m, stress_period_data={0: spd})
|
||||
|
||||
# Recharge package (transient 2d)
|
||||
rech = {0: 0.001, 1: 0.002}
|
||||
rch = fm.ModflowRch(m, rech=rech)
|
||||
|
||||
# mf6 version of same model
|
||||
mf6name = 'junk6'
|
||||
sim = fp6.MFSimulation(sim_name=mf6name, version='mf6', exe_name='mf6',
|
||||
sim_ws=tmpdir)
|
||||
tdis = flopy.mf6.modflow.mftdis.ModflowTdis(sim, pname='tdis', time_units='DAYS',
|
||||
nper=nper,
|
||||
perioddata=perioddata)
|
||||
gwf = fp6.ModflowGwf(sim, modelname=mf6name,
|
||||
model_nam_file='{}.nam'.format(mf6name))
|
||||
dis6 = fp6.ModflowGwfdis(gwf, pname='dis', nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
top=top,
|
||||
botm=botm)
|
||||
|
||||
def cellid(k, i, j, nrow, ncol):
|
||||
return k*nrow*ncol + i*ncol + j
|
||||
|
||||
# Riv6
|
||||
spd6 = fp6.ModflowGwfriv.stress_period_data.empty(gwf, maxbound=len(spd))
|
||||
#spd6[0]['cellid'] = cellid(spd.k, spd.i, spd.j, m.nrow, m.ncol)
|
||||
spd6[0]['cellid'] = list(zip(spd.k, spd.i, spd.j))
|
||||
for c in spd.dtype.names:
|
||||
if c in spd6[0].dtype.names:
|
||||
spd6[0][c] = spd[c]
|
||||
# MFTransient list apparently requires entries for additional stress periods,
|
||||
# even if they are the same
|
||||
spd6[1] = spd6[0]
|
||||
#irch = np.zeros((nrow, ncol))
|
||||
riv6 = fp6.ModflowGwfriv(gwf, stress_period_data=spd6)
|
||||
rch6 = fp6.ModflowGwfrcha(gwf, recharge=rech)
|
||||
#rch6.export('{}/mf6.shp'.format(tmpdir))
|
||||
m.export('{}/mfnwt.shp'.format(tmpdir))
|
||||
gwf.export('{}/mf6.shp'.format(tmpdir))
|
||||
|
||||
riv6spdarrays = dict(riv6.stress_period_data.masked_4D_arrays_itr())
|
||||
rivspdarrays = dict(riv.stress_period_data.masked_4D_arrays_itr())
|
||||
for k, v in rivspdarrays.items():
|
||||
assert np.abs(np.nansum(v) - np.nansum(riv6spdarrays[k])) < 1e-6, "variable {} is not equal".format(k)
|
||||
pass
|
||||
|
||||
# check that the two shapefiles are the same
|
||||
ra = shp2recarray('{}/mfnwt.shp'.format(tmpdir))
|
||||
ra6 = shp2recarray('{}/mf6.shp'.format(tmpdir))
|
||||
|
||||
# check first and last exported cells
|
||||
assert ra.geometry[0] == ra6.geometry[0]
|
||||
assert ra.geometry[-1] == ra6.geometry[-1]
|
||||
# fields
|
||||
different_fields = list(set(ra.dtype.names).difference(ra6.dtype.names))
|
||||
different_fields = [f for f in different_fields
|
||||
if 'thick' not in f
|
||||
and 'rech' not in f]
|
||||
assert len(different_fields) == 0
|
||||
for l in np.arange(m.nlay)+1:
|
||||
assert np.sum(np.abs(ra['rech_{}'.format(l)] - ra6['rechar{}'.format(l)])) < 1e-6
|
||||
common_fields = set(ra.dtype.names).intersection(ra6.dtype.names)
|
||||
common_fields.remove('geometry')
|
||||
# array values
|
||||
for c in common_fields:
|
||||
for it, it6 in zip(ra[c], ra6[c]):
|
||||
if math.isnan(it):
|
||||
assert math.isnan(it6)
|
||||
else:
|
||||
assert np.abs(it - it6) < 1e-6
|
||||
pass
|
||||
|
||||
|
||||
def test_huge_shapefile():
|
||||
nlay = 2
|
||||
nrow = 200
|
||||
ncol = 200
|
||||
top = 1
|
||||
nper = 2
|
||||
perlen = 1
|
||||
nstp = 1
|
||||
tsmult = 1
|
||||
perioddata = [[perlen, nstp, tsmult]] * 2
|
||||
botm = np.zeros((nlay, nrow, ncol))
|
||||
|
||||
m = fm.Modflow('junk', version='mfnwt', model_ws=tmpdir)
|
||||
dis = fm.ModflowDis(m, nlay=nlay, nrow=nrow, ncol=ncol,
|
||||
nper=nper, perlen=perlen, nstp=nstp,
|
||||
tsmult=tsmult,
|
||||
top=top, botm=botm)
|
||||
m.export('{}/huge.shp'.format(tmpdir))
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
test_mf6_grid_shp_export()
|
||||
test_huge_shapefile()
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -33,7 +33,7 @@
|
|||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.0\n",
|
||||
"matplotlib version: 2.1.2\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -2918,7 +2918,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.4"
|
||||
"version": "3.6.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
@ -2194,7 +2194,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.0"
|
||||
"version": "3.6.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -18,9 +18,9 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -161,7 +161,7 @@
|
|||
"test1ss MODEL DATA VALIDATION SUMMARY:\n",
|
||||
" 2 Warnings:\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods\n",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Variable NRCHOP set to value other than 3\n",
|
||||
"\n",
|
||||
|
@ -209,7 +209,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"rec.array([('Warning', 'RCH', 0, 0, 0, 1.1785916e-09, '\\r RCH package: Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods'),\n",
|
||||
"rec.array([('Warning', 'RCH', 0, 0, 0, 1.5240407e-09, '\\r RCH package: Mean R/T ratio < checker warning threshold of 2e-08'),\n",
|
||||
" ('Warning', 'RCH', 0, 0, 0, 1.0000000e+00, '\\r RCH package: Variable NRCHOP set to value other than 3')],\n",
|
||||
" dtype=[('type', 'O'), ('package', 'O'), ('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('value', '<f8'), ('desc', 'O')])"
|
||||
]
|
||||
|
@ -253,7 +253,7 @@
|
|||
"test1ss MODEL DATA VALIDATION SUMMARY:\n",
|
||||
" 2 Warnings:\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods\n",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Variable NRCHOP set to value other than 3\n",
|
||||
"\n",
|
||||
|
@ -280,14 +280,14 @@
|
|||
"\n",
|
||||
"DETAILED SUMMARY:\n",
|
||||
"type\tpackage\tk\ti\tj\tvalue\tdesc\n",
|
||||
"Warning\tRCH \t0\t0\t0\t1.18e-09\tRCH package: Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods\n",
|
||||
"Warning\tRCH \t0\t0\t0\t1.52e-09\tRCH package: Mean R/T ratio < checker warning threshold of 2e-08\n",
|
||||
"Warning\tRCH \t0\t0\t0\t1.00e+00\tRCH package: Variable NRCHOP set to value other than 3\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.check.check at 0x120818c18>"
|
||||
"<flopy.utils.check.check at 0x11f385748>"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
|
@ -319,7 +319,7 @@
|
|||
"RCH PACKAGE DATA VALIDATION:\n",
|
||||
" 2 Warnings:\n",
|
||||
" 1 instance of \r",
|
||||
" Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods\n",
|
||||
" Mean R/T ratio < checker warning threshold of 2e-08\n",
|
||||
" 1 instance of \r",
|
||||
" Variable NRCHOP set to value other than 3\n",
|
||||
"\n"
|
||||
|
@ -328,7 +328,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.check.check at 0x10f169358>"
|
||||
"<flopy.utils.check.check at 0x11f385828>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
@ -360,7 +360,7 @@
|
|||
"test1ss MODEL DATA VALIDATION SUMMARY:\n",
|
||||
" 2 Warnings:\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08 for 1 stress periods\n",
|
||||
" RCH package: Mean R/T ratio < checker warning threshold of 2e-08\n",
|
||||
" 1 instance of \r",
|
||||
" RCH package: Variable NRCHOP set to value other than 3\n",
|
||||
" see data/checksummary.csv for details.\n",
|
||||
|
@ -391,7 +391,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.utils.check.check at 0x120867978>"
|
||||
"<flopy.utils.check.check at 0x11f3a90f0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -29,7 +29,7 @@
|
|||
"text": [
|
||||
"numpy version: 1.15.1\n",
|
||||
"matplotlib version: 2.2.3\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -104,7 +104,7 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ms = flopy.modflow.Modflow(rotation=-20.)\n",
|
||||
"ms = flopy.modflow.Modflow()\n",
|
||||
"dis5 = flopy.modflow.ModflowDis(ms, nlay=nlay, nrow=nrow, ncol=ncol, delr=delr,\n",
|
||||
" delc=delc, top=top, botm=botm)"
|
||||
]
|
||||
|
@ -171,6 +171,14 @@
|
|||
"execution_count": 7,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"c:\\users\\jlarsen\\desktop\\flopy-ogw\\trunk\\flopy\\plot\\map.py:794: PendingDeprecationWarning: ModelMap will be replaced by PlotMapView(); Calling PlotMapView()\n",
|
||||
" warnings.warn(err_msg, PendingDeprecationWarning)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
|
@ -294,7 +302,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Directory structure already exists for simulation path /Users/langevin/langevin/dev/flopy3.git/examples/Notebooks/data/mp7_ex2/mf6\n",
|
||||
"Directory structure already exists for simulation path C:\\Users\\jlarsen\\Desktop\\flopy-ogw\\trunk\\examples\\Notebooks\\data\\mp7_ex2\\mf6\n",
|
||||
"writing simulation...\n",
|
||||
" writing simulation name file...\n",
|
||||
" writing simulation tdis package...\n",
|
||||
|
@ -470,7 +478,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fname, verbose=False)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -498,7 +506,7 @@
|
|||
"ibd = np.ma.masked_equal(ibd, 0)\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr, ax=ax)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, ax=ax)\n",
|
||||
"ax.set_xlim(0, Lx)\n",
|
||||
"ax.set_ylim(0, Ly)\n",
|
||||
"cmap = mpl.colors.ListedColormap(['r','g',])\n",
|
||||
|
@ -552,7 +560,7 @@
|
|||
"cint = .25\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr, ax=ax)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, ax=ax)\n",
|
||||
"ax.set_xlim(0, Lx)\n",
|
||||
"ax.set_ylim(0, Ly)\n",
|
||||
"v = mm.plot_cvfd(verts, iverts, edgecolor='black', a=head[ilay, 0, :], cmap='jet')\n",
|
||||
|
@ -598,7 +606,7 @@
|
|||
"\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr, ax=ax)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, ax=ax)\n",
|
||||
"v = mm.plot_cvfd(verts, iverts, edgecolor='black', facecolor='none')\n",
|
||||
"t = ax.set_title('Model Cells and Vertices (one-based)')\n",
|
||||
"ax.set_xlim(xmin, xmax)\n",
|
||||
|
@ -841,11 +849,12 @@
|
|||
"source": [
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr, ax=ax)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, ax=ax)\n",
|
||||
"ax.set_xlim(0, Lx)\n",
|
||||
"ax.set_ylim(0, Ly)\n",
|
||||
"cmap = mpl.colors.ListedColormap(['r','g',])\n",
|
||||
"v = mm.plot_cvfd(verts, iverts, edgecolor='gray', a=ibd, cmap=cmap)\n",
|
||||
"# v = mm.plot_cvfd(verts, iverts, edgecolor='gray', a=ibd, cmap=cmap)\n",
|
||||
"mm.plot_grid()\n",
|
||||
"mm.plot_pathline(p0, layer='all', color='blue', lw=0.75)\n",
|
||||
"colors = ['green', 'orange', 'red']\n",
|
||||
"for k in range(nlay):\n",
|
||||
|
@ -969,7 +978,7 @@
|
|||
"source": [
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr, ax=ax)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, ax=ax)\n",
|
||||
"ax.set_xlim(0, Lx)\n",
|
||||
"ax.set_ylim(0, Ly)\n",
|
||||
"cmap = mpl.colors.ListedColormap(['r','g',])\n",
|
||||
|
@ -1001,7 +1010,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.0"
|
||||
"version": "3.6.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"numpy version: 1.14.0\n",
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -153,11 +153,11 @@
|
|||
"0 0 0\n",
|
||||
"0 0 0\n",
|
||||
"CONSTANT ~ HK_LAYER_1 ~ #hk Layer 1\n",
|
||||
"CONSTANT 1.000000E+00 #vka1\n",
|
||||
"CONSTANT 1.000000E+00 #vka layer 1\n",
|
||||
"CONSTANT 10.0 #hk Layer 2\n",
|
||||
"CONSTANT 1.000000E+00 #vka2\n",
|
||||
"CONSTANT 1.000000E+00 #vka layer 2\n",
|
||||
"CONSTANT 10.0 #hk Layer 3\n",
|
||||
"CONSTANT 1.000000E+00 #vka3\n"
|
||||
"CONSTANT 1.000000E+00 #vka layer 3\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -266,9 +266,9 @@
|
|||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"CONSTANT 1.000000E+00 #vka1\n",
|
||||
"CONSTANT 1.000000E+00 #vka layer 1\n",
|
||||
"CONSTANT 10.0 #hk Layer 2\n",
|
||||
"CONSTANT 1.000000E+00 #vka2\n",
|
||||
"CONSTANT 1.000000E+00 #vka layer 2\n",
|
||||
"INTERNAL ~ HK_LAYER_1-3 ~ (FREE) -1 #hk Layer 3\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
|
@ -310,7 +310,7 @@
|
|||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0 10.0\n",
|
||||
"CONSTANT 1.000000E+00 #vka3\n"
|
||||
"CONSTANT 1.000000E+00 #vka layer 3\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -483,11 +483,11 @@
|
|||
"~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~\n",
|
||||
"10.0 10.0 10.0 10.0 10.0 10.0 10.0 ~ hk_2 ~ ~ hk_2 ~ ~ hk_3 ~\n",
|
||||
"~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~ ~ hk_3 ~\n",
|
||||
"CONSTANT ~ vka_1 ~ #vka1\n",
|
||||
"CONSTANT ~ vka_1 ~ #vka Layer 1\n",
|
||||
"CONSTANT ~ hk_4 ~ #hk Layer 2\n",
|
||||
"CONSTANT ~ vka_2 ~ #vka2\n",
|
||||
"CONSTANT ~ vka_2 ~ #vka Layer 2\n",
|
||||
"CONSTANT 10.0 #hk Layer 3\n",
|
||||
"CONSTANT ~ vka_1 ~ #vka3\n"
|
||||
"CONSTANT ~ vka_1 ~ #vka Layer 3\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -752,7 +752,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
"version": "3.6.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,544 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"source": [
|
||||
"# New plotting classes have been added to flopy\n",
|
||||
"\n",
|
||||
"these classes seamlessly support vertex model grid cross section plotting using the new `PlotCrossSection` class. This class will replace the previous `ModelCrossSection` class; however backward compatibility is still supported through `ModelCrossSection`.\n",
|
||||
"\n",
|
||||
"`PlotCrossSection` has a similar interface as `ModelCrossSection`. In most instances the two classes can be used interchangably. The biggest difference is that some of the input parameters have changed.\n",
|
||||
"\n",
|
||||
"The number of input parameters to the `PlotCrossSection` class has been reduced to make it easier to work with.\n",
|
||||
"\n",
|
||||
"Transforms using `xll`, `yll`, `xul`, `yul`, `rotation`, and `length_multiplier` have been removed from the list of parameters. The user should apply these transforms before passing their model grid to `PlotCrossSection`.\n",
|
||||
"\n",
|
||||
"The remaining functionality remains the same!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%matplotlib inline\n",
|
||||
"import numpy as np\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"import matplotlib as mpl\n",
|
||||
"import os, sys\n",
|
||||
"import setup_pmv_demo\n",
|
||||
"\n",
|
||||
"# run installed version of flopy or add local path\n",
|
||||
"try:\n",
|
||||
" import flopy\n",
|
||||
" from flopy.plot import PlotMapView, PlotCrossSection, ModelMap, ModelCrossSection\n",
|
||||
" from flopy.utils import HeadFile, CellBudgetFile, geometry\n",
|
||||
"except:\n",
|
||||
" fpth = os.path.abspath(os.path.join('..', '..'))\n",
|
||||
" sys.path.append(fpth)\n",
|
||||
" import flopy\n",
|
||||
" from flopy.plot import PlotMapView, PlotCrossSection, ModelMap, ModelCrossSection\n",
|
||||
" from flopy.utils import HeadFile, CellBudgetFile, geometry\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## First let's set up our projects \n",
|
||||
"\n",
|
||||
"This function runs a couple of modflow models; we'll be working with the output data from these\n",
|
||||
"\n",
|
||||
"### Freyberg model for the DIS example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"loadpth = os.path.join('..', 'data', 'freyberg')\n",
|
||||
"modelpth = os.path.join('data')\n",
|
||||
"dis_ml = flopy.modflow.Modflow.load('freyberg.nam', model_ws=loadpth, \n",
|
||||
" exe_name=\"mf2005\", version=\"mf2005\")\n",
|
||||
"dis_ml.change_model_ws(new_pth=modelpth)\n",
|
||||
"dis_ml.write_input()\n",
|
||||
"success, buff = dis_ml.run_model()\n",
|
||||
"if not success:\n",
|
||||
" print ('Something bad happened.')\n",
|
||||
"files = ['freyberg.hds', 'freyberg.cbc']\n",
|
||||
"for f in files:\n",
|
||||
" if os.path.isfile(os.path.join(modelpth, f)):\n",
|
||||
" msg = 'Output file located: {}'.format(f)\n",
|
||||
" print (msg)\n",
|
||||
" else:\n",
|
||||
" errmsg = 'Error. Output file cannot be found: {}'.format(f)\n",
|
||||
" print (errmsg)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISV example problem"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# load up the vertex example problem\n",
|
||||
"sim_name = \"mfsim.nam\"\n",
|
||||
"sim_path = \"../data/mf6/test003_gwftri_disv\"\n",
|
||||
"disv_sim = flopy.mf6.MFSimulation.load(sim_name=sim_name, version=\"mf6\", exe_name=\"mf6\",\n",
|
||||
" sim_ws=sim_path)\n",
|
||||
"disv_ml = disv_sim.get_model('gwf_1')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting Cross Sections using Structured (DIS) and Vertex (DISV) grids in FloPy\n",
|
||||
"\n",
|
||||
"In this example the `PlotCrossSection` functionality will be shown, and backward compatibility options with `ModelCrossSection` will also be presented. \n",
|
||||
"\n",
|
||||
"### Plotting a cross sectional model grid (DIS)\n",
|
||||
"\n",
|
||||
"the `line` parameter is a dictionary that accepts either `column`: int, `row`: int, or `line`: list(x,y) vertices"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(13, 3))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1)\n",
|
||||
"\n",
|
||||
"# Next we create an instance of the ModelCrossSection class\n",
|
||||
"xsect = flopy.plot.PlotCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"\n",
|
||||
"# Then we can use the plot_grid() method to draw the grid\n",
|
||||
"# The return value for this function is a matplotlib LineCollection object,\n",
|
||||
"# which could be manipulated (or used) later if necessary.\n",
|
||||
"pc = xsect.plot_ibound()\n",
|
||||
"linecollection = xsect.plot_grid()\n",
|
||||
"t = ax.set_title('Column 6 Cross-Section - Model Grid')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility with `ModelCrossSection`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(13, 3))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1)\n",
|
||||
"\n",
|
||||
"# Next we create an instance of the ModelCrossSection class\n",
|
||||
"modelxsect = flopy.plot.ModelCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"\n",
|
||||
"# Then we can use the plot_grid() method to draw the grid\n",
|
||||
"# The return value for this function is a matplotlib LineCollection object,\n",
|
||||
"# which could be manipulated (or used) later if necessary.\n",
|
||||
"pc = modelxsect.plot_ibound()\n",
|
||||
"linecollection = modelxsect.plot_grid()\n",
|
||||
"t = ax.set_title('Column 6 Cross-Section - Model Grid')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Plotting a cross sectional model grid for DISV (vertex grid)\n",
|
||||
"\n",
|
||||
"since row and column do not exist in the DISV grid, a line must be provided to plot a crosssection. The line can be straight or it can be an arbitrary line across the grid. \n",
|
||||
"\n",
|
||||
"Let's view the line on a MapView plot first"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# define a line through the model in model coordiantes as a \n",
|
||||
"# series of XY vertices where the cross section will be sliced!\n",
|
||||
"line = np.array([(3.5, 0), (3.5, 5), (2, 10)])\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(10, 10))\n",
|
||||
"vmap = PlotMapView(model=disv_ml, layer=0)\n",
|
||||
"ax = vmap.plot_ibound()\n",
|
||||
"pc = vmap.plot_grid()\n",
|
||||
"plt.plot(line[:,0], line[:,1], 'r--', linewidth=2);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(10, 2))\n",
|
||||
"xsect = PlotCrossSection(model=disv_ml, line={\"line\": line})\n",
|
||||
"ax = xsect.plot_ibound()\n",
|
||||
"pc = xsect.plot_grid();"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting arrays of Data:\n",
|
||||
"\n",
|
||||
"Plotting arrays can be accomplished using the `plot_array()` method\n",
|
||||
"\n",
|
||||
"### Structured grid example (DIS)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Get data from the head object for plotting\n",
|
||||
"fname = os.path.join(modelpth, 'freyberg.hds')\n",
|
||||
"hdobj = flopy.utils.HeadFile(fname)\n",
|
||||
"head = hdobj.get_data()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# plot the data\n",
|
||||
"fig = plt.figure(figsize=(16, 3))\n",
|
||||
"\n",
|
||||
"plt.title('plot_array()')\n",
|
||||
"xsect = flopy.plot.PlotCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"csa = xsect.plot_array(head, masked_values=[999.], head=head, alpha=0.5)\n",
|
||||
"patches = xsect.plot_ibound(head=head)\n",
|
||||
"linecollection = xsect.plot_grid()\n",
|
||||
"plt.colorbar(csa)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility with `ModelCrossSection`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# plot the data\n",
|
||||
"fig = plt.figure(figsize=(16, 3))\n",
|
||||
"\n",
|
||||
"plt.title('plot_array()')\n",
|
||||
"xsect = flopy.plot.ModelCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"csa = xsect.plot_array(head, masked_values=[999.], head=head, alpha=0.5)\n",
|
||||
"patches = xsect.plot_ibound(head=head)\n",
|
||||
"linecollection = xsect.plot_grid()\n",
|
||||
"plt.colorbar(csa);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Vertex grid example (DISV)\n",
|
||||
"\n",
|
||||
"The same plotting functionality is available for vertex based model grids. Coming soon is unstructured grid function(s)."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"hds_file = os.path.join(sim_path, \"tri_model.hds\")\n",
|
||||
"\n",
|
||||
"hds = HeadFile(hds_file)\n",
|
||||
"hdata = hds.get_alldata()[0]\n",
|
||||
"hdata.shape = (disv_ml.modelgrid.nlay, -1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(12.5, 2))\n",
|
||||
"\n",
|
||||
"xsect = PlotCrossSection(model=disv_ml, line={\"line\": line})\n",
|
||||
"\n",
|
||||
"ax = xsect.plot_ibound()\n",
|
||||
"ax = xsect.plot_array(a=hdata, masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"xsect.plot_grid()\n",
|
||||
"plt.title(\"plot_array()\");"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Contouring array values on a cross section\n",
|
||||
"\n",
|
||||
"By using the `contour_array` method, `PlotCrossSection` is able to draw contour lines using user supplied array data\n",
|
||||
"\n",
|
||||
"A surface can also be plotted using the `plot_surface` method\n",
|
||||
"\n",
|
||||
"### Structured grid (DIS) example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"levels = np.arange(10, 30, .5)\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(13, 3))\n",
|
||||
"xsect = flopy.plot.PlotCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"\n",
|
||||
"# contour array and plot ibound\n",
|
||||
"ct = xsect.contour_array(head, masked_values=[999.], head=head, levels=levels, linewidths=2.5)\n",
|
||||
"pc = xsect.plot_ibound(head=head)\n",
|
||||
"\n",
|
||||
"#plot the surface and model grid\n",
|
||||
"wt = xsect.plot_surface(head, masked_values=[999.], color='blue', lw=2.5)\n",
|
||||
"linecollection = xsect.plot_grid()\n",
|
||||
"\n",
|
||||
"plt.title('contour_array() and plot_surface()');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Backward compatibility with `ModelCrossSection`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"levels = np.arange(10, 30, .5)\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(13, 3))\n",
|
||||
"xsect = flopy.plot.ModelCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"\n",
|
||||
"# contour array and plot ibound\n",
|
||||
"ct = xsect.contour_array(head, masked_values=[999.], head=head, levels=levels, linewidths=2.5)\n",
|
||||
"pc = xsect.plot_ibound(head=head)\n",
|
||||
"\n",
|
||||
"#plot the surface and model grid\n",
|
||||
"wt = xsect.plot_surface(head, masked_values=[999.], color='blue', lw=2.5)\n",
|
||||
"linecollection = xsect.plot_grid()\n",
|
||||
"\n",
|
||||
"plt.title('contour_array() and plot_surface()');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Vertex grid example (DISV)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(12.5, 2))\n",
|
||||
"\n",
|
||||
"xsect = PlotCrossSection(model=disv_ml, line={\"line\": line})\n",
|
||||
"ax = xsect.plot_ibound()\n",
|
||||
"ax = xsect.plot_array(a=hdata, masked_values=[1e30], alpha=0.3)\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"\n",
|
||||
"# set our own contour levels using the matplotlib keyword argument levels\n",
|
||||
"levels = np.arange(1, 10, 0.5)\n",
|
||||
"xsect.contour_array(a=hdata, masked_values=[1e30], levels=levels)\n",
|
||||
"\n",
|
||||
"xsect.plot_grid();"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting discharge Vectors\n",
|
||||
"\n",
|
||||
"Discharge can be plotted using the `plot_discharge()` method \n",
|
||||
"\n",
|
||||
"### Structured grid example (DIS)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# First let's get the cell budget data\n",
|
||||
"fname = os.path.join(modelpth, 'freyberg.cbc')\n",
|
||||
"cbb = flopy.utils.CellBudgetFile(fname)\n",
|
||||
"frf = cbb.get_data(text='FLOW RIGHT FACE')[0]\n",
|
||||
"fff = cbb.get_data(text='FLOW FRONT FACE')[0]"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(13, 3))\n",
|
||||
"\n",
|
||||
"plt.title('plot_array() and plot_discharge()')\n",
|
||||
"xsect = flopy.plot.PlotCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"csa = xsect.plot_array(head, masked_values=[999.], head=head, alpha=0.5)\n",
|
||||
"linecollection = xsect.plot_grid()\n",
|
||||
"quiver = xsect.plot_discharge(frf, fff, head=head, \n",
|
||||
" hstep=2, normalize=True, color='green', \n",
|
||||
" scale=30, headwidth=3, headlength=3, headaxislength=3,\n",
|
||||
" zorder=10)\n",
|
||||
"patches = xsect.plot_ibound(head=head)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility using `ModelCrossSection`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(13, 3))\n",
|
||||
"\n",
|
||||
"plt.title('plot_array() and plot_discharge()')\n",
|
||||
"modelxsect = flopy.plot.ModelCrossSection(model=dis_ml, line={'Column': 5})\n",
|
||||
"csa = modelxsect.plot_array(head, masked_values=[999.], head=head, alpha=0.5)\n",
|
||||
"linecollection = modelxsect.plot_grid()\n",
|
||||
"quiver = modelxsect.plot_discharge(frf, fff, head=head, \n",
|
||||
" hstep=2, normalize=True, color='green', \n",
|
||||
" scale=30, headwidth=3, headlength=3, headaxislength=3,\n",
|
||||
" zorder=10)\n",
|
||||
"patches = modelxsect.plot_ibound(head=head)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Discharge vector plotting with DISV\n",
|
||||
"\n",
|
||||
"The Specific Discharge (SPDIS) recarray is used with plot_specific_discharge to create and plot flow vectors\n",
|
||||
"\n",
|
||||
"Specific Discharge can be written to the cell budget file by supplying the option SAVE_SPECIFIC_DISCHARGE in the NPF package of MODFLOW-6 \n",
|
||||
"\n",
|
||||
"### Note:\n",
|
||||
"Arbitrary cross section lines cannot be used with this method. A straight cross section must be supplied to calculate discharge vectors."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Get data from the CellBudgetFile\n",
|
||||
"cbc_file = os.path.join(sim_path, \"tri_model.cbc\")\n",
|
||||
"cbc = CellBudgetFile(cbc_file, precision='double')\n",
|
||||
"spdis = cbc.get_data(text=\"SPDIS\")\n",
|
||||
"\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(12.5, 2))\n",
|
||||
"\n",
|
||||
"# define the new cross section line...\n",
|
||||
"line = np.array([(0, 3.5), (10, 3.5)])\n",
|
||||
"\n",
|
||||
"vcs = PlotCrossSection(model=disv_ml, line={\"line\": line})\n",
|
||||
"ax = vcs.plot_array(a=hdata, masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"vcs.plot_grid()\n",
|
||||
"\n",
|
||||
"# plot discharge vectors\n",
|
||||
"ax = vcs.plot_specific_discharge(spdis, head=hdata, hstep=2)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
|
@ -0,0 +1,812 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"source": [
|
||||
"# New plotting classes have been added to flopy\n",
|
||||
"\n",
|
||||
"these classes seamlessly support vertex model grid and unstructured model grid plotting using the new `PlotMapView` class. This classes will replace the previous `ModelMap` class; however backward compatibility is still supported through `ModelMap`.\n",
|
||||
"\n",
|
||||
"`PlotMapView` has a similar interface as `ModelMap`. In most instances the two classes can be used interchangably. The biggest difference is that some of the input parameters have changed.\n",
|
||||
"\n",
|
||||
"`sr` has been replaced with `modelgrid` since the SpatialRefernce class is being depreciated\n",
|
||||
"\n",
|
||||
"Transforms using `xll`, `yll`, `xul`, `yul`, `rotation`, and `length_multiplier` have been removed from plot. The user should apply these transforms before passing their model grid to `PlotMapView`.\n",
|
||||
"\n",
|
||||
"The remaining functionality remains the same!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%matplotlib inline\n",
|
||||
"import numpy as np\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"import matplotlib as mpl\n",
|
||||
"import os, sys\n",
|
||||
"import setup_pmv_demo\n",
|
||||
"\n",
|
||||
"# run installed version of flopy or add local path\n",
|
||||
"try:\n",
|
||||
" import flopy\n",
|
||||
" from flopy.plot import PlotMapView, PlotCrossSection, ModelMap, ModelCrossSection\n",
|
||||
" from flopy.utils import HeadFile, CellBudgetFile, geometry\n",
|
||||
" from flopy.discretization import UnstructuredGrid\n",
|
||||
"except:\n",
|
||||
" fpth = os.path.abspath(os.path.join('..', '..'))\n",
|
||||
" sys.path.append(fpth)\n",
|
||||
" import flopy\n",
|
||||
" from flopy.plot import PlotMapView, PlotCrossSection, ModelMap, ModelCrossSection\n",
|
||||
" from flopy.utils import HeadFile, CellBudgetFile, geometry\n",
|
||||
" from flopy.discretization import UnstructuredGrid\n",
|
||||
"\n",
|
||||
"# create the model data to work with in this notebook using a helper module\n",
|
||||
"setup_pmv_demo.run()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now to load up example problems representing each grid type (DIS, DISV, and DISU)\n",
|
||||
"\n",
|
||||
"### Starting with Freyberg for the DIS example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"loadpth = os.path.join('..', 'data', 'freyberg')\n",
|
||||
"modelpth = os.path.join('data')\n",
|
||||
"dis_ml = flopy.modflow.Modflow.load('freyberg.nam', model_ws=loadpth, \n",
|
||||
" exe_name=\"mf2005\", version=\"mf2005\")\n",
|
||||
"dis_ml.change_model_ws(new_pth=modelpth)\n",
|
||||
"dis_ml.write_input()\n",
|
||||
"success, buff = dis_ml.run_model()\n",
|
||||
"if not success:\n",
|
||||
" print ('Something bad happened.')\n",
|
||||
"files = ['freyberg.hds', 'freyberg.cbc']\n",
|
||||
"for f in files:\n",
|
||||
" if os.path.isfile(os.path.join(modelpth, f)):\n",
|
||||
" msg = 'Output file located: {}'.format(f)\n",
|
||||
" print (msg)\n",
|
||||
" else:\n",
|
||||
" errmsg = 'Error. Output file cannot be found: {}'.format(f)\n",
|
||||
" print (errmsg)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### The DISV example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# load up the vertex example problem\n",
|
||||
"sim_name = \"mfsim.nam\"\n",
|
||||
"sim_path = \"../data/mf6/test003_gwftri_disv\"\n",
|
||||
"disv_sim = flopy.mf6.MFSimulation.load(sim_name=sim_name, version=\"mf6\", exe_name=\"mf6\",\n",
|
||||
" sim_ws=sim_path)\n",
|
||||
"disv_ml = disv_sim.get_model('gwf_1')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### And the DISU example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# This is a folder containing some unstructured grids\n",
|
||||
"datapth = os.path.join('..', 'data', 'unstructured')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Simple functions to load vertices and incidence lists\n",
|
||||
"def load_verts(fname):\n",
|
||||
" return(np.genfromtxt(fname))\n",
|
||||
"\n",
|
||||
"def load_iverts(fname):\n",
|
||||
" f = open(fname, 'r')\n",
|
||||
" iverts = []\n",
|
||||
" xc = []\n",
|
||||
" yc = []\n",
|
||||
" for line in f:\n",
|
||||
" ll = line.strip().split()\n",
|
||||
" iverts.append([int(i) - 1 for i in ll[4:]])\n",
|
||||
" xc.append(float(ll[1]))\n",
|
||||
" yc.append(float(ll[2]))\n",
|
||||
" return iverts, np.array(xc), np.array(yc)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# load vertices\n",
|
||||
"fname = os.path.join(datapth, 'ugrid_verts.dat')\n",
|
||||
"verts = load_verts(fname)[:, 1:]\n",
|
||||
"\n",
|
||||
"# load the incidence list into iverts\n",
|
||||
"fname = os.path.join(datapth, 'ugrid_iverts.dat')\n",
|
||||
"iverts, xc, yc = load_iverts(fname)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ncpl = np.array(5 * [len(iverts)])\n",
|
||||
"# using the SpatialReferenceUnstructured class since UnstructuredModelGrid has not been created yet\n",
|
||||
"disu_mg = UnstructuredGrid(verts, iverts, xc, yc, ncpl=ncpl)\n",
|
||||
"disu_sr = flopy.utils.reference.SpatialReferenceUnstructured(xc, yc, verts, iverts, ncpl)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting the model grid with each of these examples\n",
|
||||
"\n",
|
||||
"### DIS (structured grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# setup our modelgrid rotation and offsets\n",
|
||||
"dis_ml.modelgrid.set_coord_info(xoff=0., yoff=0, angrot=-14)\n",
|
||||
"\n",
|
||||
"# First step is to set up the plot\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"\n",
|
||||
"# Next we create an instance of the ModelMap class\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=dis_ml)\n",
|
||||
"\n",
|
||||
"# Then we can use the plot_grid() method to draw the grid\n",
|
||||
"# The return value for this function is a matplotlib LineCollection object,\n",
|
||||
"# which could be manipulated (or used) later if necessary.\n",
|
||||
"linecollection = mapview.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility with `ModelMap` using a Structured discretization"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# First step is to set up the plot\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"\n",
|
||||
"# Next we create an instance of the ModelMap class\n",
|
||||
"modelmap = flopy.plot.ModelMap(model=dis_ml, xll=0, yll=0, rotation=-14)\n",
|
||||
"\n",
|
||||
"# Then we can use the plot_grid() method to draw the grid\n",
|
||||
"# The return value for this function is a matplotlib LineCollection object,\n",
|
||||
"# which could be manipulated (or used) later if necessary.\n",
|
||||
"linecollection = modelmap.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISV (Vertex Grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(5, 5))\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=disv_ml)\n",
|
||||
"\n",
|
||||
"linecollection = mapview.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISU (Unstructured Grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"f = plt.figure(figsize=(10, 10))\n",
|
||||
"mapview = flopy.plot.PlotMapView(modelgrid=disu_mg)\n",
|
||||
"\n",
|
||||
"linecollection = mapview.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility for DISU using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"f = plt.figure(figsize=(10, 10))\n",
|
||||
"modelmap = flopy.plot.ModelMap(sr=disu_sr)\n",
|
||||
"\n",
|
||||
"linecollection = modelmap.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting Arrays with each of these examples\n",
|
||||
"\n",
|
||||
"### DIS (Structured grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Create a random array and plot it\n",
|
||||
"a = np.random.random((dis_ml.dis.nrow, dis_ml.dis.ncol))\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('Random Array')\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=dis_ml)\n",
|
||||
"quadmesh = mapview.plot_array(a)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DIS Backward compatibility using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Create a random array and plot it\n",
|
||||
"a = np.random.random((dis_ml.dis.nrow, dis_ml.dis.ncol))\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('Random Array')\n",
|
||||
"modelmap = flopy.plot.ModelMap(model=dis_ml, xll=0, yll=0, rotation=-14)\n",
|
||||
"quadmesh = modelmap.plot_array(a)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISV (Vertex grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"a = np.random.random(disv_ml.modelgrid.ncpl) * 20\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('Random Array')\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=disv_ml)\n",
|
||||
"quadmesh = mapview.plot_array(a)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISU (Unstructured grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"f = plt.figure(figsize=(10, 10))\n",
|
||||
"a = np.random.random((ncpl[0]))\n",
|
||||
"pmv = flopy.plot.PlotMapView(modelgrid=disu_mg)\n",
|
||||
"pmv.plot_array(a)\n",
|
||||
"plt.plot(xc, yc, 'bo');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility for DISU using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"f = plt.figure(figsize=(10, 10))\n",
|
||||
"mm = flopy.plot.ModelMap(sr=disu_sr)\n",
|
||||
"mm.plot_array(a)\n",
|
||||
"plt.plot(xc, yc, 'bo');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Contouring arrays with each of these examples\n",
|
||||
"\n",
|
||||
"### DIS (structured grid)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Create a random array and contour it\n",
|
||||
"a = np.random.random((dis_ml.dis.nrow, dis_ml.dis.ncol))\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('Random Array')\n",
|
||||
"\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=dis_ml)\n",
|
||||
"quadmesh = mapview.contour_array(a)\n",
|
||||
"linecollection = mapview.plot_grid(alpha=0.5)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DIS backward compatibility using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('Random Array')\n",
|
||||
"\n",
|
||||
"modelmap = flopy.plot.ModelMap(model=dis_ml, xll=0, yll=0, rotation=-14)\n",
|
||||
"quadmesh = modelmap.contour_array(a)\n",
|
||||
"linecollection = modelmap.plot_grid(alpha=0.5)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISV (unstructured grid) example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"a = np.random.random(disv_ml.modelgrid.ncpl) * 20\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('Random Array')\n",
|
||||
"\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=disv_ml)\n",
|
||||
"quadmesh = mapview.contour_array(a)\n",
|
||||
"linecollection = mapview.plot_grid(alpha=0.5)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISU (Unstructured grid) example"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"f = plt.figure(figsize=(10, 10))\n",
|
||||
"a = np.random.random((ncpl[0]))\n",
|
||||
"mv = flopy.plot.PlotMapView(modelgrid=disu_mg)\n",
|
||||
"mv.contour_array(a)\n",
|
||||
"mv.plot_grid(alpha=0.5)\n",
|
||||
"plt.plot(xc, yc, 'bo');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### DISU Backward compatibility using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"f = plt.figure(figsize=(10, 10))\n",
|
||||
"\n",
|
||||
"mm = flopy.plot.ModelMap(sr=disu_sr)\n",
|
||||
"mm.contour_array(a)\n",
|
||||
"mm.plot_grid(alpha=0.5)\n",
|
||||
"plt.plot(xc, yc, 'bo');"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Creating plots using data from MODPATH\n",
|
||||
"\n",
|
||||
"In this portion of the notebook MODPATH particle tracking examples are loaded and then plotted using each of the grid types\n",
|
||||
"\n",
|
||||
"### DIS (Structured grid example)\n",
|
||||
"\n",
|
||||
"First the modpath model must be created and then run"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"mp = flopy.modpath.Modpath('freybergmp', exe_name=\"mp6\", modflowmodel=dis_ml, model_ws=modelpth)\n",
|
||||
"mpbas = flopy.modpath.ModpathBas(mp, hnoflo=dis_ml.bas6.hnoflo, hdry=dis_ml.lpf.hdry, \n",
|
||||
" ibound=dis_ml.bas6.ibound.array, prsity=0.2, prsityCB=0.2)\n",
|
||||
"sim = mp.create_mpsim(trackdir='forward', simtype='endpoint', packages='RCH')\n",
|
||||
"mp.write_input()\n",
|
||||
"mp.run_model()\n",
|
||||
"\n",
|
||||
"mpp = flopy.modpath.Modpath('freybergmpp', exe_name=\"mp6\", modflowmodel=dis_ml, model_ws=modelpth)\n",
|
||||
"mpbas = flopy.modpath.ModpathBas(mpp, hnoflo=dis_ml.bas6.hnoflo, hdry=dis_ml.lpf.hdry, \n",
|
||||
" ibound=dis_ml.bas6.ibound.array, prsity=0.2, prsityCB=0.2)\n",
|
||||
"sim = mpp.create_mpsim(trackdir='backward', simtype='pathline', packages='WEL')\n",
|
||||
"mpp.write_input()\n",
|
||||
"mpp.run_model()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now to plot up the results of the particle tracking simulation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# load the endpoint data\n",
|
||||
"endfile = os.path.join(modelpth, mp.sim.endpoint_file)\n",
|
||||
"endobj = flopy.utils.EndpointFile(endfile)\n",
|
||||
"ept = endobj.get_alldata()\n",
|
||||
"\n",
|
||||
"# load the pathline data\n",
|
||||
"pthfile = os.path.join(modelpth, mpp.sim.pathline_file)\n",
|
||||
"pthobj = flopy.utils.PathlineFile(pthfile)\n",
|
||||
"plines = pthobj.get_alldata()\n",
|
||||
"\n",
|
||||
"# plot the data\n",
|
||||
"fig = plt.figure(figsize=(10, 10))\n",
|
||||
"\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('plot_array()')\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=dis_ml)\n",
|
||||
"quadmesh = mapview.plot_ibound()\n",
|
||||
"linecollection = mapview.plot_grid()\n",
|
||||
"for d in dis_ml.wel.stress_period_data[0]:\n",
|
||||
" mapview.plot_endpoint(ept, direction='starting', selection_direction='ending', selection=(d[0], d[1], d[2]), zorder=100)\n",
|
||||
"\n",
|
||||
"# construct maximum travel time to plot (200 years - MODFLOW time unit is seconds)\n",
|
||||
"travel_time_max = 200. * 365.25 * 24. * 60. * 60. \n",
|
||||
"ctt = '<={}'.format(travel_time_max)\n",
|
||||
"\n",
|
||||
"# plot the pathlines\n",
|
||||
"mapview.plot_pathline(plines, layer='all', colors='red', travel_time=ctt);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(10, 10))\n",
|
||||
"\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"ax.set_title('plot_array()')\n",
|
||||
"modelmap = flopy.plot.ModelMap(model=dis_ml, xll=0, yll=0, rotation=-14)\n",
|
||||
"quadmesh = modelmap.plot_ibound()\n",
|
||||
"linecollection = modelmap.plot_grid()\n",
|
||||
"for d in dis_ml.wel.stress_period_data[0]:\n",
|
||||
" modelmap.plot_endpoint(ept, direction='starting', selection_direction='ending', selection=(d[0], d[1], d[2]), zorder=100)\n",
|
||||
"\n",
|
||||
"# construct maximum travel time to plot (200 years - MODFLOW time unit is seconds)\n",
|
||||
"travel_time_max = 200. * 365.25 * 24. * 60. * 60. \n",
|
||||
"ctt = '<={}'.format(travel_time_max)\n",
|
||||
"\n",
|
||||
"# plot the pathlines\n",
|
||||
"modelmap.plot_pathline(plines, layer='all', colors='red', travel_time=ctt);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## DISV (vertex unstructured) example problem for MODPATH 7\n",
|
||||
"\n",
|
||||
"### Get the modelgrid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"model_name = 'mp7p2'\n",
|
||||
"mp_namea = model_name + 'a_mp'\n",
|
||||
"model_ws = os.path.join('data', 'mp7_ex2', 'mf6')\n",
|
||||
"fname = os.path.join(model_ws, model_name + '.disv.grb')\n",
|
||||
"grd = flopy.utils.MfGrdFile(fname, verbose=False)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"modelgrid = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Load pathline and timeseries results"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fpth = os.path.join(model_ws, mp_namea + '.mppth')\n",
|
||||
"p = flopy.utils.PathlineFile(fpth)\n",
|
||||
"p0 = p.get_alldata()\n",
|
||||
"\n",
|
||||
"fpth = os.path.join(model_ws, mp_namea + '.timeseries')\n",
|
||||
"ts = flopy.utils.TimeseriesFile(fpth)\n",
|
||||
"ts0 = ts.get_alldata()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Plot the pathline and timeseries data using `PlotMapView`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mv = PlotMapView(modelgrid=modelgrid, ax=ax)\n",
|
||||
"ax.set_xlim(0, 10000.)\n",
|
||||
"ax.set_ylim(0, 10500.)\n",
|
||||
"lc = mv.plot_grid()\n",
|
||||
"mv.plot_pathline(p0, layer='all', color='blue', lw=0.75)\n",
|
||||
"colors = ['green', 'orange', 'red']\n",
|
||||
"for k in range(3):\n",
|
||||
" mv.plot_timeseries(ts0, layer=k, marker='o', lw=0, color=colors[k]);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### plot pathline and timeseries data using `ModelMap` (backward compatibility)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Get the spatial reference object\n",
|
||||
"sr = grd.get_spatialreference()\n",
|
||||
"\n",
|
||||
"fig = plt.figure(figsize=(8, 8))\n",
|
||||
"ax = fig.add_subplot(1, 1, 1, aspect='equal')\n",
|
||||
"mm = ModelMap(sr=sr, ax=ax)\n",
|
||||
"ax.set_xlim(0, 10000.)\n",
|
||||
"ax.set_ylim(0, 10500.)\n",
|
||||
"v = mm.plot_cvfd(verts, iverts, edgecolor='gray', facecolor=\"None\")\n",
|
||||
"mm.plot_pathline(p0, layer='all', color='blue', lw=0.75)\n",
|
||||
"colors = ['green', 'orange', 'red']\n",
|
||||
"for k in range(3):\n",
|
||||
" mm.plot_timeseries(ts0, layer=k, marker='o', lw=0, color=colors[k]);"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting Discharge vectors\n",
|
||||
"\n",
|
||||
"### DIS (structured grid) example using `PlotMapView`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# get the head object\n",
|
||||
"fname = os.path.join(modelpth, 'freyberg.hds')\n",
|
||||
"hdobj = flopy.utils.HeadFile(fname)\n",
|
||||
"head = hdobj.get_data()\n",
|
||||
"\n",
|
||||
"# get the cbc object\n",
|
||||
"fname = os.path.join(modelpth, 'freyberg.cbc')\n",
|
||||
"cbb = flopy.utils.CellBudgetFile(fname)\n",
|
||||
"frf = cbb.get_data(text='FLOW RIGHT FACE')[0]\n",
|
||||
"fff = cbb.get_data(text='FLOW FRONT FACE')[0]\n",
|
||||
"\n",
|
||||
"# plot the data!\n",
|
||||
"fig = plt.figure(figsize=(10, 10))\n",
|
||||
"mapview = flopy.plot.PlotMapView(model=dis_ml)\n",
|
||||
"quadmesh = mapview.plot_ibound()\n",
|
||||
"quadmesh = mapview.plot_array(head, masked_values=[999.], alpha=0.5)\n",
|
||||
"quiver = mapview.plot_discharge(frf, fff, head=head)\n",
|
||||
"linecollection = mapview.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Backward compatibility using `ModelMap`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# plot the data!\n",
|
||||
"fig = plt.figure(figsize=(10, 10))\n",
|
||||
"modelmap = flopy.plot.ModelMap(model=dis_ml, xll=0, yll=0, rotation=-14)\n",
|
||||
"quadmesh = modelmap.plot_ibound()\n",
|
||||
"quadmesh = modelmap.plot_array(head, masked_values=[999.], alpha=0.5)\n",
|
||||
"quiver = modelmap.plot_discharge(frf, fff, head=head)\n",
|
||||
"linecollection = modelmap.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"disv_ml.plot()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -18,9 +18,9 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -615,106 +615,106 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"rec.array([(0, 0, 3, 0, 1, 1, 200., 0., 0., 0., 0., 0., 0., 0., 0., 1, 0),\n",
|
||||
" (0, 0, 3, 1, 1, 2, 200., 0., 0., 0., 0., 0., 0., 0., 0., 2, 0),\n",
|
||||
" (0, 0, 3, 2, 1, 3, 200., 0., 0., 0., 0., 0., 0., 0., 0., 3, 0),\n",
|
||||
" (0, 0, 3, 3, 1, 4, 200., 0., 0., 0., 0., 0., 0., 0., 0., 4, 0),\n",
|
||||
" (0, 0, 3, 4, 1, 5, 200., 0., 0., 0., 0., 0., 0., 0., 0., 5, 0),\n",
|
||||
" (0, 0, 3, 5, 1, 6, 200., 0., 0., 0., 0., 0., 0., 0., 0., 6, 0),\n",
|
||||
" (0, 0, 3, 6, 1, 7, 200., 0., 0., 0., 0., 0., 0., 0., 0., 7, 0),\n",
|
||||
" (0, 0, 3, 7, 1, 8, 200., 0., 0., 0., 0., 0., 0., 0., 0., 8, 0),\n",
|
||||
" (0, 0, 3, 8, 1, 9, 200., 0., 0., 0., 0., 0., 0., 0., 0., 9, 0),\n",
|
||||
" (0, 0, 3, 9, 1, 10, 200., 0., 0., 0., 0., 0., 0., 0., 0., 10, 0),\n",
|
||||
" (0, 0, 3, 10, 1, 11, 200., 0., 0., 0., 0., 0., 0., 0., 0., 11, 0),\n",
|
||||
" (0, 0, 3, 11, 1, 12, 200., 0., 0., 0., 0., 0., 0., 0., 0., 12, 0),\n",
|
||||
" (0, 0, 3, 12, 1, 13, 200., 0., 0., 0., 0., 0., 0., 0., 0., 13, 0),\n",
|
||||
" (0, 0, 3, 13, 1, 14, 200., 0., 0., 0., 0., 0., 0., 0., 0., 14, 0),\n",
|
||||
" (0, 0, 3, 14, 1, 15, 200., 0., 0., 0., 0., 0., 0., 0., 0., 15, 0),\n",
|
||||
" (0, 0, 3, 15, 1, 16, 200., 0., 0., 0., 0., 0., 0., 0., 0., 16, 0),\n",
|
||||
" (0, 0, 3, 16, 1, 17, 200., 0., 0., 0., 0., 0., 0., 0., 0., 17, 0),\n",
|
||||
" (0, 0, 3, 17, 1, 18, 200., 0., 0., 0., 0., 0., 0., 0., 0., 18, 0),\n",
|
||||
" (0, 0, 3, 18, 1, 19, 200., 0., 0., 0., 0., 0., 0., 0., 0., 19, 0),\n",
|
||||
" (0, 0, 3, 19, 1, 20, 200., 0., 0., 0., 0., 0., 0., 0., 0., 20, 0),\n",
|
||||
" (0, 0, 3, 20, 1, 21, 200., 0., 0., 0., 0., 0., 0., 0., 0., 21, 0),\n",
|
||||
" (0, 0, 3, 21, 1, 22, 200., 0., 0., 0., 0., 0., 0., 0., 0., 22, 0),\n",
|
||||
" (0, 0, 3, 22, 1, 23, 200., 0., 0., 0., 0., 0., 0., 0., 0., 23, 0),\n",
|
||||
" (0, 0, 3, 23, 1, 24, 200., 0., 0., 0., 0., 0., 0., 0., 0., 24, 0),\n",
|
||||
" (0, 0, 3, 24, 1, 25, 200., 0., 0., 0., 0., 0., 0., 0., 0., 25, 0),\n",
|
||||
" (0, 0, 3, 25, 1, 26, 200., 0., 0., 0., 0., 0., 0., 0., 0., 26, 0),\n",
|
||||
" (0, 0, 3, 26, 1, 27, 200., 0., 0., 0., 0., 0., 0., 0., 0., 27, 0),\n",
|
||||
" (0, 0, 3, 27, 1, 28, 200., 0., 0., 0., 0., 0., 0., 0., 0., 28, 0),\n",
|
||||
" (0, 0, 3, 28, 1, 29, 200., 0., 0., 0., 0., 0., 0., 0., 0., 29, 0),\n",
|
||||
" (0, 0, 3, 29, 1, 30, 200., 0., 0., 0., 0., 0., 0., 0., 0., 30, 0),\n",
|
||||
" (0, 0, 3, 30, 1, 31, 200., 0., 0., 0., 0., 0., 0., 0., 0., 31, 0),\n",
|
||||
" (0, 0, 3, 31, 1, 32, 200., 0., 0., 0., 0., 0., 0., 0., 0., 32, 0),\n",
|
||||
" (0, 0, 3, 32, 1, 33, 200., 0., 0., 0., 0., 0., 0., 0., 0., 33, 0),\n",
|
||||
" (0, 0, 3, 33, 1, 34, 200., 0., 0., 0., 0., 0., 0., 0., 0., 34, 0),\n",
|
||||
" (0, 0, 3, 34, 1, 35, 200., 0., 0., 0., 0., 0., 0., 0., 0., 35, 0),\n",
|
||||
" (0, 0, 3, 35, 1, 36, 200., 0., 0., 0., 0., 0., 0., 0., 0., 36, 0),\n",
|
||||
" (0, 0, 3, 36, 1, 37, 200., 0., 0., 0., 0., 0., 0., 0., 0., 37, 0),\n",
|
||||
" (0, 0, 3, 37, 1, 38, 200., 0., 0., 0., 0., 0., 0., 0., 0., 38, 0),\n",
|
||||
" (0, 0, 3, 38, 1, 39, 200., 0., 0., 0., 0., 0., 0., 0., 0., 39, 0),\n",
|
||||
" (0, 0, 3, 39, 1, 40, 200., 0., 0., 0., 0., 0., 0., 0., 0., 40, 0),\n",
|
||||
" (0, 0, 3, 40, 1, 41, 200., 0., 0., 0., 0., 0., 0., 0., 0., 41, 0),\n",
|
||||
" (0, 0, 3, 41, 1, 42, 200., 0., 0., 0., 0., 0., 0., 0., 0., 42, 0),\n",
|
||||
" (0, 0, 3, 42, 1, 43, 200., 0., 0., 0., 0., 0., 0., 0., 0., 43, 0),\n",
|
||||
" (0, 0, 3, 43, 1, 44, 200., 0., 0., 0., 0., 0., 0., 0., 0., 44, 0),\n",
|
||||
" (0, 0, 3, 44, 1, 45, 200., 0., 0., 0., 0., 0., 0., 0., 0., 45, 0),\n",
|
||||
" (0, 0, 3, 45, 1, 46, 200., 0., 0., 0., 0., 0., 0., 0., 0., 46, 0),\n",
|
||||
" (0, 0, 3, 46, 1, 47, 200., 0., 0., 0., 0., 0., 0., 0., 0., 47, 0),\n",
|
||||
" (0, 0, 3, 47, 1, 48, 200., 0., 0., 0., 0., 0., 0., 0., 0., 48, 0),\n",
|
||||
" (0, 0, 3, 48, 1, 49, 200., 0., 0., 0., 0., 0., 0., 0., 0., 49, 0),\n",
|
||||
" (0, 0, 3, 49, 1, 50, 200., 0., 0., 0., 0., 0., 0., 0., 0., 50, 0),\n",
|
||||
" (0, 0, 3, 50, 1, 51, 200., 0., 0., 0., 0., 0., 0., 0., 0., 51, 0),\n",
|
||||
" (0, 0, 3, 51, 1, 52, 200., 0., 0., 0., 0., 0., 0., 0., 0., 52, 0),\n",
|
||||
" (0, 0, 3, 52, 1, 53, 200., 0., 0., 0., 0., 0., 0., 0., 0., 53, 0),\n",
|
||||
" (0, 0, 3, 53, 1, 54, 200., 0., 0., 0., 0., 0., 0., 0., 0., 54, 0),\n",
|
||||
" (0, 0, 3, 54, 1, 55, 200., 0., 0., 0., 0., 0., 0., 0., 0., 55, 0),\n",
|
||||
" (0, 0, 3, 55, 1, 56, 200., 0., 0., 0., 0., 0., 0., 0., 0., 56, 0),\n",
|
||||
" (0, 0, 3, 56, 1, 57, 200., 0., 0., 0., 0., 0., 0., 0., 0., 57, 0),\n",
|
||||
" (0, 0, 3, 57, 1, 58, 200., 0., 0., 0., 0., 0., 0., 0., 0., 58, 0),\n",
|
||||
" (0, 0, 3, 58, 1, 59, 200., 0., 0., 0., 0., 0., 0., 0., 0., 59, 0),\n",
|
||||
" (0, 0, 3, 59, 1, 60, 200., 0., 0., 0., 0., 0., 0., 0., 0., 60, 0),\n",
|
||||
" (0, 0, 3, 60, 1, 61, 200., 0., 0., 0., 0., 0., 0., 0., 0., 61, 0),\n",
|
||||
" (0, 0, 3, 61, 1, 62, 200., 0., 0., 0., 0., 0., 0., 0., 0., 62, 0),\n",
|
||||
" (0, 0, 3, 62, 1, 63, 200., 0., 0., 0., 0., 0., 0., 0., 0., 63, 0),\n",
|
||||
" (0, 0, 3, 63, 1, 64, 200., 0., 0., 0., 0., 0., 0., 0., 0., 64, 0),\n",
|
||||
" (0, 0, 3, 64, 1, 65, 200., 0., 0., 0., 0., 0., 0., 0., 0., 65, 0),\n",
|
||||
" (0, 0, 3, 65, 1, 66, 200., 0., 0., 0., 0., 0., 0., 0., 0., 66, 0),\n",
|
||||
" (0, 0, 3, 66, 1, 67, 200., 0., 0., 0., 0., 0., 0., 0., 0., 67, 0),\n",
|
||||
" (0, 0, 3, 67, 1, 68, 200., 0., 0., 0., 0., 0., 0., 0., 0., 68, 0),\n",
|
||||
" (0, 0, 3, 68, 1, 69, 200., 0., 0., 0., 0., 0., 0., 0., 0., 69, 0),\n",
|
||||
" (0, 0, 3, 69, 1, 70, 200., 0., 0., 0., 0., 0., 0., 0., 0., 70, 0),\n",
|
||||
" (0, 0, 3, 70, 1, 71, 200., 0., 0., 0., 0., 0., 0., 0., 0., 71, 0),\n",
|
||||
" (0, 0, 3, 71, 1, 72, 200., 0., 0., 0., 0., 0., 0., 0., 0., 72, 0),\n",
|
||||
" (0, 0, 3, 72, 1, 73, 200., 0., 0., 0., 0., 0., 0., 0., 0., 73, 0),\n",
|
||||
" (0, 0, 3, 73, 1, 74, 200., 0., 0., 0., 0., 0., 0., 0., 0., 74, 0),\n",
|
||||
" (0, 0, 3, 74, 1, 75, 200., 0., 0., 0., 0., 0., 0., 0., 0., 75, 0),\n",
|
||||
" (0, 0, 3, 75, 1, 76, 200., 0., 0., 0., 0., 0., 0., 0., 0., 76, 0),\n",
|
||||
" (0, 0, 3, 76, 1, 77, 200., 0., 0., 0., 0., 0., 0., 0., 0., 77, 0),\n",
|
||||
" (0, 0, 3, 77, 1, 78, 200., 0., 0., 0., 0., 0., 0., 0., 0., 78, 0),\n",
|
||||
" (0, 0, 3, 78, 1, 79, 200., 0., 0., 0., 0., 0., 0., 0., 0., 79, 0),\n",
|
||||
" (0, 0, 3, 79, 1, 80, 200., 0., 0., 0., 0., 0., 0., 0., 0., 80, 0),\n",
|
||||
" (0, 0, 3, 80, 1, 81, 200., 0., 0., 0., 0., 0., 0., 0., 0., 81, 0),\n",
|
||||
" (0, 0, 3, 81, 1, 82, 200., 0., 0., 0., 0., 0., 0., 0., 0., 82, 0),\n",
|
||||
" (0, 0, 3, 82, 1, 83, 200., 0., 0., 0., 0., 0., 0., 0., 0., 83, 0),\n",
|
||||
" (0, 0, 3, 83, 1, 84, 200., 0., 0., 0., 0., 0., 0., 0., 0., 84, 0),\n",
|
||||
" (0, 0, 3, 84, 1, 85, 200., 0., 0., 0., 0., 0., 0., 0., 0., 85, 0),\n",
|
||||
" (0, 0, 3, 85, 1, 86, 200., 0., 0., 0., 0., 0., 0., 0., 0., 86, 0),\n",
|
||||
" (0, 0, 3, 86, 1, 87, 200., 0., 0., 0., 0., 0., 0., 0., 0., 87, 0),\n",
|
||||
" (0, 0, 3, 87, 1, 88, 200., 0., 0., 0., 0., 0., 0., 0., 0., 88, 0),\n",
|
||||
" (0, 0, 3, 88, 1, 89, 200., 0., 0., 0., 0., 0., 0., 0., 0., 89, 0),\n",
|
||||
" (0, 0, 3, 89, 1, 90, 200., 0., 0., 0., 0., 0., 0., 0., 0., 90, 0),\n",
|
||||
" (0, 0, 3, 90, 1, 91, 200., 0., 0., 0., 0., 0., 0., 0., 0., 91, 0),\n",
|
||||
" (0, 0, 3, 91, 1, 92, 200., 0., 0., 0., 0., 0., 0., 0., 0., 92, 0),\n",
|
||||
" (0, 0, 3, 92, 1, 93, 200., 0., 0., 0., 0., 0., 0., 0., 0., 93, 0),\n",
|
||||
" (0, 0, 3, 93, 1, 94, 200., 0., 0., 0., 0., 0., 0., 0., 0., 94, 0),\n",
|
||||
" (0, 0, 3, 94, 1, 95, 200., 0., 0., 0., 0., 0., 0., 0., 0., 95, 0),\n",
|
||||
" (0, 0, 3, 95, 1, 96, 200., 0., 0., 0., 0., 0., 0., 0., 0., 96, 0),\n",
|
||||
" (0, 0, 3, 96, 1, 97, 200., 0., 0., 0., 0., 0., 0., 0., 0., 97, 0),\n",
|
||||
" (0, 0, 3, 97, 1, 98, 200., 0., 0., 0., 0., 0., 0., 0., 0., 98, 0),\n",
|
||||
" (0, 0, 3, 98, 1, 99, 200., 0., 0., 0., 0., 0., 0., 0., 0., 99, 0),\n",
|
||||
" (0, 0, 3, 99, 1, 100, 200., 0., 0., 0., 0., 0., 0., 0., 0., 100, 0)],\n",
|
||||
"rec.array([(0, 0, 3, 0, 1, 1, 200., 0., 0., 0., 0., 0., 0., 0., 0., 1, 2),\n",
|
||||
" (0, 0, 3, 1, 1, 2, 200., 0., 0., 0., 0., 0., 0., 0., 0., 2, 3),\n",
|
||||
" (0, 0, 3, 2, 1, 3, 200., 0., 0., 0., 0., 0., 0., 0., 0., 3, 4),\n",
|
||||
" (0, 0, 3, 3, 1, 4, 200., 0., 0., 0., 0., 0., 0., 0., 0., 4, 5),\n",
|
||||
" (0, 0, 3, 4, 1, 5, 200., 0., 0., 0., 0., 0., 0., 0., 0., 5, 6),\n",
|
||||
" (0, 0, 3, 5, 1, 6, 200., 0., 0., 0., 0., 0., 0., 0., 0., 6, 7),\n",
|
||||
" (0, 0, 3, 6, 1, 7, 200., 0., 0., 0., 0., 0., 0., 0., 0., 7, 8),\n",
|
||||
" (0, 0, 3, 7, 1, 8, 200., 0., 0., 0., 0., 0., 0., 0., 0., 8, 9),\n",
|
||||
" (0, 0, 3, 8, 1, 9, 200., 0., 0., 0., 0., 0., 0., 0., 0., 9, 10),\n",
|
||||
" (0, 0, 3, 9, 1, 10, 200., 0., 0., 0., 0., 0., 0., 0., 0., 10, 11),\n",
|
||||
" (0, 0, 3, 10, 1, 11, 200., 0., 0., 0., 0., 0., 0., 0., 0., 11, 12),\n",
|
||||
" (0, 0, 3, 11, 1, 12, 200., 0., 0., 0., 0., 0., 0., 0., 0., 12, 13),\n",
|
||||
" (0, 0, 3, 12, 1, 13, 200., 0., 0., 0., 0., 0., 0., 0., 0., 13, 14),\n",
|
||||
" (0, 0, 3, 13, 1, 14, 200., 0., 0., 0., 0., 0., 0., 0., 0., 14, 15),\n",
|
||||
" (0, 0, 3, 14, 1, 15, 200., 0., 0., 0., 0., 0., 0., 0., 0., 15, 16),\n",
|
||||
" (0, 0, 3, 15, 1, 16, 200., 0., 0., 0., 0., 0., 0., 0., 0., 16, 17),\n",
|
||||
" (0, 0, 3, 16, 1, 17, 200., 0., 0., 0., 0., 0., 0., 0., 0., 17, 18),\n",
|
||||
" (0, 0, 3, 17, 1, 18, 200., 0., 0., 0., 0., 0., 0., 0., 0., 18, 19),\n",
|
||||
" (0, 0, 3, 18, 1, 19, 200., 0., 0., 0., 0., 0., 0., 0., 0., 19, 20),\n",
|
||||
" (0, 0, 3, 19, 1, 20, 200., 0., 0., 0., 0., 0., 0., 0., 0., 20, 21),\n",
|
||||
" (0, 0, 3, 20, 1, 21, 200., 0., 0., 0., 0., 0., 0., 0., 0., 21, 22),\n",
|
||||
" (0, 0, 3, 21, 1, 22, 200., 0., 0., 0., 0., 0., 0., 0., 0., 22, 23),\n",
|
||||
" (0, 0, 3, 22, 1, 23, 200., 0., 0., 0., 0., 0., 0., 0., 0., 23, 24),\n",
|
||||
" (0, 0, 3, 23, 1, 24, 200., 0., 0., 0., 0., 0., 0., 0., 0., 24, 25),\n",
|
||||
" (0, 0, 3, 24, 1, 25, 200., 0., 0., 0., 0., 0., 0., 0., 0., 25, 26),\n",
|
||||
" (0, 0, 3, 25, 1, 26, 200., 0., 0., 0., 0., 0., 0., 0., 0., 26, 27),\n",
|
||||
" (0, 0, 3, 26, 1, 27, 200., 0., 0., 0., 0., 0., 0., 0., 0., 27, 28),\n",
|
||||
" (0, 0, 3, 27, 1, 28, 200., 0., 0., 0., 0., 0., 0., 0., 0., 28, 29),\n",
|
||||
" (0, 0, 3, 28, 1, 29, 200., 0., 0., 0., 0., 0., 0., 0., 0., 29, 30),\n",
|
||||
" (0, 0, 3, 29, 1, 30, 200., 0., 0., 0., 0., 0., 0., 0., 0., 30, 31),\n",
|
||||
" (0, 0, 3, 30, 1, 31, 200., 0., 0., 0., 0., 0., 0., 0., 0., 31, 32),\n",
|
||||
" (0, 0, 3, 31, 1, 32, 200., 0., 0., 0., 0., 0., 0., 0., 0., 32, 33),\n",
|
||||
" (0, 0, 3, 32, 1, 33, 200., 0., 0., 0., 0., 0., 0., 0., 0., 33, 34),\n",
|
||||
" (0, 0, 3, 33, 1, 34, 200., 0., 0., 0., 0., 0., 0., 0., 0., 34, 35),\n",
|
||||
" (0, 0, 3, 34, 1, 35, 200., 0., 0., 0., 0., 0., 0., 0., 0., 35, 36),\n",
|
||||
" (0, 0, 3, 35, 1, 36, 200., 0., 0., 0., 0., 0., 0., 0., 0., 36, 37),\n",
|
||||
" (0, 0, 3, 36, 1, 37, 200., 0., 0., 0., 0., 0., 0., 0., 0., 37, 38),\n",
|
||||
" (0, 0, 3, 37, 1, 38, 200., 0., 0., 0., 0., 0., 0., 0., 0., 38, 39),\n",
|
||||
" (0, 0, 3, 38, 1, 39, 200., 0., 0., 0., 0., 0., 0., 0., 0., 39, 40),\n",
|
||||
" (0, 0, 3, 39, 1, 40, 200., 0., 0., 0., 0., 0., 0., 0., 0., 40, 41),\n",
|
||||
" (0, 0, 3, 40, 1, 41, 200., 0., 0., 0., 0., 0., 0., 0., 0., 41, 42),\n",
|
||||
" (0, 0, 3, 41, 1, 42, 200., 0., 0., 0., 0., 0., 0., 0., 0., 42, 43),\n",
|
||||
" (0, 0, 3, 42, 1, 43, 200., 0., 0., 0., 0., 0., 0., 0., 0., 43, 44),\n",
|
||||
" (0, 0, 3, 43, 1, 44, 200., 0., 0., 0., 0., 0., 0., 0., 0., 44, 45),\n",
|
||||
" (0, 0, 3, 44, 1, 45, 200., 0., 0., 0., 0., 0., 0., 0., 0., 45, 46),\n",
|
||||
" (0, 0, 3, 45, 1, 46, 200., 0., 0., 0., 0., 0., 0., 0., 0., 46, 47),\n",
|
||||
" (0, 0, 3, 46, 1, 47, 200., 0., 0., 0., 0., 0., 0., 0., 0., 47, 48),\n",
|
||||
" (0, 0, 3, 47, 1, 48, 200., 0., 0., 0., 0., 0., 0., 0., 0., 48, 49),\n",
|
||||
" (0, 0, 3, 48, 1, 49, 200., 0., 0., 0., 0., 0., 0., 0., 0., 49, 50),\n",
|
||||
" (0, 0, 3, 49, 1, 50, 200., 0., 0., 0., 0., 0., 0., 0., 0., 50, 51),\n",
|
||||
" (0, 0, 3, 50, 1, 51, 200., 0., 0., 0., 0., 0., 0., 0., 0., 51, 52),\n",
|
||||
" (0, 0, 3, 51, 1, 52, 200., 0., 0., 0., 0., 0., 0., 0., 0., 52, 53),\n",
|
||||
" (0, 0, 3, 52, 1, 53, 200., 0., 0., 0., 0., 0., 0., 0., 0., 53, 54),\n",
|
||||
" (0, 0, 3, 53, 1, 54, 200., 0., 0., 0., 0., 0., 0., 0., 0., 54, 55),\n",
|
||||
" (0, 0, 3, 54, 1, 55, 200., 0., 0., 0., 0., 0., 0., 0., 0., 55, 56),\n",
|
||||
" (0, 0, 3, 55, 1, 56, 200., 0., 0., 0., 0., 0., 0., 0., 0., 56, 57),\n",
|
||||
" (0, 0, 3, 56, 1, 57, 200., 0., 0., 0., 0., 0., 0., 0., 0., 57, 58),\n",
|
||||
" (0, 0, 3, 57, 1, 58, 200., 0., 0., 0., 0., 0., 0., 0., 0., 58, 59),\n",
|
||||
" (0, 0, 3, 58, 1, 59, 200., 0., 0., 0., 0., 0., 0., 0., 0., 59, 60),\n",
|
||||
" (0, 0, 3, 59, 1, 60, 200., 0., 0., 0., 0., 0., 0., 0., 0., 60, 61),\n",
|
||||
" (0, 0, 3, 60, 1, 61, 200., 0., 0., 0., 0., 0., 0., 0., 0., 61, 62),\n",
|
||||
" (0, 0, 3, 61, 1, 62, 200., 0., 0., 0., 0., 0., 0., 0., 0., 62, 63),\n",
|
||||
" (0, 0, 3, 62, 1, 63, 200., 0., 0., 0., 0., 0., 0., 0., 0., 63, 64),\n",
|
||||
" (0, 0, 3, 63, 1, 64, 200., 0., 0., 0., 0., 0., 0., 0., 0., 64, 65),\n",
|
||||
" (0, 0, 3, 64, 1, 65, 200., 0., 0., 0., 0., 0., 0., 0., 0., 65, 66),\n",
|
||||
" (0, 0, 3, 65, 1, 66, 200., 0., 0., 0., 0., 0., 0., 0., 0., 66, 67),\n",
|
||||
" (0, 0, 3, 66, 1, 67, 200., 0., 0., 0., 0., 0., 0., 0., 0., 67, 68),\n",
|
||||
" (0, 0, 3, 67, 1, 68, 200., 0., 0., 0., 0., 0., 0., 0., 0., 68, 69),\n",
|
||||
" (0, 0, 3, 68, 1, 69, 200., 0., 0., 0., 0., 0., 0., 0., 0., 69, 70),\n",
|
||||
" (0, 0, 3, 69, 1, 70, 200., 0., 0., 0., 0., 0., 0., 0., 0., 70, 71),\n",
|
||||
" (0, 0, 3, 70, 1, 71, 200., 0., 0., 0., 0., 0., 0., 0., 0., 71, 72),\n",
|
||||
" (0, 0, 3, 71, 1, 72, 200., 0., 0., 0., 0., 0., 0., 0., 0., 72, 73),\n",
|
||||
" (0, 0, 3, 72, 1, 73, 200., 0., 0., 0., 0., 0., 0., 0., 0., 73, 74),\n",
|
||||
" (0, 0, 3, 73, 1, 74, 200., 0., 0., 0., 0., 0., 0., 0., 0., 74, 75),\n",
|
||||
" (0, 0, 3, 74, 1, 75, 200., 0., 0., 0., 0., 0., 0., 0., 0., 75, 76),\n",
|
||||
" (0, 0, 3, 75, 1, 76, 200., 0., 0., 0., 0., 0., 0., 0., 0., 76, 77),\n",
|
||||
" (0, 0, 3, 76, 1, 77, 200., 0., 0., 0., 0., 0., 0., 0., 0., 77, 78),\n",
|
||||
" (0, 0, 3, 77, 1, 78, 200., 0., 0., 0., 0., 0., 0., 0., 0., 78, 79),\n",
|
||||
" (0, 0, 3, 78, 1, 79, 200., 0., 0., 0., 0., 0., 0., 0., 0., 79, 80),\n",
|
||||
" (0, 0, 3, 79, 1, 80, 200., 0., 0., 0., 0., 0., 0., 0., 0., 80, 81),\n",
|
||||
" (0, 0, 3, 80, 1, 81, 200., 0., 0., 0., 0., 0., 0., 0., 0., 81, 82),\n",
|
||||
" (0, 0, 3, 81, 1, 82, 200., 0., 0., 0., 0., 0., 0., 0., 0., 82, 83),\n",
|
||||
" (0, 0, 3, 82, 1, 83, 200., 0., 0., 0., 0., 0., 0., 0., 0., 83, 84),\n",
|
||||
" (0, 0, 3, 83, 1, 84, 200., 0., 0., 0., 0., 0., 0., 0., 0., 84, 85),\n",
|
||||
" (0, 0, 3, 84, 1, 85, 200., 0., 0., 0., 0., 0., 0., 0., 0., 85, 86),\n",
|
||||
" (0, 0, 3, 85, 1, 86, 200., 0., 0., 0., 0., 0., 0., 0., 0., 86, 87),\n",
|
||||
" (0, 0, 3, 86, 1, 87, 200., 0., 0., 0., 0., 0., 0., 0., 0., 87, 88),\n",
|
||||
" (0, 0, 3, 87, 1, 88, 200., 0., 0., 0., 0., 0., 0., 0., 0., 88, 89),\n",
|
||||
" (0, 0, 3, 88, 1, 89, 200., 0., 0., 0., 0., 0., 0., 0., 0., 89, 90),\n",
|
||||
" (0, 0, 3, 89, 1, 90, 200., 0., 0., 0., 0., 0., 0., 0., 0., 90, 91),\n",
|
||||
" (0, 0, 3, 90, 1, 91, 200., 0., 0., 0., 0., 0., 0., 0., 0., 91, 92),\n",
|
||||
" (0, 0, 3, 91, 1, 92, 200., 0., 0., 0., 0., 0., 0., 0., 0., 92, 93),\n",
|
||||
" (0, 0, 3, 92, 1, 93, 200., 0., 0., 0., 0., 0., 0., 0., 0., 93, 94),\n",
|
||||
" (0, 0, 3, 93, 1, 94, 200., 0., 0., 0., 0., 0., 0., 0., 0., 94, 95),\n",
|
||||
" (0, 0, 3, 94, 1, 95, 200., 0., 0., 0., 0., 0., 0., 0., 0., 95, 96),\n",
|
||||
" (0, 0, 3, 95, 1, 96, 200., 0., 0., 0., 0., 0., 0., 0., 0., 96, 97),\n",
|
||||
" (0, 0, 3, 96, 1, 97, 200., 0., 0., 0., 0., 0., 0., 0., 0., 97, 98),\n",
|
||||
" (0, 0, 3, 97, 1, 98, 200., 0., 0., 0., 0., 0., 0., 0., 0., 98, 99),\n",
|
||||
" (0, 0, 3, 98, 1, 99, 200., 0., 0., 0., 0., 0., 0., 0., 0., 99, 100),\n",
|
||||
" (0, 0, 3, 99, 1, 100, 200., 0., 0., 0., 0., 0., 0., 0., 0., 100, 0)],\n",
|
||||
" dtype=[('node', '<i8'), ('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('iseg', '<i8'), ('ireach', '<i8'), ('rchlen', '<f4'), ('strtop', '<f4'), ('slope', '<f4'), ('strthick', '<f4'), ('strhc1', '<f4'), ('thts', '<f4'), ('thti', '<f4'), ('eps', '<f4'), ('uhc', '<f4'), ('reachID', '<i8'), ('outreach', '<i8')])"
|
||||
]
|
||||
},
|
||||
|
@ -873,7 +873,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{1: {'numval': 50, 'inuit': 55}}"
|
||||
"{1: {'inuit': 55, 'numval': 50}}"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -11,19 +11,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from __future__ import print_function\n",
|
||||
"import os\n",
|
||||
|
@ -50,7 +40,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -63,99 +53,52 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"We can see the ``SpatialReference`` instance has generic entries, as does ``start_datetime``"
|
||||
"We can see the ``Modelgrid`` instance has generic entries, as does ``start_datetime``"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"xul:619653; yul:3353277; rotation:15; proj4_str:+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs; units:meters; lenuni:2; length_multiplier:1.0"
|
||||
]
|
||||
},
|
||||
"execution_count": 3,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ml.dis.sr"
|
||||
"ml.modelgrid"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'1/1/2015'"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ml.dis.start_datetime"
|
||||
"ml.modeltime.start_datetime"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Setting the attributes of the ``ml.dis.sr`` is easy:"
|
||||
"Setting the attributes of the ``ml.modelgrid`` is easy:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"xul:123456.7; yul:765432.1; rotation:15; proj4_str:+proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs; units:meters; lenuni:2; length_multiplier:1.0"
|
||||
]
|
||||
},
|
||||
"execution_count": 5,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ml.dis.sr.xul = 123456.7\n",
|
||||
"ml.dis.sr.yul = 765432.1\n",
|
||||
"rotation = 15.0\n",
|
||||
"proj4_str = \"+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs\"\n",
|
||||
"ml.dis.start_datetime = '7/4/1776'\n",
|
||||
"ml.dis.sr"
|
||||
"ml.modelgrid.set_coord_info(xoff=123456.7, yoff=765432.1, angrot=15.0, proj4=proj4_str)\n",
|
||||
"ml.dis.start_datetime = '7/4/1776'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"'7/4/1776'"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ml.dis.start_datetime"
|
||||
"ml.modeltime.start_datetime"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -169,7 +112,7 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
|
@ -181,20 +124,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.export.netcdf.NetCdf at 0x121f4e908>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fnc = ml.export(os.path.join(pth, ml.name+'.in.nc'))\n",
|
||||
"hds = flopy.utils.HeadFile(os.path.join(model_ws,\"freyberg.hds\"))\n",
|
||||
|
@ -210,17 +142,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"wrote data/netCDF_export/top.shp\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# export a 2d array\n",
|
||||
"ml.dis.top.export(os.path.join(pth, 'top.nc'))\n",
|
||||
|
@ -240,19 +164,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"No CRS information for writing a .prj file.\n",
|
||||
"Supply an epsg code or .prj file path to the model spatial reference or .export() method.\n",
|
||||
"wrote data/netCDF_export/drn.shp\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ml.drn.stress_period_data.export(os.path.join(pth, 'drn.shp'), sparse=True)"
|
||||
]
|
||||
|
@ -266,17 +180,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"wrote data/netCDF_export/hk.shp\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"#export a 3d array\n",
|
||||
"ml.upw.hk.export(os.path.join(pth, 'hk.nc'))\n",
|
||||
|
@ -292,20 +198,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<flopy.export.netcdf.NetCdf at 0x125ba4c88>"
|
||||
]
|
||||
},
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# export lots of things to the same nc file\n",
|
||||
"fnc = ml.dis.botm.export(os.path.join(pth, 'test.nc'))\n",
|
||||
|
@ -325,45 +220,9 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.2.10\n",
|
||||
" date_created: 2018-10-19T20:26:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
" geospatial_vertical_resolution: variable\n",
|
||||
" featureType: Grid\n",
|
||||
" namefile: freyberg.nam\n",
|
||||
" model_ws: ../data/freyberg_multilayer_transient\n",
|
||||
" exe_name: mf2005.exe\n",
|
||||
" modflow_version: mfnwt\n",
|
||||
" create_hostname: IGSAAAHMLT40179\n",
|
||||
" create_platform: Darwin\n",
|
||||
" create_directory: /Users/jdhughes/Documents/Development/flopy_us/examples/Notebooks\n",
|
||||
" solver_head_tolerance: 0.01\n",
|
||||
" solver_flux_tolerance: 500.0\n",
|
||||
" flopy_sr_xul: 123456.7\n",
|
||||
" flopy_sr_yul: 765432.1\n",
|
||||
" flopy_sr_rotation: 15.0\n",
|
||||
" flopy_sr_proj4_str: +proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs\n",
|
||||
" start_datetime: 1/1/2015\n",
|
||||
" dimensions(sizes): time(1097), layer(3), y(40), x(20)\n",
|
||||
" variables(dimensions): int32 \u001b[4mcrs\u001b[0m(), float64 \u001b[4mtime\u001b[0m(time), float64 \u001b[4melevation\u001b[0m(layer,y,x), float64 \u001b[4mlongitude\u001b[0m(y,x), float64 \u001b[4mlatitude\u001b[0m(y,x), float64 \u001b[4mx_proj\u001b[0m(y,x), float64 \u001b[4my_proj\u001b[0m(y,x), float32 \u001b[4mlayer\u001b[0m(layer), float32 \u001b[4mdelc\u001b[0m(y), float32 \u001b[4mdelr\u001b[0m(x), |S1 \u001b[4mVerticalTransform\u001b[0m(), float32 \u001b[4mwel_flux\u001b[0m(time,layer,y,x), float32 \u001b[4mhani\u001b[0m(layer,y,x), float32 \u001b[4mhk\u001b[0m(layer,y,x), float32 \u001b[4mss\u001b[0m(layer,y,x), float32 \u001b[4msy\u001b[0m(layer,y,x), float32 \u001b[4mvka\u001b[0m(layer,y,x), float32 \u001b[4mvkcb\u001b[0m(layer,y,x)\n",
|
||||
" groups: "
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# export mflist\n",
|
||||
"fnc = ml.wel.export(os.path.join(pth, 'packages.nc'))\n",
|
||||
|
@ -380,56 +239,13 @@
|
|||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<class 'netCDF4._netCDF4.Dataset'>\n",
|
||||
"root group (NETCDF4 data model, file format HDF5):\n",
|
||||
" Conventions: CF-1.6, ACDD-1.3, flopy 3.2.10\n",
|
||||
" date_created: 2018-10-19T20:26:00Z\n",
|
||||
" geospatial_vertical_positive: up\n",
|
||||
" geospatial_vertical_min: -25.0\n",
|
||||
" geospatial_vertical_max: 4.832500457763672\n",
|
||||
" geospatial_vertical_resolution: variable\n",
|
||||
" featureType: Grid\n",
|
||||
" namefile: freyberg.nam\n",
|
||||
" model_ws: ../data/freyberg_multilayer_transient\n",
|
||||
" exe_name: mf2005.exe\n",
|
||||
" modflow_version: mfnwt\n",
|
||||
" create_hostname: IGSAAAHMLT40179\n",
|
||||
" create_platform: Darwin\n",
|
||||
" create_directory: /Users/jdhughes/Documents/Development/flopy_us/examples/Notebooks\n",
|
||||
" solver_head_tolerance: 0.01\n",
|
||||
" solver_flux_tolerance: 500.0\n",
|
||||
" flopy_sr_xul: 123456.7\n",
|
||||
" flopy_sr_yul: 765432.1\n",
|
||||
" flopy_sr_rotation: 15.0\n",
|
||||
" flopy_sr_proj4_str: +proj=utm +zone=14 +ellps=WGS84 +datum=WGS84 +units=m +no_defs\n",
|
||||
" start_datetime: 1/1/2015\n",
|
||||
" dimensions(sizes): time(1097), layer(3), y(40), x(20)\n",
|
||||
" variables(dimensions): int32 \u001b[4mcrs\u001b[0m(), float64 \u001b[4mtime\u001b[0m(time), float64 \u001b[4melevation\u001b[0m(layer,y,x), float64 \u001b[4mlongitude\u001b[0m(y,x), float64 \u001b[4mlatitude\u001b[0m(y,x), float64 \u001b[4mx_proj\u001b[0m(y,x), float64 \u001b[4my_proj\u001b[0m(y,x), float32 \u001b[4mlayer\u001b[0m(layer), float32 \u001b[4mdelc\u001b[0m(y), float32 \u001b[4mdelr\u001b[0m(x), |S1 \u001b[4mVerticalTransform\u001b[0m(), float32 \u001b[4mbotm\u001b[0m(layer,y,x), float32 \u001b[4mthickness\u001b[0m(layer,y,x), float32 \u001b[4mmodel_top\u001b[0m(y,x), int32 \u001b[4mibound\u001b[0m(layer,y,x), float32 \u001b[4mstrt\u001b[0m(layer,y,x), float32 \u001b[4mrech\u001b[0m(time,layer,y,x), float32 \u001b[4mwel_flux\u001b[0m(time,layer,y,x), float32 \u001b[4mhani\u001b[0m(layer,y,x), float32 \u001b[4mhk\u001b[0m(layer,y,x), float32 \u001b[4mss\u001b[0m(layer,y,x), float32 \u001b[4msy\u001b[0m(layer,y,x), float32 \u001b[4mvka\u001b[0m(layer,y,x), float32 \u001b[4mvkcb\u001b[0m(layer,y,x), float32 \u001b[4mdrn_elev\u001b[0m(time,layer,y,x), float32 \u001b[4mdrn_cond\u001b[0m(time,layer,y,x)\n",
|
||||
" groups: "
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"fnc = ml.export(os.path.join(pth, 'model.nc'))\n",
|
||||
"fnc.nc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
|
|
|
@ -18,10 +18,10 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"numpy version: 1.14.0\n",
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -137,21 +137,21 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"model_ws: data/external_demo\n",
|
||||
"important_recharge.ref\n",
|
||||
"hk_9.ref\n",
|
||||
"hk_8.ref\n",
|
||||
"hk_6.ref\n",
|
||||
"modflowtest.rch\n",
|
||||
"hk_7.ref\n",
|
||||
"hk_5.ref\n",
|
||||
"hk_4.ref\n",
|
||||
"hk_1.ref\n",
|
||||
"hk_3.ref\n",
|
||||
"hk_10.ref\n",
|
||||
"hk_2.ref\n",
|
||||
"hk_3.ref\n",
|
||||
"hk_4.ref\n",
|
||||
"hk_5.ref\n",
|
||||
"hk_6.ref\n",
|
||||
"hk_7.ref\n",
|
||||
"hk_8.ref\n",
|
||||
"hk_9.ref\n",
|
||||
"important_recharge.ref\n",
|
||||
"modflowtest.dis\n",
|
||||
"modflowtest.lpf\n",
|
||||
"modflowtest.nam\n",
|
||||
"modflowtest.lpf\n"
|
||||
"modflowtest.rch\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -183,7 +183,7 @@
|
|||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" 'OPEN/CLOSE hk_1.ref 1 (FREE) -1 hk layer 1 \\n',\n",
|
||||
" 'INTERNAL 1 (5E15.6) -1 #vka1 \\n',\n",
|
||||
" 'INTERNAL 1 (5E15.6) -1 #vka layer 1 \\n',\n",
|
||||
" ' 1.000000E+00 1.000000E+00 1.000000E+00 1.000000E+00 1.000000E+00\\n',\n",
|
||||
" ' 1.000000E+00 1.000000E+00 1.000000E+00 1.000000E+00 1.000000E+00\\n',\n",
|
||||
" ' 1.000000E+00 1.000000E+00 1.000000E+00 1.000000E+00 1.000000E+00\\n',\n",
|
||||
|
@ -251,6 +251,9 @@
|
|||
"text": [
|
||||
"data/external_demo\n",
|
||||
"\n",
|
||||
"creating model workspace...\n",
|
||||
" data/new_external_demo_dir\n",
|
||||
"\n",
|
||||
"changing model workspace...\n",
|
||||
" data/new_external_demo_dir\n"
|
||||
]
|
||||
|
@ -286,17 +289,17 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"important_recharge.ref\n",
|
||||
"hk_9.ref\n",
|
||||
"hk_8.ref\n",
|
||||
"hk_1.ref\n",
|
||||
"hk_10.ref\n",
|
||||
"hk_2.ref\n",
|
||||
"hk_3.ref\n",
|
||||
"hk_4.ref\n",
|
||||
"hk_5.ref\n",
|
||||
"hk_6.ref\n",
|
||||
"hk_7.ref\n",
|
||||
"hk_5.ref\n",
|
||||
"hk_4.ref\n",
|
||||
"hk_1.ref\n",
|
||||
"hk_3.ref\n",
|
||||
"hk_10.ref\n",
|
||||
"hk_2.ref\n"
|
||||
"hk_8.ref\n",
|
||||
"hk_9.ref\n",
|
||||
"important_recharge.ref\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -435,16 +438,16 @@
|
|||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_1.ref 1 (FREE) -1 hk layer 1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka1.ref 1 (5E15.6) -1 vka1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_1.ref 1 (5E15.6) -1 vka layer 1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_1.ref 1 (5E15.6) -1 ss layer 1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_2.ref 1 (FREE) -1 hk layer 2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka2.ref 1 (5E15.6) -1 vka2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_2.ref 1 (5E15.6) -1 vka layer 2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_2.ref 1 (5E15.6) -1 ss layer 2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_3.ref 1 (FREE) -1 hk layer 3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka3.ref 1 (5E15.6) -1 vka3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_3.ref 1 (5E15.6) -1 vka layer 3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_3.ref 1 (5E15.6) -1 ss layer 3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_4.ref 1 (FREE) -1 hk layer 4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka4.ref 1 (5E15.6) -1 vka4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_4.ref 1 (5E15.6) -1 vka layer 4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_4.ref 1 (5E15.6) -1 ss layer 4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_5.ref 1 (FREE) -1 hk layer 5 \\n']"
|
||||
]
|
||||
|
@ -511,16 +514,16 @@
|
|||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_1.ref 1 (FREE) -1 hk layer 1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka1.ref 1 (5E15.6) -1 vka1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_1.ref 1 (5E15.6) -1 vka layer 1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_1.ref 1 (5E15.6) -1 ss layer 1 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_2.ref 1 (FREE) -1 hk layer 2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka2.ref 1 (5E15.6) -1 vka2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_2.ref 1 (5E15.6) -1 vka layer 2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_2.ref 1 (5E15.6) -1 ss layer 2 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_3.ref 1 (FREE) -1 hk layer 3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka3.ref 1 (5E15.6) -1 vka3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_3.ref 1 (5E15.6) -1 vka layer 3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_3.ref 1 (5E15.6) -1 ss layer 3 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_4.ref 1 (FREE) -1 hk layer 4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka4.ref 1 (5E15.6) -1 vka4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/vka_layer_4.ref 1 (5E15.6) -1 vka layer 4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/ss_layer_4.ref 1 (5E15.6) -1 ss layer 4 \\n',\n",
|
||||
" 'OPEN/CLOSE ref/hk_5.ref 1 (FREE) -1 hk layer 5 \\n']"
|
||||
]
|
||||
|
@ -545,51 +548,51 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"ss_layer_1.ref\n",
|
||||
"ss_layer_3.ref\n",
|
||||
"ss_layer_2.ref\n",
|
||||
"ss_layer_6.ref\n",
|
||||
"ss_layer_10.ref\n",
|
||||
"ss_layer_7.ref\n",
|
||||
"ss_layer_5.ref\n",
|
||||
"important_recharge.ref\n",
|
||||
"ss_layer_4.ref\n",
|
||||
"botm_layer_8.ref\n",
|
||||
"vka7.ref\n",
|
||||
"vka6.ref\n",
|
||||
"botm_layer_9.ref\n",
|
||||
"vka4.ref\n",
|
||||
"vka5.ref\n",
|
||||
"hk_9.ref\n",
|
||||
"vka1.ref\n",
|
||||
"hk_8.ref\n",
|
||||
"vka2.ref\n",
|
||||
"vka3.ref\n",
|
||||
"model_top.ref\n",
|
||||
"hk_6.ref\n",
|
||||
"botm_layer_1.ref\n",
|
||||
"hk_7.ref\n",
|
||||
"hk_5.ref\n",
|
||||
"botm_layer_10.ref\n",
|
||||
"botm_layer_2.ref\n",
|
||||
"botm_layer_3.ref\n",
|
||||
"hk_4.ref\n",
|
||||
"botm_layer_7.ref\n",
|
||||
"vka8.ref\n",
|
||||
"vka9.ref\n",
|
||||
"hk_1.ref\n",
|
||||
"botm_layer_6.ref\n",
|
||||
"vka10.ref\n",
|
||||
"botm_layer_4.ref\n",
|
||||
"hk_3.ref\n",
|
||||
"botm_layer_5.ref\n",
|
||||
"botm_layer_6.ref\n",
|
||||
"botm_layer_7.ref\n",
|
||||
"botm_layer_8.ref\n",
|
||||
"botm_layer_9.ref\n",
|
||||
"delc.ref\n",
|
||||
"delr.ref\n",
|
||||
"hk_1.ref\n",
|
||||
"hk_10.ref\n",
|
||||
"hk_2.ref\n",
|
||||
"botm_layer_5.ref\n",
|
||||
"ss_layer_9.ref\n",
|
||||
"hk_3.ref\n",
|
||||
"hk_4.ref\n",
|
||||
"hk_5.ref\n",
|
||||
"hk_6.ref\n",
|
||||
"hk_7.ref\n",
|
||||
"hk_8.ref\n",
|
||||
"hk_9.ref\n",
|
||||
"important_recharge.ref\n",
|
||||
"model_top.ref\n",
|
||||
"rech_0.ref\n",
|
||||
"botm_layer_10.ref\n",
|
||||
"delc.ref\n",
|
||||
"ss_layer_1.ref\n",
|
||||
"ss_layer_10.ref\n",
|
||||
"ss_layer_2.ref\n",
|
||||
"ss_layer_3.ref\n",
|
||||
"ss_layer_4.ref\n",
|
||||
"ss_layer_5.ref\n",
|
||||
"ss_layer_6.ref\n",
|
||||
"ss_layer_7.ref\n",
|
||||
"ss_layer_8.ref\n",
|
||||
"delr.ref\n"
|
||||
"ss_layer_9.ref\n",
|
||||
"vka_layer_1.ref\n",
|
||||
"vka_layer_10.ref\n",
|
||||
"vka_layer_2.ref\n",
|
||||
"vka_layer_3.ref\n",
|
||||
"vka_layer_4.ref\n",
|
||||
"vka_layer_5.ref\n",
|
||||
"vka_layer_6.ref\n",
|
||||
"vka_layer_7.ref\n",
|
||||
"vka_layer_8.ref\n",
|
||||
"vka_layer_9.ref\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -708,7 +711,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.2.10.\\n',\n",
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.2.9.\\n',\n",
|
||||
" '#xul:0; yul:20; rotation:0; proj4_str:+init=EPSG:4326; units:meters; lenuni:2; length_multiplier:1.0 ;start_datetime:1-1-1970\\n',\n",
|
||||
" 'LIST 2 modflowtest.list\\n',\n",
|
||||
" 'DIS 11 modflowtest.dis \\n',\n",
|
||||
|
@ -728,34 +731,34 @@
|
|||
" 'DATA 1012 ref/botm_layer_9.ref\\n',\n",
|
||||
" 'DATA 1013 ref/botm_layer_10.ref\\n',\n",
|
||||
" 'DATA 1014 ref/hk_1.ref\\n',\n",
|
||||
" 'DATA 1015 ref/vka1.ref\\n',\n",
|
||||
" 'DATA 1015 ref/vka_layer_1.ref\\n',\n",
|
||||
" 'DATA 1016 ref/ss_layer_1.ref\\n',\n",
|
||||
" 'DATA 1017 ref/hk_2.ref\\n',\n",
|
||||
" 'DATA 1018 ref/vka2.ref\\n',\n",
|
||||
" 'DATA 1018 ref/vka_layer_2.ref\\n',\n",
|
||||
" 'DATA 1019 ref/ss_layer_2.ref\\n',\n",
|
||||
" 'DATA 1020 ref/hk_3.ref\\n',\n",
|
||||
" 'DATA 1021 ref/vka3.ref\\n',\n",
|
||||
" 'DATA 1021 ref/vka_layer_3.ref\\n',\n",
|
||||
" 'DATA 1022 ref/ss_layer_3.ref\\n',\n",
|
||||
" 'DATA 1023 ref/hk_4.ref\\n',\n",
|
||||
" 'DATA 1024 ref/vka4.ref\\n',\n",
|
||||
" 'DATA 1024 ref/vka_layer_4.ref\\n',\n",
|
||||
" 'DATA 1025 ref/ss_layer_4.ref\\n',\n",
|
||||
" 'DATA 1026 ref/hk_5.ref\\n',\n",
|
||||
" 'DATA 1027 ref/vka5.ref\\n',\n",
|
||||
" 'DATA 1027 ref/vka_layer_5.ref\\n',\n",
|
||||
" 'DATA 1028 ref/ss_layer_5.ref\\n',\n",
|
||||
" 'DATA 1029 ref/hk_6.ref\\n',\n",
|
||||
" 'DATA 1030 ref/vka6.ref\\n',\n",
|
||||
" 'DATA 1030 ref/vka_layer_6.ref\\n',\n",
|
||||
" 'DATA 1031 ref/ss_layer_6.ref\\n',\n",
|
||||
" 'DATA 1032 ref/hk_7.ref\\n',\n",
|
||||
" 'DATA 1033 ref/vka7.ref\\n',\n",
|
||||
" 'DATA 1033 ref/vka_layer_7.ref\\n',\n",
|
||||
" 'DATA 1034 ref/ss_layer_7.ref\\n',\n",
|
||||
" 'DATA 1035 ref/hk_8.ref\\n',\n",
|
||||
" 'DATA 1036 ref/vka8.ref\\n',\n",
|
||||
" 'DATA 1036 ref/vka_layer_8.ref\\n',\n",
|
||||
" 'DATA 1037 ref/ss_layer_8.ref\\n',\n",
|
||||
" 'DATA 1038 ref/hk_9.ref\\n',\n",
|
||||
" 'DATA 1039 ref/vka9.ref\\n',\n",
|
||||
" 'DATA 1039 ref/vka_layer_9.ref\\n',\n",
|
||||
" 'DATA 1040 ref/ss_layer_9.ref\\n',\n",
|
||||
" 'DATA 1041 ref/hk_10.ref\\n',\n",
|
||||
" 'DATA 1042 ref/vka10.ref\\n',\n",
|
||||
" 'DATA 1042 ref/vka_layer_10.ref\\n',\n",
|
||||
" 'DATA 1043 ref/ss_layer_10.ref\\n',\n",
|
||||
" 'DATA 1044 ref/rech_0.ref\\n',\n",
|
||||
" 'DATA 1045 ref/important_recharge.ref\\n']"
|
||||
|
@ -813,43 +816,43 @@
|
|||
"Util2d:botm layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_1.ref\n",
|
||||
"Util2d:ss layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_2.ref\n",
|
||||
"Util2d:ss layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_3.ref\n",
|
||||
"Util2d:ss layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_4.ref\n",
|
||||
"Util2d:ss layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_5.ref\n",
|
||||
"Util2d:ss layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_6.ref\n",
|
||||
"Util2d:ss layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_7.ref\n",
|
||||
"Util2d:ss layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_8.ref\n",
|
||||
"Util2d:ss layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_9.ref\n",
|
||||
"Util2d:ss layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_10.ref\n",
|
||||
"Util2d:ss layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/rech_0.ref\n",
|
||||
|
@ -870,7 +873,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.2.10.\\n',\n",
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.2.9.\\n',\n",
|
||||
" '#xul:0; yul:20; rotation:0; proj4_str:+init=EPSG:4326; units:meters; lenuni:2; length_multiplier:1.0 ;start_datetime:1-1-1970\\n',\n",
|
||||
" 'LIST 2 modflowtest.list\\n',\n",
|
||||
" 'DIS 11 modflowtest.dis \\n',\n",
|
||||
|
@ -890,34 +893,34 @@
|
|||
" 'DATA 1057 ref/botm_layer_9.ref\\n',\n",
|
||||
" 'DATA 1058 ref/botm_layer_10.ref\\n',\n",
|
||||
" 'DATA 1059 ref/hk_1.ref\\n',\n",
|
||||
" 'DATA 1060 ref/vka1.ref\\n',\n",
|
||||
" 'DATA 1060 ref/vka_layer_1.ref\\n',\n",
|
||||
" 'DATA 1061 ref/ss_layer_1.ref\\n',\n",
|
||||
" 'DATA 1062 ref/hk_2.ref\\n',\n",
|
||||
" 'DATA 1063 ref/vka2.ref\\n',\n",
|
||||
" 'DATA 1063 ref/vka_layer_2.ref\\n',\n",
|
||||
" 'DATA 1064 ref/ss_layer_2.ref\\n',\n",
|
||||
" 'DATA 1065 ref/hk_3.ref\\n',\n",
|
||||
" 'DATA 1066 ref/vka3.ref\\n',\n",
|
||||
" 'DATA 1066 ref/vka_layer_3.ref\\n',\n",
|
||||
" 'DATA 1067 ref/ss_layer_3.ref\\n',\n",
|
||||
" 'DATA 1068 ref/hk_4.ref\\n',\n",
|
||||
" 'DATA 1069 ref/vka4.ref\\n',\n",
|
||||
" 'DATA 1069 ref/vka_layer_4.ref\\n',\n",
|
||||
" 'DATA 1070 ref/ss_layer_4.ref\\n',\n",
|
||||
" 'DATA 1071 ref/hk_5.ref\\n',\n",
|
||||
" 'DATA 1072 ref/vka5.ref\\n',\n",
|
||||
" 'DATA 1072 ref/vka_layer_5.ref\\n',\n",
|
||||
" 'DATA 1073 ref/ss_layer_5.ref\\n',\n",
|
||||
" 'DATA 1074 ref/hk_6.ref\\n',\n",
|
||||
" 'DATA 1075 ref/vka6.ref\\n',\n",
|
||||
" 'DATA 1075 ref/vka_layer_6.ref\\n',\n",
|
||||
" 'DATA 1076 ref/ss_layer_6.ref\\n',\n",
|
||||
" 'DATA 1077 ref/hk_7.ref\\n',\n",
|
||||
" 'DATA 1078 ref/vka7.ref\\n',\n",
|
||||
" 'DATA 1078 ref/vka_layer_7.ref\\n',\n",
|
||||
" 'DATA 1079 ref/ss_layer_7.ref\\n',\n",
|
||||
" 'DATA 1080 ref/hk_8.ref\\n',\n",
|
||||
" 'DATA 1081 ref/vka8.ref\\n',\n",
|
||||
" 'DATA 1081 ref/vka_layer_8.ref\\n',\n",
|
||||
" 'DATA 1082 ref/ss_layer_8.ref\\n',\n",
|
||||
" 'DATA 1083 ref/hk_9.ref\\n',\n",
|
||||
" 'DATA 1084 ref/vka9.ref\\n',\n",
|
||||
" 'DATA 1084 ref/vka_layer_9.ref\\n',\n",
|
||||
" 'DATA 1085 ref/ss_layer_9.ref\\n',\n",
|
||||
" 'DATA 1086 ref/hk_10.ref\\n',\n",
|
||||
" 'DATA 1087 ref/vka10.ref\\n',\n",
|
||||
" 'DATA 1087 ref/vka_layer_10.ref\\n',\n",
|
||||
" 'DATA 1088 ref/ss_layer_10.ref\\n',\n",
|
||||
" 'DATA 1089 ref/rech_0.ref\\n',\n",
|
||||
" 'DATA 1090 ref/important_recharge.ref\\n']"
|
||||
|
@ -1126,43 +1129,43 @@
|
|||
"Util2d:botm layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/botm_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_1.ref\n",
|
||||
"Util2d:ss layer 1: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_1.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_2.ref\n",
|
||||
"Util2d:ss layer 2: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_2.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_3.ref\n",
|
||||
"Util2d:ss layer 3: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_3.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_4.ref\n",
|
||||
"Util2d:ss layer 4: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_4.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_5.ref\n",
|
||||
"Util2d:ss layer 5: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_5.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_6.ref\n",
|
||||
"Util2d:ss layer 6: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_6.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_7.ref\n",
|
||||
"Util2d:ss layer 7: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_7.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_8.ref\n",
|
||||
"Util2d:ss layer 8: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_8.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_9.ref\n",
|
||||
"Util2d:ss layer 9: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_9.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/hk_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/vka_layer_10.ref\n",
|
||||
"Util2d:ss layer 10: resetting 'how' to external\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/ss_layer_10.ref\n",
|
||||
"BaseModel.add_external() warning: replacing existing filename ref/rech_0.ref\n",
|
||||
|
@ -1227,34 +1230,34 @@
|
|||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" ' 0 0 0 0 0 0 0 0 0 0\\n',\n",
|
||||
" ' 1117 1 (5E15.6) -1 #hk layer 1\\n',\n",
|
||||
" ' 1118 1 (5E15.6) -1 #vka1\\n',\n",
|
||||
" ' 1118 1 (5E15.6) -1 #vka layer 1\\n',\n",
|
||||
" ' 1119 1 (5E15.6) -1 #ss layer 1\\n',\n",
|
||||
" ' 1120 1 (5E15.6) -1 #hk layer 2\\n',\n",
|
||||
" ' 1121 1 (5E15.6) -1 #vka2\\n',\n",
|
||||
" ' 1121 1 (5E15.6) -1 #vka layer 2\\n',\n",
|
||||
" ' 1122 1 (5E15.6) -1 #ss layer 2\\n',\n",
|
||||
" ' 1123 1 (5E15.6) -1 #hk layer 3\\n',\n",
|
||||
" ' 1124 1 (5E15.6) -1 #vka3\\n',\n",
|
||||
" ' 1124 1 (5E15.6) -1 #vka layer 3\\n',\n",
|
||||
" ' 1125 1 (5E15.6) -1 #ss layer 3\\n',\n",
|
||||
" ' 1126 1 (5E15.6) -1 #hk layer 4\\n',\n",
|
||||
" ' 1127 1 (5E15.6) -1 #vka4\\n',\n",
|
||||
" ' 1127 1 (5E15.6) -1 #vka layer 4\\n',\n",
|
||||
" ' 1128 1 (5E15.6) -1 #ss layer 4\\n',\n",
|
||||
" ' 1129 1 (5E15.6) -1 #hk layer 5\\n',\n",
|
||||
" ' 1130 1 (5E15.6) -1 #vka5\\n',\n",
|
||||
" ' 1130 1 (5E15.6) -1 #vka layer 5\\n',\n",
|
||||
" ' 1131 1 (5E15.6) -1 #ss layer 5\\n',\n",
|
||||
" ' 1132 1 (5E15.6) -1 #hk layer 6\\n',\n",
|
||||
" ' 1133 1 (5E15.6) -1 #vka6\\n',\n",
|
||||
" ' 1133 1 (5E15.6) -1 #vka layer 6\\n',\n",
|
||||
" ' 1134 1 (5E15.6) -1 #ss layer 6\\n',\n",
|
||||
" ' 1135 1 (5E15.6) -1 #hk layer 7\\n',\n",
|
||||
" ' 1136 1 (5E15.6) -1 #vka7\\n',\n",
|
||||
" ' 1136 1 (5E15.6) -1 #vka layer 7\\n',\n",
|
||||
" ' 1137 1 (5E15.6) -1 #ss layer 7\\n',\n",
|
||||
" ' 1138 1 (5E15.6) -1 #hk layer 8\\n',\n",
|
||||
" ' 1139 1 (5E15.6) -1 #vka8\\n',\n",
|
||||
" ' 1139 1 (5E15.6) -1 #vka layer 8\\n',\n",
|
||||
" ' 1140 1 (5E15.6) -1 #ss layer 8\\n',\n",
|
||||
" ' 1141 1 (5E15.6) -1 #hk layer 9\\n',\n",
|
||||
" ' 1142 1 (5E15.6) -1 #vka9\\n',\n",
|
||||
" ' 1142 1 (5E15.6) -1 #vka layer 9\\n',\n",
|
||||
" ' 1143 1 (5E15.6) -1 #ss layer 9\\n',\n",
|
||||
" ' 1144 1 (5E15.6) -1 #hk layer 10\\n',\n",
|
||||
" ' 1145 1 (5E15.6) -1 #vka10\\n',\n",
|
||||
" ' 1145 1 (5E15.6) -1 #vka layer 10\\n',\n",
|
||||
" ' 1146 1 (5E15.6) -1 #ss layer 10\\n']"
|
||||
]
|
||||
},
|
||||
|
@ -1275,7 +1278,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.2.10.\\n',\n",
|
||||
"['# Name file for MODFLOW-2005, generated by Flopy version 3.2.9.\\n',\n",
|
||||
" '#xul:0; yul:20; rotation:0; proj4_str:+init=EPSG:4326; units:meters; lenuni:2; length_multiplier:1.0 ;start_datetime:1-1-1970\\n',\n",
|
||||
" 'LIST 2 modflowtest.list\\n',\n",
|
||||
" 'DIS 11 modflowtest.dis \\n',\n",
|
||||
|
@ -1295,34 +1298,34 @@
|
|||
" 'DATA 1115 ref/botm_layer_9.ref\\n',\n",
|
||||
" 'DATA 1116 ref/botm_layer_10.ref\\n',\n",
|
||||
" 'DATA 1117 ref/hk_1.ref\\n',\n",
|
||||
" 'DATA 1118 ref/vka1.ref\\n',\n",
|
||||
" 'DATA 1118 ref/vka_layer_1.ref\\n',\n",
|
||||
" 'DATA 1119 ref/ss_layer_1.ref\\n',\n",
|
||||
" 'DATA 1120 ref/hk_2.ref\\n',\n",
|
||||
" 'DATA 1121 ref/vka2.ref\\n',\n",
|
||||
" 'DATA 1121 ref/vka_layer_2.ref\\n',\n",
|
||||
" 'DATA 1122 ref/ss_layer_2.ref\\n',\n",
|
||||
" 'DATA 1123 ref/hk_3.ref\\n',\n",
|
||||
" 'DATA 1124 ref/vka3.ref\\n',\n",
|
||||
" 'DATA 1124 ref/vka_layer_3.ref\\n',\n",
|
||||
" 'DATA 1125 ref/ss_layer_3.ref\\n',\n",
|
||||
" 'DATA 1126 ref/hk_4.ref\\n',\n",
|
||||
" 'DATA 1127 ref/vka4.ref\\n',\n",
|
||||
" 'DATA 1127 ref/vka_layer_4.ref\\n',\n",
|
||||
" 'DATA 1128 ref/ss_layer_4.ref\\n',\n",
|
||||
" 'DATA 1129 ref/hk_5.ref\\n',\n",
|
||||
" 'DATA 1130 ref/vka5.ref\\n',\n",
|
||||
" 'DATA 1130 ref/vka_layer_5.ref\\n',\n",
|
||||
" 'DATA 1131 ref/ss_layer_5.ref\\n',\n",
|
||||
" 'DATA 1132 ref/hk_6.ref\\n',\n",
|
||||
" 'DATA 1133 ref/vka6.ref\\n',\n",
|
||||
" 'DATA 1133 ref/vka_layer_6.ref\\n',\n",
|
||||
" 'DATA 1134 ref/ss_layer_6.ref\\n',\n",
|
||||
" 'DATA 1135 ref/hk_7.ref\\n',\n",
|
||||
" 'DATA 1136 ref/vka7.ref\\n',\n",
|
||||
" 'DATA 1136 ref/vka_layer_7.ref\\n',\n",
|
||||
" 'DATA 1137 ref/ss_layer_7.ref\\n',\n",
|
||||
" 'DATA 1138 ref/hk_8.ref\\n',\n",
|
||||
" 'DATA 1139 ref/vka8.ref\\n',\n",
|
||||
" 'DATA 1139 ref/vka_layer_8.ref\\n',\n",
|
||||
" 'DATA 1140 ref/ss_layer_8.ref\\n',\n",
|
||||
" 'DATA 1141 ref/hk_9.ref\\n',\n",
|
||||
" 'DATA 1142 ref/vka9.ref\\n',\n",
|
||||
" 'DATA 1142 ref/vka_layer_9.ref\\n',\n",
|
||||
" 'DATA 1143 ref/ss_layer_9.ref\\n',\n",
|
||||
" 'DATA 1144 ref/hk_10.ref\\n',\n",
|
||||
" 'DATA 1145 ref/vka10.ref\\n',\n",
|
||||
" 'DATA 1145 ref/vka_layer_10.ref\\n',\n",
|
||||
" 'DATA 1146 ref/ss_layer_10.ref\\n',\n",
|
||||
" 'DATA 1147 ref/rech_0.ref\\n',\n",
|
||||
" 'DATA 1148 ref/important_recharge.ref\\n']"
|
||||
|
@ -1361,7 +1364,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
"version": "3.6.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -31,7 +31,7 @@
|
|||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"matplotlib version: 2.2.2\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -119,7 +119,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Directory structure already exists for simulation path /Users/jdhughes/Documents/Development/flopy_us/examples/Notebooks/data/mf6lake\n"
|
||||
"Directory structure already exists for simulation path /Users/jdhughes/Documents/Development/flopy_git/examples/Notebooks/data/mf6lake\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -548,7 +548,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"['mf6lake.oc', 'mf6lake.lst', 'mf6lake.nam', 'mf6lake.dis', 'mf6lake.dis.grb', 'mf6lake.cbb', 'mf6lake.ims', 'mf6lake.chd', 'mf6lake.npf', 'mf6lake.ic', 'mf6lake.hds', 'mfsim.nam', 'mf6lake.tdis', 'mfsim.lst']\n"
|
||||
"['mf6lake.oc', 'mf6lake.nam', 'mf6lake.dis', 'mf6lake.ims', 'mf6lake.chd', 'mf6lake.npf', 'mf6lake.ic', 'mfsim.nam', 'mf6lake.tdis']\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -596,13 +596,13 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2018/10/19 16:29:31\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2018/10/16 14:07:39\n",
|
||||
"\n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/10/19 16:29:31\n",
|
||||
" Elapsed run time: 0.529 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/10/16 14:07:39\n",
|
||||
" Elapsed run time: 0.513 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation.\n",
|
||||
"\n",
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"matplotlib version: 2.2.2\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -92,7 +92,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Directory structure already exists for simulation path /Users/jdhughes/Documents/Development/flopy_us/examples/Notebooks/data/advgw_tidal\n"
|
||||
"Directory structure already exists for simulation path /Users/jdhughes/Documents/Development/flopy_git/examples/Notebooks/data/advgw_tidal\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -557,7 +557,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"['intercell_flow_obs1.csv', 'riv_flowsA.csv', 'advgw_tidal.nam', 'advgw_tidal.ic', 'riv_flowsB.csv', 'advgw_tidal.dis.grb', 'recharge_rates_1.ts', 'advgw_tidal.sto', 'advgw_tidal.lst', 'tides.ts', 'advgw_tidal.cbb', 'advgw_tidal.ims', 'well-rates.ts', 'advgw_tidal.ghb', 'advgw_tidal.obs', 'advgw_tidal.riv.obs', 'ghb_flows.csv', 'advgw_tidal.dis', 'advgw_tidal_1.rch', 'advgw_tidal_3.rch', 'advgw_tidal_2.rch', 'advgw_tidal.oc', 'river_stages.ts', 'advgw_tidal.hds', 'advgw_tidal.wel', 'advgw_tidal.ghb.obs', 'advgw_tidal.npf', 'head_obs.csv', 'advgw_tidal.tdis', 'ghb_obs.csv', 'recharge_rates_2.ts', 'mfsim.nam', 'advgw_tidal.riv', 'head-hydrographs.csv', 'mfsim.lst', 'recharge_rates_3.ts', 'advgw_tidal.evt', 'riv_obs.csv']\n"
|
||||
"['advgw_tidal.nam', 'advgw_tidal.ic', 'recharge_rates_1.ts', 'advgw_tidal.sto', 'tides.ts', 'advgw_tidal.ims', 'well-rates.ts', 'advgw_tidal.ghb', 'advgw_tidal.obs', 'advgw_tidal.riv.obs', 'advgw_tidal.dis', 'advgw_tidal_1.rch', 'advgw_tidal_3.rch', 'advgw_tidal_2.rch', 'advgw_tidal.oc', 'river_stages.ts', 'advgw_tidal.wel', 'advgw_tidal.ghb.obs', 'advgw_tidal.npf', 'advgw_tidal.tdis', 'recharge_rates_2.ts', 'mfsim.nam', 'advgw_tidal.riv', 'recharge_rates_3.ts', 'advgw_tidal.evt']\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -605,7 +605,7 @@
|
|||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2018/10/19 16:29:49\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2018/10/16 14:05:30\n",
|
||||
"\n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
|
@ -800,7 +800,13 @@
|
|||
" Solving: Stress period: 3 Time step: 68\n",
|
||||
" Solving: Stress period: 3 Time step: 69\n",
|
||||
" Solving: Stress period: 3 Time step: 70\n",
|
||||
" Solving: Stress period: 3 Time step: 71\n",
|
||||
" Solving: Stress period: 3 Time step: 71\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Solving: Stress period: 3 Time step: 72\n",
|
||||
" Solving: Stress period: 3 Time step: 73\n",
|
||||
" Solving: Stress period: 3 Time step: 74\n",
|
||||
|
@ -830,13 +836,7 @@
|
|||
" Solving: Stress period: 3 Time step: 98\n",
|
||||
" Solving: Stress period: 3 Time step: 99\n",
|
||||
" Solving: Stress period: 3 Time step: 100\n",
|
||||
" Solving: Stress period: 3 Time step: 101\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Solving: Stress period: 3 Time step: 101\n",
|
||||
" Solving: Stress period: 3 Time step: 102\n",
|
||||
" Solving: Stress period: 3 Time step: 103\n",
|
||||
" Solving: Stress period: 3 Time step: 104\n",
|
||||
|
@ -964,7 +964,13 @@
|
|||
" Solving: Stress period: 4 Time step: 106\n",
|
||||
" Solving: Stress period: 4 Time step: 107\n",
|
||||
" Solving: Stress period: 4 Time step: 108\n",
|
||||
" Solving: Stress period: 4 Time step: 109\n",
|
||||
" Solving: Stress period: 4 Time step: 109\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
" Solving: Stress period: 4 Time step: 110\n",
|
||||
" Solving: Stress period: 4 Time step: 111\n",
|
||||
" Solving: Stress period: 4 Time step: 112\n",
|
||||
|
@ -976,8 +982,8 @@
|
|||
" Solving: Stress period: 4 Time step: 118\n",
|
||||
" Solving: Stress period: 4 Time step: 119\n",
|
||||
" Solving: Stress period: 4 Time step: 120\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/10/19 16:29:50\n",
|
||||
" Elapsed run time: 0.462 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/10/16 14:05:31\n",
|
||||
" Elapsed run time: 0.502 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation.\n",
|
||||
"\n",
|
||||
|
@ -1314,7 +1320,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.legend.Legend at 0x1171cadd8>"
|
||||
"<matplotlib.legend.Legend at 0x113c84550>"
|
||||
]
|
||||
},
|
||||
"execution_count": 25,
|
||||
|
|
|
@ -20,11 +20,10 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]\n",
|
||||
"numpy version: 1.14.3\n",
|
||||
"matplotlib version: 2.2.2\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -76,7 +75,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/nwtp3.dis.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\nwtp3.dis.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NROW with shape \n",
|
||||
|
@ -93,37 +92,22 @@
|
|||
" File contains data for JA with shape (31680,)\n",
|
||||
" File contains data for IDOMAIN with shape (6400,)\n",
|
||||
" File contains data for ICELLTYPE with shape (6400,)\n",
|
||||
"Attempting to read 16 records from ../data/mfgrd_test/nwtp3.dis.grb\n",
|
||||
"Attempting to read 16 records from ..\\data\\mfgrd_test\\nwtp3.dis.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 6400\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NROW\n",
|
||||
" NROW = 80\n",
|
||||
" Reading NCOL\n",
|
||||
" NCOL = 80\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 31680\n",
|
||||
" Reading XORIGIN\n",
|
||||
" XORIGIN = 0.0\n",
|
||||
" Reading YORIGIN\n",
|
||||
" YORIGIN = 0.0\n",
|
||||
" Reading ANGROT\n",
|
||||
" ANGROT = 0.0\n",
|
||||
" Reading DELR\n",
|
||||
" DELR: min = 100.0 max = 100.0\n",
|
||||
" Reading DELC\n",
|
||||
" DELC: min = 100.0 max = 100.0\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 200.0 max = 200.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = 3.89 max = 79.41\n",
|
||||
" Reading IA\n",
|
||||
" IA: min = 1 max = 31681\n",
|
||||
" Reading JA\n",
|
||||
" JA: min = 1 max = 6400\n",
|
||||
" Reading IDOMAIN\n",
|
||||
" IDOMAIN: min = 1 max = 1\n",
|
||||
" Reading ICELLTYPE\n",
|
||||
" ICELLTYPE: min = 1 max = 1\n",
|
||||
"[ 50. 7950.]\n"
|
||||
|
@ -134,8 +118,8 @@
|
|||
"fn = os.path.join(workspace, 'nwtp3.dis.grb')\n",
|
||||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"sr = grd.get_spatialreference()\n",
|
||||
"extents = sr.get_extent()\n",
|
||||
"mg = grd.get_modelgrid()\n",
|
||||
"extents = mg.extent\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"print(vertc[0, :])"
|
||||
]
|
||||
|
@ -150,13 +134,13 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"6400\n",
|
||||
"[0, 1, 2, 3, 4]\n",
|
||||
"(32000, 2)\n",
|
||||
"[0, 1, 2, 3]\n",
|
||||
"(25600, 2)\n",
|
||||
"[[ 0. 8000.]\n",
|
||||
" [ 0. 7900.]\n",
|
||||
" [ 100. 7900.]\n",
|
||||
" [ 100. 8000.]\n",
|
||||
" [ 0. 8000.]]\n",
|
||||
" [ 100. 7900.]\n",
|
||||
" [ 0. 7900.]\n",
|
||||
" [ 100. 8000.]]\n",
|
||||
"(0.0, 8000.0, 0.0, 8000.0)\n"
|
||||
]
|
||||
}
|
||||
|
@ -166,7 +150,7 @@
|
|||
"print(iverts[0])\n",
|
||||
"print(verts.shape)\n",
|
||||
"print(verts[0:5,:])\n",
|
||||
"print(sr.get_extent())"
|
||||
"print(mg.extent)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -209,7 +193,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(sr=sr, layer=0)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, layer=0)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(extents[:2])\n",
|
||||
"ax.set_ylim(extents[2:])\n",
|
||||
|
@ -235,7 +219,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/uzfp3_lakmvr_v2.dis.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\uzfp3_lakmvr_v2.dis.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NROW with shape \n",
|
||||
|
@ -252,37 +236,22 @@
|
|||
" File contains data for JA with shape (1142,)\n",
|
||||
" File contains data for IDOMAIN with shape (300,)\n",
|
||||
" File contains data for ICELLTYPE with shape (300,)\n",
|
||||
"Attempting to read 16 records from ../data/mfgrd_test/uzfp3_lakmvr_v2.dis.grb\n",
|
||||
"Attempting to read 16 records from ..\\data\\mfgrd_test\\uzfp3_lakmvr_v2.dis.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 300\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 2\n",
|
||||
" Reading NROW\n",
|
||||
" NROW = 15\n",
|
||||
" Reading NCOL\n",
|
||||
" NCOL = 10\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 1142\n",
|
||||
" Reading XORIGIN\n",
|
||||
" XORIGIN = 0.0\n",
|
||||
" Reading YORIGIN\n",
|
||||
" YORIGIN = 0.0\n",
|
||||
" Reading ANGROT\n",
|
||||
" ANGROT = 0.0\n",
|
||||
" Reading DELR\n",
|
||||
" DELR: min = 5000.0 max = 5000.0\n",
|
||||
" Reading DELC\n",
|
||||
" DELC: min = 5000.0 max = 5000.0\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 1110.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = 0.0 max = 1060.0\n",
|
||||
" Reading IA\n",
|
||||
" IA: min = 1 max = 1143\n",
|
||||
" Reading JA\n",
|
||||
" JA: min = 1 max = 296\n",
|
||||
" Reading IDOMAIN\n",
|
||||
" IDOMAIN: min = 0 max = 1\n",
|
||||
" Reading ICELLTYPE\n",
|
||||
" ICELLTYPE: min = 0 max = 1\n"
|
||||
]
|
||||
|
@ -292,8 +261,8 @@
|
|||
"fn = os.path.join(workspace, 'uzfp3_lakmvr_v2.dis.grb')\n",
|
||||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"sr = grd.get_spatialreference()\n",
|
||||
"extents = sr.get_extent()\n",
|
||||
"mg = grd.get_modelgrid()\n",
|
||||
"extents = mg.extent\n",
|
||||
"vertc = grd.get_centroids()"
|
||||
]
|
||||
},
|
||||
|
@ -330,7 +299,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x1154324a8>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd39120b38>"
|
||||
]
|
||||
},
|
||||
"execution_count": 9,
|
||||
|
@ -349,7 +318,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(sr=sr, layer=0)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, layer=0)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(extents[:2])\n",
|
||||
"ax.set_ylim(extents[2:])\n",
|
||||
|
@ -368,7 +337,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x1156093c8>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd394749e8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 10,
|
||||
|
@ -388,7 +357,7 @@
|
|||
],
|
||||
"source": [
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr, layer=1)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg, layer=1)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(extents[:2])\n",
|
||||
"ax.set_ylim(extents[2:])\n",
|
||||
|
@ -416,7 +385,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/flow.disv.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\flow.disv.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NCPL with shape \n",
|
||||
|
@ -430,35 +399,23 @@
|
|||
" File contains data for CELLY with shape (218,)\n",
|
||||
" File contains data for IAVERT with shape (219,)\n",
|
||||
" File contains data for JAVERT with shape (936,)\n",
|
||||
"Attempting to read 13 records from ../data/mfgrd_test/flow.disv.grb\n",
|
||||
"Attempting to read 13 records from ..\\data\\mfgrd_test\\flow.disv.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 218\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NCPL\n",
|
||||
" NCPL = 218\n",
|
||||
" Reading NVERT\n",
|
||||
" NVERT = 156\n",
|
||||
" Reading NJAVERT\n",
|
||||
" NJAVERT = 936\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 908\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 0.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = -100.0 max = -100.0\n",
|
||||
" Reading VERTICES\n",
|
||||
" VERTICES: min = 0.0 max = 700.0\n",
|
||||
" Reading CELLX\n",
|
||||
" CELLX: min = 50.0 max = 650.0\n",
|
||||
" Reading CELLY\n",
|
||||
" CELLY: min = 50.0 max = 650.0\n",
|
||||
" Reading IAVERT\n",
|
||||
" IAVERT: min = 1 max = 937\n",
|
||||
" Reading JAVERT\n",
|
||||
" JAVERT: min = 1 max = 156\n",
|
||||
"returning vertices for ../data/mfgrd_test/flow.disv.grb\n",
|
||||
"returning vertices for ../data/mfgrd_test/flow.disv.grb\n"
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flow.disv.grb\n",
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flow.disv.grb\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -467,7 +424,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -501,7 +458,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x11594e7f0>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd394f5630>"
|
||||
]
|
||||
},
|
||||
"execution_count": 13,
|
||||
|
@ -520,7 +477,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -547,7 +504,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/flowxt3d.disv.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\flowxt3d.disv.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NCPL with shape \n",
|
||||
|
@ -561,35 +518,23 @@
|
|||
" File contains data for CELLY with shape (218,)\n",
|
||||
" File contains data for IAVERT with shape (219,)\n",
|
||||
" File contains data for JAVERT with shape (936,)\n",
|
||||
"Attempting to read 13 records from ../data/mfgrd_test/flowxt3d.disv.grb\n",
|
||||
"Attempting to read 13 records from ..\\data\\mfgrd_test\\flowxt3d.disv.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 218\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NCPL\n",
|
||||
" NCPL = 218\n",
|
||||
" Reading NVERT\n",
|
||||
" NVERT = 156\n",
|
||||
" Reading NJAVERT\n",
|
||||
" NJAVERT = 936\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 908\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 0.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = -100.0 max = -100.0\n",
|
||||
" Reading VERTICES\n",
|
||||
" VERTICES: min = 0.0 max = 700.0\n",
|
||||
" Reading CELLX\n",
|
||||
" CELLX: min = 50.0 max = 650.0\n",
|
||||
" Reading CELLY\n",
|
||||
" CELLY: min = 50.0 max = 650.0\n",
|
||||
" Reading IAVERT\n",
|
||||
" IAVERT: min = 1 max = 937\n",
|
||||
" Reading JAVERT\n",
|
||||
" JAVERT: min = 1 max = 156\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowxt3d.disv.grb\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowxt3d.disv.grb\n"
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowxt3d.disv.grb\n",
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowxt3d.disv.grb\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -598,7 +543,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -632,7 +577,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x1159d8748>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd3957e4a8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 16,
|
||||
|
@ -651,7 +596,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -678,7 +623,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/flowwel.disv.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\flowwel.disv.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NCPL with shape \n",
|
||||
|
@ -692,35 +637,23 @@
|
|||
" File contains data for CELLY with shape (218,)\n",
|
||||
" File contains data for IAVERT with shape (219,)\n",
|
||||
" File contains data for JAVERT with shape (936,)\n",
|
||||
"Attempting to read 13 records from ../data/mfgrd_test/flowwel.disv.grb\n",
|
||||
"Attempting to read 13 records from ..\\data\\mfgrd_test\\flowwel.disv.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 218\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NCPL\n",
|
||||
" NCPL = 218\n",
|
||||
" Reading NVERT\n",
|
||||
" NVERT = 156\n",
|
||||
" Reading NJAVERT\n",
|
||||
" NJAVERT = 936\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 908\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 0.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = -100.0 max = -100.0\n",
|
||||
" Reading VERTICES\n",
|
||||
" VERTICES: min = 0.0 max = 700.0\n",
|
||||
" Reading CELLX\n",
|
||||
" CELLX: min = 50.0 max = 650.0\n",
|
||||
" Reading CELLY\n",
|
||||
" CELLY: min = 50.0 max = 650.0\n",
|
||||
" Reading IAVERT\n",
|
||||
" IAVERT: min = 1 max = 937\n",
|
||||
" Reading JAVERT\n",
|
||||
" JAVERT: min = 1 max = 156\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowwel.disv.grb\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowwel.disv.grb\n"
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowwel.disv.grb\n",
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowwel.disv.grb\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -729,7 +662,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -763,7 +696,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x115a326a0>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd39603e10>"
|
||||
]
|
||||
},
|
||||
"execution_count": 19,
|
||||
|
@ -782,7 +715,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -809,7 +742,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/flowwelxt3d.disv.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\flowwelxt3d.disv.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NCPL with shape \n",
|
||||
|
@ -823,35 +756,23 @@
|
|||
" File contains data for CELLY with shape (218,)\n",
|
||||
" File contains data for IAVERT with shape (219,)\n",
|
||||
" File contains data for JAVERT with shape (936,)\n",
|
||||
"Attempting to read 13 records from ../data/mfgrd_test/flowwelxt3d.disv.grb\n",
|
||||
"Attempting to read 13 records from ..\\data\\mfgrd_test\\flowwelxt3d.disv.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 218\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NCPL\n",
|
||||
" NCPL = 218\n",
|
||||
" Reading NVERT\n",
|
||||
" NVERT = 156\n",
|
||||
" Reading NJAVERT\n",
|
||||
" NJAVERT = 936\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 908\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 0.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = -100.0 max = -100.0\n",
|
||||
" Reading VERTICES\n",
|
||||
" VERTICES: min = 0.0 max = 700.0\n",
|
||||
" Reading CELLX\n",
|
||||
" CELLX: min = 50.0 max = 650.0\n",
|
||||
" Reading CELLY\n",
|
||||
" CELLY: min = 50.0 max = 650.0\n",
|
||||
" Reading IAVERT\n",
|
||||
" IAVERT: min = 1 max = 937\n",
|
||||
" Reading JAVERT\n",
|
||||
" JAVERT: min = 1 max = 156\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowwelxt3d.disv.grb\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowwelxt3d.disv.grb\n"
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowwelxt3d.disv.grb\n",
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowwelxt3d.disv.grb\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -860,7 +781,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -894,7 +815,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x115aecf98>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd39697ac8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 22,
|
||||
|
@ -915,7 +836,7 @@
|
|||
"source": [
|
||||
"#f = plt.gcf()\n",
|
||||
"#f.set_size_inches(15, 15)\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -934,7 +855,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x115b3ceb8>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd3970d400>"
|
||||
]
|
||||
},
|
||||
"execution_count": 23,
|
||||
|
@ -956,7 +877,7 @@
|
|||
"d = h - h2\n",
|
||||
"#f = plt.gcf()\n",
|
||||
"#f.set_size_inches(15, 15)\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -983,7 +904,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/flowquadwel.disv.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\flowquadwel.disv.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NCPL with shape \n",
|
||||
|
@ -997,35 +918,23 @@
|
|||
" File contains data for CELLY with shape (121,)\n",
|
||||
" File contains data for IAVERT with shape (122,)\n",
|
||||
" File contains data for JAVERT with shape (629,)\n",
|
||||
"Attempting to read 13 records from ../data/mfgrd_test/flowquadwel.disv.grb\n",
|
||||
"Attempting to read 13 records from ..\\data\\mfgrd_test\\flowquadwel.disv.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 121\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NCPL\n",
|
||||
" NCPL = 121\n",
|
||||
" Reading NVERT\n",
|
||||
" NVERT = 148\n",
|
||||
" Reading NJAVERT\n",
|
||||
" NJAVERT = 629\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 601\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 0.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = -100.0 max = -100.0\n",
|
||||
" Reading VERTICES\n",
|
||||
" VERTICES: min = 0.0 max = 700.0\n",
|
||||
" Reading CELLX\n",
|
||||
" CELLX: min = 50.0 max = 650.0\n",
|
||||
" Reading CELLY\n",
|
||||
" CELLY: min = 50.0 max = 650.0\n",
|
||||
" Reading IAVERT\n",
|
||||
" IAVERT: min = 1 max = 630\n",
|
||||
" Reading JAVERT\n",
|
||||
" JAVERT: min = 1 max = 148\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowquadwel.disv.grb\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowquadwel.disv.grb\n"
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowquadwel.disv.grb\n",
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowquadwel.disv.grb\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1034,7 +943,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1068,7 +977,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x115bd00b8>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd39458400>"
|
||||
]
|
||||
},
|
||||
"execution_count": 26,
|
||||
|
@ -1087,7 +996,7 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -1114,7 +1023,7 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"\n",
|
||||
"Processing binary grid file: ../data/mfgrd_test/flowquadwelxt3d.disv.grb\n",
|
||||
"Processing binary grid file: ..\\data\\mfgrd_test\\flowquadwelxt3d.disv.grb\n",
|
||||
" File contains data for NCELLS with shape \n",
|
||||
" File contains data for NLAY with shape \n",
|
||||
" File contains data for NCPL with shape \n",
|
||||
|
@ -1128,35 +1037,23 @@
|
|||
" File contains data for CELLY with shape (121,)\n",
|
||||
" File contains data for IAVERT with shape (122,)\n",
|
||||
" File contains data for JAVERT with shape (629,)\n",
|
||||
"Attempting to read 13 records from ../data/mfgrd_test/flowquadwelxt3d.disv.grb\n",
|
||||
"Attempting to read 13 records from ..\\data\\mfgrd_test\\flowquadwelxt3d.disv.grb\n",
|
||||
" Reading NCELLS\n",
|
||||
" NCELLS = 121\n",
|
||||
" Reading NLAY\n",
|
||||
" NLAY = 1\n",
|
||||
" Reading NCPL\n",
|
||||
" NCPL = 121\n",
|
||||
" Reading NVERT\n",
|
||||
" NVERT = 148\n",
|
||||
" Reading NJAVERT\n",
|
||||
" NJAVERT = 629\n",
|
||||
" Reading NJA\n",
|
||||
" NJA = 601\n",
|
||||
" Reading TOP\n",
|
||||
" TOP: min = 0.0 max = 0.0\n",
|
||||
" Reading BOTM\n",
|
||||
" BOTM: min = -100.0 max = -100.0\n",
|
||||
" Reading VERTICES\n",
|
||||
" VERTICES: min = 0.0 max = 700.0\n",
|
||||
" Reading CELLX\n",
|
||||
" CELLX: min = 50.0 max = 650.0\n",
|
||||
" Reading CELLY\n",
|
||||
" CELLY: min = 50.0 max = 650.0\n",
|
||||
" Reading IAVERT\n",
|
||||
" IAVERT: min = 1 max = 630\n",
|
||||
" Reading JAVERT\n",
|
||||
" JAVERT: min = 1 max = 148\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowquadwelxt3d.disv.grb\n",
|
||||
"returning vertices for ../data/mfgrd_test/flowquadwelxt3d.disv.grb\n"
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowquadwelxt3d.disv.grb\n",
|
||||
"returning vertices for ..\\data\\mfgrd_test\\flowquadwelxt3d.disv.grb\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -1165,7 +1062,7 @@
|
|||
"grd = flopy.utils.MfGrdFile(fn, verbose=True)\n",
|
||||
"iverts, verts = grd.get_verts()\n",
|
||||
"vertc = grd.get_centroids()\n",
|
||||
"sr = grd.get_spatialreference()"
|
||||
"mg = grd.get_modelgrid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -1199,7 +1096,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x1156899b0>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd39697f98>"
|
||||
]
|
||||
},
|
||||
"execution_count": 29,
|
||||
|
@ -1220,7 +1117,7 @@
|
|||
"source": [
|
||||
"#f = plt.gcf()\n",
|
||||
"#f.set_size_inches(10,10)\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
@ -1239,7 +1136,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x115aa1b70>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1bd390f2cf8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 30,
|
||||
|
@ -1261,7 +1158,7 @@
|
|||
"d = h - h2\n",
|
||||
"#f = plt.gcf()\n",
|
||||
"#f.set_size_inches(15, 15)\n",
|
||||
"mm = flopy.plot.ModelMap(sr=sr)\n",
|
||||
"mm = flopy.plot.PlotMapView(modelgrid=mg)\n",
|
||||
"ax = plt.gca()\n",
|
||||
"ax.set_xlim(0,700)\n",
|
||||
"ax.set_ylim(0,700)\n",
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -4,10 +4,13 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# FloPy \n",
|
||||
"\n",
|
||||
"## MODFLOW 6 (MF6) Support\n",
|
||||
"\n",
|
||||
"# Flopy MODFLOW 6 (MF6) Support"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The Flopy library contains classes for creating, saving, running, loading, and modifying MF6 simulations. The MF6 portion of the flopy library is located in:\n",
|
||||
"\n",
|
||||
"*flopy.mf6*\n",
|
||||
|
@ -15,10 +18,10 @@
|
|||
"While there are a number of classes in flopy.mf6, to get started you only need to use the main classes summarized below:\n",
|
||||
"\n",
|
||||
"flopy.mf6.MFSimulation \n",
|
||||
" * MODFLOW Simulation Class. Entry point into any MODFLOW simulation.\n",
|
||||
"* MODFLOW Simulation Class. Entry point into any MODFLOW simulation.\n",
|
||||
"\n",
|
||||
"flopy.mf6.ModflowGwf\n",
|
||||
" * MODFLOW Groundwater Flow Model Class. Represents a single model in a simulation.\n",
|
||||
"* MODFLOW Groundwater Flow Model Class. Represents a single model in a simulation.\n",
|
||||
"\n",
|
||||
"flopy.mf6.Modflow[pc]\n",
|
||||
" * MODFLOW package classes where [pc] is the abbreviation of the package name. Each package is a separate class. \n",
|
||||
|
@ -66,15 +69,15 @@
|
|||
"source": [
|
||||
"A MF6 simulation is created by first creating a simulation object \"MFSimulation\". When you create the simulation object you can define the simulation's name, version, executable name, workspace path, and the name of the tdis file. All of these are optional parameters, and if not defined each one will default to the following:\n",
|
||||
"\n",
|
||||
" sim_name='modflowtest'\n",
|
||||
"sim_name='modflowtest'\n",
|
||||
"\n",
|
||||
" version='mf6'\n",
|
||||
"version='mf6'\n",
|
||||
"\n",
|
||||
" exe_name='mf6.exe'\n",
|
||||
"exe_name='mf6.exe'\n",
|
||||
"\n",
|
||||
" sim_ws='.'\n",
|
||||
"sim_ws='.'\n",
|
||||
"\n",
|
||||
" sim_tdis_file='modflow6.tdis'"
|
||||
"sim_tdis_file='modflow6.tdis'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -83,6 +86,16 @@
|
|||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"import sys\n",
|
||||
"from shutil import copyfile\n",
|
||||
"try:\n",
|
||||
" import flopy\n",
|
||||
"except:\n",
|
||||
" fpth = os.path.abspath(os.path.join('..', '..'))\n",
|
||||
" sys.path.append(fpth)\n",
|
||||
" import flopy\n",
|
||||
"\n",
|
||||
"sim_name = 'example_sim'\n",
|
||||
"sim_path = os.path.join('data', 'example_project')\n",
|
||||
"sim = flopy.mf6.MFSimulation(sim_name=sim_name, version='mf6', exe_name='mf6', \n",
|
||||
|
@ -241,7 +254,7 @@
|
|||
"\n",
|
||||
"Note that flopy supports a number of ways to specify data for a package. A template, which defines the data array shape for you, can be used to specify the data. Templates are built by calling the empty of the data type you are building. For example, to build a template for k in the npf package you would call:\n",
|
||||
"\n",
|
||||
" ModflowGwfnpf.k.empty()\n",
|
||||
"ModflowGwfnpf.k.empty()\n",
|
||||
"\n",
|
||||
"The empty method for \"MFArray\" data templates (data templates whose size is based on the structure of the model grid) take up to four parameters:\n",
|
||||
"\n",
|
||||
|
@ -281,19 +294,21 @@
|
|||
"\n",
|
||||
"MFArray data can also be specified as a numpy array, a list of values, or a single value. Below strt (starting heads) are defined as a single value, 100.0, which is interpreted as an internal constant storage type of value 100.0. Strt could also be defined as a list defining a value for every model cell:\n",
|
||||
"\n",
|
||||
" strt=[100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]\n",
|
||||
"strt=[100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, \n",
|
||||
" 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]\n",
|
||||
" \n",
|
||||
"Or as a list defining a value or values for each model layer:\n",
|
||||
"\n",
|
||||
" strt=[100.0, 90.0]\n",
|
||||
"strt=[100.0, 90.0]\n",
|
||||
"\n",
|
||||
"or:\n",
|
||||
"\n",
|
||||
" strt=[[100.0], [90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]]\n",
|
||||
"strt=[[100.0], [90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]]\n",
|
||||
"\n",
|
||||
"MFArray data can also be stored in an external file by using a dictionary using the keys 'filename' to specify the file name relative to the model folder and 'data' to specific the data. The optional 'factor', 'iprn', and 'binary' keys may also be used.\n",
|
||||
"\n",
|
||||
" strt={'filename': 'strt.txt', 'factor':1.0, 'data':[100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]}\n",
|
||||
"strt={'filename': 'strt.txt', 'factor':1.0, 'data':[100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, \n",
|
||||
" 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0]}\n",
|
||||
" \n",
|
||||
"If the 'data' key is omitted from the dictionary flopy will try to read the data from an existing file 'filename'. Any relative paths for loading data from a file should specified relative to the MF6 simulation folder."
|
||||
]
|
||||
|
@ -377,15 +392,15 @@
|
|||
"\n",
|
||||
"Cell IDs always appear as tuples in an MFList. For a structured grid cell IDs appear as:\n",
|
||||
"\n",
|
||||
" (<layer>, <row>, <column>)\n",
|
||||
"(<layer>, <row>, <column>)\n",
|
||||
"\n",
|
||||
"For vertice based grid cells IDs appear as:\n",
|
||||
"\n",
|
||||
" (<layer>, <intralayer_cell_id>)\n",
|
||||
"(<layer>, <intralayer_cell_id>)\n",
|
||||
"\n",
|
||||
"Unstructured grid cell IDs appear as:\n",
|
||||
"\n",
|
||||
" (<cell_id>)"
|
||||
"(<cell_id>)"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -449,13 +464,10 @@
|
|||
"\n",
|
||||
"The recharge and evapotranspiration packages can be specified using list-based or array-based input. The array packages have an \"a\" on the end of their name:\n",
|
||||
"\n",
|
||||
"`ModflowGwfrch` - list based recharge package\n",
|
||||
"\n",
|
||||
"`ModflowGwfrcha` - array based recharge package\n",
|
||||
"\n",
|
||||
"`ModflowGwfevt` - list based evapotranspiration package\n",
|
||||
"\n",
|
||||
"`ModflowGwfevta` - array based evapotranspiration package"
|
||||
"ModflowGwfrch - list based recharge package\n",
|
||||
"ModflowGwfrcha - array based recharge package\n",
|
||||
"ModflowGwfevt - list based evapotranspiration package\n",
|
||||
"ModflowGwfevta - array based evapotranspiration package"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -538,6 +550,38 @@
|
|||
"sim.run_simulation()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Exporting a MF6 Model"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Exporting a MF6 model to a shapefile or netcdf is the same as exporting a MF2005 model."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# make directory\n",
|
||||
"pth = os.path.join('data', 'netCDF_export')\n",
|
||||
"if not os.path.exists(pth):\n",
|
||||
" os.makedirs(pth)\n",
|
||||
" \n",
|
||||
"# export the dis package to a netcdf file\n",
|
||||
"model.dis.export(os.path.join(pth, 'dis.nc'))\n",
|
||||
"\n",
|
||||
"# export the botm array to a shapefile\n",
|
||||
"model.dis.botm.export(os.path.join(pth, 'botm.shp'))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
|
@ -577,7 +621,7 @@
|
|||
"source": [
|
||||
"Data can be easily retrieved from a simulation. Data can be retrieved using two methods. One method is to retrieve the data object from a master simulation dictionary that keeps track of all the data. The master simulation dictionary is accessed by accessing a simulation's \"simulation_data\" property and then the \"mfdata\" property:\n",
|
||||
"\n",
|
||||
" sim.simulation_data.mfdata[<data path>]\n",
|
||||
"sim.simulation_data.mfdata[<data path>]\n",
|
||||
"\n",
|
||||
"The data path is the path to the data stored as a tuple containing the model name, package name, block name, and data name.\n",
|
||||
"\n",
|
||||
|
@ -636,7 +680,7 @@
|
|||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Data can also be retrieved from the data object using `[]`. For unlayered data the `[]` can be used to slice the data."
|
||||
"Data can also be retrieved from the data object using []. For unlayered data the [] can be used to slice the data."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -705,7 +749,7 @@
|
|||
"\n",
|
||||
"The simulation path folder can be changed by using the set_sim_path method in the MFFileMgmt object. The MFFileMgmt object can be obtained from the simulation object through properties:\n",
|
||||
"\n",
|
||||
" sim.simulation_data.mfpath"
|
||||
"sim.simulation_data.mfpath"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -762,13 +806,13 @@
|
|||
"\n",
|
||||
"Results can be retrieved from the master simulation dictionary. Results are retrieved from the master simulation dictionary with using a tuple key that identifies the data to be retrieved. For head data use the key\n",
|
||||
"\n",
|
||||
" ('<model name>', 'HDS', 'HEAD')\n",
|
||||
"('<model name>', 'HDS', 'HEAD')\n",
|
||||
"\n",
|
||||
"where <model name> is the name of your model. For cell by cell budget data use the key\n",
|
||||
"\n",
|
||||
" ('<model name>', 'CBC', '<flow data name>')\n",
|
||||
"('<model name>', 'CBC', '<flow data name>')\n",
|
||||
"\n",
|
||||
"where `<flow data name>` is the name of the flow data to be retrieved (ex. 'FLOW-JA-FACE'). All available output keys can be retrieved using the output_keys method."
|
||||
"where <flow data name> is the name of the flow data to be retrieved (ex. 'FLOW-JA-FACE'). All available output keys can be retrieved using the output_keys method."
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -0,0 +1,492 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {
|
||||
"collapsed": true
|
||||
},
|
||||
"source": [
|
||||
"# Vertex Model Grid (DISV) plotting \n",
|
||||
"\n",
|
||||
"No problem! Flopy supports vertex model grid plotting through the `PlotMapView` and `PlotCrossSection` classes. \n",
|
||||
"\n",
|
||||
"The method calls are almost identical to models that use a Structured Model Grid (DIS) to define the model discretization and the same keyword arguments are supported. Let's run through an example using a vertex model grid.\n",
|
||||
"\n",
|
||||
"First let's import flopy and get the model loaded!"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"%matplotlib inline\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"import numpy as np\n",
|
||||
"import os, sys\n",
|
||||
"\n",
|
||||
"# run installed version of flopy or add local path\n",
|
||||
"try:\n",
|
||||
" import flopy as fp\n",
|
||||
" from flopy.plot import PlotMapView, PlotCrossSection\n",
|
||||
" from flopy.utils import HeadFile, CellBudgetFile, geometry\n",
|
||||
"except:\n",
|
||||
" fpth = os.path.abspath(os.path.join('..', '..'))\n",
|
||||
" sys.path.append(fpth)\n",
|
||||
" import flopy as fp\n",
|
||||
" from flopy.plot import PlotMapView, PlotCrossSection\n",
|
||||
" from flopy.utils import HeadFile, CellBudgetFile, geometry\n",
|
||||
"\n",
|
||||
"# load up the example problem\n",
|
||||
"sim_name = \"mfsim.nam\"\n",
|
||||
"sim_path = \"../data/mf6/test003_gwftri_disv\"\n",
|
||||
"sim = fp.mf6.MFSimulation.load(sim_name=sim_name, version=\"mf6\", exe_name=\"mf6\",\n",
|
||||
" sim_ws=sim_path)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now let's check the model name and then get an instance of our model"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"sim.model_names"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ml = sim.get_model('gwf_1')\n",
|
||||
"ml"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Build a vertex model grid object\n",
|
||||
"The `VertexModelGrid` in not yet integrated into FloPy, but will be shortly. Until then we can build a `VertexModelGrid` instance to use for plotting"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from flopy.discretization import VertexGrid\n",
|
||||
"\n",
|
||||
"vmg = VertexGrid(ml.dis.vertices.array, ml.dis.cell2d.array,\n",
|
||||
" top=ml.dis.top.array, botm=ml.dis.botm.array,\n",
|
||||
" idomain=ml.dis.idomain.array, angrot=-25)\n",
|
||||
"vmg"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now all the discretization information is available to be used to plot model data in a `PlotMapView` or `PlotCrossSection` object\n",
|
||||
"\n",
|
||||
"Let's begin with `PlotMapView` and plot the model grid."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"As we can see, the model grid plots as a series of grid lines.\n",
|
||||
"\n",
|
||||
"We can also plot inactive cells using `plot_inactive`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_inactive()\n",
|
||||
"vmap.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Model data can be plotted using the `plot_array` method as follows:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_array(a=ml.dis.botm.array)\n",
|
||||
"plt.colorbar(ax)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This plot shows the bottom elevations of layer 1. These are a constant value of 1.5 in this example.\n",
|
||||
"\n",
|
||||
"Let's import some data from the model output to use with `plot_array()` to illustrate plotting better."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"hds_file = os.path.join(sim_path, \"tri_model.hds\")\n",
|
||||
"cbc_file = os.path.join(sim_path, \"tri_model.cbc\")\n",
|
||||
"\n",
|
||||
"hds = HeadFile(hds_file)\n",
|
||||
"hdata = hds.get_alldata()[0]\n",
|
||||
"hdata.shape = (4, -1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_inactive()\n",
|
||||
"ax = vmap.plot_array(a=hdata.ravel(), masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Data can also be contoured using the `contour_array` method."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_inactive(alpha=0.5)\n",
|
||||
"ax = vmap.plot_array(a=hdata[0], masked_values=[1e30], alpha=0.5)\n",
|
||||
"levels = np.arange(5, 10, 0.5)\n",
|
||||
"vmap.contour_array(a=hdata[0], masked_values=[1e30], levels=levels)\n",
|
||||
"plt.colorbar(ax)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Plotting specific discharge\n",
|
||||
"\n",
|
||||
"In modflow 6 SAVE_SPECIFIC_DISCHARGE can be specified in the NPF package option block. \n",
|
||||
"\n",
|
||||
"Here we grad the specific discharge recarray and use it to plot discharge vectors using FloPy"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"cbc = CellBudgetFile(cbc_file, precision='double')\n",
|
||||
"spdis = cbc.get_data(text=\"SPDIS\")\n",
|
||||
"len(spdis[0])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now we can pass the specific discharge recarray to `plot_specific_discharge`; FloPy will create a quiver plot of the discharge vectors"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_grid()\n",
|
||||
"ax = vmap.plot_array(a=hdata, alpha=0.5, masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"ax = vmap.plot_specific_discharge(spdis[0])\n",
|
||||
"plt.title(\"Specific Discharge\");"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# Working with model cross sections\n",
|
||||
"\n",
|
||||
"Flopy supports cross sections for vertex model grids, similarly to structured model grids by using the `PlotCrossSection` class. In fact most of the functionality is identical to `PlotCrossSection` with a Structured model grid. \n",
|
||||
"\n",
|
||||
"### Note:\n",
|
||||
"Cross sections must be defined by a line, since there is no row or column in a vertex model grid.\n",
|
||||
"\n",
|
||||
"Let's start by creating our cross section line and showing it on a `PlotMapView` object. "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# define a line through the model in model coordiantes as a \n",
|
||||
"# series of XY vertices where the cross section will be sliced!\n",
|
||||
"line = np.array([(0,3.5), (5, 3.5), (10, 2)])\n",
|
||||
"\n",
|
||||
"# Transform the line into the spatial refenernce projection to match the projected coordiates\n",
|
||||
"# Question? should we give the user a model grid based vertex option?\n",
|
||||
"line = geometry.transform(line.T[0], line.T[1], \n",
|
||||
" vmg.xoffset, vmg.yoffset, \n",
|
||||
" vmg.angrot_radians)\n",
|
||||
"\n",
|
||||
"vmap = PlotMapView(modelgrid=vmg, layer=0)\n",
|
||||
"ax = vmap.plot_grid()\n",
|
||||
"plt.plot(line[0], line[1], 'r--', linewidth=2)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now that we see our cross section line traverses the simulation domain where we were expecting it, let's create a cross section using the `PlotCrossSection` and plot the model grid using `plot_grid`\n",
|
||||
"\n",
|
||||
"Our cross section line is passed to the `line` dictionary"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"line = np.array(line).T\n",
|
||||
"\n",
|
||||
"vcs = PlotCrossSection(modelgrid=vmg, line={\"line\": line})\n",
|
||||
"vcs.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Array data can be plotted over similarly to the `PlotMapView` example by calling the `plot_array` method."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vcs = PlotCrossSection(modelgrid=vmg, line={\"line\": line})\n",
|
||||
"\n",
|
||||
"ax = vcs.plot_array(a=hdata, masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"vcs.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Contour plots can also be made using the `contour_array()` method. "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"vcs = PlotCrossSection(modelgrid=vmg, line={\"line\": line})\n",
|
||||
"\n",
|
||||
"ax = vcs.plot_array(a=hdata, masked_values=[1e30], alpha=0.3)\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"# set our own contour levels using the matplotlib keyword argument levels\n",
|
||||
"levels = np.arange(5, 10, 0.5)\n",
|
||||
"vcs.contour_array(a=hdata, masked_values=[1e30], levels=levels)\n",
|
||||
"vcs.plot_grid()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Plotting discharge\n",
|
||||
"\n",
|
||||
"Discharge is plotted similarly to the previous example:\n",
|
||||
"\n",
|
||||
"The SPDIS recarray is used with `plot_specific_discharge` to create and plot flow vectors\n",
|
||||
"\n",
|
||||
"### Note:\n",
|
||||
"Arbitrary cross section lines cannot be used with this method. A straight cross section must be supplied to calculate discharge vectors."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Added 0.01 to 10 to account for precision issues with transforms...\n",
|
||||
"line = np.array([(-0.1, 3.5), (10.1, 3.5)])\n",
|
||||
"\n",
|
||||
"# Transform the line into the spatial refenernce projection to match the projected coordiates\n",
|
||||
"line = geometry.transform(line.T[0], line.T[1], \n",
|
||||
" vmg.xoffset, vmg.yoffset, \n",
|
||||
" vmg.angrot_radians)\n",
|
||||
"line = np.array(line).T\n",
|
||||
"\n",
|
||||
"vcs = PlotCrossSection(modelgrid=vmg, line={\"line\": line})\n",
|
||||
"ax = vcs.plot_array(a=hdata, masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"vcs.plot_grid()\n",
|
||||
"# use hstep to plot every second cell in the horizontal direction\n",
|
||||
"ax = vcs.plot_specific_discharge(spdis[0], head=hdata, hstep=2)\n",
|
||||
"plt.xlim([0, 10])\n",
|
||||
"plt.title(\"Vertex grid specific discharge\")"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The discharge vectors look a little crammed due to the triangular nature of the grid \n",
|
||||
"\n",
|
||||
"### Let's load up a square grid example and plot up discharge vectors."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"sim_name = \"mfsim.nam\"\n",
|
||||
"sim_path = \"../data/mf6/test003_gwfs_disv\"\n",
|
||||
"sim = fp.mf6.MFSimulation.load(sim_name=sim_name, version=\"mf6\", exe_name=\"mf6\",\n",
|
||||
" sim_ws=sim_path)\n",
|
||||
"sim.run_simulation()\n",
|
||||
"\n",
|
||||
"ml = sim.get_model('gwf_1')\n",
|
||||
"vmg = VertexGrid(ml.dis.vertices.array, ml.dis.cell2d.array,\n",
|
||||
" top=ml.dis.top.array, botm=ml.dis.botm.array,\n",
|
||||
" idomain=ml.dis.idomain.array, xoff=10,\n",
|
||||
" yoff=0, angrot=-25)\n",
|
||||
"\n",
|
||||
"cbc_file = os.path.join(sim_path, \"model.cbc\") #\"expected_output/\", \"model_unch.cbc\")\n",
|
||||
"hds_file = os.path.join(sim_path, \"model.hds\") # \"expected_output/\", \"model_unch.hds\")\n",
|
||||
"\n",
|
||||
"cbc = CellBudgetFile(cbc_file, precision='double')\n",
|
||||
"spdis = cbc.get_data(text=\"SPDIS\")\n",
|
||||
"\n",
|
||||
"hds = HeadFile(hds_file)\n",
|
||||
"hdata = hds.get_alldata()[0]\n",
|
||||
"hdata.shape = (4, -1)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now let's plot the discharge vectors for a model with a grid of uniform elevations"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Added 0.01 to 10 to account for precision issues with transforms...\n",
|
||||
"line = np.array([(-0.1, 2.5), (10.1, 2.5)])\n",
|
||||
"\n",
|
||||
"# Transform the line into the spatial refenernce projection to match the projected coordiates\n",
|
||||
"line = geometry.transform(line.T[0], line.T[1], \n",
|
||||
" vmg.xoffset, vmg.yoffset, \n",
|
||||
" vmg.angrot_radians)\n",
|
||||
"line = np.array(line).T\n",
|
||||
"\n",
|
||||
"vcs = PlotCrossSection(modelgrid=vmg, line={\"line\": line})\n",
|
||||
"ax = vcs.plot_array(a=hdata, masked_values=[1e30])\n",
|
||||
"plt.colorbar(ax)\n",
|
||||
"vcs.plot_grid()\n",
|
||||
"ax = vcs.plot_specific_discharge(spdis[0], head=hdata)\n",
|
||||
"plt.xlim([0, 10])\n",
|
||||
"plt.title(\"Vertex grid specific discharge\");"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"These discharge vectors are much more uniform as expected.\n",
|
||||
"\n",
|
||||
"### For more information about the plotting functionality in flopy including optional keyword arguments, please see the ipython notebook: flopy3_PlotArrayExample.ipynb\n",
|
||||
"\n",
|
||||
"### Happy plotting!"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
|
@ -18,11 +18,11 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"pandas version: 0.23.1\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"numpy version: 1.14.0\n",
|
||||
"pandas version: 0.22.0\n",
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -793,8 +793,8 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'well1': <flopy.modflow.mfmnw2.Mnw at 0x117dfc748>,\n",
|
||||
" 'well2': <flopy.modflow.mfmnw2.Mnw at 0x117dfc3c8>}"
|
||||
"{'well1': <flopy.modflow.mfmnw2.Mnw at 0x115bc3710>,\n",
|
||||
" 'well2': <flopy.modflow.mfmnw2.Mnw at 0x117fc6748>}"
|
||||
]
|
||||
},
|
||||
"execution_count": 14,
|
||||
|
@ -814,7 +814,23 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'nper': 3, 'mnwpackage': \n",
|
||||
"{'B': [None],\n",
|
||||
" 'C': [0],\n",
|
||||
" 'P': [2.0],\n",
|
||||
" 'aux': [],\n",
|
||||
" 'cwc': [None],\n",
|
||||
" 'hlift': None,\n",
|
||||
" 'hlim': None,\n",
|
||||
" 'hwtol': None,\n",
|
||||
" 'i': [1, 1],\n",
|
||||
" 'j': [1, 1],\n",
|
||||
" 'k': [0],\n",
|
||||
" 'kskin': [5.0, 5.0],\n",
|
||||
" 'liftn': None,\n",
|
||||
" 'liftq0': None,\n",
|
||||
" 'liftqmax': None,\n",
|
||||
" 'losstype': 'skin',\n",
|
||||
" 'mnwpackage': \n",
|
||||
" Multi-Node Well 2 Package Class\n",
|
||||
" \n",
|
||||
" Parameters\n",
|
||||
|
@ -928,24 +944,42 @@
|
|||
" gwt = False ('bool)\n",
|
||||
" ipakcb = 0 ('int)\n",
|
||||
" itmp (list, items = 3\n",
|
||||
" mnw = {'well1': <flopy.modflow.mfmnw2.Mnw object at 0x117dfc748>, 'well2': <flopy.modflow.mfmnw2.Mnw object at 0x117dfc3c8>} ('dict)\n",
|
||||
" mnw = {'well1': <flopy.modflow.mfmnw2.Mnw object at 0x115bc3710>, 'well2': <flopy.modflow.mfmnw2.Mnw object at 0x117fc6748>} ('dict)\n",
|
||||
" mnwmax = 2 ('int)\n",
|
||||
" mnwprnt = 0 ('int)\n",
|
||||
" node_data (array, shape = 3,)\n",
|
||||
" nodtot = 3 ('int)\n",
|
||||
" nper = 3 ('int)\n",
|
||||
" stress_period_data = <flopy.utils.util_list.MfList object at 0x107e24470> ('flopy.utils.util_list.MfList)\n",
|
||||
" stress_period_data = <flopy.utils.util_list.MfList object at 0x115f387b8> ('flopy.utils.util_list.MfList)\n",
|
||||
" structured = True ('bool)\n",
|
||||
" unit_number = 34, 'aux': [], 'wellid': 'well1', 'nnodes': -2, 'losstype': 'skin', 'pumploc': -1, 'qlimit': 0, 'ppflag': 0, 'pumpcap': 0, 'rw': [0.5,\n",
|
||||
" 1.0], 'rskin': [2.0, 2.0], 'kskin': [5.0,\n",
|
||||
" 5.0], 'B': [None], 'C': [0], 'P': [2.0], 'cwc': [None], 'pp': [1], 'k': [0], 'i': [1,\n",
|
||||
" 1], 'j': [1, 1], 'ztop': [7.1, 9.5], 'zbotm': [5.1,\n",
|
||||
" 7.1], 'pumplay': 0, 'pumprow': 0, 'pumpcol': 0, 'zpump': 6.2, 'hlim': None, 'qcut': None, 'qfrcmn': None, 'qfrcmx': None, 'hlift': None, 'liftq0': None, 'liftqmax': None, 'hwtol': None, 'liftn': None, 'qn': None, 'stress_period_data': rec.array([(0, 1, 1, 0, 0., 0, 0., 0., 0, 0., 0.),\n",
|
||||
" unit_number = 34,\n",
|
||||
" 'nnodes': -2,\n",
|
||||
" 'node_data': rec.array([(0, 1, 1, 7.1, 5.1, 'well1', 'skin', -1, 0, 0, 0, 0.5, 2., 5., 0., 0., 0., 0., 0., 0, 0, 0, 6.2, 0., 0, 0., 0., 0., 0., 0., 0., 0., 0.),\n",
|
||||
" (0, 1, 1, 9.5, 7.1, 'well1', 'skin', -1, 0, 0, 0, 1. , 2., 5., 0., 0., 0., 0., 0., 0, 0, 0, 6.2, 0., 0, 0., 0., 0., 0., 0., 0., 0., 0.)],\n",
|
||||
" dtype=[('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('ztop', '<f4'), ('zbotm', '<f4'), ('wellid', 'O'), ('losstype', 'O'), ('pumploc', '<i8'), ('qlimit', '<i8'), ('ppflag', '<i8'), ('pumpcap', '<i8'), ('rw', '<f4'), ('rskin', '<f4'), ('kskin', '<f4'), ('B', '<f4'), ('C', '<f4'), ('P', '<f4'), ('cwc', '<f4'), ('pp', '<f4'), ('pumplay', '<i8'), ('pumprow', '<i8'), ('pumpcol', '<i8'), ('zpump', '<f4'), ('hlim', '<f4'), ('qcut', '<i8'), ('qfrcmn', '<f4'), ('qfrcmx', '<f4'), ('hlift', '<f4'), ('liftq0', '<f4'), ('liftqmax', '<f4'), ('hwtol', '<f4'), ('liftn', '<f4'), ('qn', '<f4')]),\n",
|
||||
" 'nper': 3,\n",
|
||||
" 'pp': [1],\n",
|
||||
" 'ppflag': 0,\n",
|
||||
" 'pumpcap': 0,\n",
|
||||
" 'pumpcol': 0,\n",
|
||||
" 'pumplay': 0,\n",
|
||||
" 'pumploc': -1,\n",
|
||||
" 'pumprow': 0,\n",
|
||||
" 'qcut': None,\n",
|
||||
" 'qfrcmn': None,\n",
|
||||
" 'qfrcmx': None,\n",
|
||||
" 'qlimit': 0,\n",
|
||||
" 'qn': None,\n",
|
||||
" 'rskin': [2.0, 2.0],\n",
|
||||
" 'rw': [0.5, 1.0],\n",
|
||||
" 'stress_period_data': rec.array([(0, 1, 1, 0, 0., 0, 0., 0., 0, 0., 0.),\n",
|
||||
" (0, 1, 1, 1, 100., 0, 0., 0., 0, 0., 0.),\n",
|
||||
" (0, 1, 1, 1, 100., 0, 0., 0., 0, 0., 0.)],\n",
|
||||
" dtype=[('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('per', '<i8'), ('qdes', '<f4'), ('capmult', '<i8'), ('cprime', '<f4'), ('hlim', '<f4'), ('qcut', '<i8'), ('qfrcmn', '<f4'), ('qfrcmx', '<f4')]), 'node_data': rec.array([(0, 1, 1, 7.1, 5.1, 'well1', 'skin', -1, 0, 0, 0, 0.5, 2., 5., 0., 0., 0., 0., 0., 0, 0, 0, 6.2, 0., 0, 0., 0., 0., 0., 0., 0., 0., 0.),\n",
|
||||
" (0, 1, 1, 9.5, 7.1, 'well1', 'skin', -1, 0, 0, 0, 1. , 2., 5., 0., 0., 0., 0., 0., 0, 0, 0, 6.2, 0., 0, 0., 0., 0., 0., 0., 0., 0., 0.)],\n",
|
||||
" dtype=[('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('ztop', '<f4'), ('zbotm', '<f4'), ('wellid', 'O'), ('losstype', 'O'), ('pumploc', '<i8'), ('qlimit', '<i8'), ('ppflag', '<i8'), ('pumpcap', '<i8'), ('rw', '<f4'), ('rskin', '<f4'), ('kskin', '<f4'), ('B', '<f4'), ('C', '<f4'), ('P', '<f4'), ('cwc', '<f4'), ('pp', '<f4'), ('pumplay', '<i8'), ('pumprow', '<i8'), ('pumpcol', '<i8'), ('zpump', '<f4'), ('hlim', '<f4'), ('qcut', '<i8'), ('qfrcmn', '<f4'), ('qfrcmx', '<f4'), ('hlift', '<f4'), ('liftq0', '<f4'), ('liftqmax', '<f4'), ('hwtol', '<f4'), ('liftn', '<f4'), ('qn', '<f4')])}"
|
||||
" dtype=[('k', '<i8'), ('i', '<i8'), ('j', '<i8'), ('per', '<i8'), ('qdes', '<f4'), ('capmult', '<i8'), ('cprime', '<f4'), ('hlim', '<f4'), ('qcut', '<i8'), ('qfrcmn', '<f4'), ('qfrcmx', '<f4')]),\n",
|
||||
" 'wellid': 'well1',\n",
|
||||
" 'zbotm': [5.1, 7.1],\n",
|
||||
" 'zpump': 6.2,\n",
|
||||
" 'ztop': [7.1, 9.5]}"
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
|
@ -1777,7 +1811,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"{'Well-A': <flopy.modflow.mfmnw2.Mnw at 0x117e8b7f0>}"
|
||||
"{'Well-A': <flopy.modflow.mfmnw2.Mnw at 0x1181946a0>}"
|
||||
]
|
||||
},
|
||||
"execution_count": 30,
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"numpy version: 1.14.0\n",
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -107,17 +107,20 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0\r\n",
|
||||
" 3 0 # stress period 1\r\n",
|
||||
" 3 4 5 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 6 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 7 10.7 5000.0 -5.7\r\n"
|
||||
" 3 4 5 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 6 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 7 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -136,14 +139,17 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0\r\n",
|
||||
" 3 0 # stress period 1\r\n",
|
||||
" 3 4 5 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 6 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 7 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 5 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 6 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 7 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" -1 0 # stress period 2\r\n",
|
||||
" -1 0 # stress period 3\r\n"
|
||||
" -1 0 # stress period 3\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -152,7 +158,7 @@
|
|||
"dis = flopy.modflow.ModflowDis(m, nper=3)\n",
|
||||
"riv = flopy.modflow.ModflowRiv(m, stress_period_data=stress_period_data)\n",
|
||||
"m.write_input()\n",
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -247,12 +253,15 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0\r\n",
|
||||
" 3 0 # stress period 1\r\n",
|
||||
" 3 4 5 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 6 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 7 10.7 5000.0 -5.7\r\n"
|
||||
" 3 4 5 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 6 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 7 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -260,7 +269,7 @@
|
|||
"m = flopy.modflow.Modflow(modelname='test', model_ws=workspace)\n",
|
||||
"riv = flopy.modflow.ModflowRiv(m, stress_period_data=stress_period_data)\n",
|
||||
"m.write_input()\n",
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -279,14 +288,17 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0\r\n",
|
||||
" 3 0 # stress period 1\r\n",
|
||||
" 3 4 5 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 6 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 7 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 5 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 6 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 7 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" -1 0 # stress period 2\r\n",
|
||||
" -1 0 # stress period 3\r\n"
|
||||
" -1 0 # stress period 3\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -295,7 +307,7 @@
|
|||
"dis = flopy.modflow.ModflowDis(m, nper=3)\n",
|
||||
"riv = flopy.modflow.ModflowRiv(m, stress_period_data=stress_period_data)\n",
|
||||
"m.write_input()\n",
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -373,16 +385,25 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0\r\n",
|
||||
" 0 0 # stress period 1\r\n",
|
||||
" 3 0 # stress period 2\r\n",
|
||||
" 3 4 5 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 6 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 7 10.7 5000.0 -5.7\r\n",
|
||||
" 3 4 5 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 6 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 7 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 0 0 # stress period 3\r\n",
|
||||
" -1 0 # stress period 4\r\n",
|
||||
" -1 0 # stress period 5\r\n"
|
||||
" -1 0 # stress period 5\r\n",
|
||||
" 3 0 # stress period 6\r\n",
|
||||
" 3 4 5 2.0700001E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 6 2.0700001E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 3 4 7 2.0700001E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" -1 0 # stress period 7\r\n",
|
||||
" -1 0 # stress period 8\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -392,7 +413,7 @@
|
|||
"dis = flopy.modflow.ModflowDis(m, nper=8)\n",
|
||||
"riv = flopy.modflow.ModflowRiv(m, stress_period_data=sp_dict)\n",
|
||||
"m.write_input()\n",
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -464,12 +485,15 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0 aux iface\r\n",
|
||||
" 3 0 # stress period 1\r\n",
|
||||
" 3 4 5 10.7 5000.0 -5.7 1 riv1\r\n",
|
||||
" 3 4 6 10.7 5000.0 -5.7 2 riv2\r\n",
|
||||
" 3 4 7 10.7 5000.0 -5.7 3 riv3\r\n"
|
||||
" 3 4 5 1.0700000E+01 5.0000000E+03 -5.6999998E+00 \b 1 riv1\r\n",
|
||||
" 3 4 6 1.0700000E+01 5.0000000E+03 -5.6999998E+00 \b 2 riv2\r\n",
|
||||
" 3 4 7 1.0700000E+01 5.0000000E+03 -5.6999998E+00 \b 3 riv3\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -477,7 +501,7 @@
|
|||
"m = flopy.modflow.Modflow(modelname='test', model_ws=workspace)\n",
|
||||
"riv = flopy.modflow.ModflowRiv(m, stress_period_data=stress_period_data, dtype=riva_dtype, options=['aux iface'])\n",
|
||||
"m.write_input()\n",
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -544,12 +568,15 @@
|
|||
"output_type": "stream",
|
||||
"text": [
|
||||
"data\n",
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# RIV package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 3 0\r\n",
|
||||
" 3 0 # stress period 1\r\n",
|
||||
" 77 10.7 5000.0 -5.7\r\n",
|
||||
" 245 10.7 5000.0 -5.7\r\n",
|
||||
" 450034 10.7 5000.0 -5.7\r\n"
|
||||
" 77 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 245 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
" 450034 1.0700000E+01 5.0000000E+03 -5.6999998E+00\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -558,7 +585,7 @@
|
|||
"riv = flopy.modflow.ModflowRiv(m, stress_period_data=stress_period_data, dtype=rivu_dtype)\n",
|
||||
"m.write_input()\n",
|
||||
"print(workspace)\n",
|
||||
"!head 'data/test.riv'"
|
||||
"!more 'data/test.riv'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -577,16 +604,23 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# WEL package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 1 0\r\n",
|
||||
" 0 0 # stress period 1\r\n",
|
||||
" 0 0 # stress period 2\r\n",
|
||||
" 0 0 # stress period 3\r\n",
|
||||
" 1 0 # stress period 4\r\n",
|
||||
" 2 2 2 1.0\r\n",
|
||||
" 2 2 2 1.0000000E+00\r\n",
|
||||
" -1 0 # stress period 5\r\n",
|
||||
" 1 0 # stress period 6\r\n",
|
||||
" 2 3 5 4.0\r\n"
|
||||
" 2 3 5 4.0000000E+00\r\n",
|
||||
" -1 0 # stress period 7\r\n",
|
||||
" -1 0 # stress period 8\r\n",
|
||||
" -1 0 # stress period 9\r\n",
|
||||
" -1 0 # stress period 10\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -596,7 +630,7 @@
|
|||
"sp_data1 = {3: [1, 1, 1, 1.0],5:[1,2,4,4.0]}\n",
|
||||
"wel1 = flopy.modflow.ModflowWel(ml, stress_period_data=sp_data1)\n",
|
||||
"ml.write_input()\n",
|
||||
"!head 'data/test.wel'"
|
||||
"!more 'data/test.wel'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -611,7 +645,23 @@
|
|||
"WARNING: unit 20 of package WEL already in use\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfwel.ModflowWel'> <class 'flopy.modflow.mfwel.ModflowWel'>\n",
|
||||
"replacing existing Package...\n",
|
||||
"/bin/sh: heda: command not found\r\n"
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# WEL package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 1 0\r\n",
|
||||
" 1 0 # stress period 1\r\n",
|
||||
" 2 2 4 3.0000000E+00\r\n",
|
||||
" -1 0 # stress period 2\r\n",
|
||||
" -1 0 # stress period 3\r\n",
|
||||
" -1 0 # stress period 4\r\n",
|
||||
" -1 0 # stress period 5\r\n",
|
||||
" -1 0 # stress period 6\r\n",
|
||||
" -1 0 # stress period 7\r\n",
|
||||
" -1 0 # stress period 8\r\n",
|
||||
" 1 0 # stress period 9\r\n",
|
||||
" 10 3 5 4.0000000E+00\r\n",
|
||||
" -1 0 # stress period 10\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -619,7 +669,7 @@
|
|||
"sp_data2 = {0: [1, 1, 3, 3.0],8:[9,2,4,4.0]}\n",
|
||||
"wel2 = flopy.modflow.ModflowWel(ml, stress_period_data=sp_data2)\n",
|
||||
"ml.write_input()\n",
|
||||
"!heda 'data/test.wel'"
|
||||
"!more 'data/test.wel'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
@ -641,16 +691,28 @@
|
|||
"WARNING: unit 20 of package WEL already in use\n",
|
||||
"****Warning -- two packages of the same type: <class 'flopy.modflow.mfwel.ModflowWel'> <class 'flopy.modflow.mfwel.ModflowWel'>\n",
|
||||
"replacing existing Package...\n",
|
||||
"\u001b[?1h\u001b=\r",
|
||||
"# WEL package for MODFLOW-2005, generated by Flopy.\r\n",
|
||||
" 2 0\r\n",
|
||||
" 1 0 # stress period 1\r\n",
|
||||
" 2 2 4 3.0\r\n",
|
||||
" 2 2 4 3.0000000E+00\r\n",
|
||||
" -1 0 # stress period 2\r\n",
|
||||
" -1 0 # stress period 3\r\n",
|
||||
" 2 0 # stress period 4\r\n",
|
||||
" 2 2 4 3.0\r\n",
|
||||
" 2 2 2 1.0\r\n",
|
||||
" -1 0 # stress period 5\r\n"
|
||||
" 2 2 4 3.0000000E+00\r\n",
|
||||
" 2 2 2 1.0000000E+00\r\n",
|
||||
" -1 0 # stress period 5\r\n",
|
||||
" 2 0 # stress period 6\r\n",
|
||||
" 2 2 4 3.0000000E+00\r\n",
|
||||
" 2 3 5 4.0000000E+00\r\n",
|
||||
" -1 0 # stress period 7\r\n",
|
||||
" -1 0 # stress period 8\r\n",
|
||||
" 2 0 # stress period 9\r\n",
|
||||
" 10 3 5 4.0000000E+00\r\n",
|
||||
" 2 3 5 4.0000000E+00\r\n",
|
||||
" -1 0 # stress period 10\r\n",
|
||||
"\r",
|
||||
"\u001b[K\u001b[?1l\u001b>"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -659,7 +721,7 @@
|
|||
" wel2.stress_period_data.append(\n",
|
||||
" wel1.stress_period_data))\n",
|
||||
"ml.write_input()\n",
|
||||
"!head 'data/test.wel'"
|
||||
"!more 'data/test.wel'"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -20,10 +20,10 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"3.6.4 | packaged by conda-forge | (default, Dec 23 2017, 16:54:01) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"numpy version: 1.14.0\n",
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -351,7 +351,7 @@
|
|||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.5"
|
||||
"version": "3.6.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
|
|
@ -18,11 +18,10 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]\n",
|
||||
"numpy version: 1.14.3\n",
|
||||
"matplotlib version: 2.2.2\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -114,7 +113,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x11d98fb38>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1d4b9acd978>"
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
|
@ -133,9 +132,9 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(model=mf)\n",
|
||||
"v = mm.plot_array(b)\n",
|
||||
"mm.plot_grid()\n",
|
||||
"pmv = flopy.plot.PlotMapView(model=mf)\n",
|
||||
"v = pmv.plot_array(b)\n",
|
||||
"pmv.plot_grid()\n",
|
||||
"plt.colorbar(v, shrink=0.5)"
|
||||
]
|
||||
},
|
||||
|
@ -196,7 +195,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x11dec2cc0>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1d4b9bb3b00>"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
|
@ -215,9 +214,9 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(model=mf)\n",
|
||||
"v = mm.plot_array(br)\n",
|
||||
"mm.plot_grid()\n",
|
||||
"pmv= flopy.plot.PlotMapView(model=mf)\n",
|
||||
"v = pmv.plot_array(br)\n",
|
||||
"pmv.plot_grid()\n",
|
||||
"plt.colorbar(v, shrink=0.5)"
|
||||
]
|
||||
},
|
||||
|
@ -236,7 +235,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x11dfb5c50>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x1d4b9c8ba90>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
@ -255,9 +254,9 @@
|
|||
}
|
||||
],
|
||||
"source": [
|
||||
"mm = flopy.plot.ModelMap(model=mf)\n",
|
||||
"v = mm.plot_array(b-br)\n",
|
||||
"mm.plot_grid()\n",
|
||||
"pmv = flopy.plot.PlotMapView(model=mf)\n",
|
||||
"v = pmv.plot_array(b-br)\n",
|
||||
"pmv.plot_grid()\n",
|
||||
"plt.colorbar(v, shrink=0.5)"
|
||||
]
|
||||
},
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -22,9 +22,9 @@
|
|||
"text": [
|
||||
"3.6.5 | packaged by conda-forge | (default, Apr 6 2018, 13:44:09) \n",
|
||||
"[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)]\n",
|
||||
"numpy version: 1.14.5\n",
|
||||
"numpy version: 1.14.2\n",
|
||||
"matplotlib version: 2.2.2\n",
|
||||
"flopy version: 3.2.10\n"
|
||||
"flopy version: 3.2.9\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
|
@ -74,7 +74,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"[<matplotlib.lines.Line2D at 0x11bcd5240>]"
|
||||
"[<matplotlib.lines.Line2D at 0x11e9b6828>]"
|
||||
]
|
||||
},
|
||||
"execution_count": 2,
|
||||
|
@ -198,7 +198,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PatchCollection at 0x11c7c82b0>"
|
||||
"<matplotlib.collections.PatchCollection at 0x12107b3c8>"
|
||||
]
|
||||
},
|
||||
"execution_count": 6,
|
||||
|
@ -254,7 +254,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PatchCollection at 0x11ccadb38>"
|
||||
"<matplotlib.collections.PatchCollection at 0x1212457f0>"
|
||||
]
|
||||
},
|
||||
"execution_count": 7,
|
||||
|
@ -308,7 +308,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.colorbar.Colorbar at 0x10a7a34e0>"
|
||||
"<matplotlib.colorbar.Colorbar at 0x10ea32550>"
|
||||
]
|
||||
},
|
||||
"execution_count": 8,
|
||||
|
@ -497,7 +497,7 @@
|
|||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"Directory structure already exists for simulation path /Users/jdhughes/Documents/Development/flopy_us/examples/Notebooks/data/triangle\n",
|
||||
"Directory structure already exists for simulation path /Users/langevin/langevin/dev/flopy3.git/examples/Notebooks/data/triangle\n",
|
||||
"writing simulation...\n",
|
||||
" writing simulation name file...\n",
|
||||
" writing simulation tdis package...\n",
|
||||
|
@ -510,33 +510,32 @@
|
|||
" writing package chd_0...\n",
|
||||
"INFORMATION: maxbound in ('gwf6', 'chd', 'dimensions') changed to 16 based on size of stress_period_data\n",
|
||||
" writing package oc...\n",
|
||||
"FloPy is using the following executable to run the model: /Users/jdhughes/.local/bin/mf6\n",
|
||||
"FloPy is using the following executable to run the model: /Users/langevin/langevin/bin/mac/mf6\n",
|
||||
" MODFLOW 6\n",
|
||||
" U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL\n",
|
||||
" VERSION 6.0.3 08/09/2018\n",
|
||||
" VERSION 6.0.2.72 05/07/2018\n",
|
||||
" ***DEVELOP MODE***\n",
|
||||
"\n",
|
||||
" MODFLOW 6 compiled Sep 24 2018 16:09:01 with GFORTRAN compiler (ver. 6.4.0)\n",
|
||||
" MODFLOW 6 compiled May 7 2018 10:16:18 with GFORTRAN compiler (ver. 6.4.0)\n",
|
||||
"\n",
|
||||
"This software has been approved for release by the U.S. Geological \n",
|
||||
"Survey (USGS). Although the software has been subjected to rigorous \n",
|
||||
"review, the USGS reserves the right to update the software as needed \n",
|
||||
"pursuant to further analysis and review. No warranty, expressed or \n",
|
||||
"implied, is made by the USGS or the U.S. Government as to the \n",
|
||||
"functionality of the software and related material nor shall the \n",
|
||||
"fact of release constitute any such warranty. Furthermore, the \n",
|
||||
"software is released on condition that neither the USGS nor the U.S. \n",
|
||||
"Government shall be held liable for any damages resulting from its \n",
|
||||
"authorized or unauthorized use. Also refer to the USGS Water \n",
|
||||
"Resources Software User Rights Notice for complete use, copyright, \n",
|
||||
"and distribution information.\n",
|
||||
"This software is preliminary or provisional and is subject to \n",
|
||||
"revision. It is being provided to meet the need for timely best \n",
|
||||
"science. The software has not received final approval by the U.S. \n",
|
||||
"Geological Survey (USGS). No warranty, expressed or implied, is made \n",
|
||||
"by the USGS or the U.S. Government as to the functionality of the \n",
|
||||
"software and related material nor shall the fact of release \n",
|
||||
"constitute any such warranty. The software is provided on the \n",
|
||||
"condition that neither the USGS nor the U.S. Government shall be held \n",
|
||||
"liable for any damages resulting from the authorized or unauthorized \n",
|
||||
"use of the software.\n",
|
||||
"\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2018/10/19 18:18:42\n",
|
||||
" Run start date and time (yyyy/mm/dd hh:mm:ss): 2018/05/11 8:04:09\n",
|
||||
"\n",
|
||||
" Writing simulation list file: mfsim.lst\n",
|
||||
" Using Simulation name file: mfsim.nam\n",
|
||||
" Solving: Stress period: 1 Time step: 1\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/10/19 18:18:42\n",
|
||||
" Elapsed run time: 0.026 Seconds\n",
|
||||
" Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/05/11 8:04:09\n",
|
||||
" Elapsed run time: 0.040 Seconds\n",
|
||||
"\n",
|
||||
" Normal termination of simulation.\n"
|
||||
]
|
||||
|
@ -597,7 +596,7 @@
|
|||
{
|
||||
"data": {
|
||||
"text/plain": [
|
||||
"<matplotlib.collections.PatchCollection at 0x11960b438>"
|
||||
"<matplotlib.collections.PatchCollection at 0x121d59e48>"
|
||||
]
|
||||
},
|
||||
"execution_count": 15,
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,295 @@
|
|||
import matplotlib as mpl
|
||||
import numpy as np
|
||||
import os
|
||||
import platform
|
||||
import sys
|
||||
|
||||
|
||||
def run():
|
||||
# run installed version of flopy or add local path
|
||||
try:
|
||||
import flopy
|
||||
except:
|
||||
fpth = os.path.abspath(os.path.join('..', '..'))
|
||||
sys.path.append(fpth)
|
||||
import flopy
|
||||
|
||||
# Set name of MODFLOW exe
|
||||
# assumes executable is in users path statement
|
||||
version = 'mf2005'
|
||||
exe_name = 'mf2005'
|
||||
exe_mp = 'mp6'
|
||||
if platform.system() == 'Windows':
|
||||
exe_name += '.exe'
|
||||
exe_mp += '.exe'
|
||||
mfexe = exe_name
|
||||
|
||||
# Set the paths
|
||||
loadpth = os.path.join('..', 'data', 'freyberg')
|
||||
modelpth = os.path.join('data')
|
||||
|
||||
# make sure modelpth directory exists
|
||||
if not os.path.exists(modelpth):
|
||||
os.makedirs(modelpth)
|
||||
|
||||
ml = flopy.modflow.Modflow.load('freyberg.nam', model_ws=loadpth,
|
||||
exe_name=exe_name, version=version)
|
||||
ml.change_model_ws(new_pth=modelpth)
|
||||
ml.write_input()
|
||||
success, buff = ml.run_model()
|
||||
if not success:
|
||||
print('Something bad happened.')
|
||||
files = ['freyberg.hds', 'freyberg.cbc']
|
||||
for f in files:
|
||||
if os.path.isfile(os.path.join(modelpth, f)):
|
||||
msg = 'Output file located: {}'.format(f)
|
||||
print(msg)
|
||||
else:
|
||||
errmsg = 'Error. Output file cannot be found: {}'.format(f)
|
||||
print(errmsg)
|
||||
|
||||
mp = flopy.modpath.Modpath('freybergmp', exe_name=exe_mp, modflowmodel=ml, model_ws=modelpth)
|
||||
mpbas = flopy.modpath.ModpathBas(mp, hnoflo=ml.bas6.hnoflo, hdry=ml.lpf.hdry,
|
||||
ibound=ml.bas6.ibound.array, prsity=0.2, prsityCB=0.2)
|
||||
sim = mp.create_mpsim(trackdir='forward', simtype='endpoint', packages='RCH')
|
||||
mp.write_input()
|
||||
mp.run_model()
|
||||
|
||||
mpp = flopy.modpath.Modpath('freybergmpp', exe_name=exe_mp, modflowmodel=ml, model_ws=modelpth)
|
||||
mpbas = flopy.modpath.ModpathBas(mpp, hnoflo=ml.bas6.hnoflo, hdry=ml.lpf.hdry,
|
||||
ibound=ml.bas6.ibound.array, prsity=0.2, prsityCB=0.2)
|
||||
sim = mpp.create_mpsim(trackdir='backward', simtype='pathline', packages='WEL')
|
||||
mpp.write_input()
|
||||
mpp.run_model()
|
||||
|
||||
|
||||
## load and run second example
|
||||
# run installed version of flopy or add local path
|
||||
try:
|
||||
import flopy
|
||||
except:
|
||||
fpth = os.path.abspath(os.path.join('..', '..'))
|
||||
sys.path.append(fpth)
|
||||
import flopy
|
||||
|
||||
print(sys.version)
|
||||
print('numpy version: {}'.format(np.__version__))
|
||||
print('matplotlib version: {}'.format(mpl.__version__))
|
||||
print('flopy version: {}'.format(flopy.__version__))
|
||||
|
||||
if not os.path.exists("data"):
|
||||
os.mkdir("data")
|
||||
|
||||
from flopy.utils.gridgen import Gridgen
|
||||
Lx = 10000.
|
||||
Ly = 10500.
|
||||
nlay = 3
|
||||
nrow = 21
|
||||
ncol = 20
|
||||
delr = Lx / ncol
|
||||
delc = Ly / nrow
|
||||
top = 400
|
||||
botm = [220, 200, 0]
|
||||
|
||||
ms = flopy.modflow.Modflow()
|
||||
dis5 = flopy.modflow.ModflowDis(ms, nlay=nlay, nrow=nrow, ncol=ncol, delr=delr,
|
||||
delc=delc, top=top, botm=botm)
|
||||
|
||||
model_name = 'mp7p2'
|
||||
model_ws = os.path.join('data', 'mp7_ex2', 'mf6')
|
||||
gridgen_ws = os.path.join(model_ws, 'gridgen')
|
||||
g = Gridgen(dis5, model_ws=gridgen_ws)
|
||||
|
||||
rf0shp = os.path.join(gridgen_ws, 'rf0')
|
||||
xmin = 7 * delr
|
||||
xmax = 12 * delr
|
||||
ymin = 8 * delc
|
||||
ymax = 13 * delc
|
||||
rfpoly = [[[(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax), (xmin, ymin)]]]
|
||||
g.add_refinement_features(rfpoly, 'polygon', 1, range(nlay))
|
||||
|
||||
rf1shp = os.path.join(gridgen_ws, 'rf1')
|
||||
xmin = 8 * delr
|
||||
xmax = 11 * delr
|
||||
ymin = 9 * delc
|
||||
ymax = 12 * delc
|
||||
rfpoly = [[[(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax), (xmin, ymin)]]]
|
||||
g.add_refinement_features(rfpoly, 'polygon', 2, range(nlay))
|
||||
|
||||
rf2shp = os.path.join(gridgen_ws, 'rf2')
|
||||
xmin = 9 * delr
|
||||
xmax = 10 * delr
|
||||
ymin = 10 * delc
|
||||
ymax = 11 * delc
|
||||
rfpoly = [[[(xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax), (xmin, ymin)]]]
|
||||
g.add_refinement_features(rfpoly, 'polygon', 3, range(nlay))
|
||||
|
||||
g.build(verbose=False)
|
||||
|
||||
gridprops = g.get_gridprops_disv()
|
||||
ncpl = gridprops['ncpl']
|
||||
top = gridprops['top']
|
||||
botm = gridprops['botm']
|
||||
nvert = gridprops['nvert']
|
||||
vertices = gridprops['vertices']
|
||||
cell2d = gridprops['cell2d']
|
||||
# cellxy = gridprops['cellxy']
|
||||
|
||||
# create simulation
|
||||
sim = flopy.mf6.MFSimulation(sim_name=model_name, version='mf6', exe_name='mf6',
|
||||
sim_ws=model_ws)
|
||||
|
||||
# create tdis package
|
||||
tdis_rc = [(1000.0, 1, 1.0)]
|
||||
tdis = flopy.mf6.ModflowTdis(sim, pname='tdis', time_units='DAYS',
|
||||
perioddata=tdis_rc)
|
||||
|
||||
# create gwf model
|
||||
gwf = flopy.mf6.ModflowGwf(sim, modelname=model_name,
|
||||
model_nam_file='{}.nam'.format(model_name))
|
||||
gwf.name_file.save_flows = True
|
||||
|
||||
# create iterative model solution and register the gwf model with it
|
||||
ims = flopy.mf6.ModflowIms(sim, pname='ims', print_option='SUMMARY',
|
||||
complexity='SIMPLE', outer_hclose=1.e-5,
|
||||
outer_maximum=100, under_relaxation='NONE',
|
||||
inner_maximum=100, inner_hclose=1.e-6,
|
||||
rcloserecord=0.1, linear_acceleration='BICGSTAB',
|
||||
scaling_method='NONE', reordering_method='NONE',
|
||||
relaxation_factor=0.99)
|
||||
sim.register_ims_package(ims, [gwf.name])
|
||||
|
||||
# disv
|
||||
disv = flopy.mf6.ModflowGwfdisv(gwf, nlay=nlay, ncpl=ncpl,
|
||||
top=top, botm=botm,
|
||||
nvert=nvert, vertices=vertices,
|
||||
cell2d=cell2d)
|
||||
|
||||
# initial conditions
|
||||
ic = flopy.mf6.ModflowGwfic(gwf, pname='ic', strt=320.)
|
||||
|
||||
# node property flow
|
||||
npf = flopy.mf6.ModflowGwfnpf(gwf, xt3doptions=[('xt3d')],
|
||||
icelltype=[1, 0, 0],
|
||||
k=[50.0, 0.01, 200.0],
|
||||
k33=[10., 0.01, 20.])
|
||||
|
||||
# wel
|
||||
wellpoints = [(4750., 5250.)]
|
||||
welcells = g.intersect(wellpoints, 'point', 0)
|
||||
# welspd = flopy.mf6.ModflowGwfwel.stress_period_data.empty(gwf, maxbound=1, aux_vars=['iface'])
|
||||
welspd = [[(2, icpl), -150000, 0] for icpl in welcells['nodenumber']]
|
||||
wel = flopy.mf6.ModflowGwfwel(gwf, print_input=True,
|
||||
auxiliary=[('iface',)],
|
||||
stress_period_data=welspd)
|
||||
|
||||
# rch
|
||||
aux = [np.ones(ncpl, dtype=np.int) * 6]
|
||||
rch = flopy.mf6.ModflowGwfrcha(gwf, recharge=0.005,
|
||||
auxiliary=[('iface',)],
|
||||
aux={0: [6]})
|
||||
# riv
|
||||
riverline = [[[(Lx - 1., Ly), (Lx - 1., 0.)]]]
|
||||
rivcells = g.intersect(riverline, 'line', 0)
|
||||
rivspd = [[(0, icpl), 320., 100000., 318] for icpl in rivcells['nodenumber']]
|
||||
riv = flopy.mf6.ModflowGwfriv(gwf, stress_period_data=rivspd)
|
||||
|
||||
# output control
|
||||
oc = flopy.mf6.ModflowGwfoc(gwf, pname='oc', budget_filerecord='{}.cbb'.format(model_name),
|
||||
head_filerecord='{}.hds'.format(model_name),
|
||||
headprintrecord=[('COLUMNS', 10, 'WIDTH', 15,
|
||||
'DIGITS', 6, 'GENERAL')],
|
||||
saverecord=[('HEAD', 'ALL'), ('BUDGET', 'ALL')],
|
||||
printrecord=[('HEAD', 'ALL'), ('BUDGET', 'ALL')])
|
||||
|
||||
sim.write_simulation()
|
||||
sim.run_simulation()
|
||||
|
||||
mp_namea = model_name + 'a_mp'
|
||||
mp_nameb = model_name + 'b_mp'
|
||||
|
||||
pcoord = np.array([[0.000, 0.125, 0.500],
|
||||
[0.000, 0.375, 0.500],
|
||||
[0.000, 0.625, 0.500],
|
||||
[0.000, 0.875, 0.500],
|
||||
[1.000, 0.125, 0.500],
|
||||
[1.000, 0.375, 0.500],
|
||||
[1.000, 0.625, 0.500],
|
||||
[1.000, 0.875, 0.500],
|
||||
[0.125, 0.000, 0.500],
|
||||
[0.375, 0.000, 0.500],
|
||||
[0.625, 0.000, 0.500],
|
||||
[0.875, 0.000, 0.500],
|
||||
[0.125, 1.000, 0.500],
|
||||
[0.375, 1.000, 0.500],
|
||||
[0.625, 1.000, 0.500],
|
||||
[0.875, 1.000, 0.500]])
|
||||
nodew = gwf.disv.ncpl.array * 2 + welcells['nodenumber'][0]
|
||||
plocs = [nodew for i in range(pcoord.shape[0])]
|
||||
|
||||
# create particle data
|
||||
pa = flopy.modpath.ParticleData(plocs, structured=False,
|
||||
localx=pcoord[:, 0],
|
||||
localy=pcoord[:, 1],
|
||||
localz=pcoord[:, 2],
|
||||
drape=0)
|
||||
|
||||
# create backward particle group
|
||||
fpth = mp_namea + '.sloc'
|
||||
pga = flopy.modpath.ParticleGroup(particlegroupname='BACKWARD1', particledata=pa,
|
||||
filename=fpth)
|
||||
|
||||
facedata = flopy.modpath.FaceDataType(drape=0,
|
||||
verticaldivisions1=10, horizontaldivisions1=10,
|
||||
verticaldivisions2=10, horizontaldivisions2=10,
|
||||
verticaldivisions3=10, horizontaldivisions3=10,
|
||||
verticaldivisions4=10, horizontaldivisions4=10,
|
||||
rowdivisions5=0, columndivisions5=0,
|
||||
rowdivisions6=4, columndivisions6=4)
|
||||
pb = flopy.modpath.NodeParticleData(subdivisiondata=facedata, nodes=nodew)
|
||||
# create forward particle group
|
||||
fpth = mp_nameb + '.sloc'
|
||||
pgb = flopy.modpath.ParticleGroupNodeTemplate(particlegroupname='BACKWARD2',
|
||||
particledata=pb,
|
||||
filename=fpth)
|
||||
|
||||
# create modpath files
|
||||
mp = flopy.modpath.Modpath7(modelname=mp_namea, flowmodel=gwf,
|
||||
exe_name='mp7', model_ws=model_ws)
|
||||
flopy.modpath.Modpath7Bas(mp, porosity=0.1)
|
||||
flopy.modpath.Modpath7Sim(mp, simulationtype='combined',
|
||||
trackingdirection='backward',
|
||||
weaksinkoption='pass_through',
|
||||
weaksourceoption='pass_through',
|
||||
referencetime=0.,
|
||||
stoptimeoption='extend',
|
||||
timepointdata=[500, 1000.],
|
||||
particlegroups=pga)
|
||||
|
||||
# write modpath datasets
|
||||
mp.write_input()
|
||||
|
||||
# run modpath
|
||||
mp.run_model()
|
||||
|
||||
# create modpath files
|
||||
mp = flopy.modpath.Modpath7(modelname=mp_nameb, flowmodel=gwf,
|
||||
exe_name='mp7', model_ws=model_ws)
|
||||
flopy.modpath.Modpath7Bas(mp, porosity=0.1)
|
||||
flopy.modpath.Modpath7Sim(mp, simulationtype='endpoint',
|
||||
trackingdirection='backward',
|
||||
weaksinkoption='pass_through',
|
||||
weaksourceoption='pass_through',
|
||||
referencetime=0.,
|
||||
stoptimeoption='extend',
|
||||
particlegroups=pgb)
|
||||
|
||||
# write modpath datasets
|
||||
mp.write_input()
|
||||
|
||||
# run modpath
|
||||
mp.run_model()
|
||||
return
|
||||
|
||||
if __name__ == "__main__":
|
||||
run()
|
|
@ -0,0 +1 @@
|
|||
Modflow6 conversion of the Freyberg simulation
|
|
@ -0,0 +1,22 @@
|
|||
BEGIN OPTIONS
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
MAXBOUND 10
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN PERIOD 1
|
||||
1 40 6 1.6900e+01
|
||||
1 40 7 1.6400e+01
|
||||
1 40 8 1.6100e+01
|
||||
1 40 9 1.5600e+01
|
||||
1 40 10 1.5100e+01
|
||||
1 40 11 1.5100e+01
|
||||
1 40 12 1.4000e+01
|
||||
1 40 13 1.3000e+01
|
||||
1 40 14 1.2500e+01
|
||||
1 40 15 1.2000e+01
|
||||
END PERIOD 1
|
|
@ -0,0 +1,144 @@
|
|||
BEGIN OPTIONS
|
||||
LENGTH_UNITS METERS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
NLAY 1
|
||||
NROW 40
|
||||
NCOL 20
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN GRIDDATA
|
||||
DELR
|
||||
CONSTANT 250.0
|
||||
DELC
|
||||
CONSTANT 250.0
|
||||
TOP
|
||||
CONSTANT 35.0
|
||||
BOTM
|
||||
INTERNAL FACTOR 1.
|
||||
1.7008e+01 1.8507e+01 1.8672e+01 1.5930e+01 1.3961e+01 1.4462e+01 8.0190e+00 1.0600e+01 8.8847e+00 7.2274e+00
|
||||
6.2511e+00 6.0061e+00 7.1143e+00 6.9039e+00 6.2443e+00 6.9450e+00 6.9855e+00 5.0310e+00 4.0061e+00 6.6584e+00
|
||||
1.9126e+01 1.7345e+01 1.8234e+01 1.3660e+01 1.3262e+01 1.3922e+01 1.0676e+01 9.9167e+00 1.1025e+01 6.4094e+00
|
||||
4.8782e+00 5.0843e+00 6.5321e+00 5.1773e+00 5.7181e+00 4.3329e+00 5.8867e+00 6.4356e+00 5.2941e+00 6.0503e+00
|
||||
1.7480e+01 1.8860e+01 1.8296e+01 1.2986e+01 1.3738e+01 1.4401e+01 9.2020e+00 1.1208e+01 8.3499e+00 8.5742e+00
|
||||
5.9810e+00 6.5199e+00 6.2453e+00 5.0066e+00 7.1720e+00 7.1635e+00 4.5908e+00 5.1325e+00 5.0524e+00 6.8011e+00
|
||||
1.7970e+01 1.8897e+01 1.9313e+01 1.4862e+01 1.3321e+01 1.5768e+01 1.1466e+01 8.7568e+00 1.2328e+01 7.0550e+00
|
||||
3.0590e+00 2.8243e+00 2.2451e+00 2.9858e+00 3.1909e+00 2.2319e+00 7.7850e+00 4.9555e+00 6.3389e+00 6.4755e+00
|
||||
1.8911e+01 1.8045e+01 1.6995e+01 1.4881e+01 1.5212e+01 1.3754e+01 8.6911e+00 1.4635e+01 1.0045e+01 4.7893e+00
|
||||
3.1688e+00 2.9762e+00 2.5813e+00 2.9683e+00 2.3507e+00 2.7028e+00 3.5056e+00 6.3335e+00 4.7777e+00 5.4066e+00
|
||||
1.5999e+01 1.8178e+01 1.6635e+01 1.3739e+01 1.3602e+01 1.4805e+01 1.5184e+01 1.2815e+01 1.4263e+01 1.0673e+01
|
||||
3.4014e+00 3.3428e+00 2.9257e+00 3.0238e+00 3.2361e+00 2.6949e+00 2.6232e+00 3.0085e+00 6.0561e+00 6.5184e+00
|
||||
1.5927e+01 1.3242e+01 1.5206e+01 1.1213e+01 1.4456e+01 1.1631e+01 1.5134e+01 1.2835e+01 1.4004e+01 8.9364e+00
|
||||
3.4679e+00 3.3814e+00 2.9236e+00 3.4947e+00 3.5715e+00 3.3131e+00 3.9369e+00 2.7150e+00 4.5148e+00 5.8774e+00
|
||||
1.9600e+01 1.4543e+01 1.4033e+01 1.3186e+01 1.5344e+01 1.4830e+01 1.4594e+01 1.5507e+01 1.4888e+01 8.8195e+00
|
||||
3.4633e+00 3.3105e+00 4.0456e+00 2.8153e+00 2.8529e+00 3.1951e+00 2.6150e+00 4.2689e+00 3.4225e+00 6.7451e+00
|
||||
1.8476e+01 1.3433e+01 1.2347e+01 1.5741e+01 0.0000e+00 0.0000e+00 0.0000e+00 1.2875e+01 8.8273e+00 5.1087e+00
|
||||
4.1368e+00 3.2677e+00 2.8839e+00 3.3258e+00 3.4857e+00 3.2112e+00 3.0806e+00 2.5045e+00 3.5168e+00 5.3489e+00
|
||||
1.9665e+01 1.3117e+01 1.5528e+01 1.4131e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0392e+01 6.3652e+00
|
||||
3.0670e+00 2.6610e+00 3.0942e+00 2.4251e+00 3.5019e+00 2.4368e+00 3.3456e+00 2.5427e+00 3.8515e+00 2.8273e+00
|
||||
1.7513e+01 1.4759e+01 1.3083e+01 1.5517e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0551e+01 5.4486e+00
|
||||
3.1347e+00 3.3698e+00 3.0613e+00 3.0557e+00 3.0613e+00 2.7351e+00 3.0226e+00 2.8656e+00 2.8963e+00 3.6134e+00
|
||||
1.2281e+01 1.3476e+01 1.4604e+01 1.4496e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.7126e+00 5.2610e+00
|
||||
2.5406e+00 4.1927e+00 3.0722e+00 3.1407e+00 2.6258e+00 3.2426e+00 3.5334e+00 2.8549e+00 2.5826e+00 3.2925e+00
|
||||
1.4142e+01 1.1962e+01 1.3896e+01 1.2913e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.6031e+00 5.6522e+00
|
||||
1.7532e+00 1.6521e+00 1.4932e+00 1.7338e+00 1.6462e+00 1.8513e+00 3.2896e+00 2.6617e+00 3.7838e+00 3.4377e+00
|
||||
1.4960e+01 1.3669e+01 1.1699e+01 1.0423e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.4056e+00 5.6336e+00
|
||||
1.6262e+00 1.6896e+00 1.2846e+00 1.5438e+00 1.8402e+00 1.5956e+00 3.7104e+00 3.1993e+00 3.2448e+00 2.7462e+00
|
||||
1.2852e+01 1.3661e+01 1.0573e+01 9.0339e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.2656e+00 6.6003e+00
|
||||
1.0748e+00 1.7295e+00 1.4544e+00 1.5198e+00 1.1214e+00 1.6756e+00 4.3909e+00 2.4590e+00 2.0083e+00 3.4206e+00
|
||||
1.4403e+01 1.5213e+01 1.0409e+01 9.0355e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0111e+01 3.6992e+00
|
||||
1.4232e+00 1.7499e+00 1.6581e+00 1.5920e+00 1.6104e+00 1.2725e+00 4.1903e+00 2.9122e+00 3.1891e+00 3.6998e+00
|
||||
1.3191e+01 9.3046e+00 9.2241e+00 1.0177e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.0262e+00 6.2127e+00
|
||||
1.3763e+00 1.2943e+00 1.4516e+00 1.3079e+00 1.1092e+00 1.3149e+00 2.9437e+00 3.6516e+00 3.2169e+00 3.2411e+00
|
||||
1.3757e+01 9.6697e+00 6.9156e+00 1.0092e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0803e+01 6.4464e+00
|
||||
1.3273e+00 1.5796e+00 1.1219e+00 1.2769e+00 1.5814e+00 1.4652e+00 1.6370e+00 2.8829e+00 2.4030e+00 2.3025e+00
|
||||
1.3631e+01 1.1051e+01 6.0632e+00 1.1089e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.6777e+00 6.2188e+00
|
||||
1.7076e+00 1.1244e+00 1.2750e+00 1.5545e+00 1.4465e+00 1.6284e+00 1.5016e+00 2.5399e+00 1.7712e+00 4.0115e+00
|
||||
1.4269e+01 1.0143e+01 3.9943e+00 1.0645e+01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0360e+01 5.3413e+00
|
||||
1.1137e+00 1.3405e+00 1.4209e+00 1.5649e+00 2.2000e+00 1.4498e+00 1.5241e+00 2.9436e+00 3.1003e+00 2.8790e+00
|
||||
1.2244e+01 9.7607e+00 7.8784e+00 9.5028e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.7173e+00 3.9539e+00
|
||||
1.8367e+00 1.3385e+00 9.3665e-01 1.3960e+00 1.7390e+00 1.5907e+00 1.5251e+00 2.9159e+00 3.8223e+00 2.6267e+00
|
||||
1.4718e+01 1.0695e+01 4.7303e+00 8.2807e+00 0.0000e+00 0.0000e+00 1.0112e+01 1.2156e+01 5.9685e+00 6.0099e+00
|
||||
1.1577e+00 1.6447e+00 1.8229e+00 1.3292e+00 1.3365e+00 1.8093e+00 1.3093e+00 1.6470e+00 2.4618e+00 3.1563e+00
|
||||
1.2024e+01 9.3289e+00 5.4725e+00 8.6354e+00 8.4379e+00 0.0000e+00 1.0135e+01 1.1927e+01 5.9917e+00 6.0854e+00
|
||||
1.2831e+00 1.8849e+00 1.1641e+00 2.0084e+00 1.3688e+00 1.3880e+00 1.2512e+00 1.4895e+00 1.6991e+00 2.9707e+00
|
||||
1.3803e+01 8.9535e+00 7.1000e+00 9.3852e+00 1.1012e+01 1.1410e+01 1.0451e+01 4.7665e+00 7.0223e+00 5.0816e+00
|
||||
1.4899e+00 1.3294e+00 1.6026e+00 1.1729e+00 1.4137e+00 1.7779e+00 1.0661e+00 1.4885e+00 2.9373e+00 3.1760e+00
|
||||
1.4265e+01 9.0847e+00 5.2856e+00 1.2813e+01 1.1107e+01 5.2416e+00 5.7991e+00 5.6034e+00 6.7668e+00 1.7813e+00
|
||||
6.4551e-01 3.4632e-01 3.3457e-01 6.1037e-01 2.9866e-01 7.5990e-01 2.2484e+00 1.4189e+00 2.8623e+00 2.6629e+00
|
||||
1.4872e+01 1.0049e+01 1.0579e+01 7.2766e+00 6.5425e+00 4.1703e+00 6.1618e+00 4.0361e+00 3.4598e+00 2.7051e+00
|
||||
4.4935e-01 6.3725e-01 5.4417e-01 5.6191e-01 4.7260e-01 2.4597e-01 1.1445e+00 1.5841e+00 3.8255e+00 3.5807e+00
|
||||
1.3410e+01 1.0742e+01 9.4348e+00 1.0049e+01 6.5546e+00 5.9833e+00 4.5127e+00 4.5002e+00 2.7058e+00 3.4134e+00
|
||||
3.0495e-01 5.4159e-01 4.2427e-01 4.6775e-01 3.8476e-01 4.7940e-01 1.7216e+00 1.6441e+00 1.3825e+00 3.4871e+00
|
||||
1.3735e+01 1.2127e+01 9.4241e+00 1.0306e+01 7.1944e+00 6.8039e+00 5.4021e+00 3.4308e+00 2.7098e+00 1.9810e+00
|
||||
8.6971e-01 3.3906e-01 4.9520e-01 1.8621e-01 2.1029e-01 3.7993e-01 1.3946e+00 1.5522e+00 1.5273e+00 2.7037e+00
|
||||
1.5017e+01 1.0897e+01 1.0499e+01 1.0834e+01 6.6445e+00 6.4540e+00 5.4257e+00 2.4875e+00 2.6592e+00 1.8435e+00
|
||||
1.8291e-01 4.2357e-02 7.8516e-01 4.4038e-01 6.8956e-01 8.4630e-01 1.4611e+00 1.3011e+00 1.6247e+00 3.5610e+00
|
||||
1.4111e+01 9.8787e+00 8.0351e+00 5.3384e+00 6.2775e+00 5.2240e+00 5.5896e+00 5.5891e+00 2.6451e+00 1.7568e+00
|
||||
9.1572e-01 5.6926e-01 2.3439e-01 4.4421e-01 1.3945e-02 6.3471e-01 4.3162e-01 1.4960e+00 1.7119e+00 3.4404e+00
|
||||
1.1296e+01 9.6566e+00 7.7356e+00 1.1020e+01 4.5768e+00 7.2037e+00 7.3885e+00 5.2052e+00 2.7217e+00 1.3624e+00
|
||||
3.3393e-01 6.9415e-01 6.5321e-01 5.9193e-01 4.1246e-01 4.9522e-01 7.1503e-01 1.0985e+00 1.6975e+00 2.1805e+00
|
||||
1.2594e+01 9.9103e+00 1.0769e+01 4.5977e+00 5.6607e+00 6.2810e+00 5.7616e+00 2.4491e+00 3.4721e+00 2.0608e+00
|
||||
6.8552e-01 2.5336e-01 9.1441e-01 5.4346e-01 5.6949e-01 7.5008e-01 2.3777e-01 1.2186e+00 1.1072e+00 3.1487e+00
|
||||
0.0000e+00 8.8675e+00 1.0937e+01 5.9463e+00 6.7191e+00 6.5623e+00 5.4118e+00 3.4439e+00 2.3840e+00 1.9104e+00
|
||||
5.0746e-01 6.8438e-01 1.8877e-01 4.6541e-01 7.1091e-01 3.4071e-01 1.5942e-01 1.4753e+00 1.0008e+00 2.4790e+00
|
||||
0.0000e+00 0.0000e+00 1.0951e+01 6.1613e+00 6.3923e+00 6.7709e+00 2.9707e+00 3.0016e+00 3.1640e+00 9.2741e-01
|
||||
1.6310e-01 6.6005e-01 2.6561e-01 3.3311e-01 6.9232e-01 4.8345e-01 6.3888e-01 1.3737e+00 1.6797e+00 1.4661e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 7.3548e+00 5.1731e+00 4.9708e+00 5.2845e+00 6.2087e+00 3.1052e+00 1.3327e+00
|
||||
8.0084e-01 3.9921e-01 4.7913e-01 1.8351e-01 5.8788e-01 7.4344e-01 8.5021e-01 1.9328e+00 1.8556e+00 2.0022e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 4.2779e+00 4.8438e+00 5.5892e+00 5.0886e+00 3.2245e+00 1.6683e+00
|
||||
6.8472e-01 4.0313e-01 5.1307e-01 5.3072e-01 2.5027e-01 6.3302e-01 6.8430e-01 1.4369e+00 1.6174e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 5.8926e+00 6.2475e+00 7.1632e+00 3.0387e+00 2.2536e+00 1.6464e+00
|
||||
3.1075e-01 -2.0274e-01 5.4896e-01 1.0779e+00 6.4944e-02 4.2170e-01 3.1244e-01 1.7811e+00 1.4466e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 6.5855e+00 4.7402e+00 1.7855e+00 2.9122e+00 1.6155e+00
|
||||
7.0832e-01 4.1666e-01 5.6100e-01 4.7438e-01 3.7151e-01 3.2872e-01 4.9578e-01 1.4285e+00 0.0000e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 5.1503e+00 5.8960e+00 2.3450e+00 2.7254e+00 1.4189e+00
|
||||
1.2200e-01 4.6661e-01 4.9436e-01 1.6616e-01 6.7492e-01 6.8190e-01 -1.6633e-03 0.0000e+00 0.0000e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 6.9138e+00 4.5808e+00 2.5275e+00 2.6038e+00 1.4444e+00
|
||||
5.3652e-01 2.2531e-01 5.8956e-01 6.0786e-01 5.0599e-01 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
|
||||
IDOMAIN
|
||||
INTERNAL FACTOR 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
|
||||
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
|
||||
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0
|
||||
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0
|
||||
0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0
|
||||
END GRIDDATA
|
||||
|
||||
|
Binary file not shown.
|
@ -0,0 +1,87 @@
|
|||
BEGIN OPTIONS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN GRIDDATA
|
||||
STRT
|
||||
INTERNAL FACTOR 1.
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 1.6900e+01 1.6400e+01 1.6100e+01 1.5600e+01 1.5100e+01
|
||||
1.4000e+01 1.3000e+01 1.2500e+01 1.2000e+01 1.1400e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01 4.5000e+01
|
||||
END GRIDDATA
|
|
@ -0,0 +1,18 @@
|
|||
BEGIN OPTIONS
|
||||
LIST freyberg.lst
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN PACKAGES
|
||||
DIS6 freyberg.dis
|
||||
IC6 freyberg.ic
|
||||
OC6 freyberg.oc
|
||||
NPF6 freyberg.npf
|
||||
STO6 freyberg.sto
|
||||
CHD6 freyberg.chd
|
||||
RIV6 freyberg.riv
|
||||
WEL6 freyberg.wel
|
||||
RCH6 freyberg.rch
|
||||
END PACKAGES
|
|
@ -0,0 +1,173 @@
|
|||
BEGIN OPTIONS
|
||||
SAVE_FLOWS
|
||||
SAVE_SPECIFIC_DISCHARGE
|
||||
END OPTIONS
|
||||
|
||||
BEGIN GRIDDATA
|
||||
ICELLTYPE
|
||||
CONSTANT 1
|
||||
K
|
||||
INTERNAL FACTOR 1.
|
||||
1.4519e-04 1.4133e-04 1.4430e-04 1.1095e-04 1.1270e-04 1.1874e-04 1.0534e-04 1.1486e-04 1.2146e-04 1.0406e-04
|
||||
9.2500e-05 9.5371e-05 9.0973e-05 1.1631e-04 1.1230e-04 1.0606e-04 1.1380e-04 1.1453e-04 1.1209e-04 1.1072e-04
|
||||
1.4872e-04 1.4801e-04 1.0451e-04 1.1583e-04 1.0549e-04 1.1086e-04 1.0583e-04 1.1313e-04 1.1917e-04 9.8568e-05
|
||||
9.1953e-05 1.0080e-04 9.2377e-05 1.0490e-04 1.1925e-04 1.0757e-04 8.1616e-05 1.1389e-04 1.1712e-04 1.0178e-04
|
||||
1.4116e-04 1.5908e-04 1.0890e-04 1.1269e-04 1.1555e-04 1.1075e-04 1.0941e-04 1.1592e-04 1.0382e-04 8.9436e-05
|
||||
8.6446e-05 8.7584e-05 8.5877e-05 1.1916e-04 1.0532e-04 1.1370e-04 8.2323e-05 1.0666e-04 1.0996e-04 9.9535e-05
|
||||
1.0746e-04 9.3762e-05 1.1554e-04 1.1843e-04 1.1296e-04 1.1367e-04 1.0777e-04 1.0783e-04 1.1037e-04 9.0274e-05
|
||||
8.5356e-05 9.4502e-05 9.3435e-05 1.0082e-04 9.8598e-05 8.1940e-05 8.5041e-05 1.1348e-04 1.0612e-04 1.0760e-04
|
||||
1.0801e-04 9.5925e-05 1.1101e-04 1.1341e-04 1.2172e-04 1.1192e-04 8.8969e-05 9.1672e-05 9.6538e-05 8.8196e-05
|
||||
9.5908e-05 9.5761e-05 8.8283e-05 1.0958e-04 1.0490e-04 7.6922e-05 8.7297e-05 1.0055e-04 1.1379e-04 1.0021e-04
|
||||
1.1054e-04 8.3095e-05 9.8526e-05 9.2557e-05 8.1495e-05 9.1777e-05 8.7956e-05 9.1969e-05 9.4312e-05 8.6512e-05
|
||||
8.7914e-05 9.1530e-05 9.4609e-05 1.1036e-04 9.8909e-05 8.6797e-05 9.4338e-05 1.0964e-04 1.0882e-04 1.0123e-04
|
||||
1.1299e-04 9.2286e-05 9.2851e-05 8.1656e-05 7.9373e-05 8.9353e-05 8.7365e-05 8.7279e-05 9.0789e-05 9.2645e-05
|
||||
7.1984e-05 8.0928e-05 8.8145e-05 8.7979e-05 8.0673e-05 9.4433e-05 9.5942e-05 8.9335e-05 8.8623e-05 1.1476e-04
|
||||
1.0904e-04 8.9934e-05 9.4232e-05 1.1361e-04 1.0925e-04 1.0873e-04 1.1250e-04 8.0011e-05 8.6955e-05 8.6395e-05
|
||||
6.7432e-05 8.4388e-05 9.7283e-05 9.1135e-05 9.1687e-05 9.9609e-05 8.1053e-05 8.4300e-05 9.7756e-05 1.0835e-04
|
||||
1.1825e-04 8.3602e-05 8.8391e-05 1.1790e-04 0.0000e+00 0.0000e+00 0.0000e+00 1.0816e-04 9.0249e-05 8.4678e-05
|
||||
6.4335e-05 8.6046e-05 8.6168e-05 9.0632e-05 9.1142e-05 8.9446e-05 8.4333e-05 9.7260e-05 9.0651e-05 1.1732e-04
|
||||
1.0794e-04 9.4846e-05 9.1230e-05 1.0824e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.1618e-04 8.4621e-05
|
||||
7.4679e-05 8.4881e-05 8.2917e-05 8.7025e-05 9.1894e-05 9.3444e-05 1.0041e-04 8.8884e-05 9.4005e-05 1.1406e-04
|
||||
1.1682e-04 8.4325e-05 8.4238e-05 1.0143e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0418e-04 9.0842e-05
|
||||
6.0822e-05 6.3944e-05 6.9054e-05 8.7967e-05 9.2158e-05 8.0290e-05 9.3148e-05 7.7120e-05 9.2821e-05 8.3649e-05
|
||||
1.1720e-04 9.5522e-05 8.8707e-05 1.0090e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0904e-04 9.0023e-05
|
||||
7.3492e-05 7.5445e-05 6.9703e-05 8.0582e-05 9.3026e-05 6.2411e-05 1.0441e-04 8.1632e-05 9.1962e-05 1.0326e-04
|
||||
1.0711e-04 9.6756e-05 8.6163e-05 1.0725e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.1079e-04 8.9971e-05
|
||||
6.1131e-05 9.2624e-05 8.3422e-05 9.4859e-05 9.1323e-05 8.8779e-05 8.4896e-05 9.1698e-05 8.0821e-05 8.5484e-05
|
||||
1.0850e-04 8.7752e-05 8.1362e-05 1.1820e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0379e-04 8.7686e-05
|
||||
7.0353e-05 6.8921e-05 6.6020e-05 9.1458e-05 9.9829e-05 7.8521e-05 9.7106e-05 8.6929e-05 9.9466e-05 8.6965e-05
|
||||
1.1011e-04 8.5807e-05 8.7168e-05 1.2059e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.8618e-05 8.4750e-05
|
||||
5.6106e-05 7.5222e-05 7.1627e-05 6.9635e-05 6.9698e-05 7.3190e-05 7.0016e-05 8.2969e-05 8.8915e-05 1.1788e-04
|
||||
1.0336e-04 9.1925e-05 9.2468e-05 1.0528e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.8415e-05 6.7298e-05
|
||||
4.7462e-05 6.5726e-05 7.2786e-05 6.9951e-05 7.1939e-05 6.7826e-05 7.6875e-05 9.4538e-05 9.3703e-05 1.0538e-04
|
||||
1.1538e-04 9.1526e-05 9.1657e-05 1.1229e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.0591e-05 7.3164e-05
|
||||
4.8657e-05 7.5407e-05 7.1521e-05 7.2492e-05 6.7225e-05 6.2568e-05 6.5337e-05 8.9570e-05 9.0378e-05 1.1846e-04
|
||||
1.0890e-04 8.3832e-05 9.5291e-05 1.0301e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.2549e-05 7.7325e-05
|
||||
5.2625e-05 5.6833e-05 7.3047e-05 7.1842e-05 7.3694e-05 7.6733e-05 7.2683e-05 8.5744e-05 8.9075e-05 1.1263e-04
|
||||
1.0916e-04 9.2971e-05 9.4729e-05 1.0387e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.1593e-05 6.4889e-05
|
||||
5.4538e-05 4.0629e-05 5.9753e-05 7.0713e-05 7.5479e-05 7.5960e-05 6.7998e-05 8.8101e-05 1.0071e-04 1.1144e-04
|
||||
1.0971e-04 9.2156e-05 8.3783e-05 1.1144e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.7846e-05 7.4218e-05
|
||||
4.7771e-05 4.4970e-05 5.9239e-05 7.0118e-05 6.9939e-05 7.5916e-05 6.8927e-05 8.7802e-05 8.7225e-05 1.1198e-04
|
||||
1.1563e-04 8.4280e-05 9.1334e-05 1.2205e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.9710e-05 6.9535e-05
|
||||
4.9978e-05 5.1991e-05 3.8217e-05 7.9127e-05 6.9971e-05 6.8921e-05 6.7217e-05 8.0283e-05 8.2854e-05 1.0893e-04
|
||||
1.1067e-04 9.0779e-05 9.6327e-05 1.1647e-04 0.0000e+00 0.0000e+00 1.1313e-04 1.1042e-04 8.9089e-05 7.1102e-05
|
||||
5.1240e-05 4.1288e-05 4.8677e-05 6.8856e-05 7.2503e-05 6.6003e-05 7.1811e-05 9.4308e-05 8.8201e-05 1.0326e-04
|
||||
1.0638e-04 9.1123e-05 8.2815e-05 1.1494e-04 1.0909e-04 0.0000e+00 1.1341e-04 8.3929e-05 8.6367e-05 6.7336e-05
|
||||
4.7795e-05 4.5199e-05 3.9006e-05 7.6617e-05 7.0801e-05 7.3657e-05 5.3390e-05 7.7600e-05 8.6802e-05 1.0948e-04
|
||||
1.1354e-04 9.5361e-05 8.7287e-05 8.8395e-05 1.0278e-04 1.1000e-04 9.7376e-05 8.4717e-05 9.9171e-05 7.2117e-05
|
||||
5.0651e-05 5.2520e-05 4.6987e-05 7.2796e-05 7.4366e-05 5.1577e-05 7.5595e-05 6.9359e-05 9.5135e-05 8.9246e-05
|
||||
1.1324e-04 9.2068e-05 9.1696e-05 9.2643e-05 9.1847e-05 9.0922e-05 8.9163e-05 8.3142e-05 6.5172e-05 7.7334e-05
|
||||
5.2680e-05 5.1423e-05 4.1563e-05 6.7371e-05 7.6383e-05 4.7639e-05 7.1104e-05 7.5812e-05 9.3540e-05 9.4096e-05
|
||||
1.1422e-04 9.1248e-05 9.5919e-05 6.7356e-05 9.1177e-05 8.4514e-05 8.9231e-05 9.4962e-05 6.9486e-05 7.0017e-05
|
||||
4.8127e-05 4.9474e-05 4.7601e-05 7.7646e-05 7.5471e-05 4.8005e-05 7.7294e-05 7.8978e-05 9.4411e-05 8.8448e-05
|
||||
1.1750e-04 8.3789e-05 9.9090e-05 9.1667e-05 6.6395e-05 8.7452e-05 8.9907e-05 6.5069e-05 6.8746e-05 5.2196e-05
|
||||
1.7188e-05 5.3547e-05 4.6130e-05 4.9050e-05 4.9852e-05 4.5186e-05 6.1880e-05 6.2675e-05 7.2981e-05 9.4912e-05
|
||||
1.0121e-04 1.0749e-04 8.3865e-05 8.8732e-05 9.2318e-05 8.3038e-05 6.1068e-05 5.4771e-05 6.8963e-05 3.9493e-05
|
||||
3.9971e-05 4.8827e-05 5.0589e-05 4.6833e-05 4.8995e-05 4.5298e-05 5.2202e-05 7.0280e-05 7.1851e-05 7.9058e-05
|
||||
1.0479e-04 1.1048e-04 9.0929e-05 9.0438e-05 9.6687e-05 7.3544e-05 5.6558e-05 1.3291e-05 6.9569e-05 6.1097e-05
|
||||
3.2518e-05 5.4427e-05 5.2243e-05 4.2881e-05 5.4275e-05 2.6927e-05 4.6776e-05 4.8508e-05 7.3863e-05 7.7007e-05
|
||||
1.0231e-04 1.1665e-04 9.7414e-05 9.7818e-05 9.9905e-05 7.6118e-05 1.5903e-05 1.8632e-05 1.5605e-05 3.3112e-05
|
||||
2.4920e-05 4.9826e-05 5.4471e-05 4.7016e-05 5.0789e-05 2.7186e-05 3.7544e-05 5.0323e-05 5.1742e-05 6.0367e-05
|
||||
1.1081e-04 8.5252e-05 8.5159e-05 9.2173e-05 7.2564e-05 3.9214e-05 2.9588e-05 1.9679e-05 3.2871e-05 2.4727e-05
|
||||
3.1276e-05 4.8333e-05 5.4999e-05 5.0009e-05 3.3352e-05 1.6198e-05 2.6468e-05 2.0913e-05 4.6282e-05 4.8252e-05
|
||||
1.0927e-04 8.6221e-05 8.7046e-05 9.0613e-05 9.6167e-05 6.6296e-05 8.7105e-06 2.7710e-05 2.8692e-05 3.5790e-05
|
||||
2.6652e-05 3.3906e-05 5.4819e-05 5.3427e-05 1.8368e-05 1.8581e-05 2.4460e-05 2.1743e-05 5.1845e-05 5.7560e-05
|
||||
0.0000e+00 9.1168e-05 8.8311e-05 8.9662e-05 8.8188e-05 8.5993e-05 6.8958e-05 4.7757e-05 4.0155e-06 2.6535e-05
|
||||
2.4615e-05 2.0088e-05 1.8464e-05 5.9978e-05 5.0322e-05 4.5190e-05 2.5805e-05 4.5699e-05 4.7711e-05 7.5000e-05
|
||||
0.0000e+00 0.0000e+00 8.1420e-05 8.9537e-05 9.7629e-05 6.5551e-05 7.1294e-05 5.2722e-05 3.9388e-05 3.8161e-05
|
||||
2.4906e-05 2.5367e-05 1.7740e-05 5.1189e-05 4.3841e-05 5.0900e-05 4.2575e-05 5.7366e-05 6.6453e-05 9.0433e-05
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 6.6183e-05 7.6446e-05 6.4644e-05 6.0972e-05 7.7392e-05 4.0153e-05 2.6303e-05
|
||||
2.2206e-05 1.4376e-05 3.8817e-05 4.5784e-05 4.8904e-05 5.3954e-05 4.9559e-05 4.6416e-05 7.6744e-05 8.8537e-05
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 7.4487e-05 7.4167e-05 7.1272e-05 5.2367e-05 4.8857e-05 1.5887e-05
|
||||
2.5459e-05 2.1132e-05 2.6919e-05 5.3746e-05 4.9682e-05 4.6821e-05 4.7121e-05 6.6739e-05 1.0134e-04 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.7203e-05 7.1744e-05 6.4737e-05 5.4136e-05 5.1360e-05 2.5884e-05
|
||||
2.6277e-05 2.9699e-05 2.0331e-05 5.1653e-05 4.0941e-05 5.0952e-05 7.4337e-05 7.1120e-05 8.8050e-05 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 7.4433e-05 6.8980e-05 4.7815e-05 6.2181e-05 1.5906e-05
|
||||
2.0391e-05 2.7183e-05 1.7266e-05 2.0832e-05 2.8546e-05 5.4538e-05 5.0747e-05 6.3092e-05 0.0000e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 6.8794e-05 7.8753e-05 6.5341e-05 5.2581e-05 2.3315e-05
|
||||
2.4392e-05 2.9250e-05 2.7525e-05 1.7968e-05 3.2661e-05 4.2436e-05 6.3425e-05 0.0000e+00 0.0000e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.4751e-05 5.3151e-05 5.1087e-05 2.6390e-05 2.8625e-05
|
||||
2.3886e-05 1.6100e-05 1.7895e-05 1.5188e-05 4.6163e-05 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
|
||||
K33
|
||||
INTERNAL FACTOR 1.
|
||||
1.4519e-04 1.4133e-04 1.4430e-04 1.1095e-04 1.1270e-04 1.1874e-04 1.0534e-04 1.1486e-04 1.2146e-04 1.0406e-04
|
||||
9.2500e-05 9.5371e-05 9.0973e-05 1.1631e-04 1.1230e-04 1.0606e-04 1.1380e-04 1.1453e-04 1.1209e-04 1.1072e-04
|
||||
1.4872e-04 1.4801e-04 1.0451e-04 1.1583e-04 1.0549e-04 1.1086e-04 1.0583e-04 1.1313e-04 1.1917e-04 9.8568e-05
|
||||
9.1953e-05 1.0080e-04 9.2377e-05 1.0490e-04 1.1925e-04 1.0757e-04 8.1616e-05 1.1389e-04 1.1712e-04 1.0178e-04
|
||||
1.4116e-04 1.5908e-04 1.0890e-04 1.1269e-04 1.1555e-04 1.1075e-04 1.0941e-04 1.1592e-04 1.0382e-04 8.9436e-05
|
||||
8.6446e-05 8.7584e-05 8.5877e-05 1.1916e-04 1.0532e-04 1.1370e-04 8.2323e-05 1.0666e-04 1.0996e-04 9.9535e-05
|
||||
1.0746e-04 9.3762e-05 1.1554e-04 1.1843e-04 1.1296e-04 1.1367e-04 1.0777e-04 1.0783e-04 1.1037e-04 9.0274e-05
|
||||
8.5356e-05 9.4502e-05 9.3435e-05 1.0082e-04 9.8598e-05 8.1940e-05 8.5041e-05 1.1348e-04 1.0612e-04 1.0760e-04
|
||||
1.0801e-04 9.5925e-05 1.1101e-04 1.1341e-04 1.2172e-04 1.1192e-04 8.8969e-05 9.1672e-05 9.6538e-05 8.8196e-05
|
||||
9.5908e-05 9.5761e-05 8.8283e-05 1.0958e-04 1.0490e-04 7.6922e-05 8.7297e-05 1.0055e-04 1.1379e-04 1.0021e-04
|
||||
1.1054e-04 8.3095e-05 9.8526e-05 9.2557e-05 8.1495e-05 9.1777e-05 8.7956e-05 9.1969e-05 9.4312e-05 8.6512e-05
|
||||
8.7914e-05 9.1530e-05 9.4609e-05 1.1036e-04 9.8909e-05 8.6797e-05 9.4338e-05 1.0964e-04 1.0882e-04 1.0123e-04
|
||||
1.1299e-04 9.2286e-05 9.2851e-05 8.1656e-05 7.9373e-05 8.9353e-05 8.7365e-05 8.7279e-05 9.0789e-05 9.2645e-05
|
||||
7.1984e-05 8.0928e-05 8.8145e-05 8.7979e-05 8.0673e-05 9.4433e-05 9.5942e-05 8.9335e-05 8.8623e-05 1.1476e-04
|
||||
1.0904e-04 8.9934e-05 9.4232e-05 1.1361e-04 1.0925e-04 1.0873e-04 1.1250e-04 8.0011e-05 8.6955e-05 8.6395e-05
|
||||
6.7432e-05 8.4388e-05 9.7283e-05 9.1135e-05 9.1687e-05 9.9609e-05 8.1053e-05 8.4300e-05 9.7756e-05 1.0835e-04
|
||||
1.1825e-04 8.3602e-05 8.8391e-05 1.1790e-04 0.0000e+00 0.0000e+00 0.0000e+00 1.0816e-04 9.0249e-05 8.4678e-05
|
||||
6.4335e-05 8.6046e-05 8.6168e-05 9.0632e-05 9.1142e-05 8.9446e-05 8.4333e-05 9.7260e-05 9.0651e-05 1.1732e-04
|
||||
1.0794e-04 9.4846e-05 9.1230e-05 1.0824e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.1618e-04 8.4621e-05
|
||||
7.4679e-05 8.4881e-05 8.2917e-05 8.7025e-05 9.1894e-05 9.3444e-05 1.0041e-04 8.8884e-05 9.4005e-05 1.1406e-04
|
||||
1.1682e-04 8.4325e-05 8.4238e-05 1.0143e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0418e-04 9.0842e-05
|
||||
6.0822e-05 6.3944e-05 6.9054e-05 8.7967e-05 9.2158e-05 8.0290e-05 9.3148e-05 7.7120e-05 9.2821e-05 8.3649e-05
|
||||
1.1720e-04 9.5522e-05 8.8707e-05 1.0090e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0904e-04 9.0023e-05
|
||||
7.3492e-05 7.5445e-05 6.9703e-05 8.0582e-05 9.3026e-05 6.2411e-05 1.0441e-04 8.1632e-05 9.1962e-05 1.0326e-04
|
||||
1.0711e-04 9.6756e-05 8.6163e-05 1.0725e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.1079e-04 8.9971e-05
|
||||
6.1131e-05 9.2624e-05 8.3422e-05 9.4859e-05 9.1323e-05 8.8779e-05 8.4896e-05 9.1698e-05 8.0821e-05 8.5484e-05
|
||||
1.0850e-04 8.7752e-05 8.1362e-05 1.1820e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 1.0379e-04 8.7686e-05
|
||||
7.0353e-05 6.8921e-05 6.6020e-05 9.1458e-05 9.9829e-05 7.8521e-05 9.7106e-05 8.6929e-05 9.9466e-05 8.6965e-05
|
||||
1.1011e-04 8.5807e-05 8.7168e-05 1.2059e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.8618e-05 8.4750e-05
|
||||
5.6106e-05 7.5222e-05 7.1627e-05 6.9635e-05 6.9698e-05 7.3190e-05 7.0016e-05 8.2969e-05 8.8915e-05 1.1788e-04
|
||||
1.0336e-04 9.1925e-05 9.2468e-05 1.0528e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.8415e-05 6.7298e-05
|
||||
4.7462e-05 6.5726e-05 7.2786e-05 6.9951e-05 7.1939e-05 6.7826e-05 7.6875e-05 9.4538e-05 9.3703e-05 1.0538e-04
|
||||
1.1538e-04 9.1526e-05 9.1657e-05 1.1229e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.0591e-05 7.3164e-05
|
||||
4.8657e-05 7.5407e-05 7.1521e-05 7.2492e-05 6.7225e-05 6.2568e-05 6.5337e-05 8.9570e-05 9.0378e-05 1.1846e-04
|
||||
1.0890e-04 8.3832e-05 9.5291e-05 1.0301e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.2549e-05 7.7325e-05
|
||||
5.2625e-05 5.6833e-05 7.3047e-05 7.1842e-05 7.3694e-05 7.6733e-05 7.2683e-05 8.5744e-05 8.9075e-05 1.1263e-04
|
||||
1.0916e-04 9.2971e-05 9.4729e-05 1.0387e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.1593e-05 6.4889e-05
|
||||
5.4538e-05 4.0629e-05 5.9753e-05 7.0713e-05 7.5479e-05 7.5960e-05 6.7998e-05 8.8101e-05 1.0071e-04 1.1144e-04
|
||||
1.0971e-04 9.2156e-05 8.3783e-05 1.1144e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.7846e-05 7.4218e-05
|
||||
4.7771e-05 4.4970e-05 5.9239e-05 7.0118e-05 6.9939e-05 7.5916e-05 6.8927e-05 8.7802e-05 8.7225e-05 1.1198e-04
|
||||
1.1563e-04 8.4280e-05 9.1334e-05 1.2205e-04 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.9710e-05 6.9535e-05
|
||||
4.9978e-05 5.1991e-05 3.8217e-05 7.9127e-05 6.9971e-05 6.8921e-05 6.7217e-05 8.0283e-05 8.2854e-05 1.0893e-04
|
||||
1.1067e-04 9.0779e-05 9.6327e-05 1.1647e-04 0.0000e+00 0.0000e+00 1.1313e-04 1.1042e-04 8.9089e-05 7.1102e-05
|
||||
5.1240e-05 4.1288e-05 4.8677e-05 6.8856e-05 7.2503e-05 6.6003e-05 7.1811e-05 9.4308e-05 8.8201e-05 1.0326e-04
|
||||
1.0638e-04 9.1123e-05 8.2815e-05 1.1494e-04 1.0909e-04 0.0000e+00 1.1341e-04 8.3929e-05 8.6367e-05 6.7336e-05
|
||||
4.7795e-05 4.5199e-05 3.9006e-05 7.6617e-05 7.0801e-05 7.3657e-05 5.3390e-05 7.7600e-05 8.6802e-05 1.0948e-04
|
||||
1.1354e-04 9.5361e-05 8.7287e-05 8.8395e-05 1.0278e-04 1.1000e-04 9.7376e-05 8.4717e-05 9.9171e-05 7.2117e-05
|
||||
5.0651e-05 5.2520e-05 4.6987e-05 7.2796e-05 7.4366e-05 5.1577e-05 7.5595e-05 6.9359e-05 9.5135e-05 8.9246e-05
|
||||
1.1324e-04 9.2068e-05 9.1696e-05 9.2643e-05 9.1847e-05 9.0922e-05 8.9163e-05 8.3142e-05 6.5172e-05 7.7334e-05
|
||||
5.2680e-05 5.1423e-05 4.1563e-05 6.7371e-05 7.6383e-05 4.7639e-05 7.1104e-05 7.5812e-05 9.3540e-05 9.4096e-05
|
||||
1.1422e-04 9.1248e-05 9.5919e-05 6.7356e-05 9.1177e-05 8.4514e-05 8.9231e-05 9.4962e-05 6.9486e-05 7.0017e-05
|
||||
4.8127e-05 4.9474e-05 4.7601e-05 7.7646e-05 7.5471e-05 4.8005e-05 7.7294e-05 7.8978e-05 9.4411e-05 8.8448e-05
|
||||
1.1750e-04 8.3789e-05 9.9090e-05 9.1667e-05 6.6395e-05 8.7452e-05 8.9907e-05 6.5069e-05 6.8746e-05 5.2196e-05
|
||||
1.7188e-05 5.3547e-05 4.6130e-05 4.9050e-05 4.9852e-05 4.5186e-05 6.1880e-05 6.2675e-05 7.2981e-05 9.4912e-05
|
||||
1.0121e-04 1.0749e-04 8.3865e-05 8.8732e-05 9.2318e-05 8.3038e-05 6.1068e-05 5.4771e-05 6.8963e-05 3.9493e-05
|
||||
3.9971e-05 4.8827e-05 5.0589e-05 4.6833e-05 4.8995e-05 4.5298e-05 5.2202e-05 7.0280e-05 7.1851e-05 7.9058e-05
|
||||
1.0479e-04 1.1048e-04 9.0929e-05 9.0438e-05 9.6687e-05 7.3544e-05 5.6558e-05 1.3291e-05 6.9569e-05 6.1097e-05
|
||||
3.2518e-05 5.4427e-05 5.2243e-05 4.2881e-05 5.4275e-05 2.6927e-05 4.6776e-05 4.8508e-05 7.3863e-05 7.7007e-05
|
||||
1.0231e-04 1.1665e-04 9.7414e-05 9.7818e-05 9.9905e-05 7.6118e-05 1.5903e-05 1.8632e-05 1.5605e-05 3.3112e-05
|
||||
2.4920e-05 4.9826e-05 5.4471e-05 4.7016e-05 5.0789e-05 2.7186e-05 3.7544e-05 5.0323e-05 5.1742e-05 6.0367e-05
|
||||
1.1081e-04 8.5252e-05 8.5159e-05 9.2173e-05 7.2564e-05 3.9214e-05 2.9588e-05 1.9679e-05 3.2871e-05 2.4727e-05
|
||||
3.1276e-05 4.8333e-05 5.4999e-05 5.0009e-05 3.3352e-05 1.6198e-05 2.6468e-05 2.0913e-05 4.6282e-05 4.8252e-05
|
||||
1.0927e-04 8.6221e-05 8.7046e-05 9.0613e-05 9.6167e-05 6.6296e-05 8.7105e-06 2.7710e-05 2.8692e-05 3.5790e-05
|
||||
2.6652e-05 3.3906e-05 5.4819e-05 5.3427e-05 1.8368e-05 1.8581e-05 2.4460e-05 2.1743e-05 5.1845e-05 5.7560e-05
|
||||
0.0000e+00 9.1168e-05 8.8311e-05 8.9662e-05 8.8188e-05 8.5993e-05 6.8958e-05 4.7757e-05 4.0155e-06 2.6535e-05
|
||||
2.4615e-05 2.0088e-05 1.8464e-05 5.9978e-05 5.0322e-05 4.5190e-05 2.5805e-05 4.5699e-05 4.7711e-05 7.5000e-05
|
||||
0.0000e+00 0.0000e+00 8.1420e-05 8.9537e-05 9.7629e-05 6.5551e-05 7.1294e-05 5.2722e-05 3.9388e-05 3.8161e-05
|
||||
2.4906e-05 2.5367e-05 1.7740e-05 5.1189e-05 4.3841e-05 5.0900e-05 4.2575e-05 5.7366e-05 6.6453e-05 9.0433e-05
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 6.6183e-05 7.6446e-05 6.4644e-05 6.0972e-05 7.7392e-05 4.0153e-05 2.6303e-05
|
||||
2.2206e-05 1.4376e-05 3.8817e-05 4.5784e-05 4.8904e-05 5.3954e-05 4.9559e-05 4.6416e-05 7.6744e-05 8.8537e-05
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 7.4487e-05 7.4167e-05 7.1272e-05 5.2367e-05 4.8857e-05 1.5887e-05
|
||||
2.5459e-05 2.1132e-05 2.6919e-05 5.3746e-05 4.9682e-05 4.6821e-05 4.7121e-05 6.6739e-05 1.0134e-04 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 8.7203e-05 7.1744e-05 6.4737e-05 5.4136e-05 5.1360e-05 2.5884e-05
|
||||
2.6277e-05 2.9699e-05 2.0331e-05 5.1653e-05 4.0941e-05 5.0952e-05 7.4337e-05 7.1120e-05 8.8050e-05 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 7.4433e-05 6.8980e-05 4.7815e-05 6.2181e-05 1.5906e-05
|
||||
2.0391e-05 2.7183e-05 1.7266e-05 2.0832e-05 2.8546e-05 5.4538e-05 5.0747e-05 6.3092e-05 0.0000e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 6.8794e-05 7.8753e-05 6.5341e-05 5.2581e-05 2.3315e-05
|
||||
2.4392e-05 2.9250e-05 2.7525e-05 1.7968e-05 3.2661e-05 4.2436e-05 6.3425e-05 0.0000e+00 0.0000e+00 0.0000e+00
|
||||
0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 9.4751e-05 5.3151e-05 5.1087e-05 2.6390e-05 2.8625e-05
|
||||
2.3886e-05 1.6100e-05 1.7895e-05 1.5188e-05 4.6163e-05 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00 0.0000e+00
|
||||
END GRIDDATA
|
|
@ -0,0 +1,10 @@
|
|||
BEGIN OPTIONS
|
||||
BUDGET FILEOUT freyberg.cbc
|
||||
HEAD FILEOUT freyberg.hds
|
||||
END OPTIONS
|
||||
|
||||
BEGIN PERIOD 1
|
||||
PRINT BUDGET ALL
|
||||
SAVE HEAD ALL
|
||||
SAVE BUDGET ALL
|
||||
END PERIOD
|
|
@ -0,0 +1,11 @@
|
|||
BEGIN OPTIONS
|
||||
READASARRAYS
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN PERIOD 1
|
||||
RECHARGE
|
||||
CONSTANT 1.6000e-09
|
||||
END PERIOD
|
|
@ -0,0 +1,52 @@
|
|||
BEGIN OPTIONS
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
MAXBOUND 40
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN PERIOD 1
|
||||
1 1 15 20.100000 5.000000e-002 20.000000
|
||||
1 2 15 19.870000 5.000000e-002 19.750000
|
||||
1 3 15 19.650000 5.000000e-002 19.500000
|
||||
1 4 15 19.420000 5.000000e-002 19.250000
|
||||
1 5 15 19.190000 5.000000e-002 19.000000
|
||||
1 6 15 18.970000 5.000000e-002 18.750000
|
||||
1 7 15 18.740000 5.000000e-002 18.500000
|
||||
1 8 15 18.510000 5.000000e-002 18.250000
|
||||
1 9 15 18.280000 5.000000e-002 18.000000
|
||||
1 10 15 19.060000 5.000000e-002 17.750000
|
||||
1 11 15 17.830000 5.000000e-002 17.500000
|
||||
1 12 15 17.600000 5.000000e-002 17.250000
|
||||
1 13 15 17.380000 5.000000e-002 17.000000
|
||||
1 14 15 17.150000 5.000000e-002 16.750000
|
||||
1 15 15 16.920000 5.000000e-002 16.500000
|
||||
1 16 15 16.700000 5.000000e-002 16.250000
|
||||
1 17 15 16.470000 5.000000e-002 16.000000
|
||||
1 18 15 16.240000 5.000000e-002 15.750000
|
||||
1 19 15 16.020000 5.000000e-002 15.500000
|
||||
1 20 15 15.790000 5.000000e-002 15.250000
|
||||
1 21 15 15.560000 5.000000e-002 15.000000
|
||||
1 22 15 15.330000 5.000000e-002 14.750000
|
||||
1 23 15 15.110000 5.000000e-002 14.500000
|
||||
1 24 15 14.880000 5.000000e-002 14.250000
|
||||
1 25 15 14.650000 5.000000e-002 14.000000
|
||||
1 26 15 14.430000 5.000000e-002 13.750000
|
||||
1 27 15 14.200000 5.000000e-002 13.500000
|
||||
1 28 15 13.970000 5.000000e-002 13.250000
|
||||
1 29 15 13.750000 5.000000e-002 13.000000
|
||||
1 30 15 13.520000 5.000000e-002 12.750000
|
||||
1 31 15 13.290000 5.000000e-002 12.500000
|
||||
1 32 15 13.070000 5.000000e-002 12.250000
|
||||
1 33 15 12.840000 5.000000e-002 12.000000
|
||||
1 34 15 12.610000 5.000000e-002 11.750000
|
||||
1 35 15 12.380000 5.000000e-002 11.500000
|
||||
1 36 15 12.160000 5.000000e-002 11.250000
|
||||
1 37 15 11.930000 5.000000e-002 11.000000
|
||||
1 38 15 11.700000 5.000000e-002 10.750000
|
||||
1 39 15 11.480000 5.000000e-002 10.500000
|
||||
1 40 15 11.250000 5.000000e-002 10.250000
|
||||
END PERIOD
|
|
@ -0,0 +1,16 @@
|
|||
BEGIN OPTIONS
|
||||
SAVE_FLOWS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN GRIDDATA
|
||||
ICONVERT
|
||||
CONSTANT 1
|
||||
SS
|
||||
CONSTANT 1.0e-05
|
||||
SY
|
||||
CONSTANT 0.20
|
||||
END GRIDDATA
|
||||
|
||||
BEGIN PERIOD 1
|
||||
STEADY-STATE
|
||||
END PERIOD
|
|
@ -0,0 +1,11 @@
|
|||
BEGIN OPTIONS
|
||||
TIME_UNITS seconds
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
NPER 1
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN PERIODDATA
|
||||
10.000 1 1.2000
|
||||
END PERIODDATA
|
|
@ -0,0 +1,18 @@
|
|||
BEGIN OPTIONS
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
MAXBOUND 6
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN PERIOD 1
|
||||
1 9 16 -8.200000e-003
|
||||
1 11 13 -4.100000e-003
|
||||
1 20 14 -3.900000e-003
|
||||
1 26 10 -8.300000e-004
|
||||
1 29 6 -7.200000e-004
|
||||
1 34 12 -4.300000e-003
|
||||
END PERIOD
|
|
@ -0,0 +1,170 @@
|
|||
MODFLOW 6
|
||||
U.S. GEOLOGICAL SURVEY MODULAR HYDROLOGIC MODEL
|
||||
VERSION mf6.0.2 February 23, 2018
|
||||
|
||||
MODFLOW 6 compiled Feb 21 2018 10:49:51 with IFORT compiler (ver. 18.0.1)
|
||||
|
||||
This software has been approved for release by the U.S. Geological
|
||||
Survey (USGS). Although the software has been subjected to rigorous
|
||||
review, the USGS reserves the right to update the software as needed
|
||||
pursuant to further analysis and review. No warranty, expressed or
|
||||
implied, is made by the USGS or the U.S. Government as to the
|
||||
functionality of the software and related material nor shall the
|
||||
fact of release constitute any such warranty. Furthermore, the
|
||||
software is released on condition that neither the USGS nor the U.S.
|
||||
Government shall be held liable for any damages resulting from its
|
||||
authorized or unauthorized use. Also refer to the USGS Water
|
||||
Resources Software User Rights Notice for complete use, copyright,
|
||||
and distribution information.
|
||||
|
||||
|
||||
System command used to initiate simulation:
|
||||
"C:\Users\jlarsen\Desktop\flopy-ogw\trunk\examples\data\mf6-freyberg\mf6.exe"
|
||||
|
||||
MODFLOW was compiled using uniform precision.
|
||||
Precision of REAL variables: 15
|
||||
Fortran KIND value for REAL variables: 8
|
||||
Fortran KIND value for INTEGER variables: 4
|
||||
|
||||
|
||||
OPENED mfsim.nam
|
||||
FILE TYPE:NAM UNIT 1001 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
READING SIMULATION OPTIONS
|
||||
END OF SIMULATION OPTIONS
|
||||
|
||||
READING SIMULATION TIMING
|
||||
|
||||
OPENED freyberg.tdis
|
||||
FILE TYPE:TDIS UNIT 1002 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
|
||||
TDIS -- TEMPORAL DISCRETIZATION PACKAGE,
|
||||
VERSION 1 : 11/13/2014 - INPUT READ FROM UNIT 1002
|
||||
PROCESSING TDIS OPTIONS
|
||||
SIMULATION TIME UNIT IS SECONDS
|
||||
END OF TDIS OPTIONS
|
||||
PROCESSING TDIS DIMENSIONS
|
||||
1 STRESS PERIOD(S) IN SIMULATION
|
||||
END OF TDIS DIMENSIONS
|
||||
PROCESSING TDIS PERIODDATA
|
||||
|
||||
|
||||
STRESS PERIOD LENGTH TIME STEPS MULTIPLIER FOR DELT
|
||||
----------------------------------------------------------------------------
|
||||
1 10.00000 1 1.200
|
||||
END OF TDIS PERIODDATA
|
||||
END OF SIMULATION TIMING
|
||||
|
||||
READING SIMULATION MODELS
|
||||
#modeltype namefile modelname
|
||||
GWF6 model GWF_1 will be created as model 1
|
||||
END OF SIMULATION MODELS
|
||||
|
||||
READING SIMULATION EXCHANGES
|
||||
END OF SIMULATION EXCHANGES
|
||||
|
||||
READING SOLUTIONGROUP
|
||||
|
||||
Creating solution: SLN_1
|
||||
|
||||
OPENED freyberg.ims
|
||||
FILE TYPE:IMS UNIT 1014 STATUS:OLD
|
||||
FORMAT:FORMATTED ACCESS:SEQUENTIAL
|
||||
ACTION:READ
|
||||
|
||||
END OF SIMULATION SOLUTIONGROUP
|
||||
|
||||
IMS -- ITERATIVE MODEL SOLUTION PACKAGE, VERSION 6, 4/28/2017
|
||||
INPUT READ FROM UNIT 1014
|
||||
|
||||
PROCESSING IMS OPTIONS
|
||||
END OF IMS OPTIONS
|
||||
|
||||
PROCESSING IMS NONLINEAR
|
||||
END OF IMS NONLINEAR DATA
|
||||
OUTER ITERATION CONVERGENCE CRITERION (HCLOSE) = 0.100000E-03
|
||||
MAXIMUM NUMBER OF OUTER ITERATIONS (MXITER) = 500
|
||||
SOLVER PRINTOUT INDEX (IPRIMS) = 1
|
||||
NONLINEAR ITERATION METHOD (NONLINMETH) = 0
|
||||
LINEAR SOLUTION METHOD (LINMETH) = 1
|
||||
***UNDER-RELAXATION WILL NOT BE USED***
|
||||
|
||||
***IMS LINEAR SOLVER WILL BE USED***
|
||||
|
||||
IMSLINEAR -- UNSTRUCTURED LINEAR SOLUTION PACKAGE, VERSION 8, 04/28/2017
|
||||
|
||||
PROCESSING LINEAR DATA
|
||||
END OF LINEAR DATA
|
||||
|
||||
SOLUTION BY THE CONJUGATE-GRADIENT METHOD
|
||||
------------------------------------------------------------------
|
||||
MAXIMUM OF 500 CALLS OF SOLUTION ROUTINE
|
||||
MAXIMUM OF 100 INTERNAL ITERATIONS PER CALL TO SOLUTION ROUTINE
|
||||
LINEAR ACCELERATION METHOD = CG
|
||||
MATRIX PRECONDITIONING TYPE = MOD. INCOMPLETE LU
|
||||
MATRIX SCALING APPROACH = NO SCALING
|
||||
MATRIX REORDERING APPROACH = ORIGINAL ORDERING
|
||||
NUMBER OF ORTHOGONALIZATIONS = 0
|
||||
HEAD CHANGE CRITERION FOR CLOSURE = 0.10000E-03
|
||||
RESIDUAL CHANGE CRITERION FOR CLOSURE = 0.10000E-02
|
||||
RESIDUAL CONVERGENCE OPTION = 0
|
||||
RESIDUAL CONVERGENCE NORM = INFINITY NORM
|
||||
RELAXATION FACTOR = 0.97000E+00
|
||||
|
||||
|
||||
|
||||
|
||||
1
|
||||
STRESS PERIOD NO. 1, LENGTH = 10.00000
|
||||
-----------------------------------------------
|
||||
|
||||
NUMBER OF TIME STEPS = 1
|
||||
|
||||
MULTIPLIER FOR DELT = 1.200
|
||||
|
||||
INITIAL TIME STEP SIZE = 10.00000
|
||||
|
||||
|
||||
OUTER ITERATION SUMMARY
|
||||
---------------------------------------------------------------------------------------
|
||||
OUTER INNER MAXIMUM MAXIMUM CHANGE
|
||||
ITERATION ITERATION CHANGE MODEL-(CELLID)
|
||||
---------------------------------------------------------------------------------------
|
||||
Linear Solver 1 21 -33.4744 1_GWF-(1,39,15)
|
||||
Under-relaxation 1 -33.4744 1_GWF-(1,39,15)
|
||||
Linear Solver 2 18 8.80589 1_GWF-(1,15,1)
|
||||
Under-relaxation 2 8.80589 1_GWF-(1,15,1)
|
||||
Linear Solver 3 18 -4.26387 1_GWF-(1,14,1)
|
||||
Under-relaxation 3 -4.26387 1_GWF-(1,14,1)
|
||||
Linear Solver 4 16 1.00058 1_GWF-(1,14,1)
|
||||
Under-relaxation 4 1.00058 1_GWF-(1,14,1)
|
||||
Linear Solver 5 15 -0.209813 1_GWF-(1,14,1)
|
||||
Under-relaxation 5 -0.209813 1_GWF-(1,14,1)
|
||||
Linear Solver 6 11 3.381365E-02 1_GWF-(1,13,1)
|
||||
Under-relaxation 6 3.381365E-02 1_GWF-(1,13,1)
|
||||
Linear Solver 7 8 -4.571297E-03 1_GWF-(1,13,1)
|
||||
Under-relaxation 7 -4.571297E-03 1_GWF-(1,13,1)
|
||||
Linear Solver 8 3 4.016118E-04 1_GWF-(1,13,1)
|
||||
Under-relaxation 8 4.016118E-04 1_GWF-(1,13,1)
|
||||
Linear Solver 9 1 4.457663E-05 1_GWF-(1,8,5)
|
||||
|
||||
9 CALLS TO NUMERICAL SOLUTION IN TIME STEP 1 STRESS PERIOD 1
|
||||
111 TOTAL ITERATIONS
|
||||
|
||||
INFORMATION ON VARIABLES STORED IN THE MEMORY MANAGER
|
||||
|
||||
Number of allocated integer variables: 37047
|
||||
Number of allocated real variables: 36443
|
||||
Allocated memory in megabytes: 0.439732
|
||||
|
||||
|
||||
Run end date and time (yyyy/mm/dd hh:mm:ss): 2018/07/27 16:21:59
|
||||
Elapsed run time: 0.110 Seconds
|
||||
|
||||
Normal termination of simulation.
|
|
@ -0,0 +1,19 @@
|
|||
BEGIN OPTIONS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN TIMING
|
||||
TDIS6 freyberg.tdis
|
||||
END TIMING
|
||||
|
||||
BEGIN MODELS
|
||||
#modeltype namefile modelname
|
||||
GWF6 freyberg.nam GWF_1
|
||||
END MODELS
|
||||
|
||||
BEGIN EXCHANGES
|
||||
END EXCHANGES
|
||||
|
||||
BEGIN SOLUTIONGROUP 1
|
||||
MXITER 1
|
||||
IMS6 freyberg.ims GWF_1
|
||||
END SOLUTIONGROUP
|
|
@ -1,6 +1,7 @@
|
|||
begin options
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
SAVE_SPECIFIC_DISCHARGE
|
||||
end options
|
||||
#
|
||||
BEGIN GRIDDATA
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -0,0 +1,19 @@
|
|||
BEGIN OPTIONS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN TIMING
|
||||
TDIS6 simulation.tdis
|
||||
END TIMING
|
||||
|
||||
BEGIN MODELS
|
||||
#modeltype namefile modelname
|
||||
GWF6 tri_model.nam GWF_1
|
||||
END MODELS
|
||||
|
||||
BEGIN EXCHANGES
|
||||
END EXCHANGES
|
||||
|
||||
BEGIN SOLUTIONGROUP 1
|
||||
MXITER 1
|
||||
IMS6 model.ims GWF_1
|
||||
END SOLUTIONGROUP
|
|
@ -0,0 +1,40 @@
|
|||
begin options
|
||||
PRINT_OPTION SUMMARY
|
||||
end options
|
||||
|
||||
begin nonlinear
|
||||
outer_hclose 1.e-4
|
||||
outer_maximum 500
|
||||
under_relaxation none
|
||||
end nonlinear
|
||||
|
||||
begin linear
|
||||
inner_hclose 1.0e-4
|
||||
inner_rclose 0.001
|
||||
#L2NORM_RCLOSE
|
||||
inner_maximum 100
|
||||
linear_acceleration cg
|
||||
scaling_method none
|
||||
REORDERING_METHOD none
|
||||
relaxation_factor 0.97
|
||||
end linear
|
||||
|
||||
|
||||
|
||||
1.0E-4 1.0E-4 500 100 1 0 002 #hclose, hiclose,mxiter,iter1,iprsms,nonmeth,linmeth
|
||||
#PCGU [option: "bcgs", "cg"] ipc iscl iord rclosepcgu relax
|
||||
cg 3 0 0 0.001 0.97
|
||||
# bcgs 3 0 0 0.001 0.97
|
||||
|
||||
1.0E-4 1.0E-4 500 100 1 0 001 #hclose, hiclose,mxiter,iter1,iprsms,nonmeth,linmeth
|
||||
2 0 0 2 0 0 0 1e-3
|
||||
IACL NORDER LEVEL NORTH IREDSYS RRCTOL IDROPTOL EPSRN
|
||||
|
||||
|
||||
|
||||
0.0001 0.0001 500 100 1 0 1
|
||||
2 0 0 2 0 0 0 1e-3
|
||||
IACL NORDER LEVEL NORTH IREDSYS RRCTOL IDROPTOL EPSRN
|
||||
|
||||
0.0001 0.0001 500 100 1 0 5
|
||||
3 0 0 100000
|
|
@ -0,0 +1,12 @@
|
|||
BEGIN OPTIONS
|
||||
TIME_UNITS MINUTES
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
NPER 1
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN PERIODDATA
|
||||
#perlen nstp tsmult
|
||||
1.0 1 1.0
|
||||
END PERIODDATA
|
Binary file not shown.
|
@ -0,0 +1,8 @@
|
|||
# Basic package file for MODFLOW, generated by Flopy.
|
||||
begin options
|
||||
end options
|
||||
|
||||
BEGIN GRIDDATA
|
||||
strt
|
||||
constant 1.
|
||||
END GRIDDATA
|
|
@ -0,0 +1,10 @@
|
|||
# Name file for mf2005, generated by Flopy.
|
||||
BEGIN PACKAGES
|
||||
DISV6 tri_model_cnst.disv
|
||||
IC6 tri_model.ic
|
||||
NPF6 tri_model.npf
|
||||
CHD6 tri_model_left.chd CHD_LEFT
|
||||
CHD6 tri_model_right.chd CHD_RIGHT
|
||||
OC6 tri_model.oc
|
||||
END PACKAGES
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
begin options
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
SAVE_SPECIFIC_DISCHARGE
|
||||
end options
|
||||
#
|
||||
BEGIN GRIDDATA
|
||||
#icelltype(nodes) is 0:confined, 1:convertible, 4:upstream?
|
||||
icelltype
|
||||
constant 0
|
||||
#
|
||||
K
|
||||
constant 1.0 k Layer 1
|
||||
K33
|
||||
constant 1.0 K33 Layer 1
|
||||
k22
|
||||
constant 1.0
|
||||
END GRIDDATA
|
|
@ -0,0 +1,12 @@
|
|||
BEGIN OPTIONS
|
||||
HEAD FILEOUT tri_model.hds
|
||||
BUDGET FILEOUT tri_model.cbc
|
||||
END OPTIONS
|
||||
|
||||
BEGIN PERIOD 1
|
||||
PRINT BUDGET ALL
|
||||
SAVE BUDGET ALL
|
||||
PRINT HEAD ALL
|
||||
SAVE HEAD ALL
|
||||
END PERIOD
|
||||
|
|
@ -0,0 +1,361 @@
|
|||
BEGIN OPTIONS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
NCPL 200
|
||||
NLAY 4
|
||||
NVERT 121
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN GRIDDATA
|
||||
TOP
|
||||
CONSTANT 2.0
|
||||
BOTM LAYERED
|
||||
CONSTANT 1.5
|
||||
CONSTANT 1.0
|
||||
CONSTANT 0.5
|
||||
CONSTANT 0.0
|
||||
IDOMAIN LAYERED
|
||||
INTERNAL FACTOR 1 IPRN -1
|
||||
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
CONSTANT 1
|
||||
CONSTANT 1
|
||||
CONSTANT 1
|
||||
END GRIDDATA
|
||||
|
||||
BEGIN VERTICES
|
||||
1 0.0 10.0
|
||||
2 1.0 10.0
|
||||
3 2.0 10.0
|
||||
4 3.0 10.0
|
||||
5 4.0 10.0
|
||||
6 5.0 10.0
|
||||
7 6.0 10.0
|
||||
8 7.0 10.0
|
||||
9 8.0 10.0
|
||||
10 9.0 10.0
|
||||
11 10.0 10.0
|
||||
12 0.0 9.0
|
||||
13 1.0 9.0
|
||||
14 2.0 9.0
|
||||
15 3.0 9.0
|
||||
16 4.0 9.0
|
||||
17 5.0 9.0
|
||||
18 6.0 9.0
|
||||
19 7.0 9.0
|
||||
20 8.0 9.0
|
||||
21 9.0 9.0
|
||||
22 10.0 9.0
|
||||
23 0.0 8.0
|
||||
24 1.0 8.0
|
||||
25 2.0 8.0
|
||||
26 3.0 8.0
|
||||
27 4.0 8.0
|
||||
28 5.0 8.0
|
||||
29 6.0 8.0
|
||||
30 7.0 8.0
|
||||
31 8.0 8.0
|
||||
32 9.0 8.0
|
||||
33 10.0 8.0
|
||||
34 0.0 7.0
|
||||
35 1.0 7.0
|
||||
36 2.0 7.0
|
||||
37 3.0 7.0
|
||||
38 4.0 7.0
|
||||
39 5.0 7.0
|
||||
40 6.0 7.0
|
||||
41 7.0 7.0
|
||||
42 8.0 7.0
|
||||
43 9.0 7.0
|
||||
44 10.0 7.0
|
||||
45 0.0 6.0
|
||||
46 1.0 6.0
|
||||
47 2.0 6.0
|
||||
48 3.0 6.0
|
||||
49 4.0 6.0
|
||||
50 5.0 6.0
|
||||
51 6.0 6.0
|
||||
52 7.0 6.0
|
||||
53 8.0 6.0
|
||||
54 9.0 6.0
|
||||
55 10.0 6.0
|
||||
56 0.0 5.0
|
||||
57 1.0 5.0
|
||||
58 2.0 5.0
|
||||
59 3.0 5.0
|
||||
60 4.0 5.0
|
||||
61 5.0 5.0
|
||||
62 6.0 5.0
|
||||
63 7.0 5.0
|
||||
64 8.0 5.0
|
||||
65 9.0 5.0
|
||||
66 10.0 5.0
|
||||
67 0.0 4.0
|
||||
68 1.0 4.0
|
||||
69 2.0 4.0
|
||||
70 3.0 4.0
|
||||
71 4.0 4.0
|
||||
72 5.0 4.0
|
||||
73 6.0 4.0
|
||||
74 7.0 4.0
|
||||
75 8.0 4.0
|
||||
76 9.0 4.0
|
||||
77 10.0 4.0
|
||||
78 0.0 3.0
|
||||
79 1.0 3.0
|
||||
80 2.0 3.0
|
||||
81 3.0 3.0
|
||||
82 4.0 3.0
|
||||
83 5.0 3.0
|
||||
84 6.0 3.0
|
||||
85 7.0 3.0
|
||||
86 8.0 3.0
|
||||
87 9.0 3.0
|
||||
88 10.0 3.0
|
||||
89 0.0 2.0
|
||||
90 1.0 2.0
|
||||
91 2.0 2.0
|
||||
92 3.0 2.0
|
||||
93 4.0 2.0
|
||||
94 5.0 2.0
|
||||
95 6.0 2.0
|
||||
96 7.0 2.0
|
||||
97 8.0 2.0
|
||||
98 9.0 2.0
|
||||
99 10.0 2.0
|
||||
100 0.0 1.0
|
||||
101 1.0 1.0
|
||||
102 2.0 1.0
|
||||
103 3.0 1.0
|
||||
104 4.0 1.0
|
||||
105 5.0 1.0
|
||||
106 6.0 1.0
|
||||
107 7.0 1.0
|
||||
108 8.0 1.0
|
||||
109 9.0 1.0
|
||||
110 10.0 1.0
|
||||
111 0.0 0.0
|
||||
112 1.0 0.0
|
||||
113 2.0 0.0
|
||||
114 3.0 0.0
|
||||
115 4.0 0.0
|
||||
116 5.0 0.0
|
||||
117 6.0 0.0
|
||||
118 7.0 0.0
|
||||
119 8.0 0.0
|
||||
120 9.0 0.0
|
||||
121 10.0 0.0
|
||||
END VERTICES
|
||||
|
||||
BEGIN CELL2D
|
||||
1 0.33 9.67 3 1 2 12
|
||||
2 0.67 9.33 3 2 13 12
|
||||
3 1.33 9.67 3 2 3 13
|
||||
4 1.67 9.33 3 3 14 13
|
||||
5 2.33 9.67 3 3 4 14
|
||||
6 2.67 9.33 3 4 15 14
|
||||
7 3.33 9.67 3 4 5 15
|
||||
8 3.67 9.33 3 5 16 15
|
||||
9 4.33 9.67 3 5 6 16
|
||||
10 4.67 9.33 3 6 17 16
|
||||
11 5.33 9.67 3 6 7 17
|
||||
12 5.67 9.33 3 7 18 17
|
||||
13 6.33 9.67 3 7 8 18
|
||||
14 6.67 9.33 3 8 19 18
|
||||
15 7.33 9.67 3 8 9 19
|
||||
16 7.67 9.33 3 9 20 19
|
||||
17 8.33 9.67 3 9 10 20
|
||||
18 8.67 9.33 3 10 21 20
|
||||
19 9.33 9.67 3 10 11 21
|
||||
20 9.67 9.33 3 11 22 21
|
||||
21 0.33 8.67 3 12 13 23
|
||||
22 0.67 8.33 3 13 24 23
|
||||
23 1.33 8.67 3 13 14 24
|
||||
24 1.67 8.33 3 14 25 24
|
||||
25 2.33 8.67 3 14 15 25
|
||||
26 2.67 8.33 3 15 26 25
|
||||
27 3.33 8.67 3 15 16 26
|
||||
28 3.67 8.33 3 16 27 26
|
||||
29 4.33 8.67 3 16 17 27
|
||||
30 4.67 8.33 3 17 28 27
|
||||
31 5.33 8.67 3 17 18 28
|
||||
32 5.67 8.33 3 18 29 28
|
||||
33 6.33 8.67 3 18 19 29
|
||||
34 6.67 8.33 3 19 30 29
|
||||
35 7.33 8.67 3 19 20 30
|
||||
36 7.67 8.33 3 20 31 30
|
||||
37 8.33 8.67 3 20 21 31
|
||||
38 8.67 8.33 3 21 32 31
|
||||
39 9.33 8.67 3 21 22 32
|
||||
40 9.67 8.33 3 22 33 32
|
||||
41 0.33 7.67 3 23 24 34
|
||||
42 0.67 7.33 3 24 35 34
|
||||
43 1.33 7.67 3 24 25 35
|
||||
44 1.67 7.33 3 25 36 35
|
||||
45 2.33 7.67 3 25 26 36
|
||||
46 2.67 7.33 3 26 37 36
|
||||
47 3.33 7.67 3 26 27 37
|
||||
48 3.67 7.33 3 27 38 37
|
||||
49 4.33 7.67 3 27 28 38
|
||||
50 4.67 7.33 3 28 39 38
|
||||
51 5.33 7.67 3 28 29 39
|
||||
52 5.67 7.33 3 29 40 39
|
||||
53 6.33 7.67 3 29 30 40
|
||||
54 6.67 7.33 3 30 41 40
|
||||
55 7.33 7.67 3 30 31 41
|
||||
56 7.67 7.33 3 31 42 41
|
||||
57 8.33 7.67 3 31 32 42
|
||||
58 8.67 7.33 3 32 43 42
|
||||
59 9.33 7.67 3 32 33 43
|
||||
60 9.67 7.33 3 33 44 43
|
||||
61 0.33 6.67 3 34 35 45
|
||||
62 0.67 6.33 3 35 46 45
|
||||
63 1.33 6.67 3 35 36 46
|
||||
64 1.67 6.33 3 36 47 46
|
||||
65 2.33 6.67 3 36 37 47
|
||||
66 2.67 6.33 3 37 48 47
|
||||
67 3.33 6.67 3 37 38 48
|
||||
68 3.67 6.33 3 38 49 48
|
||||
69 4.33 6.67 3 38 39 49
|
||||
70 4.67 6.33 3 39 50 49
|
||||
71 5.33 6.67 3 39 40 50
|
||||
72 5.67 6.33 3 40 51 50
|
||||
73 6.33 6.67 3 40 41 51
|
||||
74 6.67 6.33 3 41 52 51
|
||||
75 7.33 6.67 3 41 42 52
|
||||
76 7.67 6.33 3 42 53 52
|
||||
77 8.33 6.67 3 42 43 53
|
||||
78 8.67 6.33 3 43 54 53
|
||||
79 9.33 6.67 3 43 44 54
|
||||
80 9.67 6.33 3 44 55 54
|
||||
81 0.33 5.67 3 45 46 56
|
||||
82 0.67 5.33 3 46 57 56
|
||||
83 1.33 5.67 3 46 47 57
|
||||
84 1.67 5.33 3 47 58 57
|
||||
85 2.33 5.67 3 47 48 58
|
||||
86 2.67 5.33 3 48 59 58
|
||||
87 3.33 5.67 3 48 49 59
|
||||
88 3.67 5.33 3 49 60 59
|
||||
89 4.33 5.67 3 49 50 60
|
||||
90 4.67 5.33 3 50 61 60
|
||||
91 5.33 5.67 3 50 51 61
|
||||
92 5.67 5.33 3 51 62 61
|
||||
93 6.33 5.67 3 51 52 62
|
||||
94 6.67 5.33 3 52 63 62
|
||||
95 7.33 5.67 3 52 53 63
|
||||
96 7.67 5.33 3 53 64 63
|
||||
97 8.33 5.67 3 53 54 64
|
||||
98 8.67 5.33 3 54 65 64
|
||||
99 9.33 5.67 3 54 55 65
|
||||
100 9.67 5.33 3 55 66 65
|
||||
101 0.33 4.67 3 56 57 67
|
||||
102 0.67 4.33 3 57 68 67
|
||||
103 1.33 4.67 3 57 58 68
|
||||
104 1.67 4.33 3 58 69 68
|
||||
105 2.33 4.67 3 58 59 69
|
||||
106 2.67 4.33 3 59 70 69
|
||||
107 3.33 4.67 3 59 60 70
|
||||
108 3.67 4.33 3 60 71 70
|
||||
109 4.33 4.67 3 60 61 71
|
||||
110 4.67 4.33 3 61 72 71
|
||||
111 5.33 4.67 3 61 62 72
|
||||
112 5.67 4.33 3 62 73 72
|
||||
113 6.33 4.67 3 62 63 73
|
||||
114 6.67 4.33 3 63 74 73
|
||||
115 7.33 4.67 3 63 64 74
|
||||
116 7.67 4.33 3 64 75 74
|
||||
117 8.33 4.67 3 64 65 75
|
||||
118 8.67 4.33 3 65 76 75
|
||||
119 9.33 4.67 3 65 66 76
|
||||
120 9.67 4.33 3 66 77 76
|
||||
121 0.33 3.67 3 67 68 78
|
||||
122 0.67 3.33 3 68 79 78
|
||||
123 1.33 3.67 3 68 69 79
|
||||
124 1.67 3.33 3 69 80 79
|
||||
125 2.33 3.67 3 69 70 80
|
||||
126 2.67 3.33 3 70 81 80
|
||||
127 3.33 3.67 3 70 71 81
|
||||
128 3.67 3.33 3 71 82 81
|
||||
129 4.33 3.67 3 71 72 82
|
||||
130 4.67 3.33 3 72 83 82
|
||||
131 5.33 3.67 3 72 73 83
|
||||
132 5.67 3.33 3 73 84 83
|
||||
133 6.33 3.67 3 73 74 84
|
||||
134 6.67 3.33 3 74 85 84
|
||||
135 7.33 3.67 3 74 75 85
|
||||
136 7.67 3.33 3 75 86 85
|
||||
137 8.33 3.67 3 75 76 86
|
||||
138 8.67 3.33 3 76 87 86
|
||||
139 9.33 3.67 3 76 77 87
|
||||
140 9.67 3.33 3 77 88 87
|
||||
141 0.33 2.67 3 78 79 89
|
||||
142 0.67 2.33 3 79 90 89
|
||||
143 1.33 2.67 3 79 80 90
|
||||
144 1.67 2.33 3 80 91 90
|
||||
145 2.33 2.67 3 80 81 91
|
||||
146 2.67 2.33 3 81 92 91
|
||||
147 3.33 2.67 3 81 82 92
|
||||
148 3.67 2.33 3 82 93 92
|
||||
149 4.33 2.67 3 82 83 93
|
||||
150 4.67 2.33 3 83 94 93
|
||||
151 5.33 2.67 3 83 84 94
|
||||
152 5.67 2.33 3 84 95 94
|
||||
153 6.33 2.67 3 84 85 95
|
||||
154 6.67 2.33 3 85 96 95
|
||||
155 7.33 2.67 3 85 86 96
|
||||
156 7.67 2.33 3 86 97 96
|
||||
157 8.33 2.67 3 86 87 97
|
||||
158 8.67 2.33 3 87 98 97
|
||||
159 9.33 2.67 3 87 88 98
|
||||
160 9.67 2.33 3 88 99 98
|
||||
161 0.33 1.67 3 89 90 100
|
||||
162 0.67 1.33 3 90 101 100
|
||||
163 1.33 1.67 3 90 91 101
|
||||
164 1.67 1.33 3 91 102 101
|
||||
165 2.33 1.67 3 91 92 102
|
||||
166 2.67 1.33 3 92 103 102
|
||||
167 3.33 1.67 3 92 93 103
|
||||
168 3.67 1.33 3 93 104 103
|
||||
169 4.33 1.67 3 93 94 104
|
||||
170 4.67 1.33 3 94 105 104
|
||||
171 5.33 1.67 3 94 95 105
|
||||
172 5.67 1.33 3 95 106 105
|
||||
173 6.33 1.67 3 95 96 106
|
||||
174 6.67 1.33 3 96 107 106
|
||||
175 7.33 1.67 3 96 97 107
|
||||
176 7.67 1.33 3 97 108 107
|
||||
177 8.33 1.67 3 97 98 108
|
||||
178 8.67 1.33 3 98 109 108
|
||||
179 9.33 1.67 3 98 99 109
|
||||
180 9.67 1.33 3 99 110 109
|
||||
181 0.33 0.67 3 100 101 111
|
||||
182 0.67 0.33 3 101 112 111
|
||||
183 1.33 0.67 3 101 102 112
|
||||
184 1.67 0.33 3 102 113 112
|
||||
185 2.33 0.67 3 102 103 113
|
||||
186 2.67 0.33 3 103 114 113
|
||||
187 3.33 0.67 3 103 104 114
|
||||
188 3.67 0.33 3 104 115 114
|
||||
189 4.33 0.67 3 104 105 115
|
||||
190 4.67 0.33 3 105 116 115
|
||||
191 5.33 0.67 3 105 106 116
|
||||
192 5.67 0.33 3 106 117 116
|
||||
193 6.33 0.67 3 106 107 117
|
||||
194 6.67 0.33 3 107 118 117
|
||||
195 7.33 0.67 3 107 108 118
|
||||
196 7.67 0.33 3 108 119 118
|
||||
197 8.33 0.67 3 108 109 119
|
||||
198 8.67 0.33 3 109 120 119
|
||||
199 9.33 0.67 3 109 110 120
|
||||
200 9.67 0.33 3 110 121 120
|
||||
END CELL2D
|
||||
|
Binary file not shown.
|
@ -0,0 +1,461 @@
|
|||
BEGIN OPTIONS
|
||||
END OPTIONS
|
||||
|
||||
BEGIN DIMENSIONS
|
||||
NCPL 200
|
||||
NLAY 4
|
||||
NVERT 121
|
||||
END DIMENSIONS
|
||||
|
||||
BEGIN GRIDDATA
|
||||
TOP
|
||||
INTERNAL FACTOR 1.0
|
||||
6.13 4.84 4.51 4.93 2.87 3.52 3.32 5.56 4.93 4.52
|
||||
4.20 4.98 3.59 5.51 3.94 6.77 4.87 4.15 3.67 4.68
|
||||
5.97 4.17 5.28 4.78 3.95 4.83 4.57 5.21 4.89 4.60
|
||||
4.72 3.52 3.28 5.46 5.37 5.29 4.20 5.70 3.17 5.88
|
||||
4.83 6.51 4.76 6.33 4.00 5.38 2.93 3.71 3.80 7.58
|
||||
5.75 4.96 5.51 4.65 4.14 4.56 4.20 4.34 5.19 3.95
|
||||
5.06 5.11 5.14 4.68 4.32 4.44 3.57 5.53 4.42 5.74
|
||||
4.00 5.74 4.33 3.99 4.10 5.85 4.88 3.63 4.30 5.14
|
||||
4.56 3.59 3.68 5.68 4.54 4.71 4.40 5.38 3.54 4.80
|
||||
5.24 4.87 4.94 4.09 3.44 4.02 2.99 5.75 4.53 5.82
|
||||
4.42 4.03 3.54 5.57 5.45 2.74 3.61 6.33 4.23 4.26
|
||||
4.48 4.70 3.05 6.01 5.87 4.00 4.77 5.02 6.05 5.21
|
||||
4.89 4.31 4.49 6.07 4.78 5.03 4.00 4.04 6.03 3.73
|
||||
4.71 4.55 5.62 4.26 3.18 4.39 4.07 4.07 3.90 5.78
|
||||
4.64 4.49 3.46 4.23 3.80 5.18 5.56 4.84 4.31 2.86
|
||||
5.28 5.57 4.84 4.96 4.10 4.71 5.76 4.93 3.73 4.68
|
||||
5.68 4.87 5.22 6.10 3.96 3.24 5.06 3.38 4.33 3.80
|
||||
7.13 4.83 4.74 3.55 5.13 3.59 5.96 4.41 4.65 4.49
|
||||
5.13 5.17 4.48 4.96 3.50 4.49 5.30 4.92 3.88 5.48
|
||||
4.28 5.14 3.91 4.88 4.26 6.70 3.29 5.22 4.78 4.11
|
||||
BOTM LAYERED
|
||||
INTERNAL FACTOR 1.0
|
||||
4.93 4.43 3.52 3.82 2.85 3.48 2.60 4.72 2.34 2.93
|
||||
2.83 4.06 3.52 4.51 3.54 4.61 2.73 3.70 3.30 3.92
|
||||
5.36 3.47 4.81 3.65 3.12 3.40 4.05 4.40 2.65 3.58
|
||||
3.53 3.02 2.57 4.55 4.18 4.69 3.19 5.06 2.48 4.11
|
||||
4.28 5.40 3.62 5.20 3.81 4.74 2.52 2.32 2.43 6.47
|
||||
4.84 4.29 2.89 3.71 2.54 2.68 3.90 3.34 4.25 2.51
|
||||
3.13 2.96 4.10 2.71 3.33 3.56 3.09 4.38 3.50 4.77
|
||||
3.39 4.88 3.50 3.44 3.45 4.61 4.22 3.37 3.15 4.84
|
||||
3.16 3.31 3.13 4.19 3.67 3.44 3.25 3.10 2.68 3.95
|
||||
4.91 4.30 4.27 1.52 2.88 2.68 2.76 3.92 2.34 4.57
|
||||
2.90 3.31 2.70 4.53 4.76 2.59 3.23 5.21 3.84 1.69
|
||||
3.77 3.57 2.99 5.33 3.92 3.79 2.95 4.43 4.92 4.68
|
||||
4.27 3.89 3.83 4.83 3.96 3.81 3.76 2.89 4.86 2.91
|
||||
4.26 2.76 4.50 3.58 2.59 4.20 3.81 3.80 3.01 4.85
|
||||
4.00 3.57 3.26 3.32 3.45 4.17 3.56 4.12 2.68 2.75
|
||||
4.90 4.90 3.35 4.69 3.70 4.44 3.25 3.95 2.71 2.86
|
||||
4.37 4.44 3.98 4.83 3.20 2.64 3.07 3.18 4.00 2.38
|
||||
5.99 3.36 3.98 3.01 2.19 3.00 5.06 3.09 2.78 4.36
|
||||
3.25 4.55 2.72 4.33 3.04 2.89 4.82 3.94 3.18 4.36
|
||||
3.76 4.42 3.16 3.15 3.70 3.19 2.37 4.09 3.27 3.33
|
||||
INTERNAL FACTOR 1.0
|
||||
2.35 3.52 0.56 3.19 2.18 2.15 2.11 2.50 1.96 2.86
|
||||
1.59 3.09 2.80 1.71 2.86 3.57 2.60 3.25 2.47 2.80
|
||||
1.25 2.25 4.10 3.27 3.09 2.74 3.46 1.48 2.38 0.40
|
||||
2.71 1.45 0.86 3.37 2.77 2.27 2.48 3.82 0.72 3.46
|
||||
3.18 0.64 2.71 2.04 2.18 3.49 2.15 1.53 1.91 5.43
|
||||
3.64 2.51 2.18 3.20 1.23 1.87 2.91 2.26 1.63 1.71
|
||||
2.60 1.91 3.36 2.00 2.29 1.82 2.49 3.58 2.26 3.43
|
||||
1.27 4.35 2.98 0.95 2.51 2.01 3.38 2.55 1.69 3.51
|
||||
2.56 2.30 2.84 3.35 2.41 1.66 2.17 2.50 2.21 2.79
|
||||
4.07 3.71 1.94 1.07 1.96 2.57 2.53 2.33 1.37 4.07
|
||||
2.86 2.76 1.26 2.02 2.69 0.91 1.25 3.36 2.61 0.93
|
||||
3.07 2.63 2.25 1.69 3.00 2.67 2.67 4.12 4.21 2.19
|
||||
3.01 2.80 3.30 3.93 2.36 2.54 1.49 2.31 3.97 1.93
|
||||
2.52 1.28 3.34 3.08 2.21 1.53 3.32 2.27 2.83 1.99
|
||||
3.29 2.91 0.75 3.04 2.55 3.70 3.27 3.55 1.18 0.78
|
||||
1.95 3.81 3.04 4.01 1.82 3.45 0.77 3.37 1.52 0.89
|
||||
3.14 3.36 2.81 4.07 2.87 2.30 2.12 2.23 3.43 1.66
|
||||
1.99 2.45 2.40 2.26 1.99 2.74 3.89 1.40 2.40 3.19
|
||||
2.27 3.44 2.25 2.75 1.12 2.34 3.69 2.22 2.15 3.42
|
||||
3.14 2.19 1.47 1.97 3.06 1.11 2.19 3.58 2.62 2.78
|
||||
INTERNAL FACTOR 1.0
|
||||
0.99 2.72 0.18 0.77 0.41 1.74 1.54 0.79 1.58 0.74
|
||||
0.89 2.19 1.69 1.33 2.40 1.97 2.03 2.94 2.15 2.10
|
||||
1.07 1.98 3.53 1.48 2.79 2.00 2.34 0.72 0.69 0.36
|
||||
1.74 0.75 0.41 2.67 2.13 1.05 0.36 2.05 0.65 2.95
|
||||
2.20 0.48 1.63 1.03 1.34 1.50 1.05 1.48 0.89 4.19
|
||||
0.89 1.92 1.84 0.35 0.81 1.34 1.37 1.67 1.33 0.11
|
||||
0.14 1.07 2.23 1.32 0.72 1.08 0.99 2.36 0.25 2.34
|
||||
0.15 3.59 1.16 0.82 2.05 1.28 2.16 1.54 1.44 3.23
|
||||
0.18 1.71 1.27 1.61 0.37 1.29 1.66 0.56 1.91 2.28
|
||||
0.67 2.58 1.16 0.68 1.47 1.34 0.94 1.68 1.13 0.78
|
||||
0.90 2.12 0.28 1.05 2.31 0.63 0.54 2.82 1.68 0.40
|
||||
2.39 2.07 1.43 0.48 2.07 1.41 1.13 2.96 1.68 1.26
|
||||
0.77 1.22 0.71 1.08 0.49 1.15 0.80 1.93 1.77 1.11
|
||||
1.10 0.50 0.26 2.13 0.38 0.69 0.51 2.09 1.11 1.94
|
||||
1.09 2.10 0.50 2.39 1.67 2.26 2.54 2.46 1.05 0.73
|
||||
1.86 3.54 2.80 1.03 1.52 2.24 0.41 2.12 0.87 0.49
|
||||
2.62 0.45 2.30 3.09 1.88 0.80 0.69 1.21 1.80 0.68
|
||||
0.19 0.22 1.44 1.20 1.27 2.04 1.40 0.49 0.43 1.83
|
||||
1.37 2.48 1.46 2.37 0.33 1.87 2.86 1.42 0.95 1.52
|
||||
0.45 1.06 1.46 0.78 1.34 0.84 0.71 0.48 2.21 1.92
|
||||
INTERNAL FACTOR 1.0
|
||||
0.71 0.00 0.00 0.00 0.00 0.77 0.00 0.00 0.59 0.43
|
||||
0.38 0.09 0.00 0.00 0.00 0.61 0.94 0.52 1.06 0.00
|
||||
0.00 0.00 0.03 0.00 0.00 0.00 0.08 0.00 0.00 0.00
|
||||
0.68 0.31 0.00 0.00 0.00 0.00 0.00 0.68 0.00 0.81
|
||||
0.00 0.00 0.70 0.33 0.00 0.48 0.00 0.00 0.00 1.79
|
||||
0.00 0.21 1.20 0.00 0.77 1.07 0.00 1.00 0.85 0.00
|
||||
0.00 0.16 1.21 0.90 0.23 0.00 0.58 1.56 0.00 1.72
|
||||
0.00 2.39 0.12 0.59 0.61 0.29 1.54 0.34 0.16 2.32
|
||||
0.00 1.27 0.10 0.47 0.23 0.00 1.26 0.00 1.76 1.42
|
||||
0.00 0.00 0.79 0.00 0.55 0.00 0.11 1.27 0.00 0.00
|
||||
0.00 0.00 0.00 0.00 1.08 0.00 0.00 0.76 0.37 0.00
|
||||
1.91 0.00 0.53 0.14 1.68 0.00 0.00 2.53 0.00 0.14
|
||||
0.00 0.00 0.00 0.05 0.00 0.07 0.00 0.00 0.00 0.00
|
||||
0.00 0.00 0.00 0.97 0.00 0.00 0.00 1.41 0.36 0.00
|
||||
0.66 0.08 0.00 0.00 0.87 1.39 1.48 0.00 0.40 0.00
|
||||
1.49 2.38 0.08 0.29 0.00 0.85 0.34 0.41 0.11 0.00
|
||||
0.14 0.00 0.87 1.96 1.08 0.05 0.00 0.00 0.64 0.02
|
||||
0.00 0.00 0.00 0.86 0.21 0.00 0.00 0.00 0.00 0.91
|
||||
0.71 0.00 0.00 1.67 0.16 0.00 0.00 0.73 0.68 0.84
|
||||
0.00 0.84 1.01 0.00 0.00 0.28 0.00 0.28 1.77 0.00
|
||||
IDOMAIN LAYERED
|
||||
INTERNAL FACTOR 1 IPRN -1
|
||||
1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
|
||||
CONSTANT 1
|
||||
CONSTANT 1
|
||||
CONSTANT 1
|
||||
END GRIDDATA
|
||||
|
||||
BEGIN VERTICES
|
||||
1 0.0 10.0
|
||||
2 1.0 10.0
|
||||
3 2.0 10.0
|
||||
4 3.0 10.0
|
||||
5 4.0 10.0
|
||||
6 5.0 10.0
|
||||
7 6.0 10.0
|
||||
8 7.0 10.0
|
||||
9 8.0 10.0
|
||||
10 9.0 10.0
|
||||
11 10.0 10.0
|
||||
12 0.0 9.0
|
||||
13 1.0 9.0
|
||||
14 2.0 9.0
|
||||
15 3.0 9.0
|
||||
16 4.0 9.0
|
||||
17 5.0 9.0
|
||||
18 6.0 9.0
|
||||
19 7.0 9.0
|
||||
20 8.0 9.0
|
||||
21 9.0 9.0
|
||||
22 10.0 9.0
|
||||
23 0.0 8.0
|
||||
24 1.0 8.0
|
||||
25 2.0 8.0
|
||||
26 3.0 8.0
|
||||
27 4.0 8.0
|
||||
28 5.0 8.0
|
||||
29 6.0 8.0
|
||||
30 7.0 8.0
|
||||
31 8.0 8.0
|
||||
32 9.0 8.0
|
||||
33 10.0 8.0
|
||||
34 0.0 7.0
|
||||
35 1.0 7.0
|
||||
36 2.0 7.0
|
||||
37 3.0 7.0
|
||||
38 4.0 7.0
|
||||
39 5.0 7.0
|
||||
40 6.0 7.0
|
||||
41 7.0 7.0
|
||||
42 8.0 7.0
|
||||
43 9.0 7.0
|
||||
44 10.0 7.0
|
||||
45 0.0 6.0
|
||||
46 1.0 6.0
|
||||
47 2.0 6.0
|
||||
48 3.0 6.0
|
||||
49 4.0 6.0
|
||||
50 5.0 6.0
|
||||
51 6.0 6.0
|
||||
52 7.0 6.0
|
||||
53 8.0 6.0
|
||||
54 9.0 6.0
|
||||
55 10.0 6.0
|
||||
56 0.0 5.0
|
||||
57 1.0 5.0
|
||||
58 2.0 5.0
|
||||
59 3.0 5.0
|
||||
60 4.0 5.0
|
||||
61 5.0 5.0
|
||||
62 6.0 5.0
|
||||
63 7.0 5.0
|
||||
64 8.0 5.0
|
||||
65 9.0 5.0
|
||||
66 10.0 5.0
|
||||
67 0.0 4.0
|
||||
68 1.0 4.0
|
||||
69 2.0 4.0
|
||||
70 3.0 4.0
|
||||
71 4.0 4.0
|
||||
72 5.0 4.0
|
||||
73 6.0 4.0
|
||||
74 7.0 4.0
|
||||
75 8.0 4.0
|
||||
76 9.0 4.0
|
||||
77 10.0 4.0
|
||||
78 0.0 3.0
|
||||
79 1.0 3.0
|
||||
80 2.0 3.0
|
||||
81 3.0 3.0
|
||||
82 4.0 3.0
|
||||
83 5.0 3.0
|
||||
84 6.0 3.0
|
||||
85 7.0 3.0
|
||||
86 8.0 3.0
|
||||
87 9.0 3.0
|
||||
88 10.0 3.0
|
||||
89 0.0 2.0
|
||||
90 1.0 2.0
|
||||
91 2.0 2.0
|
||||
92 3.0 2.0
|
||||
93 4.0 2.0
|
||||
94 5.0 2.0
|
||||
95 6.0 2.0
|
||||
96 7.0 2.0
|
||||
97 8.0 2.0
|
||||
98 9.0 2.0
|
||||
99 10.0 2.0
|
||||
100 0.0 1.0
|
||||
101 1.0 1.0
|
||||
102 2.0 1.0
|
||||
103 3.0 1.0
|
||||
104 4.0 1.0
|
||||
105 5.0 1.0
|
||||
106 6.0 1.0
|
||||
107 7.0 1.0
|
||||
108 8.0 1.0
|
||||
109 9.0 1.0
|
||||
110 10.0 1.0
|
||||
111 0.0 0.0
|
||||
112 1.0 0.0
|
||||
113 2.0 0.0
|
||||
114 3.0 0.0
|
||||
115 4.0 0.0
|
||||
116 5.0 0.0
|
||||
117 6.0 0.0
|
||||
118 7.0 0.0
|
||||
119 8.0 0.0
|
||||
120 9.0 0.0
|
||||
121 10.0 0.0
|
||||
END VERTICES
|
||||
|
||||
BEGIN CELL2D
|
||||
1 0.33 9.67 3 1 2 12
|
||||
2 0.67 9.33 3 2 13 12
|
||||
3 1.33 9.67 3 2 3 13
|
||||
4 1.67 9.33 3 3 14 13
|
||||
5 2.33 9.67 3 3 4 14
|
||||
6 2.67 9.33 3 4 15 14
|
||||
7 3.33 9.67 3 4 5 15
|
||||
8 3.67 9.33 3 5 16 15
|
||||
9 4.33 9.67 3 5 6 16
|
||||
10 4.67 9.33 3 6 17 16
|
||||
11 5.33 9.67 3 6 7 17
|
||||
12 5.67 9.33 3 7 18 17
|
||||
13 6.33 9.67 3 7 8 18
|
||||
14 6.67 9.33 3 8 19 18
|
||||
15 7.33 9.67 3 8 9 19
|
||||
16 7.67 9.33 3 9 20 19
|
||||
17 8.33 9.67 3 9 10 20
|
||||
18 8.67 9.33 3 10 21 20
|
||||
19 9.33 9.67 3 10 11 21
|
||||
20 9.67 9.33 3 11 22 21
|
||||
21 0.33 8.67 3 12 13 23
|
||||
22 0.67 8.33 3 13 24 23
|
||||
23 1.33 8.67 3 13 14 24
|
||||
24 1.67 8.33 3 14 25 24
|
||||
25 2.33 8.67 3 14 15 25
|
||||
26 2.67 8.33 3 15 26 25
|
||||
27 3.33 8.67 3 15 16 26
|
||||
28 3.67 8.33 3 16 27 26
|
||||
29 4.33 8.67 3 16 17 27
|
||||
30 4.67 8.33 3 17 28 27
|
||||
31 5.33 8.67 3 17 18 28
|
||||
32 5.67 8.33 3 18 29 28
|
||||
33 6.33 8.67 3 18 19 29
|
||||
34 6.67 8.33 3 19 30 29
|
||||
35 7.33 8.67 3 19 20 30
|
||||
36 7.67 8.33 3 20 31 30
|
||||
37 8.33 8.67 3 20 21 31
|
||||
38 8.67 8.33 3 21 32 31
|
||||
39 9.33 8.67 3 21 22 32
|
||||
40 9.67 8.33 3 22 33 32
|
||||
41 0.33 7.67 3 23 24 34
|
||||
42 0.67 7.33 3 24 35 34
|
||||
43 1.33 7.67 3 24 25 35
|
||||
44 1.67 7.33 3 25 36 35
|
||||
45 2.33 7.67 3 25 26 36
|
||||
46 2.67 7.33 3 26 37 36
|
||||
47 3.33 7.67 3 26 27 37
|
||||
48 3.67 7.33 3 27 38 37
|
||||
49 4.33 7.67 3 27 28 38
|
||||
50 4.67 7.33 3 28 39 38
|
||||
51 5.33 7.67 3 28 29 39
|
||||
52 5.67 7.33 3 29 40 39
|
||||
53 6.33 7.67 3 29 30 40
|
||||
54 6.67 7.33 3 30 41 40
|
||||
55 7.33 7.67 3 30 31 41
|
||||
56 7.67 7.33 3 31 42 41
|
||||
57 8.33 7.67 3 31 32 42
|
||||
58 8.67 7.33 3 32 43 42
|
||||
59 9.33 7.67 3 32 33 43
|
||||
60 9.67 7.33 3 33 44 43
|
||||
61 0.33 6.67 3 34 35 45
|
||||
62 0.67 6.33 3 35 46 45
|
||||
63 1.33 6.67 3 35 36 46
|
||||
64 1.67 6.33 3 36 47 46
|
||||
65 2.33 6.67 3 36 37 47
|
||||
66 2.67 6.33 3 37 48 47
|
||||
67 3.33 6.67 3 37 38 48
|
||||
68 3.67 6.33 3 38 49 48
|
||||
69 4.33 6.67 3 38 39 49
|
||||
70 4.67 6.33 3 39 50 49
|
||||
71 5.33 6.67 3 39 40 50
|
||||
72 5.67 6.33 3 40 51 50
|
||||
73 6.33 6.67 3 40 41 51
|
||||
74 6.67 6.33 3 41 52 51
|
||||
75 7.33 6.67 3 41 42 52
|
||||
76 7.67 6.33 3 42 53 52
|
||||
77 8.33 6.67 3 42 43 53
|
||||
78 8.67 6.33 3 43 54 53
|
||||
79 9.33 6.67 3 43 44 54
|
||||
80 9.67 6.33 3 44 55 54
|
||||
81 0.33 5.67 3 45 46 56
|
||||
82 0.67 5.33 3 46 57 56
|
||||
83 1.33 5.67 3 46 47 57
|
||||
84 1.67 5.33 3 47 58 57
|
||||
85 2.33 5.67 3 47 48 58
|
||||
86 2.67 5.33 3 48 59 58
|
||||
87 3.33 5.67 3 48 49 59
|
||||
88 3.67 5.33 3 49 60 59
|
||||
89 4.33 5.67 3 49 50 60
|
||||
90 4.67 5.33 3 50 61 60
|
||||
91 5.33 5.67 3 50 51 61
|
||||
92 5.67 5.33 3 51 62 61
|
||||
93 6.33 5.67 3 51 52 62
|
||||
94 6.67 5.33 3 52 63 62
|
||||
95 7.33 5.67 3 52 53 63
|
||||
96 7.67 5.33 3 53 64 63
|
||||
97 8.33 5.67 3 53 54 64
|
||||
98 8.67 5.33 3 54 65 64
|
||||
99 9.33 5.67 3 54 55 65
|
||||
100 9.67 5.33 3 55 66 65
|
||||
101 0.33 4.67 3 56 57 67
|
||||
102 0.67 4.33 3 57 68 67
|
||||
103 1.33 4.67 3 57 58 68
|
||||
104 1.67 4.33 3 58 69 68
|
||||
105 2.33 4.67 3 58 59 69
|
||||
106 2.67 4.33 3 59 70 69
|
||||
107 3.33 4.67 3 59 60 70
|
||||
108 3.67 4.33 3 60 71 70
|
||||
109 4.33 4.67 3 60 61 71
|
||||
110 4.67 4.33 3 61 72 71
|
||||
111 5.33 4.67 3 61 62 72
|
||||
112 5.67 4.33 3 62 73 72
|
||||
113 6.33 4.67 3 62 63 73
|
||||
114 6.67 4.33 3 63 74 73
|
||||
115 7.33 4.67 3 63 64 74
|
||||
116 7.67 4.33 3 64 75 74
|
||||
117 8.33 4.67 3 64 65 75
|
||||
118 8.67 4.33 3 65 76 75
|
||||
119 9.33 4.67 3 65 66 76
|
||||
120 9.67 4.33 3 66 77 76
|
||||
121 0.33 3.67 3 67 68 78
|
||||
122 0.67 3.33 3 68 79 78
|
||||
123 1.33 3.67 3 68 69 79
|
||||
124 1.67 3.33 3 69 80 79
|
||||
125 2.33 3.67 3 69 70 80
|
||||
126 2.67 3.33 3 70 81 80
|
||||
127 3.33 3.67 3 70 71 81
|
||||
128 3.67 3.33 3 71 82 81
|
||||
129 4.33 3.67 3 71 72 82
|
||||
130 4.67 3.33 3 72 83 82
|
||||
131 5.33 3.67 3 72 73 83
|
||||
132 5.67 3.33 3 73 84 83
|
||||
133 6.33 3.67 3 73 74 84
|
||||
134 6.67 3.33 3 74 85 84
|
||||
135 7.33 3.67 3 74 75 85
|
||||
136 7.67 3.33 3 75 86 85
|
||||
137 8.33 3.67 3 75 76 86
|
||||
138 8.67 3.33 3 76 87 86
|
||||
139 9.33 3.67 3 76 77 87
|
||||
140 9.67 3.33 3 77 88 87
|
||||
141 0.33 2.67 3 78 79 89
|
||||
142 0.67 2.33 3 79 90 89
|
||||
143 1.33 2.67 3 79 80 90
|
||||
144 1.67 2.33 3 80 91 90
|
||||
145 2.33 2.67 3 80 81 91
|
||||
146 2.67 2.33 3 81 92 91
|
||||
147 3.33 2.67 3 81 82 92
|
||||
148 3.67 2.33 3 82 93 92
|
||||
149 4.33 2.67 3 82 83 93
|
||||
150 4.67 2.33 3 83 94 93
|
||||
151 5.33 2.67 3 83 84 94
|
||||
152 5.67 2.33 3 84 95 94
|
||||
153 6.33 2.67 3 84 85 95
|
||||
154 6.67 2.33 3 85 96 95
|
||||
155 7.33 2.67 3 85 86 96
|
||||
156 7.67 2.33 3 86 97 96
|
||||
157 8.33 2.67 3 86 87 97
|
||||
158 8.67 2.33 3 87 98 97
|
||||
159 9.33 2.67 3 87 88 98
|
||||
160 9.67 2.33 3 88 99 98
|
||||
161 0.33 1.67 3 89 90 100
|
||||
162 0.67 1.33 3 90 101 100
|
||||
163 1.33 1.67 3 90 91 101
|
||||
164 1.67 1.33 3 91 102 101
|
||||
165 2.33 1.67 3 91 92 102
|
||||
166 2.67 1.33 3 92 103 102
|
||||
167 3.33 1.67 3 92 93 103
|
||||
168 3.67 1.33 3 93 104 103
|
||||
169 4.33 1.67 3 93 94 104
|
||||
170 4.67 1.33 3 94 105 104
|
||||
171 5.33 1.67 3 94 95 105
|
||||
172 5.67 1.33 3 95 106 105
|
||||
173 6.33 1.67 3 95 96 106
|
||||
174 6.67 1.33 3 96 107 106
|
||||
175 7.33 1.67 3 96 97 107
|
||||
176 7.67 1.33 3 97 108 107
|
||||
177 8.33 1.67 3 97 98 108
|
||||
178 8.67 1.33 3 98 109 108
|
||||
179 9.33 1.67 3 98 99 109
|
||||
180 9.67 1.33 3 99 110 109
|
||||
181 0.33 0.67 3 100 101 111
|
||||
182 0.67 0.33 3 101 112 111
|
||||
183 1.33 0.67 3 101 102 112
|
||||
184 1.67 0.33 3 102 113 112
|
||||
185 2.33 0.67 3 102 103 113
|
||||
186 2.67 0.33 3 103 114 113
|
||||
187 3.33 0.67 3 103 104 114
|
||||
188 3.67 0.33 3 104 115 114
|
||||
189 4.33 0.67 3 104 105 115
|
||||
190 4.67 0.33 3 105 116 115
|
||||
191 5.33 0.67 3 105 106 116
|
||||
192 5.67 0.33 3 106 117 116
|
||||
193 6.33 0.67 3 106 107 117
|
||||
194 6.67 0.33 3 107 118 117
|
||||
195 7.33 0.67 3 107 108 118
|
||||
196 7.67 0.33 3 108 119 118
|
||||
197 8.33 0.67 3 108 109 119
|
||||
198 8.67 0.33 3 109 120 119
|
||||
199 9.33 0.67 3 109 110 120
|
||||
200 9.67 0.33 3 110 121 120
|
||||
END CELL2D
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
begin options
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
end options
|
||||
|
||||
begin dimensions
|
||||
MAXBOUND 10
|
||||
end dimensions
|
||||
|
||||
begin period 1
|
||||
#layer 1
|
||||
1 1 10.
|
||||
1 21 10.
|
||||
1 41 10.
|
||||
1 61 10.
|
||||
1 81 10.
|
||||
1 101 10.
|
||||
1 121 10.
|
||||
1 141 10.
|
||||
1 161 10.
|
||||
1 181 10.
|
||||
end period
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
begin options
|
||||
PRINT_INPUT
|
||||
PRINT_FLOWS
|
||||
SAVE_FLOWS
|
||||
end options
|
||||
|
||||
begin dimensions
|
||||
MAXBOUND 10
|
||||
end dimensions
|
||||
|
||||
begin period 1
|
||||
#layer 1
|
||||
1 20 5.
|
||||
1 40 5.
|
||||
1 60 5.
|
||||
1 80 5.
|
||||
1 100 5.
|
||||
1 120 5.
|
||||
1 140 5.
|
||||
1 160 5.
|
||||
1 180 5.
|
||||
1 200 5.
|
||||
end period
|
File diff suppressed because one or more lines are too long
|
@ -23,7 +23,8 @@ contribute.
|
|||
__name__ = 'flopy'
|
||||
__author__ = 'Mark Bakker, Vincent Post, Christian D. Langevin, ' + \
|
||||
'Joseph D. Hughes, Jeremy T. White, Andrew T. Leaf, ' + \
|
||||
'Scott R. Paulinski, Jeffrey J. Starn, and Michael N. Fienen'
|
||||
'Scott R. Paulinski, Jeffrey J. Starn, Michael N. Fienen, ' +\
|
||||
'and Joshua D. Larsen'
|
||||
|
||||
from .version import __version__, __build__, __git_commit__
|
||||
|
||||
|
@ -38,4 +39,6 @@ from . import plot
|
|||
from . import export
|
||||
from . import pest
|
||||
from . import mf6
|
||||
from . import discretization
|
||||
|
||||
from .mbase import run_model, which
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
import abc
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class DataType(Enum):
|
||||
array2d = 1
|
||||
array3d = 2
|
||||
transient2d = 3
|
||||
transient3d = 4
|
||||
list = 5
|
||||
transientlist = 6
|
||||
scalar = 7
|
||||
transientscalar = 8
|
||||
|
||||
|
||||
class DataInterface(object):
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def data_type(self):
|
||||
raise NotImplementedError(
|
||||
'must define dat_type in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def dtype(self):
|
||||
def dtype(self):
|
||||
raise NotImplementedError(
|
||||
'must define dtype in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def array(self):
|
||||
raise NotImplementedError(
|
||||
'must define array in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def name(self):
|
||||
raise NotImplementedError(
|
||||
'must define name in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def model(self):
|
||||
raise NotImplementedError(
|
||||
'must define name in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def plotable(self):
|
||||
raise NotImplementedError(
|
||||
'must define plotable in child '
|
||||
'class to use this base class')
|
||||
|
||||
|
||||
class DataListInterface(object):
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def package(self):
|
||||
raise NotImplementedError(
|
||||
'must define package in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
@abc.abstractmethod
|
||||
def to_array(self, kper=0, mask=False):
|
||||
def to_array(self):
|
||||
raise NotImplementedError(
|
||||
'must define to_array in child '
|
||||
'class to use this base class')
|
||||
|
||||
@abc.abstractmethod
|
||||
def masked_4D_arrays_itr(self):
|
||||
def masked_4D_arrays_itr(self):
|
||||
raise NotImplementedError(
|
||||
'must define masked_4D_arrays_itr in child '
|
||||
'class to use this base class')
|
|
@ -0,0 +1,3 @@
|
|||
from .structuredgrid import StructuredGrid
|
||||
from .vertexgrid import VertexGrid
|
||||
from .unstructuredgrid import UnstructuredGrid
|
|
@ -0,0 +1,497 @@
|
|||
import numpy as np
|
||||
import copy, os
|
||||
import warnings
|
||||
from ..utils import geometry
|
||||
|
||||
|
||||
class CachedData(object):
|
||||
def __init__(self, data):
|
||||
self._data = data
|
||||
self.out_of_date = False
|
||||
|
||||
@property
|
||||
def data(self):
|
||||
return copy.deepcopy(self._data)
|
||||
|
||||
def update_data(self, data):
|
||||
self._data = data
|
||||
self.out_of_date = False
|
||||
|
||||
|
||||
class Grid(object):
|
||||
"""
|
||||
Base class for a structured or unstructured model grid
|
||||
|
||||
Parameters
|
||||
----------
|
||||
grid_type : enumeration
|
||||
type of model grid ('structured', 'vertex_layered',
|
||||
'vertex_unlayered')
|
||||
top : ndarray(np.float)
|
||||
top elevations of cells in topmost layer
|
||||
botm : ndarray(np.float)
|
||||
bottom elevations of all cells
|
||||
idomain : ndarray(np.int)
|
||||
ibound/idomain value for each cell
|
||||
lenuni : ndarray(np.int)
|
||||
model length units
|
||||
origin_loc : str
|
||||
Corner of the model grid that is the model origin
|
||||
'ul' (upper left corner) or 'll' (lower left corner)
|
||||
origin_x : float
|
||||
x coordinate of the origin point (lower left corner of model grid)
|
||||
in the spatial reference coordinate system
|
||||
origin_y : float
|
||||
y coordinate of the origin point (lower left corner of model grid)
|
||||
in the spatial reference coordinate system
|
||||
rotation : float
|
||||
rotation angle of model grid, as it is rotated around the origin point
|
||||
|
||||
Properties
|
||||
----------
|
||||
grid_type : enumeration
|
||||
type of model grid ('structured', 'vertex_layered',
|
||||
'vertex_unlayered')
|
||||
top : ndarray(np.float)
|
||||
top elevations of cells in topmost layer
|
||||
botm : ndarray(np.float)
|
||||
bottom elevations of all cells
|
||||
idomain : ndarray(np.int)
|
||||
ibound/idomain value for each cell
|
||||
proj4 : proj4 SpatialReference
|
||||
spatial reference locates the grid in a coordinate system
|
||||
epsg : epsg SpatialReference
|
||||
spatial reference locates the grid in a coordinate system
|
||||
origin_x : float
|
||||
x coordinate of the origin point in the spatial reference coordinate
|
||||
system
|
||||
origin_y : float
|
||||
y coordinate of the origin point in the spatial reference coordinate
|
||||
system
|
||||
rotation : float
|
||||
rotation angle of model grid, as it is rotated around the origin point
|
||||
xgrid : ndarray
|
||||
returns numpy meshgrid of x edges in reference frame defined by
|
||||
point_type
|
||||
ygrid : ndarray
|
||||
returns numpy meshgrid of y edges in reference frame defined by
|
||||
point_type
|
||||
zgrid : ndarray
|
||||
returns numpy meshgrid of z edges in reference frame defined by
|
||||
point_type
|
||||
xcenters : ndarray
|
||||
returns x coordinate of cell centers
|
||||
ycenters : ndarray
|
||||
returns y coordinate of cell centers
|
||||
ycenters : ndarray
|
||||
returns z coordinate of cell centers
|
||||
xyzgrid : [ndarray, ndarray, ndarray]
|
||||
returns the location of grid edges of all model cells. if the model
|
||||
grid contains spatial reference information, the grid edges are in the
|
||||
coordinate system provided by the spatial reference information.
|
||||
returns a list of three ndarrays for the x, y, and z coordinates
|
||||
xyzcellcenters : [ndarray, ndarray, ndarray]
|
||||
returns the cell centers of all model cells in the model grid. if
|
||||
the model grid contains spatial reference information, the cell centers
|
||||
are in the coordinate system provided by the spatial reference
|
||||
information. otherwise the cell centers are based on a 0,0 location
|
||||
for the upper left corner of the model grid. returns a list of three
|
||||
ndarrays for the x, y, and z coordinates
|
||||
|
||||
Methods
|
||||
----------
|
||||
get_coords(x, y)
|
||||
transform point or array of points x, y from model coordinates to
|
||||
spatial coordinates
|
||||
grid_lines : (point_type=PointType.spatialxyz) : list
|
||||
returns the model grid lines in a list. each line is returned as a
|
||||
list containing two tuples in the format [(x1,y1), (x2,y2)] where
|
||||
x1,y1 and x2,y2 are the endpoints of the line.
|
||||
xyvertices : (point_type) : ndarray
|
||||
1D array of x and y coordinates of cell vertices for whole grid
|
||||
(single layer) in C-style (row-major) order
|
||||
(same as np.ravel())
|
||||
intersect(x, y, local)
|
||||
returns the row and column of the grid that the x, y point is in
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
Notes
|
||||
-----
|
||||
|
||||
Examples
|
||||
--------
|
||||
"""
|
||||
def __init__(self, grid_type=None, top=None, botm=None, idomain=None,
|
||||
lenuni=None, epsg=None, proj4=None, prj=None, xoff=0.0, yoff=0.0,
|
||||
angrot=0.0):
|
||||
self.use_ref_coords = True
|
||||
self._grid_type = grid_type
|
||||
self._top = top
|
||||
self._botm = botm
|
||||
self._idomain = idomain
|
||||
self._lenuni = lenuni
|
||||
self._epsg = epsg
|
||||
self._proj4 = proj4
|
||||
self._prj = prj
|
||||
self._xoff = xoff
|
||||
self._yoff = yoff
|
||||
if angrot is None:
|
||||
angrot = 0.0
|
||||
self._angrot = angrot
|
||||
self._cache_dict = {}
|
||||
|
||||
###################################
|
||||
# access to basic grid properties
|
||||
###################################
|
||||
def __repr__(self):
|
||||
s = "xll:{0:<.10G}; yll:{1:<.10G}; rotation:{2:<G}; ". \
|
||||
format(self.xoffset, self.yoffset, self.angrot)
|
||||
s += "proj4_str:{0}; ".format(self.proj4)
|
||||
s += "units:{0}; ".format("")
|
||||
s += "lenuni:{0}; ".format(self.lenuni)
|
||||
s += "length_multiplier:{}".format(1)
|
||||
return s
|
||||
|
||||
@property
|
||||
def grid_type(self):
|
||||
return self._grid_type
|
||||
|
||||
@property
|
||||
def xoffset(self):
|
||||
return self._xoff
|
||||
|
||||
@property
|
||||
def yoffset(self):
|
||||
return self._yoff
|
||||
|
||||
@property
|
||||
def angrot(self):
|
||||
return self._angrot
|
||||
|
||||
@property
|
||||
def angrot_radians(self):
|
||||
return self._angrot * np.pi / 180.
|
||||
|
||||
@property
|
||||
def epsg(self):
|
||||
return self._epsg
|
||||
|
||||
@epsg.setter
|
||||
def epsg(self, epsg):
|
||||
self._epsg = epsg
|
||||
|
||||
@property
|
||||
def proj4(self):
|
||||
return self._proj4
|
||||
|
||||
@proj4.setter
|
||||
def proj4(self, proj4):
|
||||
self._proj4 = proj4
|
||||
|
||||
@property
|
||||
def prj(self):
|
||||
return self._prj
|
||||
|
||||
@prj.setter
|
||||
def prj(self, prj):
|
||||
self._proj4 = prj
|
||||
|
||||
@property
|
||||
def top(self):
|
||||
return self._top
|
||||
|
||||
@property
|
||||
def botm(self):
|
||||
return self._botm
|
||||
|
||||
@property
|
||||
def top_botm(self):
|
||||
new_top = np.expand_dims(self._top, 0)
|
||||
return np.concatenate((new_top, self._botm), axis=0)
|
||||
|
||||
@property
|
||||
def lenuni(self):
|
||||
return self._lenuni
|
||||
|
||||
@property
|
||||
def idomain(self):
|
||||
return self._idomain
|
||||
|
||||
@property
|
||||
def shape(self):
|
||||
raise NotImplementedError(
|
||||
'must define extent in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
def extent(self):
|
||||
raise NotImplementedError(
|
||||
'must define extent in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
def grid_lines(self):
|
||||
raise NotImplementedError(
|
||||
'must define get_cellcenters in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
def xcellcenters(self):
|
||||
return self.xyzcellcenters[0]
|
||||
|
||||
@property
|
||||
def ycellcenters(self):
|
||||
return self.xyzcellcenters[1]
|
||||
|
||||
@property
|
||||
def zcellcenters(self):
|
||||
return self.xyzcellcenters[2]
|
||||
|
||||
@property
|
||||
def xyzcellcenters(self):
|
||||
raise NotImplementedError(
|
||||
'must define get_cellcenters in child '
|
||||
'class to use this base class')
|
||||
|
||||
@property
|
||||
def xvertices(self):
|
||||
return self.xyzvertices[0]
|
||||
|
||||
@property
|
||||
def yvertices(self):
|
||||
return self.xyzvertices[1]
|
||||
|
||||
@property
|
||||
def zvertices(self):
|
||||
return self.xyzvertices[2]
|
||||
|
||||
@property
|
||||
def xyzvertices(self):
|
||||
raise NotImplementedError(
|
||||
'must define xyzgrid in child '
|
||||
'class to use this base class')
|
||||
|
||||
#@property
|
||||
#def indices(self):
|
||||
# raise NotImplementedError(
|
||||
# 'must define indices in child '
|
||||
# 'class to use this base class')
|
||||
|
||||
def get_coords(self, x, y):
|
||||
"""
|
||||
Given x and y array-like values, apply rotation, scale and offset,
|
||||
to convert them from model coordinates to real-world coordinates.
|
||||
"""
|
||||
if isinstance(x, list):
|
||||
x = np.array(x)
|
||||
y = np.array(y)
|
||||
if not np.isscalar(x):
|
||||
x, y = x.copy(), y.copy()
|
||||
|
||||
x += self._xoff
|
||||
y += self._yoff
|
||||
return geometry.rotate(x, y, self._xoff, self._yoff,
|
||||
self.angrot_radians)
|
||||
|
||||
def get_local_coords(self, x, y):
|
||||
"""
|
||||
Given x and y array-like values, apply rotation, scale and offset,
|
||||
to convert them from model coordinates to real-world coordinates.
|
||||
"""
|
||||
if isinstance(x, list):
|
||||
x = np.array(x)
|
||||
y = np.array(y)
|
||||
if not np.isscalar(x):
|
||||
x, y = x.copy(), y.copy()
|
||||
|
||||
x, y = geometry.rotate(x, y, self._xoff, self._yoff,
|
||||
-self.angrot_radians)
|
||||
x -= self._xoff
|
||||
y -= self._yoff
|
||||
|
||||
return x, y
|
||||
|
||||
def intersect(self, x, y, local=True):
|
||||
if not local:
|
||||
return self.get_local_coords(x, y)
|
||||
else:
|
||||
return x, y
|
||||
|
||||
def set_coord_info(self, xoff=0.0, yoff=0.0, angrot=0.0, epsg=None,
|
||||
proj4=None):
|
||||
if xoff is None:
|
||||
xoff = self._xoff
|
||||
if yoff is None:
|
||||
yoff = self._yoff
|
||||
if angrot is None:
|
||||
angrot = self._angrot
|
||||
self._xoff = xoff
|
||||
self._yoff = yoff
|
||||
self._angrot = angrot
|
||||
self._epsg = epsg
|
||||
self._proj4 = proj4
|
||||
self._require_cache_updates()
|
||||
|
||||
def load_coord_info(self, namefile=None, reffile='usgs.model.reference'):
|
||||
"""Attempts to load spatial reference information from
|
||||
the following files (in order):
|
||||
1) usgs.model.reference
|
||||
2) NAM file (header comment)
|
||||
3) defaults
|
||||
"""
|
||||
reffile = os.path.join(os.path.split(namefile)[0], reffile)
|
||||
# try to load reference file
|
||||
if not self.read_usgs_model_reference_file(reffile):
|
||||
# try to load nam file
|
||||
if not self.attribs_from_namfile_header(namefile):
|
||||
# set defaults
|
||||
self.set_coord_info()
|
||||
|
||||
def attribs_from_namfile_header(self, namefile):
|
||||
# check for reference info in the nam file header
|
||||
if namefile is None:
|
||||
return False
|
||||
header = []
|
||||
with open(namefile, 'r') as f:
|
||||
for line in f:
|
||||
if not line.startswith('#'):
|
||||
break
|
||||
header.extend(line.strip().replace('#', '').split(';'))
|
||||
|
||||
for item in header:
|
||||
if "xll" in item.lower():
|
||||
try:
|
||||
xll = float(item.split(':')[1])
|
||||
self._xoff = xll
|
||||
except:
|
||||
pass
|
||||
elif "yll" in item.lower():
|
||||
try:
|
||||
yll = float(item.split(':')[1])
|
||||
self._yoff = yll
|
||||
except:
|
||||
pass
|
||||
elif "xul" in item.lower():
|
||||
try:
|
||||
xul = float(item.split(':')[1])
|
||||
self._xoff = self._xul_to_xll(xul)
|
||||
warnings.warn(
|
||||
'xul/yul have been deprecated. Use xll/yll instead.',
|
||||
DeprecationWarning)
|
||||
except:
|
||||
pass
|
||||
elif "yul" in item.lower():
|
||||
try:
|
||||
yul = float(item.split(':')[1])
|
||||
self._yoff = self._yul_to_yll(yul)
|
||||
warnings.warn(
|
||||
'xul/yul have been deprecated. Use xll/yll instead.',
|
||||
DeprecationWarning)
|
||||
except:
|
||||
pass
|
||||
elif "rotation" in item.lower():
|
||||
try:
|
||||
self._angrot = float(item.split(':')[1])
|
||||
except:
|
||||
pass
|
||||
elif "proj4_str" in item.lower():
|
||||
try:
|
||||
self._proj4 = ':'.join(item.split(':')[1:]).strip()
|
||||
if self._proj4.lower() == 'none':
|
||||
self._proj4 = None
|
||||
except:
|
||||
pass
|
||||
elif "start" in item.lower():
|
||||
try:
|
||||
start_datetime = item.split(':')[1].strip()
|
||||
except:
|
||||
pass
|
||||
return True
|
||||
|
||||
def read_usgs_model_reference_file(self, reffile='usgs.model.reference'):
|
||||
"""read spatial reference info from the usgs.model.reference file
|
||||
https://water.usgs.gov/ogw/policy/gw-model/modelers-setup.html"""
|
||||
if os.path.exists(reffile):
|
||||
with open(reffile) as input:
|
||||
for line in input:
|
||||
if len(line) > 1:
|
||||
if line.strip()[0] != '#':
|
||||
info = line.strip().split('#')[0].split()
|
||||
if len(info) > 1:
|
||||
data = ' '.join(info[1:])
|
||||
if info[0] == 'xll':
|
||||
self._xoff = float(data)
|
||||
elif info[0] == 'yul':
|
||||
self._yoff = float(data)
|
||||
elif info[0] == 'xul':
|
||||
self._xoff = self._xul_to_xll(
|
||||
float(data))
|
||||
warnings.warn(
|
||||
'xul/yul have been deprecated. Use xll/yll instead.',
|
||||
DeprecationWarning)
|
||||
elif info[0] == 'yul':
|
||||
self._yoff = self._yul_to_yll(
|
||||
float(data))
|
||||
warnings.warn(
|
||||
'xul/yul have been deprecated. Use xll/yll instead.',
|
||||
DeprecationWarning)
|
||||
elif info[0] == 'rotation':
|
||||
self._angrot = float(data)
|
||||
elif info[0] == 'epsg':
|
||||
self._epsg = int(data)
|
||||
elif info[0] == 'proj4':
|
||||
self._proj4 = data
|
||||
elif info[0] == 'start_datetime':
|
||||
start_datetime = data
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
# Internal
|
||||
def _xul_to_xll(self, xul, angrot=None):
|
||||
yext = self.xyedges[1][0]
|
||||
if angrot is not None:
|
||||
return xul + (np.sin(angrot * np.pi / 180) * yext)
|
||||
else:
|
||||
return xul + (np.sin(self.angrot_radians) * yext)
|
||||
|
||||
def _yul_to_yll(self, yul, angrot=None):
|
||||
yext = self.xyedges[1][0]
|
||||
if angrot is not None:
|
||||
return yul - (np.cos(angrot * np.pi / 180) * yext)
|
||||
else:
|
||||
return yul - (np.cos(self.angrot_radians) * yext)
|
||||
|
||||
def _set_sr_coord_info(self, sr):
|
||||
self._xoff = sr.xll
|
||||
self._yoff = sr.yll
|
||||
self._angrot = sr.rotation
|
||||
self._epsg = sr.epsg
|
||||
self._proj4 = sr.proj4_str
|
||||
self._require_cache_updates()
|
||||
|
||||
def _require_cache_updates(self):
|
||||
for cache_data in self._cache_dict.values():
|
||||
cache_data.out_of_date = True
|
||||
|
||||
@property
|
||||
def _has_ref_coordinates(self):
|
||||
return self._xoff != 0.0 or self._yoff != 0.0 or self._angrot != 0.0
|
||||
|
||||
def _load_settings(self, d):
|
||||
self._xoff = d.xul
|
||||
|
||||
def _zcoords(self):
|
||||
if self.top is not None and self.botm is not None:
|
||||
zcenters = []
|
||||
top_3d = np.expand_dims(self.top, 0)
|
||||
zbdryelevs = np.concatenate((top_3d, self.botm), axis=0)
|
||||
|
||||
for ix in range(1, len(zbdryelevs)):
|
||||
zcenters.append((zbdryelevs[ix - 1] + zbdryelevs[ix]) / 2.)
|
||||
else:
|
||||
zbdryelevs = None
|
||||
zcenters = None
|
||||
return zbdryelevs, zcenters
|
|
@ -0,0 +1,40 @@
|
|||
class ModelTime():
|
||||
"""
|
||||
Class for MODFLOW simulation time
|
||||
|
||||
Parameters
|
||||
----------
|
||||
stress_periods : pandas dataframe
|
||||
headings are: perlen, nstp, tsmult
|
||||
temporal_reference : TemporalReference
|
||||
contains start time and time units information
|
||||
"""
|
||||
def __init__(self, period_data=None, time_units='days',
|
||||
start_datetime=None):
|
||||
self._period_data = period_data
|
||||
self._time_units = time_units
|
||||
self._start_datetime = start_datetime
|
||||
|
||||
@property
|
||||
def time_units(self):
|
||||
return self._time_units
|
||||
|
||||
@property
|
||||
def start_datetime(self):
|
||||
return self._start_datetime
|
||||
|
||||
@property
|
||||
def perlen(self):
|
||||
return self._period_data['perlen']
|
||||
|
||||
@property
|
||||
def nper(self):
|
||||
return len(self._period_data['perlen'])
|
||||
|
||||
@property
|
||||
def nstp(self):
|
||||
return self._period_data['nstp']
|
||||
|
||||
@property
|
||||
def tsmult(self):
|
||||
return self._period_data['tsmult']
|
|
@ -0,0 +1 @@
|
|||
## Development notes for grid module
|
|
@ -0,0 +1,371 @@
|
|||
import numpy as np
|
||||
from .grid import Grid, CachedData
|
||||
|
||||
|
||||
class StructuredGrid(Grid):
|
||||
"""
|
||||
class for a structured model grid
|
||||
|
||||
Parameters
|
||||
----------
|
||||
delc
|
||||
delc array
|
||||
delr
|
||||
delr array
|
||||
|
||||
Properties
|
||||
----------
|
||||
nlay
|
||||
returns the number of model layers
|
||||
nrow
|
||||
returns the number of model rows
|
||||
ncol
|
||||
returns the number of model columns
|
||||
delc
|
||||
returns the delc array
|
||||
delr
|
||||
returns the delr array
|
||||
xyedges
|
||||
returns x-location points for the edges of the model grid and
|
||||
y-location points for the edges of the model grid
|
||||
|
||||
Methods
|
||||
----------
|
||||
get_cell_vertices(i, j)
|
||||
returns vertices for a single cell at row, column i, j.
|
||||
"""
|
||||
def __init__(self, delc, delr, top=None, botm=None, idomain=None,
|
||||
lenuni=None, epsg=None, proj4=None, prj=None, xoff=0.0,
|
||||
yoff=0.0, angrot=0.0):
|
||||
super(StructuredGrid, self).__init__('structured', top, botm, idomain,
|
||||
lenuni, epsg, proj4, prj, xoff,
|
||||
yoff, angrot)
|
||||
self.__delc = delc
|
||||
self.__delr = delr
|
||||
self.__nrow = len(delc)
|
||||
self.__ncol = len(delr)
|
||||
if top is not None:
|
||||
assert self.__nrow * self.__ncol == len(np.ravel(top))
|
||||
if botm is not None:
|
||||
assert self.__nrow * self.__ncol == len(np.ravel(botm[0]))
|
||||
self.__nlay = len(botm)
|
||||
else:
|
||||
self.__nlay = None
|
||||
|
||||
####################
|
||||
# Properties
|
||||
####################
|
||||
@property
|
||||
def nlay(self):
|
||||
return self.__nlay
|
||||
|
||||
@property
|
||||
def nrow(self):
|
||||
return self.__nrow
|
||||
|
||||
@property
|
||||
def ncol(self):
|
||||
return self.__ncol
|
||||
|
||||
@property
|
||||
def shape(self):
|
||||
return self.__nlay, self.__nrow, self.__ncol
|
||||
|
||||
@property
|
||||
def extent(self):
|
||||
xyzgrid = self.xyzvertices
|
||||
return (np.min(xyzgrid[0]), np.max(xyzgrid[0]),
|
||||
np.min(xyzgrid[1]), np.max(xyzgrid[1]))
|
||||
|
||||
@property
|
||||
def delc(self):
|
||||
return self.__delc
|
||||
|
||||
@property
|
||||
def delr(self):
|
||||
return self.__delr
|
||||
|
||||
@property
|
||||
def xyzvertices(self):
|
||||
"""
|
||||
"""
|
||||
cache_index = 'xyzgrid'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
xedge = np.concatenate(([0.], np.add.accumulate(self.__delr)))
|
||||
length_y = np.add.reduce(self.__delc)
|
||||
yedge = np.concatenate(([length_y], length_y -
|
||||
np.add.accumulate(self.delc)))
|
||||
xgrid, ygrid = np.meshgrid(xedge, yedge)
|
||||
zgrid, zcenter = self._zcoords()
|
||||
if self._has_ref_coordinates:
|
||||
# transform x and y
|
||||
pass
|
||||
xgrid, ygrid = self.get_coords(xgrid, ygrid)
|
||||
if zgrid is not None:
|
||||
self._cache_dict[cache_index] = \
|
||||
CachedData([xgrid, ygrid, zgrid])
|
||||
else:
|
||||
self._cache_dict[cache_index] = \
|
||||
CachedData([xgrid, ygrid])
|
||||
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
@property
|
||||
def xyedges(self):
|
||||
cache_index = 'xyedges'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
xedge = np.concatenate(([0.], np.add.accumulate(self.__delr)))
|
||||
length_y = np.add.reduce(self.__delc)
|
||||
yedge = np.concatenate(([length_y], length_y -
|
||||
np.add.accumulate(self.delc)))
|
||||
self._cache_dict[cache_index] = \
|
||||
CachedData([xedge, yedge])
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
@property
|
||||
def xyzcellcenters(self):
|
||||
"""
|
||||
Return a list of two numpy one-dimensional float array one with
|
||||
the cell center x coordinate and the other with the cell center y
|
||||
coordinate for every row in the grid in model space -
|
||||
not offset of rotated, with the cell center y coordinate.
|
||||
"""
|
||||
cache_index = 'cellcenters'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
# get x centers
|
||||
x = np.add.accumulate(self.__delr) - 0.5 * self.delr
|
||||
# get y centers
|
||||
Ly = np.add.reduce(self.__delc)
|
||||
y = Ly - (np.add.accumulate(self.__delc) - 0.5 *
|
||||
self.__delc)
|
||||
x_mesh, y_mesh = np.meshgrid(x, y)
|
||||
if self.__nlay is not None:
|
||||
# get z centers
|
||||
z = np.empty((self.__nlay, self.__nrow, self.__ncol))
|
||||
z[0, :, :] = (self._top[:, :] + self._botm[0, :, :]) / 2.
|
||||
for l in range(1, self.__nlay):
|
||||
z[l, :, :] = (self._botm[l - 1, :, :] +
|
||||
self._botm[l, :, :]) / 2.
|
||||
else:
|
||||
z = None
|
||||
if self._has_ref_coordinates:
|
||||
# transform x and y
|
||||
x_mesh, y_mesh = self.get_coords(x_mesh, y_mesh)
|
||||
# store in cache
|
||||
self._cache_dict[cache_index] = CachedData([x_mesh, y_mesh, z])
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
@property
|
||||
def grid_lines(self):
|
||||
"""
|
||||
Get the grid lines as a list
|
||||
|
||||
"""
|
||||
# get edges initially in model coordinates
|
||||
use_ref_coords = self.use_ref_coords
|
||||
self.use_ref_coords = False
|
||||
xyedges = self.xyedges
|
||||
self.use_ref_coords = use_ref_coords
|
||||
|
||||
xmin = xyedges[0][0]
|
||||
xmax = xyedges[0][-1]
|
||||
ymin = xyedges[1][-1]
|
||||
ymax = xyedges[1][0]
|
||||
lines = []
|
||||
# Vertical lines
|
||||
for j in range(self.ncol + 1):
|
||||
x0 = xyedges[0][j]
|
||||
x1 = x0
|
||||
y0 = ymin
|
||||
y1 = ymax
|
||||
lines.append([(x0, y0), (x1, y1)])
|
||||
|
||||
# horizontal lines
|
||||
for i in range(self.nrow + 1):
|
||||
x0 = xmin
|
||||
x1 = xmax
|
||||
y0 = xyedges[1][i]
|
||||
y1 = y0
|
||||
lines.append([(x0, y0), (x1, y1)])
|
||||
|
||||
if self._has_ref_coordinates:
|
||||
lines_trans = []
|
||||
for ln in lines:
|
||||
lines_trans.append([self.get_coords(*ln[0]),
|
||||
self.get_coords(*ln[1])])
|
||||
return lines_trans
|
||||
return lines
|
||||
|
||||
###############
|
||||
### Methods ###
|
||||
###############
|
||||
def intersect(self, x, y, local=True):
|
||||
x, y = super(StructuredGrid, self).intersect(x, y, local)
|
||||
|
||||
if x < 0 or y < 0:
|
||||
raise Exception('x, y point given is outside of the model area')
|
||||
# find row
|
||||
y_bound = 0
|
||||
row = None
|
||||
for index, row_width in enumerate(self.__delc):
|
||||
y_bound += row_width
|
||||
if y <= y_bound:
|
||||
row = index
|
||||
# find column
|
||||
x_bound = 0
|
||||
col = None
|
||||
for index, col_width in enumerate(self.__delr):
|
||||
x_bound += col_width
|
||||
if x <= x_bound:
|
||||
col = index
|
||||
# determine success
|
||||
if col is None or row is None:
|
||||
raise Exception('x, y point given is outside of the model area')
|
||||
return row, col
|
||||
|
||||
def _cell_vert_list(self, i, j):
|
||||
"""Get vertices for a single cell or sequence of i, j locations."""
|
||||
pts = []
|
||||
xgrid, ygrid = self.xvertices, self.yvertices
|
||||
pts.append([xgrid[i, j], ygrid[i, j]])
|
||||
pts.append([xgrid[i + 1, j], ygrid[i + 1, j]])
|
||||
pts.append([xgrid[i + 1, j + 1], ygrid[i + 1, j + 1]])
|
||||
pts.append([xgrid[i, j + 1], ygrid[i, j + 1]])
|
||||
pts.append([xgrid[i, j], ygrid[i, j]])
|
||||
if np.isscalar(i):
|
||||
return pts
|
||||
else:
|
||||
vrts = np.array(pts).transpose([2, 0, 1])
|
||||
return [v.tolist() for v in vrts]
|
||||
|
||||
def get_cell_vertices(self, i, j):
|
||||
"""
|
||||
Method to get a set of cell vertices for a single cell
|
||||
used in the Shapefile export utilities
|
||||
:param i: (int) cell row number
|
||||
:param j: (int) cell column number
|
||||
:return: list of x,y cell vertices
|
||||
"""
|
||||
return [(self.xvertices[i, j], self.yvertices[i, j]),
|
||||
(self.xvertices[i, j+1], self.yvertices[i, j+1]),
|
||||
(self.xvertices[i+1, j+1], self.yvertices[i+1, j+1]),
|
||||
(self.xvertices[i+1, j], self.yvertices[i+1, j]),]
|
||||
|
||||
def plot(self, **kwargs):
|
||||
"""
|
||||
Plot the grid lines.
|
||||
|
||||
Parameters
|
||||
----------
|
||||
kwargs : ax, colors. The remaining kwargs are passed into the
|
||||
the LineCollection constructor.
|
||||
|
||||
Returns
|
||||
-------
|
||||
lc : matplotlib.collections.LineCollection
|
||||
p
|
||||
"""
|
||||
from flopy.plot import PlotMapView
|
||||
|
||||
mm = PlotMapView(modelgrid=self)
|
||||
return mm.plot_grid(**kwargs)
|
||||
|
||||
# Importing
|
||||
@classmethod
|
||||
def from_gridspec(cls, gridspec_file, lenuni=0):
|
||||
f = open(gridspec_file, 'r')
|
||||
raw = f.readline().strip().split()
|
||||
nrow = int(raw[0])
|
||||
ncol = int(raw[1])
|
||||
raw = f.readline().strip().split()
|
||||
xul, yul, rot = float(raw[0]), float(raw[1]), float(raw[2])
|
||||
delr = []
|
||||
j = 0
|
||||
while j < ncol:
|
||||
raw = f.readline().strip().split()
|
||||
for r in raw:
|
||||
if '*' in r:
|
||||
rraw = r.split('*')
|
||||
for n in range(int(rraw[0])):
|
||||
delr.append(float(rraw[1]))
|
||||
j += 1
|
||||
else:
|
||||
delr.append(float(r))
|
||||
j += 1
|
||||
delc = []
|
||||
i = 0
|
||||
while i < nrow:
|
||||
raw = f.readline().strip().split()
|
||||
for r in raw:
|
||||
if '*' in r:
|
||||
rraw = r.split('*')
|
||||
for n in range(int(rraw[0])):
|
||||
delc.append(float(rraw[1]))
|
||||
i += 1
|
||||
else:
|
||||
delc.append(float(r))
|
||||
i += 1
|
||||
f.close()
|
||||
grd = cls(np.array(delc), np.array(delr), lenuni=lenuni)
|
||||
xll = grd._xul_to_xll(xul)
|
||||
yll = grd._yul_to_yll(yul)
|
||||
cls.set_coord_info(xoff=xll, yoff=yll, angrot=rot)
|
||||
return cls
|
||||
|
||||
# Exporting
|
||||
def write_shapefile(self, filename='grid.shp', epsg=None, prj=None):
|
||||
"""Write a shapefile of the grid with just the row and column attributes"""
|
||||
from ..export.shapefile_utils import write_grid_shapefile2
|
||||
if epsg is None and prj is None:
|
||||
epsg = self.epsg
|
||||
write_grid_shapefile2(filename, self, array_dict={}, nan_val=-1.0e9,
|
||||
epsg=epsg, prj=prj)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import matplotlib.pyplot as plt
|
||||
delc = np.ones((10,)) * 1
|
||||
delr = np.ones((20,)) * 1
|
||||
|
||||
top = np.ones((10, 20)) * 2000
|
||||
botm = np.ones((1, 10, 20)) * 1100
|
||||
|
||||
t = StructuredGrid(delc, delr, top, botm, xoff=0, yoff=0,
|
||||
angrot=45)
|
||||
|
||||
#plt.scatter(np.ravel(t.xcenters), np.ravel(t.ycenters), c="b")
|
||||
#t.plot_grid_lines()
|
||||
#plt.show()
|
||||
#plt.close()
|
||||
|
||||
#delc = np.ones(10,) * 2
|
||||
#t.delc = delc
|
||||
|
||||
#plt.scatter(np.ravel(t.xcenters), np.ravel(t.ycenters), c="b")
|
||||
#t.plot_grid_lines()
|
||||
#plt.show()
|
||||
|
||||
t.use_ref_coords = False
|
||||
x = t.xvertices
|
||||
y = t.yvertices
|
||||
xc = t.xcellcenters
|
||||
yc = t.ycellcenters
|
||||
#extent = t.extent
|
||||
grid = t.grid_lines
|
||||
|
||||
#print('break')
|
||||
|
||||
t.use_ref_coords = True
|
||||
sr_x = t.xvertices
|
||||
sr_y = t.yvertices
|
||||
sr_xc = t.xcellcenters
|
||||
sr_yc = t.ycellcenters
|
||||
#sr_extent = t.extent
|
||||
sr_grid = t.grid_lines
|
||||
print(sr_grid)
|
||||
#t.plot_grid_lines()
|
||||
#plt.show()
|
||||
#print('break')
|
|
@ -0,0 +1,258 @@
|
|||
import numpy as np
|
||||
import itertools
|
||||
from .grid import Grid, CachedData
|
||||
|
||||
|
||||
class UnstructuredGrid(Grid):
|
||||
"""
|
||||
Class for an unstructured model grid
|
||||
|
||||
Parameters
|
||||
----------
|
||||
vertices
|
||||
list of vertices that make up the grid
|
||||
cell2d
|
||||
list of cells and their vertices
|
||||
|
||||
Properties
|
||||
----------
|
||||
vertices
|
||||
returns list of vertices that make up the grid
|
||||
cell2d
|
||||
returns list of cells and their vertices
|
||||
|
||||
Methods
|
||||
----------
|
||||
get_cell_vertices(cellid)
|
||||
returns vertices for a single cell at cellid.
|
||||
"""
|
||||
def __init__(self, vertices, iverts, xcenters, ycenters,
|
||||
top=None, botm=None, idomain=None, lenuni=None,
|
||||
ncpl=None, epsg=None, proj4="EPSG:4326", prj=None,
|
||||
xoff=0., yoff=0., angrot=0., layered=True):
|
||||
super(UnstructuredGrid, self).__init__(self.grid_type, top, botm, idomain,
|
||||
lenuni, epsg, proj4, prj,
|
||||
xoff, yoff, angrot)
|
||||
|
||||
self._vertices = vertices
|
||||
self._iverts = iverts
|
||||
self._top = top
|
||||
self._botm = botm
|
||||
self._ncpl = ncpl
|
||||
self._layered = layered
|
||||
self._xc = xcenters
|
||||
self._yc = ycenters
|
||||
|
||||
if self.layered:
|
||||
assert np.all([n == len(iverts) for n in ncpl])
|
||||
assert np.array(self.xcellcenters).shape[0] == self.ncpl[0]
|
||||
assert np.array(self.ycellcenters).shape[0] == self.ncpl[0]
|
||||
else:
|
||||
msg = ('Length of iverts must equal ncpl.sum '
|
||||
'({} {})'.format(len(iverts), ncpl))
|
||||
assert len(iverts) == ncpl.sum(), msg
|
||||
assert np.array(self.xcellcenters).shape[0] == self.ncpl
|
||||
assert np.array(self.ycellcenters).shape[0] == self.ncpl
|
||||
|
||||
|
||||
@property
|
||||
def grid_type(self):
|
||||
return "unstructured"
|
||||
|
||||
@property
|
||||
def nlay(self):
|
||||
if self.layered:
|
||||
try:
|
||||
return len(self.ncpl)
|
||||
except TypeError:
|
||||
return 1
|
||||
else:
|
||||
return 1
|
||||
|
||||
@property
|
||||
def layered(self):
|
||||
return self._layered
|
||||
|
||||
@property
|
||||
def ncpl(self):
|
||||
if self._ncpl is None:
|
||||
return len(self._iverts)
|
||||
return self._ncpl
|
||||
|
||||
@property
|
||||
def shape(self):
|
||||
if isinstance(self.ncpl, (list, np.ndarray)):
|
||||
return self.nlay, self.ncpl[0]
|
||||
else:
|
||||
return self.nlay, self.ncpl
|
||||
|
||||
@property
|
||||
def extent(self):
|
||||
xvertices = np.hstack(self.xvertices)
|
||||
yvertices = np.hstack(self.yvertices)
|
||||
return (np.min(xvertices),
|
||||
np.max(xvertices),
|
||||
np.min(yvertices),
|
||||
np.max(yvertices))
|
||||
|
||||
@property
|
||||
def grid_lines(self):
|
||||
"""
|
||||
Creates a series of grid line vertices for drawing
|
||||
a model grid line collection
|
||||
|
||||
Returns:
|
||||
list: grid line vertices
|
||||
"""
|
||||
xgrid = self.xvertices
|
||||
ygrid = self.yvertices
|
||||
|
||||
lines = []
|
||||
for ncell, verts in enumerate(xgrid):
|
||||
for ix, vert in enumerate(verts):
|
||||
lines.append([(xgrid[ncell][ix - 1], ygrid[ncell][ix - 1]),
|
||||
(xgrid[ncell][ix], ygrid[ncell][ix])])
|
||||
return lines
|
||||
|
||||
@property
|
||||
def xyzcellcenters(self):
|
||||
"""
|
||||
Internal method to get cell centers and set to grid
|
||||
"""
|
||||
cache_index = 'cellcenters'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
self._build_grid_geometry_info()
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
@property
|
||||
def xyzvertices(self):
|
||||
"""
|
||||
Internal method to get model grid verticies
|
||||
|
||||
Returns:
|
||||
list of dimension ncpl by nvertices
|
||||
"""
|
||||
cache_index = 'xyzgrid'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
self._build_grid_geometry_info()
|
||||
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
def intersect(self, x, y, local=True):
|
||||
x, y = super(UnstructuredGrid, self).intersect(x, y, local)
|
||||
raise Exception('Not implemented yet')
|
||||
|
||||
def get_cell_vertices(self, cellid):
|
||||
"""
|
||||
Method to get a set of cell vertices for a single cell
|
||||
used in the Shapefile export utilities
|
||||
:param cellid: (int) cellid number
|
||||
:return: list of x,y cell vertices
|
||||
"""
|
||||
return list(zip(self.xvertices[cellid],
|
||||
self.yvertices[cellid]))
|
||||
|
||||
def _build_grid_geometry_info(self):
|
||||
cache_index_cc = 'cellcenters'
|
||||
cache_index_vert = 'xyzgrid'
|
||||
|
||||
vertexdict = {ix: list(v[-2:])
|
||||
for ix, v in enumerate(self._vertices)}
|
||||
|
||||
xcenters = self._xc
|
||||
ycenters = self._yc
|
||||
xvertices = []
|
||||
yvertices = []
|
||||
|
||||
# build xy vertex and cell center info
|
||||
for iverts in self._iverts:
|
||||
|
||||
xcellvert = []
|
||||
ycellvert = []
|
||||
for ix in iverts:
|
||||
xcellvert.append(vertexdict[ix][0])
|
||||
ycellvert.append(vertexdict[ix][1])
|
||||
|
||||
xvertices.append(xcellvert)
|
||||
yvertices.append(ycellvert)
|
||||
|
||||
zvertices, zcenters = self._zcoords()
|
||||
|
||||
if self._has_ref_coordinates:
|
||||
# transform x and y
|
||||
xcenters, ycenters = self.get_coords(xcenters, ycenters)
|
||||
xvertxform = []
|
||||
yvertxform = []
|
||||
# vertices are a list within a list
|
||||
for xcellvertices, ycellvertices in zip(xvertices, yvertices):
|
||||
xcellvertices, \
|
||||
ycellvertices = self.get_coords(xcellvertices, ycellvertices)
|
||||
xvertxform.append(xcellvertices)
|
||||
yvertxform.append(ycellvertices)
|
||||
xvertices = xvertxform
|
||||
yvertices = yvertxform
|
||||
|
||||
self._cache_dict[cache_index_cc] = CachedData([xcenters,
|
||||
ycenters,
|
||||
zcenters])
|
||||
self._cache_dict[cache_index_vert] = CachedData([xvertices,
|
||||
yvertices,
|
||||
zvertices])
|
||||
|
||||
@classmethod
|
||||
def from_argus_export(cls, fname, nlay=1):
|
||||
"""
|
||||
Create a new SpatialReferenceUnstructured grid from an Argus One
|
||||
Trimesh file
|
||||
|
||||
Parameters
|
||||
----------
|
||||
fname : string
|
||||
File name
|
||||
|
||||
nlay : int
|
||||
Number of layers to create
|
||||
|
||||
Returns
|
||||
-------
|
||||
sru : flopy.utils.reference.SpatialReferenceUnstructured
|
||||
|
||||
"""
|
||||
from ..utils.geometry import get_polygon_centroid
|
||||
f = open(fname, 'r')
|
||||
line = f.readline()
|
||||
ll = line.split()
|
||||
ncells, nverts = ll[0:2]
|
||||
ncells = int(ncells)
|
||||
nverts = int(nverts)
|
||||
verts = np.empty((nverts, 2), dtype=np.float)
|
||||
xc = np.empty((ncells), dtype=np.float)
|
||||
yc = np.empty((ncells), dtype=np.float)
|
||||
|
||||
# read the vertices
|
||||
f.readline()
|
||||
for ivert in range(nverts):
|
||||
line = f.readline()
|
||||
ll = line.split()
|
||||
c, iv, x, y = ll[0:4]
|
||||
verts[ivert, 0] = x
|
||||
verts[ivert, 1] = y
|
||||
|
||||
# read the cell information and create iverts, xc, and yc
|
||||
iverts = []
|
||||
for icell in range(ncells):
|
||||
line = f.readline()
|
||||
ll = line.split()
|
||||
ivlist = []
|
||||
for ic in ll[2:5]:
|
||||
ivlist.append(int(ic) - 1)
|
||||
if ivlist[0] != ivlist[-1]:
|
||||
ivlist.append(ivlist[0])
|
||||
iverts.append(ivlist)
|
||||
xc[icell], yc[icell] = get_polygon_centroid(verts[ivlist, :])
|
||||
|
||||
# close file and return spatial reference
|
||||
f.close()
|
||||
return cls(verts, iverts, xc, yc, ncpl=np.array(nlay * [len(iverts)]))
|
|
@ -0,0 +1,214 @@
|
|||
import numpy as np
|
||||
import itertools
|
||||
from .grid import Grid, CachedData
|
||||
|
||||
|
||||
class VertexGrid(Grid):
|
||||
"""
|
||||
class for a vertex model grid
|
||||
|
||||
Parameters
|
||||
----------
|
||||
vertices
|
||||
list of vertices that make up the grid
|
||||
cell2d
|
||||
list of cells and their vertices
|
||||
|
||||
Properties
|
||||
----------
|
||||
vertices
|
||||
returns list of vertices that make up the grid
|
||||
cell2d
|
||||
returns list of cells and their vertices
|
||||
|
||||
Methods
|
||||
----------
|
||||
get_cell_vertices(cellid)
|
||||
returns vertices for a single cell at cellid.
|
||||
"""
|
||||
|
||||
def __init__(self, vertices, cell2d, top=None, botm=None, idomain=None,
|
||||
lenuni=None, epsg=None, proj4=None, prj=None, xoff=0.0,
|
||||
yoff=0.0, angrot=0.0, grid_type='vertex'):
|
||||
super(VertexGrid, self).__init__(grid_type, top, botm, idomain, lenuni,
|
||||
epsg, proj4, prj, xoff, yoff, angrot)
|
||||
self._vertices = vertices
|
||||
self._cell2d = cell2d
|
||||
self._top = top
|
||||
self._botm = botm
|
||||
self._idomain = idomain
|
||||
|
||||
@property
|
||||
def nlay(self):
|
||||
if self._botm is not None:
|
||||
return len(self._botm)
|
||||
|
||||
@property
|
||||
def ncpl(self):
|
||||
return len(self._botm[0])
|
||||
|
||||
@property
|
||||
def shape(self):
|
||||
return self.nlay, self.ncpl
|
||||
|
||||
@property
|
||||
def extent(self):
|
||||
xvertices = np.hstack(self.xvertices)
|
||||
yvertices = np.hstack(self.yvertices)
|
||||
return (np.min(xvertices),
|
||||
np.max(xvertices),
|
||||
np.min(yvertices),
|
||||
np.max(yvertices))
|
||||
|
||||
@property
|
||||
def grid_lines(self):
|
||||
"""
|
||||
Creates a series of grid line vertices for drawing
|
||||
a model grid line collection
|
||||
|
||||
Returns:
|
||||
list: grid line vertices
|
||||
"""
|
||||
xgrid = self.xvertices
|
||||
ygrid = self.yvertices
|
||||
|
||||
lines = []
|
||||
for ncell, verts in enumerate(xgrid):
|
||||
for ix, vert in enumerate(verts):
|
||||
lines.append([(xgrid[ncell][ix - 1], ygrid[ncell][ix - 1]),
|
||||
(xgrid[ncell][ix], ygrid[ncell][ix])])
|
||||
return lines
|
||||
|
||||
@property
|
||||
def xyzcellcenters(self):
|
||||
"""
|
||||
Internal method to get cell centers and set to grid
|
||||
"""
|
||||
cache_index = 'cellcenters'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
self._build_grid_geometry_info()
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
@property
|
||||
def xyzvertices(self):
|
||||
"""
|
||||
Internal method to get model grid verticies
|
||||
|
||||
Returns:
|
||||
list of dimension ncpl by nvertices
|
||||
"""
|
||||
cache_index = 'xyzgrid'
|
||||
if cache_index not in self._cache_dict or \
|
||||
self._cache_dict[cache_index].out_of_date:
|
||||
self._build_grid_geometry_info()
|
||||
|
||||
return self._cache_dict[cache_index].data
|
||||
|
||||
def intersect(self, x, y, local=True):
|
||||
x, y = super(VertexGrid, self).intersect(x, y, local)
|
||||
raise Exception('Not implemented yet')
|
||||
|
||||
def get_cell_vertices(self, cellid):
|
||||
"""
|
||||
Method to get a set of cell vertices for a single cell
|
||||
used in the Shapefile export utilities
|
||||
:param cellid: (int) cellid number
|
||||
:return: list of x,y cell vertices
|
||||
"""
|
||||
return list(zip(self.xvertices[cellid],
|
||||
self.yvertices[cellid]))
|
||||
|
||||
def _build_grid_geometry_info(self):
|
||||
cache_index_cc = 'cellcenters'
|
||||
cache_index_vert = 'xyzgrid'
|
||||
|
||||
vertexdict = {v[0]: [v[1], v[2]]
|
||||
for v in self._vertices}
|
||||
xcenters = []
|
||||
ycenters = []
|
||||
xvertices = []
|
||||
yvertices = []
|
||||
|
||||
# build xy vertex and cell center info
|
||||
for cell2d in self._cell2d:
|
||||
cell2d = tuple(cell2d)
|
||||
xcenters.append(cell2d[1])
|
||||
ycenters.append(cell2d[2])
|
||||
|
||||
vert_number = []
|
||||
for i in cell2d[4:]:
|
||||
if i is not None:
|
||||
vert_number.append(int(i))
|
||||
|
||||
xcellvert = []
|
||||
ycellvert = []
|
||||
for ix in vert_number:
|
||||
xcellvert.append(vertexdict[ix][0])
|
||||
ycellvert.append(vertexdict[ix][1])
|
||||
xvertices.append(xcellvert)
|
||||
yvertices.append(ycellvert)
|
||||
|
||||
# build z cell centers
|
||||
zvertices, zcenters = self._zcoords()
|
||||
|
||||
if self._has_ref_coordinates:
|
||||
# transform x and y
|
||||
xcenters, ycenters = self.get_coords(xcenters, ycenters)
|
||||
xvertxform = []
|
||||
yvertxform = []
|
||||
# vertices are a list within a list
|
||||
for xcellvertices, ycellvertices in zip(xvertices, yvertices):
|
||||
xcellvertices, \
|
||||
ycellvertices = self.get_coords(xcellvertices, ycellvertices)
|
||||
xvertxform.append(xcellvertices)
|
||||
yvertxform.append(ycellvertices)
|
||||
xvertices = xvertxform
|
||||
yvertices = yvertxform
|
||||
|
||||
self._cache_dict[cache_index_cc] = CachedData([xcenters,
|
||||
ycenters,
|
||||
zcenters])
|
||||
self._cache_dict[cache_index_vert] = CachedData([xvertices,
|
||||
yvertices,
|
||||
zvertices])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import os
|
||||
import flopy as fp
|
||||
|
||||
ws = "../../examples/data/mf6/test003_gwfs_disv"
|
||||
name = "mfsim.nam"
|
||||
|
||||
sim = fp.mf6.modflow.MFSimulation.load(sim_name=name, sim_ws=ws)
|
||||
|
||||
print(sim.model_names)
|
||||
ml = sim.get_model("gwf_1")
|
||||
|
||||
dis = ml.dis
|
||||
|
||||
t = VertexGrid(dis.vertices.array, dis.cell2d.array, top=dis.top.array,
|
||||
botm=dis.botm.array, idomain=dis.idomain.array,
|
||||
epsg=26715, xoff=0, yoff=0, angrot=45)
|
||||
|
||||
sr_x = t.xvertices
|
||||
sr_y = t.yvertices
|
||||
sr_xc = t.xcellcenters
|
||||
sr_yc = t.ycellcenters
|
||||
sr_lc = t.grid_lines
|
||||
sr_e = t.extent
|
||||
|
||||
print('break')
|
||||
|
||||
t.use_ref_coords = False
|
||||
x = t.xvertices
|
||||
y = t.yvertices
|
||||
z = t.zvertices
|
||||
xc = t.xcellcenters
|
||||
yc = t.ycellcenters
|
||||
zc = t.zcellcenters
|
||||
lc = t.grid_lines
|
||||
e = t.extent
|
||||
|
||||
print('break')
|
|
@ -36,6 +36,7 @@ class acdd:
|
|||
|
||||
self.id = sciencebase_id
|
||||
self.model = model
|
||||
self.model_grid = model.modelgrid
|
||||
self.sciencebase_url = 'https://www.sciencebase.gov/catalog/item/{}'.format(
|
||||
sciencebase_id)
|
||||
self.sb = self.get_sciencebase_metadata(sciencebase_id)
|
||||
|
@ -89,8 +90,8 @@ class acdd:
|
|||
self.geospatial_lat_max = self.bounds.get('maxY')
|
||||
self.geospatial_lon_min = self.bounds.get('minX')
|
||||
self.geospatial_lon_max = self.bounds.get('maxX')
|
||||
self.geospatial_vertical_min = self.model.dis.botm.array.min()
|
||||
self.geospatial_vertical_max = self.model.dis.top.array.max()
|
||||
self.geospatial_vertical_min = self.model_grid.botm.min()
|
||||
self.geospatial_vertical_max = self.model_grid.top.max()
|
||||
self.geospatial_vertical_positive = 'up' # assumed to always be up for GW models
|
||||
self.time_coverage_start = self.time_coverage.get('start')
|
||||
self.time_coverage_end = self.time_coverage.get('end')
|
||||
|
@ -174,12 +175,12 @@ class acdd:
|
|||
for t in ['start', 'end']:
|
||||
tc[t] = [d.get('dateString') for d in l
|
||||
if t in d['type'].lower()][0]
|
||||
if not np.all(self.model.dis.steady) and pd:
|
||||
if not np.all(self.model_grid.steady) and pd:
|
||||
# replace with times from model reference
|
||||
tc['start'] = self.model.dis.start_datetime
|
||||
strt = pd.Timestamp(self.model.dis.start_datetime)
|
||||
mlen = self.model.dis.perlen.array.sum()
|
||||
tunits = self.model.dis.itmuni_dict[self.model.dis.itmuni]
|
||||
tc['start'] = self.model_grid.sim_time.tr.start_datetime
|
||||
strt = pd.Timestamp(self.model_grid.sim_time.tr.start_datetime)
|
||||
mlen = self.model_grid.sim_time.perlen.sum()
|
||||
tunits = self.model_grid.sim_time.time_units
|
||||
tc['duration'] = '{} {}'.format(mlen, tunits)
|
||||
end = strt + pd.Timedelta(mlen, unit='d')
|
||||
tc['end'] = str(end)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue