Coder Social home page Coder Social logo

Comments (5)

MBARIMike avatar MBARIMike commented on June 1, 2024 1

It wasn't too hard for me to make a work-around in my code, but it'd be nice to have the same behavior that we have 3.1.1.

from pydap.

MBARIMike avatar MBARIMike commented on June 1, 2024

Upon further inspection I see that the GridType returned is different. In Version 3.1.1 I get a dictionary:

>>> from pydap.client import open_url
>>> ds = open_url('http://dods.mbari.org/opendap/data/auvctd/surveys/2010/netcdf/Dorado389_2010_300_00_300_00_decim.nc')
>>> ds['temperature']
{'temperature': <pydap.model.BaseType object at 0x7f18464a7650>, 'time': <pydap.model.BaseType object at 0x7f18464a7750>}

With Version 3.2.0 I get something different:

>>> from pydap.client import open_url
>>> ds = open_url('http://dods.mbari.org/opendap/data/auvctd/surveys/2010/netcdf/Dorado389_2010_300_00_300_00_decim.nc')
>>> ds['temperature']
<GridType with array 'temperature' and maps 'time'>

Perhaps this is an improvement and I should change my code?

from pydap.

taeold avatar taeold commented on June 1, 2024

This explains some of the compatibility issue I saw in pydata/xarray#1174 - namely, datatype returned by pydap.client in version 3.2 is dictionary-like but not quite so, missing couple of functions like __len__ and iteritems/items.

Does it make sense to implement these functions? From my understanding of the code, GridType/StructureType appeared well equipped to implement those functions (am I naive in thinking so?).

from pydap.

jenfly avatar jenfly commented on June 1, 2024

I'd love to have this compatibility as well! I'm new to Pydap - I've been using Xarray and now I'm trying to get it to work with engine=pydap in order to handle NASA's new authentication procedures. But the engine=pydap option doesn't work in xarray.open_dataset() anymore because of these changes to GridType. I can try to make my own versions with workarounds, but going forward it would be great to restore compatibility between Xarray and Pydap again. Is there any particular reason these attributes were removed?

from pydap.

laliberte avatar laliberte commented on June 1, 2024

I'm going to close this one following PR #48. If it turns out to be insufficient, I'll reopen.

from pydap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.