Lab-0029: Difference between revisions

From CSDMS
(Created page with "{{Labbasics |Labtitle=GeoTiff Data Component |LabCOModule=1 of 1 |LabDateContributedOrUpdated=2021-12-23 |LabDescriptionShort=Learn how to access data and metadata from a GeoT...")
 
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 2: Line 2:
|Labtitle=GeoTiff Data Component
|Labtitle=GeoTiff Data Component
|LabCOModule=1 of 1
|LabCOModule=1 of 1
|LabDateContributedOrUpdated=2021-12-23
|LabDateContributedOrUpdated=2022-04-19
|LabDescriptionShort=Learn how to access data and metadata from a GeoTIFF file through an API or a BMI.
|LabDescriptionShort=Learn how to access data and metadata from a GeoTIFF file through an API or a BMI with the CSDMS GeoTiff data component.
|LabCODuration=1.0 hrs
|LabCODuration=1.0 hrs
|LabModelDocumentation=GeoTiff Data Component
|LabModelDocumentation=GeoTiff Data Component
|LabAssociatedLesson=Jupyter Notebook
|LabURLDownloadNotebook=https://github.com/csdms/bmi-geotiff/tree/main/examples
|LabURLDownloadNotebook=https://github.com/csdms/bmi-geotiff/tree/main/examples
|LabURLStartNotebook=https://jupyter.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fbmi-geotiff&urlpath=tree%2Fbmi-geotiff%2Fexamples&branch=main
|LabURL2StartNotebook=https://lab.openearthscape.org/hub/user-redirect/git-pull?repo=https%3A%2F%2Fgithub.com%2Fcsdms%2Fbmi-geotiff&urlpath=tree%2Fbmi-geotiff%2Fexamples&branch=main
}}
}}
{{LabContributorData
{{LabContributorData
Line 14: Line 17:
}}
}}
{{LabIntro
{{LabIntro
|LabDescription=TODO
|LabDescription=<p>GeoTiff is a Python library for accessing data and metadata from a GeoTIFF file through an API or a BMI.</p>
 
<p>The bmi-geotiff library accepts a filepath or an URL to a GeoTIFF file. Data are loaded into an xarray DataArray using the experimental open_rasterio method. The API is wrapped with a Basic Model Interface (BMI), which provides a standard set of functions for coupling with data or models that also expose a BMI.</p>
 
<p>More information on GeoTiff can found in its documentation: https://bmi-geotiff.readthedocs.io.</p>
|LabPicture=Example-rgb.png
|LabPicture=Example-rgb.png
}}
}}
Line 34: Line 41:
}}
}}
{{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://github.com/csdms/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-geotiff repository: https://github.com/csdms/bmi-geotiff.
|LabNotesRequirements=If run locally, see installation instructions in the bmi-geotiff repository: https://github.com/csdms/bmi-geotiff.
|LabAcknowledgements=This work is supported by the National Science Foundation under Award No. 1831623, Community Facility Support: The Community Surface Dynamics Modeling System (CSDMS).
|LabAcknowledgements=This work is supported by the National Science Foundation under Award No. 1831623, Community Facility Support: The Community Surface Dynamics Modeling System (CSDMS).
Line 40: Line 49:
{{LabReferences
{{LabReferences
|LabReferences=Piper, M. (2021). CSDMS GeoTIFF data component (Version 0.2.3) (Computer software). https://doi.org/10.5281/zenodo.4721475
|LabReferences=Piper, M. (2021). CSDMS GeoTIFF data component (Version 0.2.3) (Computer software). https://doi.org/10.5281/zenodo.4721475
}}
{{LabReferences
|LabReferences=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, https://doi.org/10.5194/gmd-15-1413-2022.
}}
}}

Latest revision as of 13:56, 31 May 2022

GeoTiff Data Component

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

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

Introduction

GeoTiff is a Python library for accessing data and metadata from a GeoTIFF file through an API or a BMI.

The bmi-geotiff library accepts a filepath or an URL to a GeoTIFF file. Data are loaded into an xarray DataArray using the experimental open_rasterio method. The API is wrapped with a Basic Model Interface (BMI), which provides a standard set of functions for coupling with data or models that also expose a BMI.

More information on GeoTiff can found in its documentation: https://bmi-geotiff.readthedocs.io.


Classroom organization
This lab includes examples of using the GeoTiff data component in a Jupyter Notebook, in a shell script, and in a Python program. Try editing these examples to download, open, and display data from other GeoTIFF files.

Learning objectives
Skills
  • 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-geotiff repository: https://github.com/csdms/bmi-geotiff.

Acknowledgements
This work is supported by the National Science Foundation under Award No. 1831623, Community Facility Support: The Community Surface Dynamics Modeling System (CSDMS).

References
  • Piper, M. (2021). CSDMS GeoTIFF data component (Version 0.2.3) (Computer software). https://doi.org/10.5281/zenodo.4721475
  • 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, https://doi.org/10.5194/gmd-15-1413-2022.