How do I access Cloud Data from my Local Machine with OPeNDAP?


OPeNDAP, or the Open-source Project for a Network Data Access Protocol, is a data server that allows for accessing scientific datasets through the public internet. OPeNDAP links can be acquired through dataset landing pages or the common metadata repository. Once you have the desired link(s), you can open them as follows:

#Import packages
import xarray as xr

ds_https = xr.open_dataset(

# For datasets that contain dap4 specific datatypes, such as `int64`, replace `https` with `dap4` at the beginning to open with xarray. For example:
url =
dap4_url = url.replace("https://", "dap4://")
# dap4_url output: dap4://
ds_dap4 = xr.open_dataset(dap4_url)

# Note: Some datasets have their variables organized in groups, so within the open_dataset function, you may need to specify 'group=' to access the dataset.

For more information, see the OPeNDAP Data Access Client Tutorials.