html_url,issue_url,id,node_id,user,created_at,updated_at,author_association,body,reactions,performed_via_github_app,issue https://github.com/pydata/xarray/issues/1068#issuecomment-984940677,https://api.github.com/repos/pydata/xarray/issues/1068,984940677,IC_kwDOAMm_X846tQCF,1197350,2021-12-02T19:36:12Z,2021-12-02T19:36:12Z,MEMBER,"One solution to this problem might be the creation of a [custom Xarray backend](http://xarray.pydata.org/en/stable/internals/how-to-add-new-backend.html) for NASA EarthData. This backend could manage authentication with EDL and have its own documentation. If this package were maintained by NASA, it would close the feedback loop more effectively.","{""total_count"": 5, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 4, ""eyes"": 1}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-984920867,https://api.github.com/repos/pydata/xarray/issues/1068,984920867,IC_kwDOAMm_X846tLMj,1197350,2021-12-02T19:08:54Z,2021-12-02T19:08:54Z,MEMBER,"Just wanted to say how much I appreciate @betolink acting as a communication channel between Xarray and NASA. Users often end up on our issue tracker because Xarray raises errors whenever it can't read data. But the source of these problems is not with Xarray, it's with the upstream data provider. This also happens all the time with xmitgcm, e.g. https://github.com/MITgcm/xmitgcm/issues/266 It would be great if NASA had a better way to respond to these issues which didn't require that you ""know a guy"".","{""total_count"": 1, ""+1"": 1, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-968993065,https://api.github.com/repos/pydata/xarray/issues/1068,968993065,IC_kwDOAMm_X845wakp,1197350,2021-11-15T14:58:05Z,2021-11-15T14:58:05Z,MEMBER,At what point do we escalate this issue to NASA? Is there a channel via which they can receive and respond to user feedback?,"{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-966324523,https://api.github.com/repos/pydata/xarray/issues/1068,966324523,IC_kwDOAMm_X845mPEr,1197350,2021-11-11T13:59:55Z,2021-11-11T13:59:55Z,MEMBER,"I'd like to tag @betolink in this issue. He knows quite a bit about both Xarray and Earthdata login. Maybe he can help us get to the bottom of these problems. Luis, any ideas?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-624226394,https://api.github.com/repos/pydata/xarray/issues/1068,624226394,MDEyOklzc3VlQ29tbWVudDYyNDIyNjM5NA==,1197350,2020-05-05T18:23:57Z,2020-05-05T18:23:57Z,MEMBER,"> So, I tried Ryan's example, and got to the same error, where do you accept the EULA? It doesn't pop up on screen. https://urs.earthdata.nasa.gov/app_eula/nasa_gesdisc_data_archive","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-582432731,https://api.github.com/repos/pydata/xarray/issues/1068,582432731,MDEyOklzc3VlQ29tbWVudDU4MjQzMjczMQ==,1197350,2020-02-05T14:26:40Z,2020-02-05T14:26:40Z,MEMBER,"No, actually the problem was with my authorization. I had to accept a [EULA](https://urs.earthdata.nasa.gov/app_eula/nasa_gesdisc_data_archive) before my password was valid. Once I did that, everything worked. ","{""total_count"": 2, ""+1"": 2, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-582226104,https://api.github.com/repos/pydata/xarray/issues/1068,582226104,MDEyOklzc3VlQ29tbWVudDU4MjIyNjEwNA==,1197350,2020-02-05T03:38:52Z,2020-02-05T03:38:52Z,MEMBER,"I am trying to load MERRA2 data via the NASA password-protected opendap server. Although it sounds like both pydap and xarray have been fixed to support this, I still am having basically the same problem @jenfly described over three years ago. At this point it feels like a pydap issue, but I ask on this thread anyway. Here's a fully reproducible example, password and all 😄 ```python from pydap.client import open_url from pydap.cas.urs import setup_session username = 'rabernat' password = '%8rTMU6VT37r&%3e' url = 'https://goldsmr5.gesdisc.eosdis.nasa.gov:443/opendap/MERRA2_MONTHLY/M2IMNPANA.5.12.4/2019/MERRA2_400.instM_3d_ana_Np.201901.nc4' session = setup_session(username, password, check_url=url) dataset = open_url(url, session=session) assert 'USVS' in dataset _ = dataset['USVS'][:] ``` raises ``` --------------------------------------------------------------------------- HTTPError Traceback (most recent call last) <ipython-input-7-56bfca618586> in <module> ----> 1 _ = dataset['USVS'][:] /srv/conda/envs/notebook/lib/python3.7/site-packages/pydap/model.py in __getitem__(self, index) 318 def __getitem__(self, index): 319 out = copy.copy(self) --> 320 out.data = self._get_data_index(index) 321 return out 322 /srv/conda/envs/notebook/lib/python3.7/site-packages/pydap/model.py in _get_data_index(self, index) 347 return np.vectorize(decode_np_strings)(self._data[index]) 348 else: --> 349 return self._data[index] 350 351 def _get_data(self): /srv/conda/envs/notebook/lib/python3.7/site-packages/pydap/handlers/dap.py in __getitem__(self, index) 140 logger.info(""Fetching URL: %s"" % url) 141 r = GET(url, self.application, self.session, timeout=self.timeout) --> 142 raise_for_status(r) 143 dds, data = r.body.split(b'\nData:\n', 1) 144 dds = dds.decode(r.content_encoding or 'ascii') /srv/conda/envs/notebook/lib/python3.7/site-packages/pydap/net.py in raise_for_status(response) 37 detail=response.status+'\n'+response.text, 38 headers=response.headers, ---> 39 comment=response.body 40 ) 41 HTTPError: 302 Found <!DOCTYPE HTML PUBLIC ""-//IETF//DTD HTML 2.0//EN""> <html><head> <title>302 Found</title> </head><body> <h1>Found</h1> <p>The document has moved <a href=""https://urs.earthdata.nasa.gov/oauth/authorize/?scope=uid&app_type=401&client_id=e2WVk8Pw6weeLUKZYOxvTQ&response_type=code&redirect_uri=http%3A%2F%2Fgoldsmr5.gesdisc.eosdis.nasa.gov%2Fdata-redirect&state=aHR0cHM6Ly9nb2xkc21yNS5nZXNkaXNjLmVvc2Rpcy5uYXNhLmdvdi9vcGVuZGFwL01FUlJBMl9NT05USExZL00ySU1OUEFOQS41LjEyLjQvMjAxOS9NRVJSQTJfNDAwLmluc3RNXzNkX2FuYV9OcC4yMDE5MDEubmM0LmRvZHM%2FVVNWUyU1QjA6MTowJTVEJTVCMDoxOjQxJTVEJTVCMDoxOjM2MCU1RCU1QjA6MTo1NzUlNUQ"">here</a>.</p> </body></html> ``` Is this a problem with pydap? Or the NASA server?","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975 https://github.com/pydata/xarray/issues/1068#issuecomment-287659092,https://api.github.com/repos/pydata/xarray/issues/1068,287659092,MDEyOklzc3VlQ29tbWVudDI4NzY1OTA5Mg==,1197350,2017-03-20T00:04:08Z,2017-03-20T00:04:08Z,MEMBER,"Hi @jenfly, it's great to see that you have tracked down this root issue! I agree we should be able to support direct access to these sort of opendap resources within xarray. It should not be too tricky to implement, and in fact, if you are interested, it could be a great opportunity for you to open a pull request and become directly involved in the project. We would be very happy to gain another contributor. You can see the line where `pydap.open_url` gets called here: https://github.com/pydata/xarray/blob/master/xarray/backends/pydap_.py#L64 We just need a mechanism to pass the username and password from `open_dataset` to the pydap backend. There are two possible options I see: 1. we could add new `username` and `password` keyword args to `open_dataset`. This is the most straightforward, but `open_dataset` already has a ton of arguments, so maybe it is not ideal. 1. we could parse out the username and password from a url like `https://username:password@...` within the pydap backend. It would be good to get some other opinions on which approach would be preferable.","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975