 Welcome to Creating Hydrologic Routing Input with the Worf Hydro GIS Pre-Processing Toolkit. This tool is created by Kevin Sampson and David Gotchis. This video is by Molly McAllister from the National Center for Atmospheric Research. During this tutorial, we will walk through the process of creating the Hydrologic Routing Inputs, or Routing Stacks, for the Croton New York Test Case, which is available from our website. We will use the GIS preprocessing tool to verify the geogrid file creation and domain location. Then we will create basic hydrologic routing input. Next, we will add forecast points in the lakes to this routing stack. And finally, we will examine the outputs of the GIS preprocessing tool. The requirements for working with this tool are ArcGIS 10.3.1 or later and spatial analyst extension. So first, we will download the GIS preprocessing tool from our website. We will also download the GIS preprocessing standalone test data and the documentation. Now we will open up our catalog. Let's make sure that our spatial analyst extension is activated. Click customize, extensions, notice spatial analyst is activated, and close. Next, we will connect our folders for the GIS preprocessing tool. So navigate to the preprocessor tool, version five, click OK. Connect our folder for the test data, GIS preprocessor test data, and click OK. Now let's look at the test data that we have created for you. So if we open up that folder, you find a folder with expected outputs. These are outputs that have already been created using various configurations such as forecast points, lakes, masks, and for different gridding configurations. This is so that you can compare them to what you might create with the tool. The groundwater basins file folder contains groundwater NHD plus catchment shape files. The lake shapes folder contains shape files of lakes in this domain. And the Croton forecast points.csv is the forecast points and gauge locations, the latitude and longitude, and station IDs for the gauge locations for this domain. The geo underscore emd01.nc file is our geogrid file. And lastly we have the elevation data file, which is NED30m02b.croton.tif. Okay, so first we're going to verify our geogrid file domain boundary. So first we're going to expand the GIS preprocessor, expand the geogrid standalone test data processing toolbox and the utilities toolbox. We'll first be using the utility called create domain boundary shape file. Double click that. The first input that we'll use is clicking on the folder where we'll go navigate to our geogrid file, which is geoemd01.nc and open. You notice it automatically populates the destination and the shape file name that it's going to create. You can change this if you'd like. I'm going to leave it as default. We're going to hit OK. And if you go to the results window, you can watch the current session and expanding the meshes. You'll see how the tool is running. It says it has succeeded and the domain shape file was created. So we will go to arc map and create a new blank map. Click OK. We'll want to add our domain shape file that we just created. So we're going to go to the add data button. Click add data. Navigate to our folder connection, which was the test data folder under Croton Lambert. This Croton Lambert folder is named such for Croton indicates the destination that we are looking at or the domain that we're looking at, which is Croton, New York. And Lambert indicates the projection that was used to create these inputs, which was the Lambert conformal conic. OK. Now that we're in the correct folder, click on the domain shape file that was just created and click add. You'll see a filled in rectangle. All right. Now we're going to add a base map so that we can make sure that the location of our rectangle is in the correct spot. So click the drop down, add base map, click topographic, add. Now you see the rectangle is over a topographic map and it seems to be in New York. To see it better, we want to make the fill hollow. So we will go to our table of contents and under the domain shape file, we'll click the rectangle, go over it has a selection, click hollow and click OK. I like to have a stronger border, so I'm going to go back and click the little rectangle under table of contents in the domain shape file again. Go under outlying width and increase it to two and click OK. OK. Now we see that our domain boundary encompasses the region of our interest, which is the west branch of the Croton River in New York. And we also have a lake in here, or reservoir, which is called the west branch reservoir. So our domain boundary seems to be correct. Let's go back to our catalog and look at some of the variables from our geogrid file and verify that they were created correctly. So we will go to, we're going to use the utility called export grid from geogrid file. And we're going to input the geogrid file again. And it automatically populates the location and the file name. You can change this if you'd like. I'm going to leave it as default. Next, we're going to look at one of the variables that was mapped to our domain grid to see if it looks like it's correct. We want to verify that. If you click the drop down menu, you can see all the variables that were in the geogrid file. We're going to look at hgt underscore m, which is the topographic height over the mass grid. And again, click OK. You can go to our current session and watch the messages. And it says it has succeeded. And our output raster is d01 export grid 1.tiff. Okay, so let's go back to ArcMap. And we're going to add that layer. So go up to add data and the d01 export grid dot tiff, which is a raster layer. And click add. And since it was the topographic height over the mass grid, you can see that it's course grid resolution. However, the elevation, lower elevation is in the darker shaded colors or shaded values. And the higher elevation is in the lighter shaded values, so lighter shades. And it is relatively close to corresponding with our topographic base map. So this verifies that the variables in our geogrid file are correct and that we can start creating our routing stack. So let's go back to Arc Catalog. And we're going to start creating the most basic set of hydrologic routing input for a gridded routing configuration. And this time we're actually going to use the process geogrid file program. So double-click process geogrid file, input our geogrid file. Again, geomd01.nc, click open. We're going to skip forecast points because that's optional. And at this time we are just creating our basic hydrologic routing stack. So the only other thing we need is an input elevation raster, which has been created for us. Which is if you're in the Croton-Lambert folder, you should see ned underscore 30m underscore 02b underscore Croton dot tiff. This is our 30 meter elevation raster. Click add. Next we need to edit the regretting or nest factor. The regretting factor is how you control the resolution that the hydro model is going to use. This needs to nest perfectly into the land surface model resolution. Our land surface model resolution is 1000 meters. And we want to create, we want our hydro routing to be at the same as the national water model, which is currently 250 meter hydro grid. So 1000 divided by 250 is 4, so we'll enter a regretting factor of 4. Next we want to enter the number of routing grid cells to define a stream. This is used to control the density of the stream network. For this we want something that's close to the NHD plus density, which is two square kilometers. And if we want a stream pixel for every two square kilometers of area, and our grid resolution is 250 meters, and every grid cell is 62500 square meters, we will need 32 grid cells at that resolution. It's a little bit of math, but we're going to enter 32. Okay, so our output file is already populated for us, but we want to redefine it. So we want to click the folder, make sure it's in the correct location, which is in this Croton-Lambert file. And then we want to name this zip file according to what we have created. So we want to make sure that we have the resolution in there, and it's NED 30 meter. And our recruiting factor is 4, and our threshold is 32. And dot zip. And click save. Now click OK, and the process will run. You can go over to your results window and see, expand the messages to see how it's running. This will take a little bit longer than the other processes. Okay, it says it has succeeded. And there's an output file. NED 30 meter are 432 dot zip. Let's look at that file. So if we open up the zip file, this is the minimum output produced when you have grid erouting, no lakes or no forecast points. So the first file we see is fulldom, hires, and C. This is your full domain file, which contains all of the routing grids for all the variables in the geogrid file. The geogrid ldsout spatial metadata.nc file contains the spatial metadata associated with the geogrid variables. The gwbasins.nc file is a basin mass grid but re-gridded to the geogrid file resolution. And the gwbuckkarm.nc file is your ground water parameter table. More information about these files can be accessed in this tool documentation and the wharf hydrotechnical user guide. Okay, so that's the basic routing stack. Now let's create one with, which includes some gauge locations or forecast points. And since we have a lake in the domain, let's add the lake. So let's again go to process geogrid file and put the geogrid file and add the forecast points. It automatically looks for something with the extension dot csv. Here we have kroten forecast points dot csv. So open that. And now look at the options below that field. And since we have a lake in their domain, we're going to create lake parameter file. Notice a new field popped up as required, which is reservoir shape file or feature class. So we're going to find the lake shapes folder. And click on the lake shape file that has been included for us. Add that. Again, we're going to input our elevation raster, which was in the kroten-lambert folder, which is NED 30 meter 0 to B kroten dot tif. Add that. Again, our regriding factor was four. And our number of routing grid cells to define a stream was 32. And we're going to again name this according to what we have included. So we're going to name this NED 30 meter rf4 threshold 32 forecast points. Click OK. And go back to process in the results folder, open up the messages and watch them run. This will take a little bit longer because it has, it is including the forecast points in the lakes. But you can watch and see each step of the process that this program is running in this and through these messages. This will all each program that we've created in the processing and the utilities does produce a log file, which can be really helpful if you happen to come upon an error. And it's really helpful for troubleshooting. We see that this has succeeded and it has created the zip file. So let's open up this zip file, which was in kroten-lambert and see the difference. So now we have, again, we have the full-dom high res NC, which is your full-domain file. You have your spatial metal data file, your GW basins file, your GW buck-parm file. But now we have a lake-parm.nc file. And this is a table will contain a record for each lake feature that was in the full-dom high res NC file. Okay, so now we've created a full-routing stack. We want to visually examine these outputs in GIS before we submit them to Worf Hydro. So to do that, we're going to use another utility called examine outputs of GIS preprocessor. So double-click this. And our input will be the zip file that we just created, the one with the forecast points in the lakes. So click that and open. So what this does is takes the netcdf files that were created and it converts them into raster images that the GIS tool can be visualized within the GIS tool. Okay, click OK and watch it run. And you can see that it's creating all the grids that were from the full-dom file, all the variables in the full-dom file. And it has succeeded. And it has created a new output folder. The output folder is NED30MRI4TH3forecastpointslake1. Okay, so that should contain all the raster grids. Now we will open ArcMap and look at those rasters. So I'm going to keep my domain-shaped file border on. But let's add data from the rasters that we just created in NED30MRI4TH3forecastpointslake, this folder that was just created. Open it up and you can see all the raster grids that were created. So let's look at flow accumulation. Our flow accumulation grid. Click Add. So the flow accumulation grid gives the number of the contributing cells for each cell in the domain. That looks good. We'll turn that one off. Now let's add the channel grid. And you can see that the channels are in there and you can see there's a break here with an outflow point. And this is where the lake is supposed to exist. So we can see this by changing the transparency to say 50. And you can see how the channels line up with the topographic map channels. And then you can see there's a break where the lake exists and then there's the outflow point. Next we will add the gauge locations or the forecast points. Let's add the forecast points on the grid. So now you can see the forecast points were added to this grid. If you want to see them a little bit better with the topography behind it, you can go to properties. The display tab. Go down to transparency and change the transparency to say 50. Click OK. Now you can see that our forecast points location or location related to the base layer topography map. And so those look about right. OK, we will add stream order. So stream order grid is calculated using the stroller method. Let's make sure that our lake was created in our lake grid. So if we put in the lake grid, we can see that our lake is created and relative to the position that it exists related to the topographic map. We will change the transparency again to say 50. And see where our pixelated lake is covers the west branch of West Branch Reservoir. This lake. Alright, so our lake is in the right place. And finally let's look at topography. And let's change the value of this. Go to properties again, display, transparency, let's say 50. Just so that we can see the base map behind it a little bit to see that the topography of our grid is this is pretty close to the base map topography. So this our topography grid raster is the grid derived from the elevation values from the input elevation raster, which was the NED 30 meters. But it's been converted to floating point and resampled to the routing grid resolution. Okay, so our inputs look good and seem to be ready to input into a wharf hydro simulation. So this concludes the tutorial with the wharf hydro GIS preprocessing tool in relation to the Croton New York test case. We verified the geogrid file creation and domain location. We created a basic hydrologic routing input and routing stack. We then created a hydrologic routing input and routing stack, including forecast points and lakes. We then examined the outputs of the GIS preprocessing tool. And if you would like to like more information, you can read the GIS preprocessing tool documentation and the wharf hydro technical description. Which are available from our website. If you would like to contact us, please use our contact form on our website, which is https-rall.ucar.edu-projects-wharf-hydro-contact or wharfhydro-ucar.edu.