PyDAP is a pure Python implementation of the Data Access Protocol (DAP, also known as OPeNDAP), enabling access to scientific data over the internet. It acts as both a client for accessing remote OPeNDAP servers and a server for making local data available via OPeNDAP. A key feature is lazy data evaluation, where data is downloaded on-the-fly as needed, conserving bandwidth and time. The library is actively developed and maintained by the OPeNDAP community.
pip install pydapVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use PyDAP as a client to open a remote OPeNDAP dataset, inspect its variables, and retrieve a subset of data using lazy evaluation. Data is only downloaded when explicitly accessed or sliced.
If encountered, try reducing the requested subset further. If the issue persists with small requests, it might be a server-specific limitation or a fundamental difference in how pydap constructs requests compared to other clients. Consider reporting to the pydap issue tracker.
Ensure that any problematic parts of the URL are properly URL-encoded (e.g., using `urllib.parse.quote`) before passing them to `open_url`. Also, verify the encoding of your environment if possible.
Always refer to the official PyDAP documentation linked from its main GitHub repository or PyPI page for the most up-to-date and accurate information. Update to Python 3.10+ for full compatibility.
Upgrade your `xarray` library to a version compatible with `pydap` 3.x. Ensure both libraries are kept up-to-date to maintain compatibility. This issue is largely resolved in recent `xarray` releases.
Explicitly encode problematic URL components using `urllib.parse.quote` or verify the encoding of the URL source. Ensure your Python environment is configured for UTF-8 where possible, e.g., via `locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')` if applicable.
Double-check that the subsetting (slicing) in your `pydap` code is correct. If the issue persists even with very small subsets, the problem lies with the specific OPeNDAP server or `pydap`'s interaction with it. Consider fetching data in even smaller chunks, if possible, or consulting the server's documentation.