Plot Relative Aquifer Flow Vectors

An additional characteristic of the site we could characterize is the relative flow rates of the of the aquifer across the study area. This example uses GRIDDATA and CONTOUR to generate the base terrain map, over which we lay a VECTOR plot of the aquifer flow rates. Your final plot should look similar to this:

Grid the Terrain Data

Using the data in the files "TankTerrainData.csv" (see Model the Study Area and Setting), create a contour plot of the terrain to act as a base for the flow vectors.

Start by reading in the base data to use throughout the rest of the examples. The data resides in the file TankDataTerrain.csv in the \examples\data directory of your IDL installation. This file contains the surface terrain data of our site, in X, Y, Z coordinates (all in meters). The fourth column of data in this file contains the elevation of the surface of the underlying aquifer.

In this example, we create a template with ASCII_TEMPLATE, then read in the data using READ_ASCII.

; Create the base template and assign X, Y, Z,

; and AQ as the variable names.

; Make sure to start the data at row 2

; (row 1 contains column headers).

myTemplate = ASCII_TEMPLATE()

site = READ_ASCII('TankDataTerrain.csv', $

   TEMPLATE=myTemplate)

 

; Grid the data using the Kriging method

; (set DIMENSION to 1000

; to align with the size of the study area).

; Choose another gridding method if you wish.

grid = GRIDDATA(site.X, site.Y, site.Z, $

   DIMENSION=1000, METHOD="Kriging")

 

Create the Base Contour Map

Create the plot that will serve as a base for the flow vectors.

; Create a variable for a refactored color table. Use the REVERSE

; keyword of the COLORTABLE function on colortable #74

; to flip the colors so that the darker colors are

; in the lower areas of the terrain.

myCT = COLORTABLE(74, /REVERSE)

 

; Set up an index variable to hold the contour levels.

; Create the contour plot from the gridded data.

index = [420,430,440,450,460,470,480,490,500,510, $

   520,530,540,550,560,570,580]

myContour = CONTOUR(grid, RGB_TABLE=myCT, $

   C_VALUE=index, ASPECT_RATIO=.75, /FILL, $

   TITLE="Study Area Terrain with Tank Locations", $

   XTITLE="Meters (x10)", YTITLE="Meters (x10)")

myContour2 = CONTOUR(grid, COLOR='black', $

   C_VALUE=index, ASPECT_RATIO=.75, /OVERPLOT)

 

; Change the font size of the title.

myContour.TITLE.FONT_SIZE = 14

 

Read and Grid the Flow Data

Now that we have the base CONTOUR plot completed, read in the aquifer flow data and create a VECTOR plot in the current window.

Note: The rate of flow for the river is several orders of magnitude greater than that in the aquifer. For this reason, only directional data for river flow is included in the dataset.

 

; Create a template to populate variables U, V, AX, and AY.

myTemplateAQ = ASCII_TEMPLATE()

 

; Read in the data.

gwFlow = READ_ASCII('GWFlowRates.csv', TEMPLATE=myTemplateAQ)

 

; Create the VECTOR plot over the current CONTOUR plot using

; a separate RGB_TABLE, then hide the axes. Note that

; AUTO_COLOR must be set to 1 in order for the vectors to

; have a color assigned based on the RGB_TABLE.

myVectors = VECTOR(gwFlow.U, gwFlow.V, gwFlow.AX, gwFlow.AY, $

   XRANGE=[0,9], YRANGE=[0,10], rgb_table = 34, /CURRENT, $

   AUTO_COLOR=1, background_transparency=100)

ax = myVectors.AXES

ax[0].HIDE= 1 ; hide bottom X axis

ax[1].HIDE= 1 ; hide left Y axis

 

; Add a colorbar.

cb = COLORBAR(TARGET=myVectors, POSITION=[0.10,0.065,0.3,0.085], $

   TITLE='Flow Rate (m/day)', FONT_SIZE=8)

 

Other Topics in this Series

See Also

ASCII_TEMPLATE, COLORBAR, COLORTABLE, CONTOUR, Formatting IDL Graphics Symbols and Lines, GRIDDATA, READ_ASCII, READ_CSV, VECTOR