Skip to main content
Article thumbnail
Location of Repository

Analytic element modeling of the High Plains Aquifer: non-linear model optimization using Levenberg-Marquardt and particle swarm algorithms

By Andy Allen

Abstract

Master of ScienceDepartment of Civil EngineeringDavid R. StewardAccurate modeling of the High Plains Aquifer depends on the availability of good data that represents and quantities properties and processes occurring within the aquifer. Thanks to many previous studies there is a wealth of good data available for the High Plains Aquifer but one key component, groundwater-surface water interaction locations and rates, is generally missing. Without these values accurate modeling of the High Plains Aquifer is very difficult to achieve. This thesis presents methods for simplifying the modeling of the High Plains Aquifer using a sloping base method and then applying mathematical optimization techniques to locate and quantify points of groundwater-surface water interaction. The High Plains Aquifer has a base that slopes gently from west to east and is approximated using a one-dimensional stepping base model. The model was run under steady-state predevelopment conditions using readily available GIS data representing aquifer properties such as hydraulic conductivity, bedrock elevation, recharge, and the predevelopment water level. The Levenberg-Marquardt and particle swarm algorithms were implemented to minimize error in the model. The algorithms reduced model error by finding locations in the aquifer of potential groundwater-surface water interaction and then determining the rate of groundwater to surface water exchange at those points that allowed for the best match between the measured predevelopment water level and the simulated water level. Results from the model indicate that groundwater-surface water interaction plays an important role in the overall water balance in the High Plains Aquifer. Findings from the model show strong groundwater-surface water interaction occurring in the northern basin of the aquifer where the water table is relatively shallow and there are many surface water features. In the central and southern basins the interaction is primarily limited to river valleys. Most rivers have baseflow that is a net sink from groundwater

Topics: Ogallala aquifer, High plains aquifer, Particle swarm optimization, Levenberg-marquardt, Groundwater-surface water interaction, Sloping base, Engineering (0537), Water Resource Management (0595)
Publisher: Kansas State University
OAI identifier: oai:krex.k-state.edu:2097/14103

Suggested articles

Citations

  1. ("rech","float32") ,("avg_lse"," float32"), ("min_lse","float32") ,
  2. ("X","int32") ,("Y","int32") ,("K"," float32"), ("bedrock","float32") ,("pwl","float32 "),
  3. ['Fishnet ','Fishnet_label ','Head','DTW','ST','Error ',' Extraction '] for featureclass in fcs:
  4. [1] for runs in xrange(1):
  5. 0 Cumulative Contribution to Baseflow (cfs)
  6. 0 Table D.14: Simulated Groundwater-Surface Water Interaction along Cimarron River up to Gauging Station 07156500 (Mean Discharge from 1942-1946) Cimarron River Baseflow (up to station 07156500)
  7. 0 Table D.24: Simulated Groundwater-Surface Water Interaction along Platte River up to Gauging Station 06686500 (Mean Discharge from 1930-1960) Platte River Baseflow (up to station 06686500)
  8. 0;3 1;NODATA 0", Boundary_Raster , "DATA"
  9. 1 Average Interaction Rate (cfs)
  10. 1.5 #weights the personal best bmax = 2.5 #weights the global or local best
  11. 1", thickness_reclass , "DATA"
  12. 1000 #If objective function falls below this value then the optimization routine ends. neighborhood = 0 #not used at this point
  13. 1000] #Cellsizes to use for raster creation workingFolder = "D:/ Research/MODFLOW/High_Plains/WorkingFiles/" #Folder containing primary GIS files
  14. 150 #Enter minimum transect length. Transects with a total number of cells < minTransect length will not be simulated.
  15. 2 Average Interaction Rate (cfs)
  16. (2000). 2000x10000 ' #dimensions of cells in the fishnet grid being used in the model entered as a text string (width X height) modelCellWidth =
  17. (2009). 26790% 1461% 2473% 34199% Table D.15: Simulated Groundwater-Surface Water Interaction along Cimarron River up to Gauging Station
  18. 3&quot;,
  19. 31 Table D.20: Simulated Groundwater-Surface Water Interaction along Arkansas River up to Gauging Station 07140500 (Mean Discharge from 1922-1940) Arkansas River Baseflow (up to station 07140500)
  20. 31 Table D.22: Simulated Groundwater-Surface Water Interaction along Republican River up to Gauging Station 06824500 (Mean Discharge from 1947-1967) Republican River Baseflow (up to station 06824500)
  21. 35 Average Interaction Rate (cfs)
  22. 4 Average Interaction Rate (cfs)
  23. 5 Table D.26: Simulated Groundwater-Surface Water Interaction along Platte River up to Gauging Station 06767998 (Mean Discharge from 1968-1976) Platte River Baseflow (up to station 06767998)
  24. 53 Average Interaction Rate (cfs)
  25. 68 Table D.18: Simulated Groundwater-Surface Water Interaction along Arkansas River up to Gauging Station 07139000 (Mean Discharge from 1922-1950) Arkansas River Baseflow (up to station 07139000)
  26. 800 #maximum number of iteration to use for PSO xmin = -0.0005 #starting point min (m/d)
  27. 86 Average Interaction Rate (cfs)
  28. 94 Average Interaction Rate (cfs)
  29. 98 Average Interaction Rate (cfs)
  30. a numpy record array of tuples (one per row)
  31. Account for possibility of data not overlapping perfectly at edges resulting in zeros in areas within the boundary count
  32. Add errors to fishnet print &quot;Rearranging Errors&quot;
  33. Add extraction values to fishnet print &quot;Rearranging extractions&quot;
  34. Add heads to fishnet print &quot;Rearranging Heads&quot;
  35. Add ZONE_ID number and set it equal to Object ID print &quot;Assigning Zone IDs ... &quot;
  36. Adjust left and right extents
  37. Adjust top and bottom extents change = (new_length -
  38. AggregateCells&quot; #Provide a default value if unspecified
  39. Analysis Tools.tbx&quot;
  40. (2011). Analytic elements method and particle swarm optimization based simulation-optimization model for groundwater management.
  41. and 22nd cells of the transect when counting from left to right from 1
  42. and Cell_Height #&quot;&quot;&quot; High Plains Model
  43. and save largest polygon within boundary to new shapefile:
  44. append(fishnetFC[header ][i-1]) i
  45. arcgisscripting from FileReader_recordArray import *
  46. Area > &quot;
  47. Area Field gp.AddField_management (AquiferCoveragePoly , &quot;Area&quot;, &quot;FLOAT&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;NON_NULLABLE&quot;, &quot;NON_REQUIRED&quot;, &quot;&quot;)
  48. Area Field gp.AddField_management (Extents_Polygon , &quot;Area&quot;, &quot;FLOAT&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;NON_NULLABLE&quot;, &quot;NON_REQUIRED&quot;, &quot;&quot;)
  49. Area\&quot; = &quot;
  50. Area\&quot; = &quot; + str(maxArea) area_string = &quot;Area > &quot;
  51. Arguments: filename - name of file to be read (including path if needed)
  52. Array2Raster.py The Array2Raster.py script is used to create rasters from 2D arrays in Python.
  53. Average Interaction Rate (cfs)
  54. AVG_K&quot;, Raster_K , str( cellsize)) #print 'times '
  55. ax = plt.subplots(1) plt.title('PSO_'
  56. ax.plot(objPlotX ,OFmin ,'b',objPlotX , OFmax ,'r') ax.set_xlabel('iteration ')
  57. ax.set_xlabel('iteration ') ax.set_ylabel('Objective Function Value ')
  58. ax.set_xlabel('X coordinate (m)') ax.set_ylabel('Elevation (m)'
  59. ax.set_ylabel('Objective Function Value ') ax.legend (('Global Best', 'Global Worst '
  60. baseName + &quot;Err&quot; , outputDirectory , txtOutput) print &quot;Rasters saved in&quot;, outputDirectory
  61. (2000). Bedrock ','Conductance ','K','PredWlv ','Recharge ', 'RiverHead ','SPYD','SurfaceElev '] #names of polygons to be created , must be in same order as file_array Cell_Width =
  62. best for 1000m cellsize xmaxEnforce = 2.5 #maximum extraction value , enforced only by penalty function
  63. Boundary_ASCII_file = textFolders + &quot;\\txt\\ boundary.txt&quot;
  64. boundary_txt = txtOutput+ 'slopingbasebound.txt' xid_txt =
  65. Buffer Single_Model_Polygon ... gp.Buffer_analysis(Single_Model_Polygon_Agg , Single_Model_Polygon_Agg_Buffer , str(-int(cellsize)) + &quot; Meters&quot;, &quot;FULL&quot;, &quot;FLAT&quot;, &quot;NONE&quot;, &quot;&quot;
  66. C:/ Documents and Settings/andya/My Documents/Python/Py2.
  67. C:/ Documents and Settings/andya/My Documents/Python/Py2.6/ GW_Optimization/Fishnet/Fishnet/&quot;
  68. C:/ Documents and Settings/andya/My Documents/Python/Py2.6/ GW_Optimization/Fishnet/Fishnet/&quot; + OutputFolder + &quot;/&quot; + cellDimensions #Enter path to folder containing fishnet csv file
  69. C:/ Documents and Settings/andya/My Documents/Python/Py2.6/GW_Optimization/output/'
  70. (1983). C:/ Program Files (x86)/ArcGIS/Desktop10.0/Coordinate Systems/Projected Coordinate Systems/UTM/NAD
  71. (2000). C.5 Recharge Rate Recharge rates for the High Plains aquifer were obtained from an image on page 49 of a report produced by Dugan
  72. Calculate Field for Single_Model_Polygon ... gp.CalculateField_management(Single_Model_Polygon , &quot;Raster_val &quot;, &quot;1&quot;, &quot;PYTHON_9.3&quot;, &quot;&quot;)
  73. Calculate Field for Single_Model_Polygon_Agg ...
  74. Calculate Field for Single_Model_Polygon_Agg_Buffer ... gp.CalculateField_management(Single_Model_Polygon_Agg_Buffer , &quot;Raster_val&quot;, &quot;1&quot;, &quot;PYTHON_9.3&quot;, &quot;&quot;)
  75. Calculate rows and columns needed for fishnet
  76. Calculate zonal statistics as a table.
  77. Cell_Height = 10000 #meters #&quot;&quot;&quot;
  78. character separating data items in a row (optional ; default ',') Outputs
  79. Check out any necessary licenses
  80. Clean up River Head and Conductance text files
  81. close the two files myInFile.close (
  82. conductance = read_ndArray(textFileFolder + 'Conductance_MODFLOW.txt ', dtype , skip , missing , separator ,rows ,cols ,read)
  83. Conductance ASCII to Raster ... gp.ASCIIToRaster_conversion(Conductance_ASCII_file , Conductance_Raster , &quot;INTEGER&quot;)
  84. Conductance text file MODFLOW_ascii(Conductance_ASCII_file , textFolders + &quot;\\
  85. Conductance_ASCII_file ,RiverHead_Raster ,RiverHead_ASCII_file ,RiverBottom_Raster , RiverBottom_ASCII_file ,HighPlainsRivers_Clip , RiverBottom_Raster_Reclass
  86. Conductance_ASCII_file = textFolders + &quot;\\txt\\ conductance.txt&quot;
  87. Conversion Tools.tbx&quot;
  88. Conversion Tools.tbx&quot;) gp.AddToolbox(ToolboxFolder + &quot;Data Management Tools. tbx&quot;)
  89. Conversion Tools.tbx&quot;) gp.AddToolbox(ToolboxFolder + &quot;Data Management Tools.tbx&quot;)
  90. Conversion Tools.tbx&quot;) gp.AddToolbox(ToolboxFolder + &quot;Spatial Analyst Tools.tbx&quot;)
  91. copy the rest to the new file
  92. Create bedrock raster from topo lines
  93. Create Boundary File for Sloping base
  94. Create Boundary Files if create_ModelBoundary or create_RiverHead or create_Conductance or create_SlopingBaseBoundary:
  95. Create Conductance files if create_Conductance or create_ModelBoundary or create_RiverHead:
  96. Create fishnet lines and labels
  97. Create folder to hold new model information dirname = outDirec
  98. Create Polygons feature class from fishnet lines and labels
  99. Create Polygons for Head ,Depth to Water , and Saturated Thickness calculations calcs=['Head','ST','DTW','Error ']
  100. Create Predevelopment Water Level files if create_InitialHead or create_ModelBoundary or create_RiverHead or create_Conductance:
  101. Create Predeveolopment Water Level Raster for future comparison
  102. Create the Geodatabase and empty Feature Data Set. print &quot;Creating Geodatabase &quot; + GDB_Name + &quot; with Feature Data Set &quot; + FDS_Name + &quot; ... &quot;
  103. Create the Geoprocessor and set overwrite
  104. Cumulative Contribution to Baseflow (cfs)
  105. cwd + '\\ MODFLOW_texts \\'
  106. D:/ Research/MODFLOW/High_Plains/Output/&quot; #Folder to write output to
  107. D.2 Additional Baseflow Results D.2.1 Cimarron River Table D.13: Simulated Groundwater-Surface Water Interaction along Cimarron River up to Gauging Station 07156500
  108. D.2.2 Arkansas River Table D.17: Simulated Groundwater-Surface Water Interaction along Arkansas River up to Gauging Station 07139000
  109. D.2.3 Republican River Table D.21: Simulated Groundwater-Surface Water Interaction along Republican River up to Gauging Station 06824500
  110. Data Management Tools. tbx&quot;) gp.AddToolbox(ToolboxFolder + &quot;Spatial Analyst Tools. tbx&quot;)
  111. Data Management Tools.tbx&quot;
  112. def Fishnet(file_array ,Workspace ,GDB_Name ,Poly_Names ,Cell_Width , Cell_Height): #Create folder to store files if DNE
  113. def MODFLOWtxt(cellsize ,DEM_cellsize ,Recharge_cellsize ,dem_minus , working_folder ,outDirec ,names):
  114. def OneD_solve(row ,transectIndices ,cellWidth ,E,E_indices ,bedrockArray , boundaryArray ,DEMArray ,pwlArray ,KArray ,RArray ,dtype
  115. def visualizeFishnet(heads ,E,error ,fishnetDim ,modelDirec): #High Plains Fishnet Directory
  116. del Recharge_clip ,Recharge_resample ,Recharge_md , Recharge_ASCII_file
  117. del River_Raster ,River_Raster_Reclass ,DEM_Resample
  118. del thickness ,thickness_reclass ,Extents_raster , Extents_raster_reclassify ,Extents_Polygon del Single_Model_Polygon_Agg ,Single_Model_Polygon_Agg_Buffer , Spec_Head_Bound_Poly ,Single_Model_Raster
  119. delete the next four lines # (3) replace the no data value -9999 with 0
  120. Delete variables , releasing memory.
  121. Describe Input_Grid and derive extents.
  122. Determine required size of polygon
  123. Determine spatial reference of Input_Grid for feature data set
  124. dirname = outDirec + &quot;_&quot; +
  125. distances = numpy.zeros ((popSize -1,popSize),&quot;float64&quot;) offsetMatrix = numpy.ones((popSize ,popSize -1),&quot;float64&quot;
  126. E1.append (.0001) #cell size =
  127. ELEV Contour&quot;, bedrock_raster , str(cellsize), AquiferCoverage , &quot;20&quot;, &quot;&quot;, &quot;&quot;, &quot;ENFORCE&quot;, &quot; CONTOUR&quot;, &quot;40&quot;, &quot;&quot;, &quot;1&quot;, &quot;0&quot;, &quot;&quot;, &quot;&quot;,
  128. elif createRasters: outputDirectory = cwd + &quot;\\ output \\&quot; + outputGeoDatabaseName + &quot;\\&quot;
  129. elif featureclass == 'SurfaceElev ':
  130. elif useFishnet and FishnetVisualize:
  131. else: print 'Creating Recharge files '
  132. else: transectNum =
  133. Enter cell dimensions and output folder
  134. Enter cell dimensions and output folder name cellDimensions='2000x10000 ' #Fishnet Dimensions width x height
  135. Enter cell sizes and path to working folder and path to output folder DEM_cellsize = 250.0 #Cellsize of DEM being used for data creation , must be less than or equal to smallest cell size entered below
  136. Enter folder where text file outputs should be saved
  137. Enter maximum iterations to use for Levenber -Marquardt Optimization.
  138. Enter path for the csv file to be saved to.
  139. Enter the following folder locations ToolboxFolder = &quot;C:/ Program Files (x86)/ArcGis/Desktop10.0/ArcToolbox/ Toolboxes/&quot;
  140. Enter the names of your working files SPYD = &quot;spyd.shp&quot;
  141. except OSError: fishnet_Workspace = Workspace + &quot;/Fishnet/&quot;
  142. Extents_Polygon = outFolder + &quot;\\Temp\\ extents_poly.shp&quot; Single_Model_Polygon = outFolder + &quot;\\Temp\\ single_boundary_polygon.shp&quot;
  143. Extents_raster = outFolder + &quot;\\Temp\\ model_extents&quot; Extents_raster_reclassify = outFolder + &quot;\\Temp\\ mod_ext_rec&quot;
  144. Extents_raster_reclassify to Polygon ...
  145. F ig u re B .1 : Sl op in g B as e M od el an d O pt im iz at io n P yt ho n Sc ri pt s F lo w ch ar t
  146. False #Set to true to create rasters of results (head , extraction , error). Can only be used in model is run on grid with square cells.
  147. False #Set to true to display model results of each simulated transect as they finish. saveFigures = True #Set to true to automatically save plots
  148. False #Set to true to display the progression of the objective function throughout the optimization iterations. saveOF = True #Set to true to automatically save the objective function plot
  149. False #Use if want to limit minimum extraction according to xminEnforce value , enforced only by penalty function Vmax = 0.0001 #maximum velocity
  150. FC_values['Boundary '][ count]
  151. FCrow.SetValue('Error ',value) FCrows.UpdateRow(FCrow)
  152. FCrow.SetValue('Extraction ',value) FCrows.UpdateRow(FCrow)
  153. Feature to Raster ...
  154. Feature to Raster ... gp.FeatureToRaster_conversion(HighPlainsRivers_Clip , &quot; Conduc&quot;, Conductance_Raster , str(cellsize
  155. Figure C.1: High Plains Bedrock Contours Input Shapefile
  156. Figure C.6: High Plains Recharge Raster Input Shapefile
  157. Figure D.10: Groundwater-Surface Water Interaction Along the Republican River (L-M results,
  158. Figure D.2: Groundwater-Surface Water Interaction Along the Cimarron River (L-M results,
  159. Figure D.3: Groundwater-Surface Water Interaction Along the Cimarron River (PSO results,
  160. Figure D.4: Groundwater-Surface Water Interaction Along the Cimarron River (L-M results,
  161. Figure D.5: Groundwater-Surface Water Interaction Along the Arkansas River (PSO results,
  162. Figure D.6: Groundwater-Surface Water Interaction Along the Arkansas River (L-M results,
  163. Figure D.7: Groundwater-Surface Water Interaction Along the Arkansas River (PSO results,
  164. Figure D.8: Groundwater-Surface Water Interaction Along the Arkansas River (L-M results,
  165. Figure D.9: Groundwater-Surface Water Interaction Along the Republican River (PSO results,
  166. figure.figsize ': figsize} plt.rcParams.update(params)
  167. file_list = ['slp_bse_bound ','bedrock_m ','conductance ','k_md','pred_wlv_m ' ,'recharge_md ','river_head ','spyd','dem'] #Names of the rasters in the workspace to be used in creation of fishnets
  168. Files if create_Wells:
  169. fishnet_Workspace = Workspace + &quot;/Fishnet/&quot;
  170. FishnetLayer&quot; LabelsLyr = &quot;LabelsLayer&quot;
  171. float (!SHAPE.AREA@SQUAREMILES !)&quot; gp.CalculateField_management (AquiferCoveragePoly , &quot;Area&quot;, expression , &quot;PYTHON_9.3&quot;)
  172. float (!SHAPE.AREA@SQUAREMILES !)&quot; gp.CalculateField_management (Extents_Polygon , &quot;Area&quot;, expression , &quot;PYTHON_9.3&quot;)
  173. for bed in FC_values['Bedrock ']:
  174. for colCount , number in enumerate(fields): if number == '': number = missing
  175. for dataset in datasets: gp.Workspace = workspace + &quot;/&quot; + dataset + &quot;/&quot;
  176. for dummy in xrange(len(dtype
  177. for dummy in xrange(skip):
  178. for extraction in E*cellWidth:
  179. for i in
  180. for i in range(1,3): line =
  181. for i in range(3,7): myInFile.readline (
  182. for i in xrange(1,len(transectIndices)):
  183. for i in xrange(1,popSize -1): offsetMatrix[i,0:i]
  184. for i in xrange(len(dtype)):
  185. for i in xrange(len(Ebest)):
  186. for i in xrange(numObservations): if i == 0:
  187. for i in xrange(totalCells):
  188. for i, number in enumerate(fields): if number == '': number = missing
  189. for interval in intervals: if createRasters:
  190. for item in FC_values[header ]:
  191. for item in output: output_writer.writerow(item)
  192. for j in xrange(popSize): if iteration ==0:
  193. for line in In_file:
  194. for name in calcs:
  195. for OFrow in xrange(rowsOF): ax.plot(objPlotX[OFrow],objPlotY[ OFrow],'b'
  196. for row in xrange(20 ,35): #use nrows to simulate all transects activeCellIndices =
  197. for transectIndices in activeCellIndices: lamb
  198. for value in E: if value*cellWidth < xminEnforce:
  199. for X_val in X: if X_val not
  200. from FileReader_ndArray import * from FileReader_recordArray import *
  201. from math import * import matplotlib.pyplot as plt
  202. from MODFLOWtxt import *
  203. Gauge Data and Baseflow Results This appendix contains the tables used to determine monthly average stream flows for the major rivers of the High Plains aquifer. It also contains results of baseflow analysis not presented in section 5.1.4.
  204. Generalized input routine from http ://
  205. Generalized input routine from http :// www.scipy.org/Cookbook/ InputOutput Modified by SM Welch to handle missing data
  206. GIS/&quot;
  207. GIS/Temp&quot;) os.makedirs(dirname + &quot;/txt&quot;)
  208. GIS&quot;) os.makedirs(dirname + &quot;/MODFLOW_txt&quot;)
  209. gp.AddField_management(PolysFC ,&quot;ZONE_ID&quot;,&quot;long&quot;) gp.CalculateField_management(PolysFC ,&quot;ZONE_ID&quot;,&quot;[OBJECTID]&quot;
  210. gp.CreateObject(&quot;Array&quot;) pnt = gp.CreateObject(&quot;Point&quot;)
  211. gp.Extent = str(left) + &quot; &quot; + str(bottom) + &quot; &quot;
  212. gp.Extent = str(left) + &quot; &quot; + str(bottom) + &quot; &quot; + str(right) + &quot; &quot; + str(top) SPYD_ASCII_file = textFolders + &quot;/txt/spyd.txt&quot;
  213. gp.FeatureToPolygon_management(FishnetLyr ,PolysFC ,&quot;#&quot;,&quot;Attributes&quot; ,LabelsLyr)
  214. gp.ZonalStatisticsAsTable_sa(PolysFC ,&quot;ZONE_ID&quot;,Input_Grid , Stat_Table ,&quot;DATA&quot;)
  215. GW_Optimization/Fishnet/Fishnet/&quot; + fishnetFolder + &quot;/&quot; textFileFolder = modelDirec + fishnetDim + &quot;/MODFLOW_txt/&quot;
  216. H[i]*K[0,i]*slope[i] for i in xrange(len( transectIndices))] for i in xrange(len(transectIndices)):
  217. header = [ncols ,nrows ,xllcorner ,yllcorner ,cellsize ,NODATA_value]
  218. header =[ncols ,nrows ,0,0,cell_width ,-9999]
  219. headers = ['Boundary ','xid','yid','X','Y','K','Recharge ','Bedrock ',' PredWlv ','SurfaceElev_avg ','SurfaceElev_min ']
  220. HighPlains ' #Name of Output Folder
  221. HighPlains ' #The name of the model folder where the input text files are located. baseName = 'HighPlains ' #This is the name that will be used to name output rasters
  222. Hyd_K ,Bedrock ,Recharge ,PredevWaterLv ,HighPlainsRivers ,DEM , AquiferCoverage ,ToolboxFolder ,Spatial_Ref_Folder] for cellsize in cellsizes:
  223. hyd_k.shp&quot; Bedrock = &quot;bedrock_elev.shp&quot;
  224. if &quot;IsRiver&quot; in names: gp.FeatureToRaster_conversion( HighPlainsRivers_Clip , &quot;IsRiver&quot;, River_Raster , str(cellsize
  225. if &quot;Raster_val&quot; in names: gp.FeatureToRaster_conversion(AquiferCoverage , &quot;Raster_val &quot;, AquiferCoverage_raster , str(cellsize
  226. if abs(smallChange) < smallChangeCountValue: smallChangeCount = smallChangeCount +
  227. if bottom < 0: if change -
  228. if change - int(change) <> 0: right
  229. if change and value == 0:
  230. if col == ncols -1: col
  231. if create_AquiferPolygon or create_ModelBoundary or create_Conductance : print 'Creating Aquifer Polygon files '
  232. if create_Bedrock or create_ModelBoundary or create_RiverHead or create_Conductance:
  233. if create_K: print 'Creating Hydraulic Conductivity files '
  234. if create_Recharge: if Recharge_cellsize <> cellsize:
  235. if create_RiverHead or create_RiverBottom or create_ModelBoundary or create_Conductance: print 'Creating River files '
  236. if create_SlopingBaseBoundary: gp.AddToolbox(ToolboxFolder + &quot;Conversion Tools.tbx&quot;)
  237. if create_SPYD: print 'Creating Specific Yield files '
  238. if DEM_cellsize > cellsize: print &quot;Dem cellsize > model cellsize&quot;
  239. if enforcePenalty: count
  240. if extraction < 0: count
  241. if header == 'Boundary ' or header == 'xid'or header == 'yid'or header == 'X'or header == 'Y': temp.append(int(item
  242. if i <> 0: E.append(Q_noE[i] - sum(E) - Q_reality[i
  243. if index in E_indices: if Ebest[Ebest_index ]* cellsize ==0:
  244. if initilizeE: #Used in L-M for i in xrange(len(E_indices)):
  245. if mode == &quot;DTW&quot;: lowPointIndices = [index for index in transectIndices if DEMArray[ row ,index] - pwlArray[row ,index]
  246. if not change and value == 1: change
  247. if number == '': number = missing data[i]. append(number)
  248. if one2zero: if value == 0 and not change:
  249. if os.path.exists(outRaster): while os.path.exists(outRaster):
  250. if plotFigures or saveFigures:
  251. if popSize >400: #This keeps the number of particles from becoming too large if the number of parameter is quite large. This number can be modified by user. popSize =
  252. if Recharge_cellsize > cellsize: print &quot;Recharge cellsize > model cellsize&quot;
  253. if right < 0: right
  254. if runPSO: variablePop = False #Set to true to use a population size that varies based on the number of parameters being optimized
  255. if saveFigures: figureDirectory = &quot;C:/ Documents and Settings/andya/Desktop/Figures/PSO /&quot;
  256. if saveOF: plt.savefig(figureDirectory + 'PSO_OF_ '
  257. if SpRef.Type != &quot;Projected&quot;: print &quot;Input raster data is not a projected data set.&quot;
  258. if top < 0: top
  259. if useMinDEM: DEMextraction = read_ndArray(textFileFolder + ' Surface_Elev_Min_MODFLOW.txt', dtype , skip , missing , separator ,nrows ,ncols ,read)
  260. if value == 1: indexList[segmentCount ]. append(index)
  261. if variablePop: popSize = len(E_indices)*8 #This creates a ratio of 8:1 particles to parameters. Can be modified by user.
  262. if Y_val not in unique_Y: unique_Y.append(Y_val)
  263. import arcgisscripting , os , sys , csv
  264. import numpy , random from math import *
  265. Import system modules
  266. In_file.close() Array2txt.py The Array2txt script takes the 2D arrays and writes them to text files.
  267. InitialHead_ASCII_file = textFolders + &quot;\\txt\\ initialhead.txt &quot; PredWlv_ASCII_file = textFolders + &quot;\\txt\\ predwlv.txt&quot;
  268. Input_Grid = raster print &quot;Creating &quot;
  269. IsRiver&quot;, &quot; short&quot;
  270. IsRiver&quot;, &quot;1&quot;, &quot; PYTHON_9.3&quot;) gp.FeatureToRaster_conversion( HighPlainsRivers_Clip , &quot;IsRiver&quot;, River_Raster , str(cellsize
  271. It will be cast to the given dtype at runtime
  272. iteration > maxIter ' print 'iteration > maxIter '
  273. Join ZonalStats table to PolysFC print &quot;Joining tables&quot;
  274. le A .1 : E xa m pl e of Sl op in gB as eC SV .p y ou tp ut te xt fil e B ou n d ar y x id y id
  275. line.strip().split(separator) for i, number in enumerate(fields):
  276. Load required toolboxes ...
  277. Local variables ...
  278. Local variables ... AquiferCoveragePoly = outFolder + &quot;\\Temp\\ aquifer_coverage_poly.shp&quot;
  279. Local variables ... Recharge_clip = outFolder + &quot;\\Temp\\ recharge_clip&quot;
  280. Local variables ... thickness = outFolder + &quot;\\Temp\\ thickness&quot;
  281. Local Variables Raster_SPYD = outFolder + &quot;/SPYD&quot;
  282. Make feature layers of the Fishnet and Labels feature classes.
  283. missing - value to use for missing data (optional; default '') separator - character separating data items in a row (optional ; default ',')
  284. missing , separator ,nrows ,ncols ,read) DEMextraction =
  285. missing , separator ,nrows ,ncols ,read) else:
  286. missing , separator ,rows ,cols ,read) #initialHead = read_ndArray(textFileFolder + 'InitialHead_MODFLOW.txt ', dtype , skip , missing , separator ,rows ,cols ,read)
  287. Model #Enter path to geodatabase created by Fishnet.py, this is the geodatabase that contains the fishnet shapefiles
  288. (1993). Model Calibration Techniques for Use with the Analytic Element Method.
  289. model_directory + &quot;/&quot; + fishnetDim + &quot;.gdb/ AggregateCells/Extraction&quot; FCrows = gp.UpdateCursor(extractionFC)
  290. model_directory + &quot;/&quot; + fishnetDim + &quot;.gdb/AggregateCells/ Error&quot; FCrows = gp.UpdateCursor(errFC)
  291. MODFLOWAscii.py The MODFLOWAscii script takes the text file created by the Raster to Ascii tool in ArcGIS and formats the header for use with PMWIN and mflab MODFLOW processors.
  292. Modified by SM Welch to handle missing data (10 Aug 10) Modified by W Kusnierczyk to handle header lines (20
  293. Modified by W Kusnierczyk to handle header lines
  294. MOST_FREQUENT&quot;, &quot;NONE&quot;, str(cellsize
  295. name of file to be read (including path if needed) dtype - numpy data type specifier
  296. (1972). Natural and artificial groundwater recharge, wet walnut creek, central kansas. Kansas Water Resources Board Bulletin 17,
  297. NEW_SELECTION&quot;, area_string
  298. NON_NULLABLE&quot;, &quot; NON_REQUIRED&quot;, &quot;&quot;
  299. number of header lines to skip (optional; default 1) missing - value to use for missing data (optional; default '')
  300. number of lines to read (0 means read all)
  301. (2003). Numerical simulation of ground-water flow in la crosse county, wisconsin and into nearby pools of the mississippi river. U.S. Geological Survey Water-Resources Investigations Report
  302. numpy data type specifier skip - number of header lines to skip (optional; default 1)
  303. numpy must be available &quot;&quot;&quot;
  304. numpy.zeros ((1,totalCells+1),dtype) discharge =
  305. OneD_solve(row ,transectIndices , cellsize ,E_orig ,E_indices ,bedrock ,
  306. only write the column and row number into the new file l =
  307. out any necessary licenses
  308. out any necessary licenses gp.CheckOutExtension(&quot;spatial&quot;)
  309. outDirec + &quot;/MODFLOW_txt/ SlopingBaseBound_MODFLOW.txt&quot;) MODFLOW_ascii(xid_txt , outDirec + &quot;/MODFLOW_txt/xid_MODFLOW.txt&quot;)
  310. outDirec + &quot;/MODFLOW_txt/ Surface_Elev_Min_MODFLOW.txt&quot;
  311. outDirec + &quot;/MODFLOW_txt/PredWlv_MODFLOW.txt&quot;) MODFLOW_ascii(surface_elev_avg_txt , outDirec + &quot;/MODFLOW_txt/ Surface_Elev_Avg_MODFLOW.txt&quot;)
  312. outDirec + &quot;/MODFLOW_txt/Recharge_MODFLOW.txt&quot;) MODFLOW_ascii(bedrock_txt , outDirec + &quot;/MODFLOW_txt/Bedrock_MODFLOW.txt&quot;)
  313. outDirec + &quot;/MODFLOW_txt/Y_MODFLOW.txt&quot;) MODFLOW_ascii(K_txt , outDirec + &quot;/MODFLOW_txt/K_MODFLOW.txt&quot;)
  314. outDirec + &quot;/MODFLOW_txt/yid_MODFLOW.txt&quot;) MODFLOW_ascii(X_txt , outDirec + &quot;/MODFLOW_txt/X_MODFLOW.txt&quot;)
  315. outFolder + &quot;\\ bedrock_m&quot; Bedrock_ASCII_file = textFolders + &quot;\\txt\\ bedrock.txt&quot;
  316. outFolder + &quot;\\ boundary&quot; Boundary_Centroids = outFolder + &quot;\\Temp\\ boundary_centroids. shp&quot;
  317. outFolder + &quot;\\ HighPlainsRivers_Clip.shp&quot; River_Raster = outFolder + &quot;\\Temp\\ River_Raster1&quot;
  318. outFolder + &quot;\\ river_bottom&quot; RiverHead_ASCII_file = textFolders + &quot;\\txt\\ riverhead .txt&quot;
  319. outFolder + &quot;\\ river_head&quot; RiverBottom_Raster = outFolder + &quot;\\Temp\\ riverbot_temp&quot;
  320. outFolder + &quot;\\Temp\\ bound_x&quot; Bound_Y = outFolder + &quot;\\Temp\\ bound_y&quot;
  321. outFolder + &quot;\\Temp\\ River_Raster2&quot; DEM_Resample = outFolder + &quot;\\Temp\\ DEM_Resample&quot;
  322. outFolder + &quot;\\Temp\\ sloping_base_poly.shp&quot; SlopingBaseExtentsRaster = outFolder + &quot;\\ slp_bse_bound&quot;
  323. outFolder + &quot;\\Temp\\ spec_head_bound. shp&quot; Single_Model_Raster = outFolder + &quot;\\Temp\\ bound_raster1&quot;
  324. output geodatabase name , fishnet folder ,
  325. Output_parameter_file = &quot;&quot;
  326. Output_remaining_sink_point_features = &quot;&quot;
  327. Outputs a numpy N-dimensional array with single given datatype (numpy.
  328. pBest = numpy.zeros ((dimensions ,popSize),&quot;float64&quot;) pLocal = numpy.zeros(( dimensions ,popSize),&quot;float64&quot;
  329. pCurrentFitness = numpy.zeros ((dimensions ,popSize),&quot;float64&quot;) pGlobal = numpy.zeros(( dimensions ,1),&quot;float64&quot;
  330. penalty function xminEnforce = -10.0 #minimum extraction value , enforced only by penalty function
  331. plotAllOF = False #If false only plot min and max values
  332. Plus ...
  333. Point to Raster ...
  334. Point to Raster ... gp.PointToRaster_conversion(Boundary_Centroids , &quot;POINT_Y&quot;,
  335. POLYGON&quot;
  336. PolygonToRaster ...
  337. pred_wlv_raster_m = outFolder + &quot;\\ pred_wlv_m&quot; InitialHead_raster = outFolder + &quot;\\ initialhead_m&quot;
  338. print '\nFinished ' print 'iteration:', iteration
  339. print 'best fit:', fitnessBestGlobal a = numpy.random.rand(dimensions ,popSize)*(amax)
  340. print 'best fit:', fitnessBestGlobal stop
  341. print 'Copying DEM to output folder '
  342. print 'Creating Bedrock files '
  343. print 'Creating Conductance files '
  344. print 'Creating Initial Head files '
  345. print 'Creating Model Boundary files '
  346. print 'Creating Well files '
  347. print 'iteration ',iteration objList[0]
  348. print 'Maximum Iteration Reached ' print 'best fit:', fitnessBestGlobal
  349. print 'min_count = 50' stop
  350. print 'minChange == 20'
  351. print 'Optimizing transect %d of row %d'
  352. print 'Reading '
  353. print 'Reading in Fishnet csv file' Fishnet_Data_Type = numpy.dtype ([(&quot;boundary&quot;,&quot;int32&quot;) ,(&quot;xid&quot;,&quot;int32&quot;) ,(&quot;yid&quot;,&quot;int32&quot;),
  354. print 'Resampling DEM to match input cell size' try:
  355. print 'Resampling Recharge Raster '
  356. print 'row %d has no active cells' %(row+1) if useFishnet and createRasters and not FishnetVisualize:
  357. print 'smallChangeCount = %d'
  358. print 'Sum objFunc ',
  359. print 'Transect %d in row %d has no extraction points '
  360. print 'Transect %d of row %d length < %d' %( transectNum ,row+1,minTransectLen) else:
  361. print 'transect indices ',transectIndices #print 'Extraction points ', E_indices
  362. print 'Writing Error values to Error feature class'
  363. print 'Writing extraction values to Extraction feature class'
  364. print 'Writing head values to Head feature class'
  365. print 'Writing values to .txt'
  366. print &quot;Calculating zonal statistics ... &quot;
  367. print &quot;Creating &quot; + name gp.FeatureToPolygon_management(FishnetLyr ,PolysFC ,&quot;#&quot;,&quot;Attributes&quot; ,LabelsLyr)
  368. print &quot;Creating &quot; + str(propertyName) + &quot; text file&quot;
  369. print &quot;Creating &quot; + str(rasterName) + &quot; Raster&quot;
  370. print &quot;Creating Fishnet with &quot; + str(Rows) + &quot; rows and &quot; + str(Cols) + &quot; columns at Origin Point:&quot;
  371. print &quot;Fishnet Saved in &quot;, modelDirec
  372. print &quot;Getting coordinates for cells ... &quot; gp.AddXY_management(LabelsLyr)
  373. print &quot;Output Directory:&quot;, dirname print &quot;cell size =&quot;,cellsize
  374. print &quot;Rasters saved in&quot;,
  375. Process script arguments and derive some variables GDB = GDB_Name + &quot;.gdb&quot;
  376. Project Raster gp.DefineProjection_management(SlopingBaseExtentsRaster , &quot;
  377. r') for dummy in xrange(skip): In_file.readline (
  378. Raster to ASCII ...
  379. Raster to Point ...
  380. Raster to Polygon ...
  381. Raster_val &quot;, &quot;1&quot;, &quot;PYTHON_9.3&quot;) gp.FeatureToRaster_conversion(AquiferCoverage , &quot;Raster_val &quot;, AquiferCoverage_raster , str(cellsize
  382. Raster_val Field
  383. Raster_val&quot;, &quot; SHORT&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;&quot;, &quot;NON_NULLABLE&quot;, &quot;NON_REQUIRED&quot;, &quot;&quot;
  384. Raster_val&quot;, &quot;1&quot;, &quot;PYTHON_9.3&quot;, &quot;&quot;
  385. Raster_val&quot;, Single_Model_Raster , &quot;CELL_CENTER&quot;, &quot;NONE&quot;,
  386. Raster_val&quot;, Single_Model_Raster_Agg , &quot;CELL_CENTER&quot;, &quot;NONE &quot;, str(cellsize
  387. Raster_val&quot;, Single_Model_Raster_Agg_Buffer , &quot; CELL_CENTER&quot;, &quot;NONE&quot;, str(cellsize
  388. rasterType) FishnetVisualize.py The FishnetVisualize.py script is used to create fishnet grids for head, error, and extraction values calculated by the GW Model.py script. The grids are saved as shapefiles in a user defined output geodatabase.
  389. Read a file with an arbitrary number of columns.
  390. Read a file with an arbitrary number of columns. The type of data in each column is arbitrary
  391. Read data from unformatted .txt to get header info Dim_Data_Type = numpy.dtype ([(&quot;dim&quot;, &quot;str&quot;) ,(&quot;dimval&quot;,&quot;float&quot;
  392. Recharge = &quot;rech_in_yr_ss&quot; PredevWaterLv = &quot;predevwlv_elev.shp&quot;
  393. Recharge_ASCII_file = textFolders + &quot;\\txt\\ recharge. txt&quot;
  394. Recharge_ASCII_file = textFolders + &quot;\\txt\\ recharge.txt&quot;
  395. Recharge_cellsize = 500.0 #cell size of recharge raster dem_minus = 3 #Value to subtract from DEM to create initial head values , this is only important for a MODFLOW model
  396. Recharge_resample = outFolder + &quot;\\Temp\\ recharge_res&quot; Recharge_md = outFolder + &quot;\\ recharge_md&quot;
  397. (1904). Recherches theoriques sur l’ecoulement des nappes d’eau infiltrees dans le sol et. sur le debit des sources.
  398. Reclassify ...
  399. Reclassify ... gp.Reclassify_sa(Extents_raster , &quot;Value&quot;, &quot;1 1;2 2;NODATA 1&quot;, Extents_raster_reclassify , &quot;DATA&quot;)
  400. Reclassify ... gp.Reclassify_sa(RiverBottom_Raster , &quot;VALUE&quot;, &quot;-3 0&quot;, RiverBottom_Raster_Reclass , &quot;DATA&quot;)
  401. Reclassify ... gp.Reclassify_sa(Single_Model_Raster , &quot;VALUE&quot;, &quot;1 1;NODATA 0&quot;, Single_Model_Raster_Reclass , &quot;DATA&quot;)
  402. Reclassify ... gp.Reclassify_sa(Single_Model_Raster_Agg_Buffer , &quot;VALUE&quot;, &quot;1 1 ;NODATA 0&quot;, Single_Model_Raster_Agg_Buffer_Reclass , &quot;DATA&quot; )
  403. (1999). Regional groundwater modeling of the yucca mountain site using analytic elements.
  404. replace -9999 with 0 myOutFile.write(line.replace('-9999', '0'
  405. required toolboxes ... gp.AddToolbox(ToolboxFolder + &quot;Conversion Tools.tbx&quot;)
  406. required toolboxes ... gp.AddToolbox(ToolboxFolder + &quot;Data Management Tools.tbx&quot;)
  407. required toolboxes ... gp.AddToolbox(ToolboxFolder + &quot;Spatial Analyst Tools. tbx&quot;)
  408. required toolboxes ... gp.AddToolbox(ToolboxFolder + &quot;Spatial Analyst Tools.tbx&quot;)
  409. Resample ...
  410. Resample ... gp.Resample_management(Recharge_clip , Recharge_resample ,
  411. ResultsFishnet.mdb' #Name of geodatabase to store fishnet results in fishnetFolder = 'HighPlains ' #Name of folder containing the output geodatabase
  412. return numpy.rec.array(data ,
  413. return objfunc ,headMid ,
  414. River Table D.23: Simulated Groundwater-Surface Water Interaction along Platte River up to Gauging Station 06686500
  415. RiverBottom ASCII to Raster ... gp.ASCIIToRaster_conversion(RiverBottom_ASCII_file , RiverBottom_Raster_Reclass , &quot;INTEGER&quot;)
  416. RiverBottom text file MODFLOW_ascii(RiverBottom_ASCII_file , textFolders + &quot;\\ MODFLOW_txt \\ RiverBottom_MODFLOW.txt&quot;)
  417. RiverBottom_ASCII_file = textFolders + &quot;\\txt\\ riverbottom.txt&quot;
  418. RiverHead ASCII to Raster ...
  419. script processes the ASCII file from ArcGIS to the format required by PMWIN and mflab # The processing procedures include (1) only keep the column and row number in the first two lines
  420. segmentCount = 0 for index ,value in enumerate(boundaryArray[row]):
  421. separator ,nrows ,ncols ,read) bound = read_ndArray(textFileFolder + 'SlopingBaseBound_MODFLOW.txt', dtype , skip , missing , separator ,nrows ,ncols ,read)
  422. separator ,nrows ,ncols ,read) K = read_ndArray(textFileFolder + 'K_MODFLOW.txt', dtype , skip , missing , separator ,nrows ,ncols ,read)
  423. separator ,nrows ,ncols ,read) pwl = read_ndArray(textFileFolder + 'PredWlv_MODFLOW.txt', dtype , skip , missing , separator ,nrows ,ncols ,read)
  424. separator ,nrows ,ncols ,read) R = read_ndArray(textFileFolder + 'Recharge_MODFLOW.txt', dtype , skip , missing , separator ,nrows ,ncols ,read)
  425. shutil.copy2(textFolders + &quot;\\ MODFLOW_txt \\ RiverHead_MODFLOW. txt&quot;, textFolders + &quot;\\ MODFLOW_txt \\ Wells_MODFLOW.txt&quot;)
  426. (2000). Simulation and analysis of soil-water conditions in the great plains and adjacent areas, central united states, 1951-80.
  427. Single Output Map Algebra ... gp.SingleOutputMapAlgebra_sa(&quot;con(isnull(k1_md),17 ,k1_md)&quot;, K2_md , &quot;&quot;
  428. Single Output Map Algebra ... gp.SingleOutputMapAlgebra_sa(&quot;con(k2_md == 0,1,k2_md)&quot;, K3_md , &quot;&quot;
  429. Single_Model_Polygon Polygons ...
  430. Single_Model_Polygon_Agg = outFolder + &quot;\\Temp\\ single_boundary_polygon_agg.shp&quot; Single_Model_Polygon_Agg_Buffer = outFolder + &quot;\\Temp\\ single_boundary_polygon_agg_buffer.shp&quot;
  431. slope.append(abs(DEM[0,i]-DEM[0,i-1])/len(transectIndices)/ cellWidth) slope = [abs(DEM[0,0]-DEM[0,-1])/len(transectIndices)/cellWidth for i in xrange(len(transectIndices
  432. SlopingBaseExtents_ASCII_file = textFolders + &quot;\\txt\\ slopingbasebound.txt&quot; DEM_ASCII_file = textFolders + &quot;\\txt\\dem.txt&quot;
  433. Spatial Analyst Tools.tbx&quot;
  434. Specify names for feature classes of Fishnet Lines and Lables.
  435. (1983). sr = gp.CreateSpatialReference(Spatial_Ref_Folder + &quot;NAD
  436. str(bottom) + &quot; &quot;
  437. str(bottom) + &quot; &quot; + str(right) + &quot; &quot; + str(top) AquiferCoverage_raster = outFolder + &quot;\\Temp\\ aquifer_ras&quot;
  438. str(Extent.XMin) + &quot; &quot;
  439. str(int(cellsize)) + &quot; Unknown&quot;, &quot;0 Unknown&quot;, &quot;1E+20 SquareMiles&quot;, &quot;NON_ORTHOGONAL&quot;
  440. str(left) + &quot; &quot; + str( bottom) + &quot; &quot;
  441. Table D.16: Simulated Groundwater-Surface Water Interaction along Cimarron River up to Gauging Station 07156800 (Mean Discharge from 1895-1942) Cimarron River Baseflow (up to station 07156800)
  442. Table D.19: Simulated Groundwater-Surface Water Interaction along Arkansas River up to Gauging Station 07140500
  443. Table D.25: Simulated Groundwater-Surface Water Interaction along Platte River up to Gauging Station 06767998
  444. Table E.3: PSO Test: Optimized Parameter Values Optimized
  445. text file MODFLOW_ascii(K_ASCII_file , textFolders + &quot;\\ MODFLOW_txt \\ K_MODFLOW.txt&quot;)
  446. text file MODFLOW_ascii(Recharge_ASCII_file , textFolders + &quot;\\ MODFLOW_txt \\ Recharge_MODFLOW.txt&quot;)
  447. textFolders + &quot;/MODFLOW_txt/ SPYD_MODFLOW.txt&quot;
  448. textFolders + &quot;\\ MODFLOW_txt \\ Bedrock_MODFLOW.txt&quot;
  449. textFolders + &quot;\\ MODFLOW_txt \\ Boundary_MODFLOW.txt&quot;
  450. textFolders + &quot;\\ MODFLOW_txt \\ InitialHead_MODFLOW.txt&quot;) MODFLOW_ascii(PredWlv_ASCII_file , textFolders + &quot;\\ MODFLOW_txt \\ PredWlv_MODFLOW.txt&quot;)
  451. textFolders + &quot;\\ MODFLOW_txt \\ Recharge_MODFLOW.txt&quot;
  452. textFolders + &quot;\\ MODFLOW_txt \\ RiverHead_MODFLOW.txt&quot;
  453. textFolders + &quot;\\ MODFLOW_txt \\ SlopingBaseBound_MODFLOW.txt&quot;) MODFLOW_ascii(DEM_ASCII_file , textFolders + &quot;\\ MODFLOW_txt \\ DEM_MODFLOW.txt&quot;)
  454. textFolders + &quot;\\ MODFLOW_txt \\ Y_Coords .txt&quot;
  455. the next four lines
  456. The type of data in each column is arbitrary It will be cast to the given dtype at runtime
  457. thickness_reclass = outFolder + &quot;\\ thickness_rec&quot; pred_wlv_raster = outFolder + &quot;\\Temp\\ pred_wlv&quot;
  458. thickness) # for use with optimization scripts
  459. Times ...
  460. tolist () objFunc = OneD_solve(totalRows ,transectIndices ,cellWidth ,E, E_indices ,bedrockArray ,boundaryArray ,DEMArray ,pwlArray , KArray ,RArray ,dtype = 'float64 ')
  461. tolist ()) objPlotX.append ([x for x in xrange( colsOF
  462. totalCells - 1 #index of last value
  463. True #If true PSO routine used for optimization. If false Levenberg -Marquardt routine used for optimization. initilizeE = False #Set to true to give initial guess for Levenberg -Marquardt. Not used in PSO.
  464. True #Set to true if using fishnet grid rather than raster grid for model data FishnetVisualize = False #Set to true to generate fishnet grids of model results (head , extraction , error)
  465. True #Set to true to use the minimum elevation in each fishnet grid cell when searching for potential extraction points based on depth to water. If false , use average elevation of entire cell. Only works with fishnet.
  466. True #Use if want to limit maximum extraction according to xmaxEnforce value , enforced only by
  467. try: Recharge_md = outFolder + &quot;\\ recharge_md&quot;
  468. Turn creation of data on or off create_AquiferPolygon
  469. txt\\&quot;,textFolders + &quot;\\txt \\&quot;,&quot;boundary.txt&quot;
  470. txtOutput = cwd + &quot;\\ output \\&quot; + modelName + &quot;\\&quot;
  471. (2006). Using analytic element models to delineate drinking water source protection
  472. VALUE&quot;, &quot;1 1;NODATA 0&quot; , River_Raster_Reclass , &quot;DATA&quot;
  473. variables ... gp.Extent = str(left) + &quot; &quot;
  474. Verify that the Input_Grid is in projected space.
  475. while FCrow: if
  476. while FCrow: if extraction[0][iter]
  477. while FCrow: if model_err[0][iter]
  478. while i <= nvals : for header in headers:
  479. while new_width/cellsize -
  480. while os.path.exists(dirname): iteration
  481. while os.path.exists(filepath): append
  482. while searchRow: if searchRow.MEAN
  483. X_Coords = textFolders + &quot;\\txt\\ X_coords.txt&quot; Y_Coords = textFolders + &quot;\\txt\\ Y_coords.txt&quot;
  484. X_COORDS text file MODFLOW_ascii(X_Coords , textFolders + &quot;\\ MODFLOW_txt \\ X_Coords .txt&quot;)
  485. x*modelCellWidth for x in xrange(
  486. xmax = 0.0005 #starting point (m/d) heavily influences final solution;
  487. xtick.labelsize ': 18, 'ytick.labelsize ':

To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.