예제 #1
0
# --problem size
nlay, nrow, ncol = 1, 41, 40
# --default data if command line argument not defined for variable
head_file = "..\\data\\CoastalAquifer.hds"
# --get available times in the head file
get_cell = 1
headObj = mfb.MODFLOW_Head(nlay, nrow, ncol, head_file)
t = headObj.get_gage(get_cell)
ntimes = t.shape[0]
mf_times = np.zeros((ntimes), np.float)
for i in range(0, ntimes):
    mf_times[i] = t[i, 0]

# --create a time-series plot of head
headObj = mfb.MODFLOW_Head(nlay, nrow, ncol, head_file)
get_cell = mfb.icrl_from_kij(1, 18, 31, nlay, nrow, ncol)
t = headObj.get_gage(get_cell)
ztf = figure(figsize=(4, 2), facecolor="w")
ztf.subplots_adjust(wspace=0.2, hspace=0.2, left=0.15, right=0.95, bottom=0.15, top=0.95)
ax = ztf.add_subplot(1, 1, 1)
hp = ax.plot(mf_times / 365.25 - 100.0, t[:, 1])
ax.set_xlim(0, 50)
xlabel("Time since the beginning of groundwater withdrawls (years)")
ylabel("Head (m)")
output_name = "..\\figures.MF\\Cell_{0}.png".format(get_cell)
ztf.savefig(output_name, dpi=300)
# --create a time-series plot of drawdown
h0 = t[:, 1].max()
ztf = figure(figsize=(4, 2), facecolor="w")
ztf.subplots_adjust(wspace=0.2, hspace=0.2, left=0.15, right=0.95, bottom=0.15, top=0.95)
ax = ztf.add_subplot(1, 1, 1)
예제 #2
0
	swr_qaq04[n] = ce1[n,iextbf] #/ 86400.

#SWRObj = mfb.SWR_Record(2,SWR_file)
#ce1 = SWRObj.get_gage(iobs04)
##print 'qaq04 layer 2\n', ce1
#nt =  np.shape(ce1)[0]
#for n  in range(0,nt):
#	swr_qaq04[n] = swr_qaq04[n] + ce1[n,iextbf] #/ 86400.

#--MODFLOW results
#--heads
ncol = 6
nrow = 6
nlay = 2

iobs1node = mfb.icrl_from_kij(1,3,4,nlay,nrow,ncol)
iobs2node = mfb.icrl_from_kij(1,4,5,nlay,nrow,ncol)
iobs3node = mfb.icrl_from_kij(1,5,6,nlay,nrow,ncol)
iobs4node = mfb.icrl_from_kij(1,6,5,nlay,nrow,ncol)
#print 'MODFLOW observation location', iobs1node, iobs2node, iobs3node, iobs4node

HEAD_file = '..\\SWRSample05\\Results\\SWRSample05.hds'

HEADObj = mfb.MODFLOW_Head(nlay,ncol,nrow,HEAD_file)
mf1 = HEADObj.get_gage(iobs1node)
nmft =  np.shape(mf1)[0]
mf_t = np.zeros(nmft) 
mf_h01 = np.zeros(nmft) 
t = np.zeros(nmft) 
for n  in range(0,nmft):
	mf_t[n] = mf1[n,0]