ssz=0.2, isource=iso, nsolver=1) oc = mf.ModflowOc(ml, save_head_every=100) pcg = mf.ModflowPcg(ml) #--write the model files ml.write_input() #--run the model m = ml.run_model(silent=True) headfile = '{}.hds'.format(modelname) hdobj = fu.HeadFile(headfile) head = hdobj.get_data(totim=3.65000E+05) zetafile = '{}.zta'.format(modelname) zobj = fu.CellBudgetFile(zetafile) zkstpkper = zobj.get_kstpkper() zeta = [] for kk in zkstpkper: zeta.append(zobj.get_data(kstpkper=kk, text=' ZETASRF 1')[0]) zeta = np.array(zeta) fwid, fhgt = 7.00, 4.50 flft, frgt, fbot, ftop = 0.125, 0.95, 0.125, 0.925 colormap = plt.cm.spectral #winter cc = [] icolor = 11 cr = np.linspace(0.0, 0.9, icolor) for idx in cr: cc.append(colormap(idx))
obsnam=obsnam, obslrc=obslrc) oc = mf.ModflowOc(ml2, words=savewords) pcg = mf.ModflowPcg(ml2, hclose=1.0e-6, rclose=3.0e-3, mxiter=100, iter1=50) #--create model files ml2.write_input() #--run the model m = ml2.run_model(silent=False) # Load the simulation 1 `ZETA` data and `ZETA` observations. #--read base model zeta zfile = fu.CellBudgetFile(os.path.join(ml.model_ws, modelname + '.zta')) kstpkper = zfile.get_kstpkper() zeta = [] for kk in kstpkper: zeta.append(zfile.get_data(kstpkper=kk, text='ZETASRF 1')[0]) zeta = np.array(zeta) #--read swi obs zobs = np.genfromtxt(os.path.join(ml.model_ws, modelname + '.zobs'), names=True) # Load the simulation 2 `ZETA` data and `ZETA` observations. #--read saltwater well model zeta zfile2 = fu.CellBudgetFile(os.path.join(ml2.model_ws, modelname2 + '.zta')) kstpkper = zfile2.get_kstpkper() zeta2 = [] for kk in kstpkper: