OPeNDAP plug-in issues

Open
#60 50 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend, data

Research direction

Start with the opendap_model entry point referenced in the traceback and the compass_viewer reopen path. Reproduce the reported cases using the listed DAP URL and compare the plug-in with the pydap command-line results; done means global attributes and names containing special characters are handled, with compound datatype limitations documented or verified.

Written by the indexing model from the issue text.

Description

bug OPeNDAP

By enabling opendap_model in the compass_viewer, I can build HDF-compass on Linux. So I can test the opendap plug-in at least from my development environment.

In general,
One can open a URL served via DAP via "Open Resource". A simple netCDF style DAP service can be opened with the following limitations.

  1. The current opendap model misses group attributes (at least for root)

The attributes under the root group(or global attributes) can not be displayed. It seems the feature is missing.

"
File "/mnt/scr1/kent/hdf-compass-kent/hdf-compass/build/HDFCompass/out00-PYZ.pyz/compass_viewer.frame", line 388, in on_menu_reopen
File "/mnt/scr1/kent/hdf-compass-kent/hdf-compass/build/HDFCompass/out00-PYZ.pyz/opendap_model", line 272, in init
AttributeError: 'NoneType' object has no attribute 'attributes'

Note: Pydap client on the command-line can successfully retrieve the global attribute. So this is an issue related to the opendap model.
Pydap output is as follows:

dataset = open_url('http://test.opendap.org/dap/data/nc/coads_climatology.nc')
print dataset.attributes
{'NC_GLOBAL': {'history': 'FERRET V4.30 (debug/no GUI) 15-Aug-96'}, 'DODS_EXTRA'
: {'Unlimited_Dimension': 'TIME'}}

I think it is promising to fix this issue. It seems the opendap_model just forgets considering the global attribute case.

  1. Can not serve any object names that contain special characters

The opendap plug-in can only address the object names that include underscore,letter and numeric values(CF naming conventions). So essentially all HDF5 data served by the default option of the Hyrax OPeNDAP services can not be served since a "/" is always included in an HDF5 object name.
Symptom: the plug-in just opens the file without displaying any objects. The file name displayed by the plug-in looks like to be escaped with %...h5 for the dot in an HDF5 file name.

Pydap command-line client doesn't have an issue to open an HDF5 file served by the default HDF5 handler although I may see %.. displayed for the special characters inside the variable names.

  1. Can and potentially will not serve compound datatype objects well because of the limitation of pydap

My version of the pydap(installed by using pip) can only handle a scalar compound datatype HDF5 dataset. So we should NOT expect the opendap module to be able to serve compound datatype objects well even if bugs are fixed.

Dominant language
Python
Stars
132
Forks
27
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from HDFGroup/hdf-compass

All issues in HDFGroup/hdf-compass

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.