cdasws Example Jupyter Notebook

This Jupyter notebook demonstrates using the cdasws Python package to access NetCDF data from cdaweb with the data returned in the xarray.Dataset. This notebook contains the following sections:

  1. Prerequisites
  2. Setup
  3. Get Observatory Groups
  4. Get Datasets
  5. Get Dataset Variables
  6. Get Data
  7. Display Metadata
  8. Plot Values
  9. Additional Documentation

Notes:

  1. This example only depends upon pure Python modules and does not require modules that depend upon non-Python code (such as spacepy and pycdf).
  2. The use of the dataRepresentation keyword parameter below is only necessary if you also have spacepy installed.
  3. It also is possible to have the data returned in a SpasePy data model instead of an xarrayDataset.

Prerequisites

Install the prerequisite software from the Python Package Index if it is not already installed.

Setup

Execute some preliminary code that is necessary before the code that follows.

Get Observatory Groups

The following code demonstrates how to get the available observatory groups.

Get Datasets

The following code demontrates how to get a list of datasets.

Get Dataset Variables

The following code demonstrates how to get a dataset's variables.

Get Data

The following code demonstrates how to get NetCDF data from the ICON_L2-4_FUV_DAY dataset.

Display Metadata

The following code displays metadata for the ICON_L24_Disk_SZA variable, do

Plot Values

The following code plots the ICON_L24_Disk_SZA variable's values using the label values from the metadata.

Additional Documentation

View the cdasws API for additional functions. Additional notebook examples are also available.