From the PO.DAAC Cookbook, to access the GitHub version of the notebook, follow this link.

OPeNDAP Access

Notebook Objectives:

  • Search the common metadata repository (CMR) for the MUR dataset
  • Obtain OPeNDAP links from CMR search
  • Download data from OPeNDAP links and open via xarray to visualize data
#https://ghrc.nsstc.nasa.gov/opendap/globalir/data/2020/0525/globir.20146.0000
from netCDF4 import Dataset
import xarray as xr
import dask
import os
import requests
import earthaccess

#Allows us to visualize the dask progress for parallel operations
from dask.diagnostics import ProgressBar
ProgressBar().register()

Earthdata Login

An Earthdata Login account is required to access data, as well as discover restricted data, from the NASA Earthdata system. Thus, to access NASA data, you need Earthdata Login. If you don’t already have one, please visit https://urs.earthdata.nasa.gov to register and manage your Earthdata Login account. This account is free to create and only takes a moment to set up. We use earthaccess to authenticate your login credentials below.

auth = earthaccess.login()
#Histogram
cloud_data['analysed_sst'].plot()
# Choose one time segment, plot the data
cloud_data['analysed_sst'].isel(time=4).plot()
#Plot a single point over time
cloud_data['analysed_sst'].isel(lat=7000, lon=7000).plot()