-
Notifications
You must be signed in to change notification settings - Fork 0
How to access GES DISC Hyrax server with PyDAP
GES DISC runs Hyrax server that requires URS authentication [1]. They also started using https instead of http. This document explains how to use PyDAP to access and visualize GES DISC data products.
First, make sure that your pydap is up-to-date.
pip install pydap -U
Second, set up session correctly according to [2].
from pydap.client import open_url
from pydap.cas.urs import setup_session
session = setup_session('username', 'password', check_url=url) # Use yours here.
url = 'https://acdisc.gesdisc.eosdis.nasa.govacdis/opendap/HDF-EOS5/Aura_MLS_Level2/ML2BRO.004/2016/MLS-Aura_L2GP-BrO_v04-23-c03_2016d303.he5'
dataset = open_url(url, session=session)
Finally, test if dataset is read correctly.
print dataset
If you see a list of variable names like below, you're ready to use PyDAP!
<DatasetType with children 'BrO_AscDescMode', 'BrO_Convergence', ..., 'BrO_APriori_Pressure'>
Here's a complete MLS v4 example in Jupyter Notebook.
Note: It's true that Hyrax has code to make different kinds of data appear to follow CF-1.x, but that's not actually necessary to use the netcdf-python library. Pretty much any data that are arrays can be accessed this way. I figured I add this because you can use the netcdf4-python code with just a huge amount of DAP-served data (Hyrax, TDS, PyDAP, GDS, ERRDAP, ...). jhrg 1/10/17
NASA's Hyrax server uses HDF handlers that make their HDF product CF-compliant. Thus, it is possible to use netCDF4 Python library. Here's a complete netCDF4-Python AIRS v6 example in Jupyter Notebook.