-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path03-AdhPrep.Rmd
104 lines (74 loc) · 7.29 KB
/
03-AdhPrep.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# Prepare Hydraulic Data
This chapter will describe the process used to prepare hydraulic modeling data for input to the Maxent model. For this study, the USACE developed Adaptive Hydraulics (AdH) 2D hydraulic model was used to model river dynamics. This chapter will describe how to process AdH outputs into usable datasets for mussel modeling.
```{r echo=FALSE, fig.cap="HREP Mussel Modeling Workflow, Hydraulic Predictors Step."}
include_graphics("docs/images/workflow_hydraulic.png")
```
## Import Adh Mesh Nodes
The purpose of this step is convert the AdH mesh node output into a set of point feature classes.
* Create a new folder and geodatabase to represent the alternative that this AdH model represents. In this example we will be modeling the existing condition alternative: `\\mvrdfs\egis\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Adh\Existing_condition/existingcondition.gdb`
* Get the AdH output from the hydraulic engineer. Copy it to the alternative folder you created in the last step. EC-HH Working directory: `\\mvr-netapp2\MVRDATA\ED\ec-hh\Mississippi_River\Steamboat Island\AdH\Model Runs\`
* Examine the AdH output file format and determine the steps required to convert it to `.csv` format.
* If the file contains header information other than field names (e.g., number of records, software version), delete those extraneous header rows so that only the row field names and data remain.
* If the file is tab or space-delimited, use Excel to convert the delimited text file to `.csv`. Open a blank Excel workbook and open the delimited text file. Use the import wizard to convert the tab or space-delimited file into an Excel workbook. Ensure the import works correctly and then save as a `.csv` file.
* Import the `.csv` file into the `existingcondition` geodatabase. Name the table by the flow condition it represents (Q5, Q95). Ensure that the field types are all set to `double`.
* Add the Q5 table into a blank ArcMap document.
* Right-click the `Q5` table and click "Display XY Data".
* Set appropriate 'X','Y', and 'Z' fields.
* Identify the datum and coordinate system recorded in the AdH table; all future output feature classes and rasters will need to be in the same projected coordinate system. In this example, Datum: 'NAD 1983 2011 US Feet' and Coordinate System: 'StatePlane Illinois West FIPS 1202'.
* Export `Q5_Events` as new point feature class named `Q5_pts`.
* Repeat the above steps to create point feature classes for the Q95 model results.
## Create Mask
The goal of this step is to define no data areas outside of the study. This step will use the UMRR Long Term Resource Monitoring (LTRM) Aquatic Areas dataset to create a mask of the study area.
* Create a new polygon feature class named: `\\mvrdfs\EGIS\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Data\SB_Mussels.gdb\SB_ILStatePlaneW\study_area`.
* Start an edit session on the `study_area` feature class and draw a polygon around the study area. Ensure that this polygon entirely covers the `Q5_pts` and `Q95_pts`.
* Use the `Aquatic_Areas_2010` layer to prepare data for the Clip (Analysis) tool (`\\mvrdfs\egis\Data\Layers\Biology\Aquatic_Areas_2010.lyr`).
* Input Features: `Aquatic Areas 2010\Classifications\Aquatic Areas: Level 2`
* Clip Features: `study_area`
* Output Feature Class: `\\mvrdfs\EGIS\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Data\SB_Mussels.gdb\aquatic_areas`
* Open an edit session to edit the `aquatic_areas` attribute table.
* Delete "Isolated Floodplain Lake" records from the `aquatic_areas` attribute table. Mussels are unlikely to be found in these areas.
* Select rows where 'LAND_WATER' field is set to Land, and delete.
* Use the merge tool on this feature class to ensure there is only one row representing Water.
* Use the Buffer (Analysis) tool to expand the study area beyond the extent of valid values. Use a buffer of approximately 20 meters to ensure that mussel samples fall well within the study area. Areas that fall outside the buffered area will be used to define no data in the AdH rasters.
* Input features: `aquatic_areas_dissolve`
* Output Feature Class: `\\mvrdfs\egis\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Data\SB_Mussels.gdb\SB_ILStatePlaneW\aquatic_areas_20m`
* Distance: 20 meters
* Use the Polygon to Raster (Conversion) tool to convert the `aquatic_areas_20m` feature class to a raster.
* Input Features: `aquatic_areas_20m`
* Value field: `OBJECTID`
* Output Raster Dataset: `\\mvrdfs\egis\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Adh\Existing_condition\existingcondition.gdb\mask`
* Set Environments
* Output Coordinates: `NAD_1983_2011_StatePlane_Illinois_West_FIPS_1202_Ft_US`
* Processing Extent: `study_area`
* Cell Size: 3 ft
## Set Environments
The purpose of this step is to set the Environments to `mask` so that all the subsequent AdH raster outputs will have the same coordinate system, extent, cell alignment, cell size, and no data area.
*Set Environments
* Ouput Coordinates: `mask`
* Processing Extent: `mask`
* Snap raster: `mask`
* Cell Size: `mask`
* Mask: `mask`
## Convert Adh Mesh Nodes to Raster
The goal of this step is to convert the raw Adaptive Hydraulics Model (AdH) data (depth, slope velocity, sheer stress, froude_number, Reynolds_number) into raster format that can be input to the Maxent model. AdH models will be produced for the Q5 (high flow) and Q95 (low flow) flow conditions. This will result in the creation of 12 rasters (one for each of 6 AdH parameter) by 2 flow conditions.
* Use the IDW (Spatial Analyst) tool to interpolate a raster surface.
* Input point features: `Q5_pts`.
* Z value field: `velocity`
* Output raster: `\\mvrdfs\EGIS\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Adh\Existing_condition\existingcondition.gdb\q5_velocity`
* Complete these steps for the other variables, `depth`, `sheer stress`, `froude_number`, and `reynolds_number`.
## Calculate Slope
The goal of the step is to calculate slope from the AdH depth variable created in the previous step.
* Use the Slope (Spatial Analyst) tool to calculate slope.
* Input raster: `q5_depth`
* Output raster: `\\mvrdfs\egis\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Adh\Existing_condition\existingcondition.gdb\q5_slope`
* Output measurement: degree
* Z factor = 1 (linear units same)
* Use Copy Raster (Data Management) tool to convert the `q5_slope` raster into .bil format, as outlined in previous step.
* Repeat the above steps to convert calculate the Q95 slope.
## Convert to .bil format
The goal of this step is to convert the AdH output into a format that can be used by Maxent. The .bil format is one of the formats common to both Maxent and ESRI. This step will repeated for all AdH (Q5, Q95) predictors.
* Use the Copy Raster (Data Management) tool to covert the AdH predictor rasters into .bil format.
* Input Raster: `q5_velocity`
* Output Raster Dataset: `\\mvrdfs\egis\Work\EMP\HREP_Projects\SteamboatSlough\Mussels\SteamboatMusselModel\Adh\Existing_condition\q5_velocity.bil` (Note: cannot save .bil format within the .gdb)
* Format: ESRI BIL
* Repeat the above step for all of the other environmental predictor variables.