Attention!!!

We have changed the password for OMP database due to security reasons. Please contact Database Manager for the new password.

How to retrieve data from BNL hydrographic database

1. Telnet to BNL workstation (bnlocn.das.bnl.gov) as GUEST. Contact our Database Manager for password.

2. Once logged in, type OMP to get into omp directory.

3. Make your own working directory and go to that directory:

mkdir [.yoursubdirectory]
cd [.yoursubdirectory]

4. Type omp_sql to invoke the sir SQL session.

5. Now that you are connected to the database, you can enter SQL commands to extract data from the database. Type "select variables from record where conditions" to select the data you want. For example,

    select station cast pre no3 no2 po4 nh4 sio from-
    bottle where station > 70000 and station < 80000  

Then press EXECUTE to carry out the query. The EXECUTE key will usually be the Enter key within the numerical keypad area although its location may depend upon your terminal or terminal emulation. The normal Enter key is used as a line feed/carriage return command to form the SQL query.

There are three records to choose from in the database - HEADER, CTD, and BOTTLE. Check the variable names in each record and the station IDs for each cruise. Note that "-" is a line continuation symbol.

If there is too much data in the record you are searching, a warning will be issued informing you that the limit specified has been reached. Just ignore it by hit normal Enter key(may be several times, depending on how big your record is) or simply type in a larger number for the limit, and the search will continue.

6. Once the search is complete, you are promted by a question as following:

"Do you wish to view the xxx selected rows? (Y/n)"

Where xxx are number of rows selected. If you choose Y(es), the data selected will be shown on the screen.

7. At this stage, you can save the selected data in a file by typing:

		set pagesize lines, columns
and		print output 'filename'
 
followed by EXECUTE. Here "lines" is a number slightly greater than the number of rows (xxx as shown above) plus the number of header lines. "columns" is usually set to 121. Your data will be saved in the file named filename.

8. After you have saved the data set, press ctrl-z to go back to the command buffer. Now you can perform another search using "select ... from ... " command.

9. Once you are done with the searching, press ctrl-z to quit from the SQL session.

10. After getting out of SQL, type dir to see the file you saved. You are now ready to ftp the data to your end.

We also provide graphics routines which extract data directly from the database and generate color or black and white contour sections, T-S diagrams, vertical profiles, etc. If you would like to learn how to run these routines and/or to learn more about the database, go see the comprehensive database manual.

Any question? Contact our Database Manager