DE BLAUWE SCHICHT on the WORLD WIDE WEB

Main

Tinkering
    ETOPO1
    QL Keys (1)
    QL Keys (2)
    Atari2USB
    MOS 6581 (1)
    MOS 6581 (2)
    Indy battery
    C64 and BT

Writing

Pictures

Retrogaming

Machines

About

Using the ETOPO1 database in Matlab and Octave

For all manner of modeling and simulation pertaining to sea and ocean physics, bathymetry databases are indispensible. Naval operations and scientific expeditions are dependant on them, and hydrographic services of seafaring nations survey coastal areas and waterways scrupulously while satellite observations give us the depths of oceans.

Numerous databases exist, of various resolutions, with local or global scopes, publicly accessible or very secret. One example is the ETOPO1 global relief data set, assembled and made available by the US National Oceanic and Atmospheric Administration. It has a relatively high square resolution of 1 minute of arc and can be downloaded in a number of popular formats.

To read elevations for a selected area from this large file in Matlab or Octave, I wrote readetopo1.m. This function enables you to obtain a single height or depth or a matrix of elevations relative to sea level from your local copy of the ETOPO1 database. Example output image and documentation below.

ETOPO1 bathymetry
Bathymetry along the Dutch coast; ETOPO1 data imaged using Octave.

Usage:

[DATA, LONAX, LATAX] = readetopo1(LON1, LAT1, LON2, LAT2, DRAWMAP)

LON1 and LAT1 are the upper left coordinates of the area of interest, and LON2 and LAT2 are the lower right coordinates of the area of interest. Presently the function cannot handle crossing the limits of the map. Set the switch DRAWMAP to a nonzero value to get a plot of the topography and bathymetry.

Example: [DATA, LONAX, LATAX] = readetopo1(3, 54, 6, 51, 1) will give data, axes and a plot of the area around the Netherlands. Use fractions if you want, but it is also possible to enter degrees and minutes of arc as a vector; 55.5 is the same as [55 30], for example.

Copyleft this script Jeroen Janmaat, 2010. First version 2010.09.23.

The Etopo1 database you need is the BINARY and GRID/NODE-REGISTERED version that can be downloaded from the NOAA website. "Amante, C. and B. W. Eakins, ETOPO1 1 Arc-Minute Global Relief Model: Procedures, Data Sources and Analysis. NOAA Technical Memorandum NESDIS NGDC-24, 19 pp, March 2009."

Back