Lab-0028: Difference between revisions

From CSDMS
No edit summary
No edit summary
Line 2: Line 2:
|Labtitle=Topography Data Component
|Labtitle=Topography Data Component
|LabCOModule=1 of 1
|LabCOModule=1 of 1
|LabDateContributedOrUpdated=2021-12-20
|LabDateContributedOrUpdated=2022-04-19
|LabDescriptionShort=Learn how to download and access NASA SRTM and JAXA ALOS land elevation data with the CSDMS Topography data component.
|LabDescriptionShort=Learn how to download and access land elevation data from OpenTopography with the CSDMS Topography data component.
|LabCODuration=1.0 hrs
|LabCODuration=1.0 hrs
|LabModelDocumentation=Topography Data Component
|LabModelDocumentation=Topography Data Component
|LabAssociatedLesson=Jupyter Notebook
|LabAssociatedLesson=Jupyter Notebook
|LabURLDownloadNotebook=https://github.com/csdms/bmi-topography/tree/main/examples
|LabURLDownloadNotebook=https://github.com/csdms/bmi-topography/tree/main/examples
|LabURLStartNotebook=https://csdms.rc.colorado.edu/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fbmi-topography&urlpath=tree%2Fbmi-topography%2Fexamples&branch=main
|LabURLStartNotebook=https://jupyter.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fbmi-topography&urlpath=tree%2Fbmi-topography%2Fexamples&branch=main
|LabURL2StartNotebook=https://lab.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fbmi-topography&urlpath=tree%2Fbmi-topography%2Fexamples&branch=main
}}
}}
{{LabContributorData
{{LabContributorData
Line 16: Line 17:
}}
}}
{{LabIntro
{{LabIntro
|LabDescription=Topography is a Python library for fetching and caching NASA Shuttle Radar Topography Mission (SRTM) and JAXA Advanced Land Observing Satellite (ALOS) land elevation data using the OpenTopography REST API. Topography provides access to the following global raster datasets:
|LabDescription=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:


* SRTM GL3 (90m)
* SRTM GL3 (90m)
Line 49: Line 50:
}}
}}
{{LabNotes
{{LabNotes
|LabNotesInstructions=This lab can be run on the CSDMS JupyterHub. (If you don't already have an account, follow the instructions to sign up at: https://csdms.colorado.edu/wiki/JupyterHub.) Run the lab notebooks by clicking the "start" link under the Run online heading at the top of this page. If you're an educator using this lab in a class, you can get CSDMS JupyterHub accounts for students. For more information, please contact us through the CSDMS Help Desk: https://csdms.github.io/help-desk.
|LabNotesInstructions=<p>This lab can be run on the <em>lab</em> (for educators) and <em>jupyter</em> (for general use) instances of the OpenEarthscape JupyterHub: just click one of the links under the <strong>Run online using</strong> heading at the top of this page, then run the notebook in  the "CSDMS" kernel.</p>
 
<p>If you don't already have a JupyterHub account, follow the instructions to sign up at https://csdms.colorado.edu/wiki/JupyterHub. If you're an educator, you can get JupyterHub accounts for students--please contact us through the CSDMS Help Desk: https://csdms.github.io/help-desk.</p>
|LabNotesRequirements=If run locally, see installation instructions in the bmi-topography repository: https://github.com/csdms/bmi-topography.
|LabNotesRequirements=If run locally, see installation instructions in the bmi-topography repository: https://github.com/csdms/bmi-topography.
|LabAcknowledgements=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.
|LabAcknowledgements=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.

Revision as of 16:39, 19 April 2022

Topography Data Component

Duration
1.0 hrs
Updated
2022-04-19
Download
download
Run online using:
  1. Jupyter
  2. Lab
     Jupyter logo.png

Contributor(s)
    Mark Piper at University of Colorado Boulder.

Introduction
Topography.png
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:
  • SRTM GL3 (90m)
  • SRTM GL1 (30m)
  • SRTM GL1 (Ellipsoidal)
  • ALOS World 3D (30m)
  • ALOS World 3D (30m, Ellipsoidal)

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: https://bmi-topography.readthedocs.io.

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
Skills
  • 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 https://csdms.colorado.edu/wiki/JupyterHub. If you're an educator, you can get JupyterHub accounts for students--please contact us through the CSDMS Help Desk: https://csdms.github.io/help-desk.


Requirements
If run locally, see installation instructions in the bmi-topography repository: https://github.com/csdms/bmi-topography.

Acknowledgements
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.

References