issues: 2216068694
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2216068694 | I_kwDOAMm_X86EFoZW | 8895 | droping variables when accessing remote datasets via pydap | 8241481 | open | 0 | 1 | 2024-03-29T22:55:45Z | 2024-05-03T15:15:09Z | CONTRIBUTOR | Is your feature request related to a problem?I ran into the following issue when trying to access a remote dataset. Here is the concrete example that reproduces the error. ```python from pydap.client import open_url from pydap.cas.urs import setup_session import xarray as xr import numpy as np username = "UsernameHere" password= "PasswordHere" filename = 'Daymet_Daily_V4R1.daymet_v4_daily_na_tmax_2010.nc' hyrax_url = 'https://opendap.earthdata.nasa.gov/collections/C2532426483-ORNL_CLOUD/granules/' url1 = hyrax_url + filename session = setup_session(username, password, check_url=hyrax_url) ds = xr.open_dataset(url1, engine="pydap", session=session)
The issue involves the variable I tried all this with the newer versions of Describe the solution you'd likeI think it would be nice to be able to drop the variable I know I don't want. So something like this:
Describe alternatives you've consideredThis is potentially a For example I can easily open the dataset and drop the variable with pydap as described below ```python $ dataset = open_url(url1, session=session) # this works $ dataset[tuple([var for var in dataset.keys() if var not in ['time_bnds']])] # this takes < 1ms
It looks like it would be a easy implementation on the backend, but at the same time I took a look at and I feel like it could also be implemented at the Any thoughts or suggestions? I can certainly lead on this effort as I already will be working on enabling the dap4 implementation within pydap. |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/8895/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
13221727 | issue |