xpublish-community / xpublish-opendap

OpenDAP router for Xpublish
BSD 3-Clause "New" or "Revised" License
7 stars 4 forks source link

Opening .dods with OPeNDAP clients #18

Open xaviernogueira opened 1 year ago

xaviernogueira commented 1 year ago

Hi again @abkfenris.

So I was testing OPeNDAP clients with my Catalog-To-Xpublish repo which uses xpublish-opendap. There seems to be some issues with certain clients/techniques for opening the data.

For reference the testing URL I am using looks like this: "http://127.0.0.1:8000/conus404-daily/datasets/zarr-s3/opendap?ACETLSM[100:150][100:300][100:300]" where "zarr-s3" is the dataset name.

What works:

What doesn't work:

How to address this may be out of the scope of this plugin, but I wanted to mention this for potential inclusion in documentation before others run into similar issues.

abkfenris commented 1 year ago

Bummer. I'm guessing we have probably a slight incompatibility with the underlying engines. I feel like this might take some reading of the OPeNDAP spec (dap4), and maybe comparing it against other implementations.

We may need to use something like pytest-xprocess so that we can test the various engines directly rather than only making mock requests.

xaviernogueira commented 1 year ago

By intercepting the Xarray backend logging I can see that it is not an issue with the OPeNDAP spec but rather Xarray lazy loading and how it pings my locally API iteratively to load in chunks. The issue seems to be the URL it expects to ping, not the structure of the DODs binary (at least from what I see).

Regardless I agree adding test cases for the clients/engines one might use makes sense.

abkfenris commented 1 year ago

Ok, I've got a PR with tests that replicates what you've found: #20