Hydrologic Projects
ESPAM2 Recharge Tools 1.5 Documentation
Processing Steps
IAR Steps
Input Data (all inputs are grids unless otherwise specified):
- Urban/Wetland Mask (1 = yes / 0 = no) (See wetlandmask)
- Surface Water Entity (String value for each entity name: IESW000, IESW001, etc...) (See surfacewaterentity)
- Groundwater Entity (String value for each entity name: IEGW501, IEGW502, etc...) (See groundwaterentity)
- Groundwater Fraction (Values between 0.00 and 1.00 inclusive) (See groundwaterfraction)
- Irrigation For 1980, 1986, 1992, 2000, 2002, and 2006. (1 = Irrigated / 0 = Not Irrigated) (See irrigation)
- ESPA Model Grid (Vector) (See espagrid)
Convert ESPA Grid vector to a raster. Use the CELL_INTGR value as the attribute. This step only needs to occur once. Make the cell size equal to the other input rasters, which are 30 square meters.
Reclassify Groundwater Entity raster to an integer. Save the reclassified values off into a separate file. Will need this later when generating the IAR output. The file needs to be reclassified, because the combine tool only works on integer grids. Removed the No_IRR record from the reclassification value list. Checked the change missing values to NoData.
Combine the output from step 1 and step 2, using the Combine tool in the Local toolbox in Spatial Analyst. This will create a Groundwater Entity raster, summarized by ESPA Model Grid cell.
Add a raster attribute field to both the output from step 3. Name the new field ENTITY_GRID, and set the data type to a text field.
Calculate the value of the ENTITY_GRID field added in step 4 as the concatenated ESPA Grid Cell value to the reclassified ID value separated by an underscore:
1018196 & "_" & 3 = "1018196_3."
This will uniquely identify each zone as part of a specific model cell, and a specific groundwater entity.
Reclassify Surface Water Entity raster to an integer. Save the reclassified values off into a separate file. Will need this later when generating the IAR output. The file needs to be reclassified, because the combine tool only works on integer grids. Removed the No_IRR record from the reclassification value list. Checked the change missing values to``NoData``.
Combine the output from step 1 and step 6, using the Combine tool in the Local toolbox in Spatial Analyst. This will create a Surface Water Entity raster, summarized by ESPA Model Grid cell.
Add a raster attribute field to both the output from step 7. Name the new field ENTITY_GRID, and set the data type to a text field.
Calculate the value of the ENTITY_GRID field added in step 8 as the concatenated ESPA Grid Cell value to the reclassified ID value separated by an underscore:
1021201 & "_" & 31 = "1021201_31."
This will uniquely identify each zone as part of a specific model cell, and a specific surface water entity.
Mask out Groundwater Fractions for each Irrigation Year, using Irrigated Lands raster and Wetland/Urban mask raster.
Apply irrigation and urban/wetland mask to groundwater fraction for each irrigation year using the following Map Algebra statement (using ArcGIS 10.x syntax):
Result = Con((~"Urban Wetland Mask" & "Irrigated Lands Year 1986"),"Groundwater Fractions")
Take the irrigation raster and apply a Boolean and to the negation of the Urban/Wetland Mask. Where this is equal to 1, then use Groundwater Fraction as the resulting value; otherwise use NoData.
This will produce a raster of groundwater fractions for Irrigated Areas outside of Urban/Wetland areas.
Create Surface Water Fraction and Groundwater Fraction grids using the pixel size:
Generate Groundwater Fraction by area, by multiplying the resulting grids from step 10, by the cell size. In this case the cell size is 30x30 meters, or 900 square meters. I applied a conversion factory of 10.7639104 to convert square meters into square feet. The map algebra expression would look like this:
Result = (900 * 10.7639104) * Groundwater Fraction
Generate Surface Water Fraction by area, by multiplying the resulting grid from step 10, by the cell size. In this case the cell size is 30x30 meters, or 900 square meters. I applied a conversion factory of 10.7639104 to convert square meters into square feet. The map algebra expression would look like this:
Result = (900 * 10.7639104) * (1 - Groundwater Fraction)
Using Zonal Statistics, summarize the amount of Irrigated acres / Groundwater fraction for each ESPA Grid Cell and Groundwater Entity. Use Zonal Stats to summarize the values from step 11, by the ENTITY_GRID value for the Groundwater / ESPA Grid overlay from step 5. This will produce a sum of all Irrigated Acres * Surface Water fraction by each surface water entity for each grid cell. This will need to be repeated for each irrigation year.
Using Zonal Statistics, summarize the amount of Irrigated acres / Surface Water fraction for each ESPA Grid Cell and Surface Water Entity. Use Zonal Stats to summarize the values from step 12, by the ENTITY_GRID value for the Surface Water / ESPA Grid overlay from step 9. This will produce a sum of all Irrigated Acres * Surface Water fraction by each surface water entity for each grid cell. This will need to be repeated for each irrigation year.
Convert the resulting rasters from steps 13 and 14 into an IAR file. In this step I will use the reclassification tables written out in steps 2 and 6 to get the entity names for the zonal statistics grids. I will not go into details here, but the basics are that the irrigated acreage for each entity and stress period will be written out as described in the IAR memo.
Curtailment IAR Steps
In addition to the steps performed on the IAR file, a Junior Fraction is generated for each grid cell. This Junior Fraction is multiplied to the groundwater entities output generated from the IAR tool.
Input Data (all inputs are grids unless otherwise specified):
- Urban/Wetland Mask (1 = yes / 0 = no) (See wetlandmask)
- Surface Water Entity (String value for each entity name: IESW000, IESW001, etc...) (See surfacewaterentity)
- Groundwater Entity (String value for each entity name: IEGW501, IEGW502, etc...) (See groundwaterentity)
- Groundwater Fraction (Values between 0.00 and 1.00 inclusive) (See groundwaterfraction)
- Irrigation For 1980, 1986, 1992, 2000, 2002, and 2006. (1 = Irrigated / 0 = Not Irrigated) (See irrigation)
- Point of Diversions (Vector) (See pointofdiversion)
- ESPA Model Grid (Vector) (See espagrid)
Load the Point of Diversion vector and determine the which ESPAM grid cell each Point of Diversion falls into using row and column fields in the attribute table.
Determine the diversion rate for each grid cell by taking the sum of all diversions within the grid cell.
Determine the senior diversion rate for each grid cell by taking the sum of all diversions that are senior (less than or equal) to the user entered priority date.
Calculate the global senior fraction by taking the sum of all senior diversion rates and dividing by all diversion rates.
Generate junior fraction for each ESPAM grid cell.
If the ESPAM grid cell contains diversions, then the senior fraction is the sum of all senior diversion rates in the grid cell divided by the sum of all diversion rates within the grid cell.
If the ESPAM grid cell is located in the Mud Lake or Monteview entity, overwrite the senior fraction with the senior fraction calculated from POD diversion rates in the cells from the appropriate list. If there is not at least one POD in each cell located in the Mud Lake and Monteview well fields, a warning message will be written in the IAR file to alert the user. This will not affect calculation of the junior fraction.
- If the ESPAM grid cell does not contain diversions, then the senior fraction is calculated according to the user defined EST_FLAG parameter (A or G).
- If EST_FLAG is A, then the fraction is determined using the senior fraction calculated from POD diversion rates in the eight adjacent grid cells. If none of the eight grid cells contain a diversion then the global fraction is used.
- If EST_FLAG is G, then the global fraction is used.
The junior fraction is calculated as 1 minus the senior fraction. The output generated by the IAR tool (see IAR Steps) is multiplied by the junior fraction for each grid cell, and by the user-specified multipliers for groundwater and surface water.
PRISM Pre-Processing Steps
- Imports PRISM ASCII file into an Esri Grid
>>> arcpy.ASCIIToRaster_conversion (inputPRISMAsciiFile, newRaster, "INTEGER")
- Defines projection onto new grid as NAD 83/Decimal Degrees
>>> arcpy.DefineProjection_management(newRaster, "nad83DDProject")
- Projects PRISM grid to Idaho Transverse Mercator - 1983. See Map Projections Used By ESPAM2 Recharge Tools for details. Set the registration point to 0,0, and resample the input to 500x500 meters. The 500 meter cell size is to make the PRISM cell size smaller than the ESPA Model grid size.
>>> arcpy.ProjectRaster_management(newRaster,idtmRaster,"idtm83Project", "NEAREST", "500", "", registration_point)
- Clips PRISM grid To ESPA Model boundary
>>> espamExtent = "2378349.08421956 1190138.26189886 2752647.96876284 1508243.31334068"
>>> arcpy.Clip_management(idtmRaster, espamExtent , idtmClippedRaster, modelGridFeatureClass, "", "NONE")
- Converts cell values from 100’s of mm of rainfall to feet of rainfall
>>> resampledRaster = Raster(idtmClippedResRaster)
>>> #Use map algebra for the conversions
>>> #100's of mm / 100 = 1 mm
>>> #1 mm / 10 = 1 cm
>>> #1 cm / 2.54 = 1 inch
>>> #1 inch / 12 = 1 Foot
>>> outputRaster = resampledRaster / 100 / 10 / 2.54 / 12
>>> outputRaster.save(outputGrid)