AMBER Display ArcView Extension
Updated April 18, 2002
The AMBER Display ArcView Extension is used to display output from the
ambergis program. The extension provides scripts to automatically update
views with new data and efficiently display ABR, BRA, FFG and Alert Status
data for the 6 Alert Time Periods and multiple Basin Types. The advantage
of using ArcView as a display engine is that additional data that may help
in the flash flood warning decision process can be easily added and the
ArcView interface can also be easily customized to meet the needs of individual
sites.
The AMBER Display extension provides an easy way to view data for the
high resolution sub watersheds and also provides a high level view of the
overall radar area of coverage or Area of Responsibility. Due to the small
scale nature of the AMBER basins, the display can become difficult to interpret
with all basins displayed. Therefore, an Area of
Responsibility view generally uses counties, zones or large scale watersheds
(such as MAP areas, HUCs, etc.) as the primary theme. This theme is colored
coded by the highest Alert Status of any individual small scale basin falling
within the polygons of the theme. This provides a quick and easy way to
visually determine where potential problem areas are. A "Zoom to County"
tool can then be used to zoom into the small
scale basins from the larger scale Area of Responsibility view.
The extension requires the AMBER data display project to be set up in
a specific way. A template project is included that should be used to initially
set up the AMBER display project. This template project contains three
views which are the minimum requirements for the extension. The first view
is the high level Area of Responsibility view. The second view would contain
the small scale AMBER basins. The third view called AMBER State contains
just a text summary indicating the data time, Auto Update status, and the
Radar Adjustment factor. In addition to the basin and Area of Responsibility
shapefiles, the extension requires three text files output from the ambergis
program:
- alert.txt
- highest.txt
- validtim.txt
To use the extension for real time display, these files must be accessible
to the system ArcView is running on. For the Unix version of ArcView, this
is generally easy to set up. However, on Windows systems, some type of
NFS program, SAMBA or ftp server is required on the PC. If these text files are on
the PC, ArcView or Windows seems to lock the files ArcView has open and
prevents the files from being updated. Therefore, it is generally best
to leave the above text files on a Unix/Linux system and NFS mount the files
onto the PC.
Using the extension
The extension adds a menu, several buttons and a tool to the View interface:
AMBER Menu
The "Change Period"
portion of the AMBER menu is used to change the accumulation period of
the AMBER themes. These menu choices will apply to all real time AMBER
data themes in the project.
The "Change Theme" portion of the AMBER menu is used to change which
parameter is displayed. These menu choices will apply only to the active
theme. The "Change Theme" options only change the legend of the active
theme to display the desired data. This allows only one theme to present
all the data for that basin type. This improves performance since the AMBER
data is joined only once to the theme instead of having multiple themes
for each of BRA, ABR, Alert Status and FFG data and a join for each.
AMBER Buttons:
- Forces a check
for new data. The display will not be updated unless a new data time is
detected in table validtim.txt.
- Toggles
auto-update mode.
- Opens
the Area of Responsibility View and zooms out
to preset scale.
- Queries
for basins with a combination of BRA and ABR values. This is useful to
find basins with both high BRA and ABR.
AMBER Tools:
- Tool to select
an area on the Area of Responsibility view and then automatically zoom
in on the small scale basins view. Click
or drag a box in the view to zoom. The view that will be zoomed in on is
defined in the start up script.
Set up instructions
The AMBER data display is accomplished by a joining the AMBER realtime
files to the attribute tables of the basin shapefiles. The legend for the
shapefile themes are set to display a specific field from the AMBER data
files. To allow for multiple Basin Types in the project, the alert.txt
file is exported to separate Dbase (.dbf) files for each AMBER Basin Type
used in the project. If there are a large number of basins and/or Basin
Type files, the exporting to Dbase and joining to the different themes
can take a few minutes. Therefore, you may have to balance the amount of
data displayed (multiple Basin Types, ABR, BRA, FFG and Alert Status) versus
performance.
The extension ZIP file contains the following:
- amber_vxxx.avx - The ArcView extension file where xxx is
the version. Install this file in the ArcView extensions directory and
rename to amber_apr.avx.
- amber_template.apr - The project template containing the basic views. This
is used only to create a new AMBER Display project.
- abr.avl - ArcView legend file. Use this to set up the initial legend for
ABR, FFG and BRA themes.
- alert.avl - ArcView legend file. Use this to set up the initial legend
for Alert Status themes.
- amber_apr.html - This documentation file.
The legend files are provided to set up the themes quickly. The legends
for the AMBER data themes can easily be customized and saved to legend
files through the normal ArcView interface.
Once the project is set up with the basic AMBER display and it is working,
it is highly recommended that a back up of the project be made before adding
other data. Once the operational version is set up with any additional
data and site customizations, you should write protect the project (in
addition to making a back up copy) since users may change the project by
adding or deleting themes.
Procedures for Creating a New ArcView AMBER real-time Display Project
The files alert.txt, highest.txt and validtim.txt from the ambergis program
are needed to set this project up. These files should be in the directory
where they will be updated in real time.
- Open the amber_template.apr project.
- From the File menu, select "Save Project As..." and save the project (kxxx_amber.apr
suggested where kxxx is the radar ID). Save
frequently while setting up the project.
- Select the project properties menu and set the Work Directory for the project.
Dbf files for the real time AMBER data will be written to this directory.
- Load the ambergis text data files:
- From the project window, select the Tables icon and press the "Add" button.
Change the file type to "*.txt" and add alert.txt, highest.txt and validtim.txt.
- Close the highest.txt and validtim.txt tables.
- Export alert.txt to .dbf files:
- Select the alert.txt table to make it active.
- Click on the Query Builder button (hammer icon).
- Build a query that selects all rows with basin type (field Bt) equal to
1. The query should look like: ( [Bt] = 1 )
- Click on the button "New Set"
- From the file menu, select "Export" and export the table to a new dBase
file called "alert1.dbf" in the Work directory from Step 2.
- Repeat step the previous 5 steps for each different basin type you wish
to display (change the number 1 in the query and the export steps to the
appropriate basin type number).
- Close the query window.
- From the Edit menu, select "Select None" to clear the selection on alert.txt.
- Close the alert.txt table window.
- From the project window, select the Tables icon and press the "Add" button.
Change the file type to "*.dbf" and add all the alert*.dbf files just created
to the project. Once added, the tables can be closed to clean up the display.
- Create the "Area of Responsibility - Valid:" view:
- Open the "Area of Responsibility - Valid:" view.
- Add the shapefile that represents the Warning Ids used in the AMBER algorithm.
This shapefile is generally counties, zones or large scale watersheds such
as MAP areas, HUCs, etc. However, this shapefile must have a field in the
attribute table that corresponds to the Warning ID used in the AMBER run
time data base.
- Make this theme active and select "Theme Properties" from the Theme menu.
Change the theme name to "Alert Status:".
- From the Theme menu or the by using the Table button, open the attribute
table for the Warning IDs shapefile.
- Open the highest.txt table and select the field that represents the Warning
ID (click on the field name).
- In the Warning ID theme attribute table, select the field that represents
the Warning ID.
- From the Table menu select Join (or use the Join button). The highest.txt
table will be automatically closed and its data will now appear in the
Warning ID attribute table.
- The attribute table for the Warning ID shapefile must be the active table
during this step. If not, from the Table menu select "Remove all Joins"
and repeat the above steps.
- Close the Warning ID theme attribute table.
- Make the "Area of Responsibility - Valid:" view active.
- Open the legend editor by double clicking on the theme legend.
- Click on the "Load" button.
- Open the alert.avl file that was included in the original ZIP file.
- For the Field, select the "As_a" field and press the Ok button.
- In the Legend Editor window, press the Apply button and then close the
legend editor.
- Create the "Primary Basins - Valid:" view (this view will be the primary
view for displaying AMBER output and for flash flood analysis):
- Open the Primary Basins - Valid:" view.
- Add the shapefile of basins to this view.
- Make the basins theme the active theme (click on its legend).
- From the Theme menu, select "Theme Properties". Change the theme name to
"ABR:" (colon required).
- Join the alert dbf file to the basin theme:
- Open the alert#.dbf table that corresponds to the basin type of the basin
shapefile (if basin type = 1, open the alert1.dbf table).
- Select the "Basinid" field.
- Open the attribute table for the basins theme and select the field that
corresponds to the "Basinid" field in the alert table.
- From the Table menu select Join (or use the Join button). The alert table
will close and its data joined to the theme's table.
- Open the legend editor by double clicking on the theme legend.
- Click on the "Load" button.
- Open the abr.avl file that was included in the original ZIP file.
- For the Field, select the "Abr_a" field.
- Press the Ok button in the Load Legend window
- In the Legend Editor window, press the Apply button and then close the
legend editor.
- Create new basin Views for additional basin types:
- From the project window, click on View and then New.
- From the View menu, select Properties.
- Name the view with a descriptive title that ends with the string "- Valid:".
If any view's name contains this string, it will be updated with the AMBER
data time.
- Repeat the procedure in Step 7 to join the tables and set up the legends.
- Load the AMBER Display Extension:
- From the File menu, select Extensions
- Click in the box next to "Amber Display" to turn on the check mark.
- Press the Ok button. Once this project is saved, it will always load this
extension.
- Create the Startup script:
- From the project window, select the Scripts icon and click on the "kxxx.Startup"
entry.
- Press the "Load System Script" button. This is also available on the Script
menu. Select script "AMBER.Startup". This will insert the contents of the
AMBER.Startup script into your startup script.
- From the Script menu, Select Properties.
- Change the "kxxx" in the script name to be the radar ID.
- Edit the configuration section near the top of the Startup script. Look
at the comments in the script and check the settings for:
- _radarID
- _autoUpdate
- _basinTypes - This is a list variable; set the list to include each of
the basin types used in your project.
- _rdalat and _rdalon - these set up the center point of the "Area of Responsibility
- Valid:" view. The coordinates must be in the units of the View.
- _cwaView - The actual name of the area of responsibility view. The name
here must match the name of the view so if you change here, you must also
change the View Properties. The "- Valid:" portion of the name is required.
- _cwaScale - the default scale of the CWA view for the Show CWA button.
Zoom in or out on the view to the desired area of coverage and use the
number in the Scale window on the right side of the tool bar. (The View
Properties, Map Units must be defined).
- _hotview - The actual name of the view that will be zoomed in on when using
the Zoom to County tool. The name here must match the name of the view
so if you change here, you must also change the View Properties. The "-
Valid:" portion of the name is required.
- _hotviewScale - the default scale of _hotview view when using the Zoom
to County tool. Zoom in on the view to the desired level of detail and
use the number in the Scale window on the right side of the tool bar. (In the
View Properties, Map Units must be defined).
- Compile the script by pressing the compile button (check mark button).
- Close the script window.
- Make the project window active and select Properties from the Project menu.
- Set the Start up script to be the name of the script just edited.
- From the Project window, select Tables.
- The AMBER Display project must have the following tables in the project:
- alert.txt
- highest.txt
- validtim.txt
- alertn.dbf - where n is Basin Type. There must
be a separate dbf table for each Basin Type used in the project.
- Delete other tables not needed. Any table called "Attributes of ..." should
be deleted from the project. These are the attribute tables of the shapefiles
and were needed only to perform the table joins.
- Save the project.
- Exit ArcView.
- Restart ArcView and open the project. The alert.txt file should be exported
to the alertn.dbf files (n = basin types configured)
and all themes joined to these files. Depending on the number of basin
types and number of basins, this could take a few minutes.
- The views should all have the AMBER data valid time appended to their names.
-
From the Period menu, change time periods. All theme legends should update
with the period and the data displays should change correspondingly.
- Move the AMBER State view to be along the bottom of the ArcView window.
Resize and arrange the other views to so that the contents of the AMBER
State view can still be seen. ArcView remembers the last used window settings
when opening its windows. Therefore, set the size and position of all views
to how you want them to appear when the view is initially opened.
- Once the basics are working, save the project and make a backup copy.
- Add any other data and views that are needed.
- Save and restart the project.
- Once the project is totally configured, make a backup copy of the project
file. You may also want to write protect the project file used operationally
so users cannot save when exiting ArcView.
Displaying the AMBER Basin Graph from ArcView
By using the Hotlink function of ArcView, the project can be set up so that
clicking on a basin will launch the basin graph program. Unfortunately, the basin
graph program is an HPUX executable so this currently can only be done on the HPUX
version of ArcView. (If anyone knows how to run a remote shell from a PC to UNIX, please
let me know).
The hotlink property of a theme should is set through the theme properties. The basin graph
program can be hotlinked to any theme that has an alert dbf table joined to it.
- Make the desired theme active.
- From the Theme menu, select Properties.
- On the left side of the Theme Properties window, scroll down and click the Hotlink icon.
- For the Field, select "Basin_id".
- For the Predefined Action, select "Link to User Script".
- For the Script, select "AMBER.BasinGraph".
- Click the Ok button.
For the basin graph programs to run properly, AMBER environment variables must be set and
the amber/bin directory must be in your PATH variable. A script amberStart_AV.sh is provided
that should be used to start the AMBER project on UNIX. This script expects the project to be
named $AMBER_DATADIR/av/kxxx_amber.apr where kxxx is your radar ID. The script requires the
radar ID as the only command line argument. Edit the script if you
have installed amber in a location other than /data/local/amber.