Topography Data Component

1.0 hrs
Run online using:
  1. Jupyter
  2. Lab
     Jupyter logo.png

    Mark Piper at University of Colorado Boulder.

Topography is a Python library for fetching and caching land elevation data using the OpenTopography REST API. Topography provides access to the following global raster datasets:
  • SRTMGL3 (SRTM GL3 90m)
  • SRTMGL1 (SRTM GL1 30m)
  • SRTMGL1_E (SRTM GL1 Ellipsoidal 30m)
  • AW3D30 (ALOS World 3D 30m)
  • AW3D30_E (ALOS World 3D Ellipsoidal, 30m)
  • SRTM15Plus (Global Bathymetry SRTM15+ V2.1)
  • COP30 (Copernicus Global DSM 30m)
  • COP90 (Copernicus Global DSM 90m)

The library includes an API, CLI, and BMI that accept the dataset type, a latitude-longitude bounding box, and the output file format. Data are downloaded from OpenTopography and cached locally. The cache is checked before downloading new data. Data from a cached file can optionally be loaded into an xarray DataArray using the experimental open_rasterio method.

More information on Topography can found in its documentation:

Classroom organization
This lab includes examples of using the Topography data component in a Jupyter Notebook, in a shell script, and in a Python program. Try editing these examples to get data from different locations around the globe.

Learning objectives
  • Use a command-line interface (CLI) for a Python library
  • Use an application programming interface (API) for a Python library
  • Use a Basic Model Interface (BMI)
Key concepts
  • Access data through a data component
  • Understand the difference between an API and a BMI, as well as their relative strengths

Lab notes

This lab can be run on the lab (for educators) and jupyter (for general use) instances of the OpenEarthscape JupyterHub: just click one of the links under the Run online using heading at the top of this page, then run the notebook in the "CSDMS" kernel.

If you don't already have a JupyterHub account, follow the instructions to sign up at If you're an educator, you can get JupyterHub accounts for students--please contact us through the CSDMS Help Desk:

If run locally, see installation instructions in the bmi-topography repository:

This work is supported by the National Science Foundation under Award No. 2026951, EarthCube Capabilities: Cloud-Based Accessible and Reproducible Modeling for Water and Sediment Research.

  • Piper, M. (2021). CSDMS Topography data component (Version 0.3.1) (Computer software).
  • Tucker, G. E., Hutton, E. W. H., Piper, M. D., Campforts, B., Gan, T., Barnhart, K. R., Kettner, A. J., Overeem, I., Peckham, S. D., McCready, L., and Syvitski, J., 2022: CSDMS: a community platform for numerical modeling of Earth surface processes, Geosci. Model Dev., 15, 1413–1439,