Skip to main content
U.S. flag

An official website of the United States government

Here’s how you know

Dot gov

Official websites use .gov
A .gov website belongs to an official government organization in the United States.

HTTPS

Secure .gov websites use HTTPS
A lock (LockA locked padlock) or https:// means you’ve safely connected to the .gov website. Share sensitive information only on official, secure websites.

    • Environmental Topics
    • Air
    • Bed Bugs
    • Cancer
    • Chemicals, Toxics, and Pesticide
    • Emergency Response
    • Environmental Information by Location
    • Health
    • Land, Waste, and Cleanup
    • Lead
    • Mold
    • Radon
    • Research
    • Science Topics
    • Water Topics
    • A-Z Topic Index
    • Laws & Regulations
    • By Business Sector
    • By Topic
    • Compliance
    • Enforcement
    • Laws and Executive Orders
    • Regulations
    • Report a Violation
    • Environmental Violations
    • Fraud, Waste or Abuse
    • About EPA
    • Our Mission and What We Do
    • Headquarters Offices
    • Regional Offices
    • Labs and Research Centers
    • Planning, Budget, and Results
    • Organization Chart
    • EPA History

Breadcrumb

  1. Home
  2. High-End Scientific Computing

Scripting Estuary Data Mapper

Estuary Data Mapper (EDM) includes a scripting capability where short one-line text commands can control interactions with the application.

The scripting capability uses keyboard shortcuts (shown as underlined letters in the Controller window) instead of a mouse to select the various buttons and menus. Scripting enables EDM to read these keyboard shortcut commands from a plain text file.

This can be a quick and repeatable way to execute common data retrievals, run automated demos, and facilitate usage by mobility-impaired users. It is possible that a speech-to-text utility could write the commands to the plain text script file that EDM reads.

On this page:

  • Download the Sample Script File
  • Script File Name & Location
  • Always Keep a Copy of the Script File
    • Tip: Create Multiple Script Files
  • Running an EDM Script File
  • Running Interactive Script Commands
  • Script File Format
    • Terse One-Line Commands
    • Each Line in the Script Represents a Line of UI Commands
    • Specifying Dropdown Menu Selections
    • If Menu Item Names Contain Spaces

Download the Sample Script File

Download the sample script file and customize it to your needs:  edm_script.txt (txt)

The file is thoroughly commented and can serve as a reference to EDM scripting conventions.

Script File Name & Location

An EDM script file is a simple text file with a .txt extension. Create the file in Notepad (Windows) or any editor that can save the file in a plaintext format.

The script file must be saved on a computer or network drive, and then copied to edm_in.txt in the user’s home directory:

  • For Windows users, this would be C:\Users\yourusername\edm_in.txt
  • For Mac/UNIX/Linux users, this would be $HOME/edm_in.txt

Always Keep a Copy of the Script File

EDM will delete the edm_in.txt file when it is finished, so keep a copy of the original file.

Tip: Create Multiple Script Files

Because EDM deletes the edm_in.txt file after running, it is strongly recommended that the user keep a copy of the original script file.

Users can also create multiple script files to cover different scenarios or to repeat a frequently used sequence of commands.

To use a different script, copy one of them to $HOME/edm_in.txt and then run the script file. 

Running an EDM Script File

To run the script file:

  • From a Terminal or shell window, run the command: EstuaryDataMapper -s to start EDM in scripting mode. EDM will look for the edm_in.txt file and start executing the script commands. This is useful for batch (hands-free) processing.
  • Or launch EDM, select the Zoom Maps tab (or type 1) and select the Read Commands button or type . (a period). EDM will begin executing the script commands.

After all commands are executed, EDM deletes the edm_in.txt file. For this reason, it is strongly recommended that the user keep a copy of the original file, or even create multiple script files.

Running Interactive Script Commands

If EDM is already running, then use any of the following ways to interactively enter one-line script commands:

  • Select Zoom Maps tab or type 1. Then click the Read Commands button or press . (a period).
  • On Linux, open a Terminal/shell window and run $HOME/EDM/utils/edmcom.
  • On Windows: Launch Command Prompt and run %HOMEPATH%\EDM\utils\edmcom.

Then, enter one-line commands into the shell window where edmcom is running.

To stop the interactive session, either:

  • Enter . (a period), or 
  • Press 4 then q to quit EDM. 

Script File Format

Terse One-Line Commands

An EDM script file contains terse one-line commands consisting of shortcut keys (underlined as shown in the Controller GUI) for each row of buttons/menus that appear in the Controller plus some keys shown in labels.

For example, in the following screenshot, on Windows, pressing 1 opens the Zoom Maps tab, s toggles the States map lines, g a zooms to the Atlantic region, and z r zooms to Rhode Island. Letter commands are case insensitive.

Section of Estuary Data Mapper user interface with menus and buttons' shortcut keys

The script commands to select the Zoom Maps tab and then show Rhode Island’s state boundaries in the Display window would look like this:

1 # Select Map tab.
z r # Zoom to Rhode Island.

(All text following the # are comments that are ignored by EDM.)

The syntax is terse by design to match the GUI. The terseness also benefits mobility-impaired users, who may have difficulty typing or selecting commands via a mouse, and experienced users who prefer minimalist commands.

Each Line in the Script Represents a Line of UI Commands

Example: In the EDM Controller on the 2. Get Data tab, the Vulnerability commands are all on the same line in the user interface, as shown in the following screenshot: 

EDM's line of vulnerability commands: the label, the data source, and the variables menu

There are no visible keyboard shortcuts to the Data Source and Variable dropdown menus (Coastal and CVI(-), in this example) since we would quickly run out of unique keys.

However, this line of Vulnerability commands can be scripted on  a single line like this:

v C 2

EDM reads this line as follows:

  • v = Vulnerability selection. Because this is a visible keyboard shortcut, the v is case-insensitive.
  • C = Coastal source. Because there is no keyboard shortcut for this button, the beginning letters as represented in the UI must be entered; Co or Coastal would also work.
  • 2 = the second variable in the dropdown menu of variable names for this data source, which in this example is CVI(-).

Specifying Dropdown Menu Selections

Specify an item in a dropdown menu by entering either:

  • The number of the item as it appears in the menu (1=first item in the dropdown menu) or 
  • By partial beginning letter(s) match (C matches Coastal, for example). 

If no value is specified in a script line, then the script defaults to the first item in the dropdown menu.

The following screenshot shows the dropdown menu listing all variables associated with the Coastal data source. To specify “Slope Risk,” the script commands could be either:

  • Slope Ri to match “Slope Risk,” or 
  • 16 because Slope Risk is the 16th item in the dropdown menu.  
The Vulnerability data source and variables drop-down menu, with example variable selected

If Menu Item Names Contain Spaces

When menu source or variable names contain spaces, then use comma-delimited lines in the script. 

For example, this line in the script:

v,C,Slope Ri

would be read by EDM as:

  • v=vulnerability
  • C=Coastal
  • Slope Ri=Slope Risk

High-End Scientific Computing

  • RSIG
    • Download
    • RSIG3D Release History
    • RSIG3D Video Demonstrations
    • Web Access to RSIG Data
    • Reading Local/Remote CMAQ Files
    • Data Inventory
    • RSIG-Related Downloadable Data Files
    • How RSIG Regrids Data
    • Troubleshooting RSIG
  • EDM
    • About Estuary Data Mapper
    • Download & Install
    • Image Gallery
    • Release History
    • Data Inventory
    • Frequent Questions
    • Special Topics and Videos
      • EDM Basics
      • Nitrogen Sources and Loads
      • Develop Seagrass Models
      • Seagrass Updates (2024)
      • Web Coverage Service (WCS)
      • WCS & Decision Support Tools
      • Land-Use Scenarios
  • RETIGO
    • Enter Your Data in RETIGO
    • Timestamp Converter
    • Tutorial: How to use RETIGO
    • Tutorial: Create RETIGO file from Excel
    • Frequent Questions
Contact Us About High-End Scientific Computing
Contact Us to ask a question, provide feedback, or report a problem.
Last updated on July 12, 2024
  • Assistance
  • Spanish
  • Arabic
  • Chinese (simplified)
  • Chinese (traditional)
  • French
  • Haitian Creole
  • Korean
  • Portuguese
  • Russian
  • Tagalog
  • Vietnamese
United States Environmental Protection Agency

Discover.

  • Accessibility Statement
  • Budget & Performance
  • Contracting
  • EPA www Web Snapshot
  • Grants
  • No FEAR Act Data
  • Plain Writing
  • Privacy
  • Privacy and Security Notice

Connect.

  • Data
  • Inspector General
  • Jobs
  • Newsroom
  • Regulations.gov
  • Subscribe
  • USA.gov
  • White House

Ask.

  • Contact EPA
  • EPA Disclaimers
  • Hotlines
  • FOIA Requests
  • Frequent Questions
  • Site Feedback

Follow.

Environmental Protection Agency logo
www.epa.gov Feedback Survey

Welcome! Please share your feedback on how we can make www.epa.gov work better for you.

A red asterisk (*) indicates a required field.

Success

Thank you. Your feedback has been received.

Error

alert message

Required Questions - page 1 of 2
question_55203_answer_01
*

400 characters allowed
Would you like to take two more minutes to answer more questions to help us improve our services?
Yes, keep going →
← Back
Optional questions - page 2 of 2
How would you describe yourself?
400 characters allowed
400 characters allowed
400 characters allowed
U.S. flag

An official form of the United States government. Provided by Touchpoints
OMB Approval #1090-0008 · Expiration Date 11/30/2027