Metadata-Version: 2.4
Name: xarray-erddap
Version: 1.0.1
Summary: Load ERDDAP Datasets directly into xarray
License: Copyright 2017 Filipe Fernandes
        
        
        Redistribution and use in source and binary forms,
        with or without modification,
        are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice,
           this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice,
           this list of conditions and the following disclaimer in the documentation
           and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors
           may be used to endorse or promote products derived from this software
           without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
        THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
        LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
        (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
        LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
        STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
        WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: documentation, https://ioos.github.io/xarray_erddap
Project-URL: homepage, https://github.com/ioos/xarray_erddap
Project-URL: repository, https://github.com/ioos/xarray_erddap
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: erddapy>=3
Requires-Dist: netcdf4
Requires-Dist: xarray
Dynamic: license-file

ERDDAPy engine for xarray.

pip (or conda) install xarray-erddap and check if you load the erddapy engine:


```python
import xarray as xr

xr.backends.list_engines()
```

If successful any ERDDAP URL should, that has a netcdf-like response, should work.
Here are a few examples:

1. OPeNDAP
    ```python
    import xarray as xr

    url = "https://gliders.ioos.us/erddap/tabledap/amelia-20200825T1929"
    ds = xr.open_dataset(url, engine="erddapy")
    ```

1. Full NetCDF file (also works with the `ncCF` and `ncCFMA` responses).
    ```python
    url = "https://gliders.ioos.us/erddap/tabledap/amelia-20200825T1929.nc"
    ds = xr.open_dataset(url, engine="erddapy")
    ```

1. Sliced/Filtered URLs obatined from the ERDDAP web interface.

    ```python
    url = "https://gliders.ioos.us/erddap/tabledap/amelia-20200825T1929.nc?trajectory%2Cwmo_id%2Cprofile_id%2Ctime%2Clatitude%2Clongitude%2Cdepth%2Cconductivity&time%3E=2020-09-18T00%3A00%3A00Z&time%3C=2020-09-25T14%3A32%3A48Z"
    ds = xr.open_dataset(url, engine="erddapy")
    ```


    Also works on griddap URLs.

1. OPeNDAP-griddap

    ```python
    url = "https://pae-paha.pacioos.hawaii.edu/erddap/griddap/etopo1_bedrock"
    ds = xr.open_dataset(url, engine="erddapy")
    ```


    Note that griddap supports lazy loading! However, you can do it the ERDDAP way and pass a server-side sliced URL:

1. Sliced/Filtered griddap

    ```python
    url = "https://pae-paha.pacioos.hawaii.edu/erddap/griddap/etopo1_bedrock.nc?z%5B(-42.0):1:(-44.0)%5D%5B(-42.0):1:(-44.0)%5D"
    ds = xr.open_dataset(url, engine="erddapy")
    ```

NB: All URLs should be quoted, like the ones returned from ERDDAP's web-interface. If you are looking for human readable URLs, other non-netCDF responses, and/or programmatically building them, then erddapy is better suited for the task.
