Difference between revisions of "Tarsier Tutorial: Watershed simulation using the Marmoset Model"

From CCoWS Wiki
Jump to: navigation, search
(Creating NetworkData using the WatershedForm and a Hydro-DEM raster)
(Optional steps referenced from above)
Line 113: Line 113:
  
 
# After your Ptr raster gets created go to the Ptr '''UseeControl''' and click the view button.
 
# After your Ptr raster gets created go to the Ptr '''UseeControl''' and click the view button.
 +
# The Ptr raster should look like a technicolor version of a shaded relief image, with cell values between 1 and 8 indicating flow directions, and some pink cells (-9999) indicating [[NoData]] cells.
 
# Now save your Ptr raster  
 
# Now save your Ptr raster  
 
## Make sure the window you want to save is active (click on the window that is showing the Ptr raster).
 
## Make sure the window you want to save is active (click on the window that is showing the Ptr raster).
Line 118: Line 119:
 
## The Tarsier SaveDialog should come up. The top yellow box is the raster viewer file '''*.trv'''. The second box is your raster file '''*.tra'''. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name, like 'ptr'. Click the 'Save All Checked' Button.
 
## The Tarsier SaveDialog should come up. The top yellow box is the raster viewer file '''*.trv'''. The second box is your raster file '''*.tra'''. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name, like 'ptr'. Click the 'Save All Checked' Button.
 
# Close the window for Ptr raster (the raster itself will stay loaded, since its still being used by the Watershed tool)
 
# Close the window for Ptr raster (the raster itself will stay loaded, since its still being used by the Watershed tool)
 +
 +
=== Viewing and saving the Stream raster ===
 +
 +
# After your Stream raster gets created, go to the '''Stream''' UseeControl(bottom of page) and click the '''view''' button.
 +
# The Stream raster should look mostly empty (white, 0) with non-zero (usually red) cells only along streams, and some pink cells (-9999) indicating [[NoData]] cells.
 +
# Now save your Stream raster
 +
## File->Save As.
 +
## The Tarsier Save Dialog should come up. The top yellow box is the raster viewer file '''*.trv'''. The second box is your raster file '''*.tra'''. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name. Click the 'Save All Checked' Button.
 +
# Close the Stream raster
  
 
== Links ==
 
== Links ==
  
 
* [[Tarsier Tutorials]]
 
* [[Tarsier Tutorials]]

Revision as of 08:05, 8 April 2010

Prerequisites

Creating NetworkData using the WatershedForm and a Hydro-DEM raster

The first step in this tutorial is to create a representation of the streamflow network in the watershed. In Tarsier, this is called a Tarsier Network Data object, and it is created using the Tarsier Watershed Tool.

  1. Open the Tarsino executable file (Tarsino.exe). If no Tarsier modules (dlls) are already loaded, the program will ask if you want to load the basic modules, select Yes.
  2. Open your HydroDEM raster
    1. File->Open, navigate to your raster and click open.
  3. Create a new Watershed form
    1. File->New->Analysts->Watershed form
  4. Go to the input tab on the Watershed form. Here you see two UseeControls like the generic one below:
    UseeControl.JPG
    UseeControls are one of the ways Tarsier loads and shares data, you can learn more about it here: Tarsier: UseeControl
    1. Go to the HydroDEM UseeControl dropdown-box and select your hydro DEM raster.
  5. Create a pointer image (Ptr) raster. This will be raster of flow directions, i.e. each cell will contain a value indicating which way water should flow from that cell.
    1. Go to the Streams tab and click the Calc Ptr button (it could take a while to do this calculation).
    2. Optionally, you could View and Save the Ptr raster, but skip this on the first time around.
  6. Calculate the streams raster
    1. You can set the threshold upslope area above which cells are considered streams by changing the value inside the Tresh box. The default is 100000000 which should work for your raster.
    2. Click the Calc stream button - this will calculate NetPtr, UpslopeArea, LnA, and Stream. This calculation takes a few seconds. View the progress at the top left of the Watershed analysis window.
    3. Optionally, you could View and Save the Stream raster, but skip this on the first time around.
  7. Go to the Basins tab and click on the Add all outlets to starting points button.
  8. Once you have a starting point you can click the Calc all basins from starting points button. This will create your network data. It will take a while (and it will also create rasters of sub-watersheds of your watershed).
  9. Skip this step, since its superceded by the one below
    1. We need to add some landscape characteristics to your netdata. Just to get it up and running, we're going to assign each cell a value of "1" (implying that the land area represented by each node is homogeneous, as opposed, for example, to being partly forested and partly grassy).
      1. Create a raster matching your DEM entirely of value "1"
        1. AG:20100312 How should we this? Tell them to go to windows explorer and make a copy of their hydroDEM? We can just give them a constant '1' raster that matches DEM
        2. Raster -> Algebra -> Constant -> 1
  10. Go to the Network tab.
    1. On the Landscape Raster: UseeControl click the Open button to load your constant 1 raster.
    2. Click "Calc landscape stats"
    3. Click "Add NetData Landscape Stats"
    4. Your Network data now has phony landscape data. (feel free to use your own real landscape data next time)
  11. View your network data
    1. Go to the NetData UseeControl and click the view button.
  12. Save your NetData
    1. File->Save As.
    2. The Tarsier Save Dialog should come up. The top yellow box is the network viewer file *.tnv. The second box is your netdata file *.tne. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name. Click the 'Save All' Button.
  13. Leave your HydroDEM and NetData open, close the Watershed form.

Viewing your network data with the 3D viewer

  1. Open the Renderer
    1. ->File ->New ->Data Views ->Render view
  2. Make and view the Carmel watershed terrain
    1. On the Raster tab (you can press the "Ctrl+Shift+R" key on your keyboard to go to this tab).
    2. Click the Make Terrain button.
    3. A UseeControlDialog dialog will come up. Your hydro DEM should still be open, click on the drop-down box and select the DEM. Alternatively if your raster is not open, click the open button and navigate to your hydro DEM raster.
    4. After the raster is loaded click the OK button to start making the Terrain. When asked, accept the default name and folder for your Terrain files. Click Ok to start making the Terrain (this might take a couple of minutes).
    5. Once the Terrain is created a message will come up asking if you want to load a color raster, click Yes.
    6. For the color raster we are going to use a true color NAIP raster. Click open and navigate to the NAIP raster that was provided in the data files for this tutorial. Click OK.
    7. A dialog box will come up asking if you want to set the Color Scheme to RGB, since our raster is true color click 'Yes'.
    8. Activate the Raster tab by clicking the check box at the upper left.
    9. If no other Terrains are loaded, Tarsier will automatically place you next to the Terrain you just created. Alternatively, you can go to the Cam 1 tab and click one of the camera icons on the left.
    10. You might notice some pink sections on your terrain. This means that there is no color data available for this section. If you want the make no data sections transparent uncheck the 'Draw nodata' checkbox on the Raster tab(upper right).
  3. Add your network data
    1. Go to the Net tab.
    2. Go to the Net Data UseeControlDialog dropdown-box and select your network data.
    3. Activate the Network tab by clicking the check box at the upper left.
    4. Change the net scaling to Sqrt Water(left side of the Net tab).
    5. Change the Width scale box to 0.001.
  4. Go to the Time tab
    1. Go to the Time UseeControl and click on the view button.
    2. Save the Time tool
      1. File-Save As
      2. The Tarsier Save Dialog should come up. The top yellow box is the timetool viewer file *.ttl. The second box is the model time file *.tti. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name. Click the 'Save All' Button.
  5. Save the Renderview
    1. Make sure the Renderview window is selected. File->Save As
    2. Here you want to save the *.tre file which is the Top yellow box. Go to that box and click browse. Find an appropriate folder to save your file and give it a name. Click the Save All Checked button.
  6. You can get closer to the terrain by using the flying keys. This is done by pressing the 'Ctrl+Shift+K' keys on your keyboard, or by going to the Cam1 tab and pressing the Keys button. You can then use the key controls to move your point of view.

Running the Marmoset model

  1. Open the Marmoset model
    1. File->New->Model views ->Marmoset model view
  2. Go to the Usees tab
    1. Go to the Net Data UseeControl dropdown-box and select your network data.
    2. Go to the Precip series UseeControl and click open. Navigate to your Salinas TimeSeriesData (.tts) (provided in the sample data files for this tutorial).
    3. Go to the Model time UseeControl, using the drop down list open the same time file as in your render view form.
    4. Go to the Control tab and click on the Match ModelTime to Precip Series button.
    5. Change the ModelTime start date to something sensible, like 1-Jan-2000. To do this click in the gray area just below the start date (black text) in the ModelTimeTool. A set of dialogs will pop up, asking you for the desired year, month, day, hour, and second. Enter 2000, 1, 1, 0, 0.
    6. Go to the Geomorphology tab , check use full geometry and then click the estimate channel geometry button.
    7. Go to the Watershed models tab and select Runoff coefficient for the model type.
    8. Arrange your windows so that you can see the RenderView's form and the Timetool.
  3. We want to give more detail to our terrain. Click on the Renderview window.
    1. Go to the Econ tab and change the Detail to 15.
  4. It will also look a little nicer (but slower) if you set Accumulations to 2 on the 'Gen' tab.
  5. Now we need to record a movie of the visualization our model (ending up with an .mov file)
    1. Go to the Rec tab and check the Auto record directly to vid\folder checkbox.
    2. Go to the Timetool and click the play button (4th button from the right; a green 'arrow'), this will run the model and record .jpg files to the \vid folder (it will create this as a sub-folder of the folder where your Renderer is saved).
    3. Keep Tarsino maximized and Renderview window visible while it's recording.
  6. Once the ModelTimeTool stops (or you decide you've recorded enough)
    1. Go to the Rec tab and uncheck the Auto record directly to vid\folder checkbox.
    2. Now you can create a mov of your animation. See: Making QuickTime movies (.mov files) from sequences of images

Optional steps referenced from above

Viewing and saving the Ptr raster

  1. After your Ptr raster gets created go to the Ptr UseeControl and click the view button.
  2. The Ptr raster should look like a technicolor version of a shaded relief image, with cell values between 1 and 8 indicating flow directions, and some pink cells (-9999) indicating NoData cells.
  3. Now save your Ptr raster
    1. Make sure the window you want to save is active (click on the window that is showing the Ptr raster).
    2. File->Save As.
    3. The Tarsier SaveDialog should come up. The top yellow box is the raster viewer file *.trv. The second box is your raster file *.tra. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name, like 'ptr'. Click the 'Save All Checked' Button.
  4. Close the window for Ptr raster (the raster itself will stay loaded, since its still being used by the Watershed tool)

Viewing and saving the Stream raster

  1. After your Stream raster gets created, go to the Stream UseeControl(bottom of page) and click the view button.
  2. The Stream raster should look mostly empty (white, 0) with non-zero (usually red) cells only along streams, and some pink cells (-9999) indicating NoData cells.
  3. Now save your Stream raster
    1. File->Save As.
    2. The Tarsier Save Dialog should come up. The top yellow box is the raster viewer file *.trv. The second box is your raster file *.tra. Go to the second box and click the browse button. Browse to an appropriate folder and give the file an appropriate name. Click the 'Save All Checked' Button.
  4. Close the Stream raster

Links