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-291410815,https://api.github.com/repos/pydata/xarray/issues/1068,291410815,MDEyOklzc3VlQ29tbWVudDI5MTQxMDgxNQ==,13774246,2017-04-04T06:54:34Z,2017-04-04T06:54:34Z,NONE,"Awesome, thanks so much @laliberte!","{""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-290870420,https://api.github.com/repos/pydata/xarray/issues/1068,290870420,MDEyOklzc3VlQ29tbWVudDI5MDg3MDQyMA==,13774246,2017-03-31T23:53:20Z,2017-03-31T23:53:20Z,NONE,"I also like the idea of passing `PydapDataStore` objects that include the `session` object. Delving deeper into the `pydap` authentication, I found that there are already several different `setup_session` functions available to create the `session` object, corresponding to different authentication procedures (`pydap.cas.get_cookies.setup_session`, `pydap.cas.urs.setup_session`, `pydap.cas.esgf.setup_session`) as well as additional arguments to `setup_session` beyond `username` and `password`. Best to deal with all this separately with `pydap` rather than trying to embed it within `xarray`.
I'm still having problems trying to get `xarray.open_dataset` to work with `pydap`. Using the latest commit on `pydap/master` (in which https://github.com/pydap/pydap/pull/48 is merged) I'm now getting a new error: `AttributeError: '' object has no attribute 'encode'`. When I have some time, I'll look into it further and try to see what else is needed to restore compatibility.","{""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-287670125,https://api.github.com/repos/pydata/xarray/issues/1068,287670125,MDEyOklzc3VlQ29tbWVudDI4NzY3MDEyNQ==,13774246,2017-03-20T02:54:33Z,2017-03-20T02:54:33Z,NONE,"Thanks, @rabernat! I'd be happy to try implementing this in the project. I'm a newbie when it comes to contributing to big projects like this (so far I've just used Github for my own little projects) so I might have some naive questions as I figure out how things work.
The two options you mentioned for passing username and password info to `open_dataset` both sound good to me. I don't have any strong preference between them. How do I get other opinions on which approach to use? Should I start a new issue thread?
Also, I realized that there is another hiccup along the way. When I try to specify `engine='pydap'` in `open_dataset`, I get the same error message as mentioned in #1174, that the object has no attribute `iteritems`. When I wrote the first post in this thread, back in October, I was able to use `engine='pydap'` without any problems. This seems to be related to recent upstream changes in Pydap: https://github.com/pydap/pydap/issues/43 and I presume might require more substantial changes either in Xarray or Pydap so that they can work together again. Any thoughts on how to handle this?","{""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-287653485,https://api.github.com/repos/pydata/xarray/issues/1068,287653485,MDEyOklzc3VlQ29tbWVudDI4NzY1MzQ4NQ==,13774246,2017-03-19T22:32:50Z,2017-03-19T22:36:08Z,NONE,"I've finally found something useful online and am able to use Pydap to open these files -- hoping someone can help me find a way to integrate this into an xarray.open_dataset() function call and then I will be a very happy camper!
Turns out much of the info posted by NASA online is out of date and based on a different implementation of Pydap than what is actually being used currently (argh). Here is something that actually works, from http://www.pydap.org/en/latest/client.html#urs-nasa-earthdata:
```
from pydap.client import open_url
from pydap.cas.urs import setup_session
url = 'https://goldsmr4.gesdisc.eosdis.nasa.gov/opendap/MERRA2/M2T1NXSLV.5.12.4/2016/06/MERRA2_400.tavg1_2d_slv_Nx.20160601.nc4'
session = setup_session(username, password)
dataset = open_url(url, session=session)
```
where I've assigned the username and password variables with the appropriate values in another function.
I've tested this and it is working, but I would prefer to do things within Xarray since all my code is already using it. Just for fun, I tried `ds = xarray.open_dataset(url, engine='pydap', session=session)`, to see if the extra keyword would be magically sent to the pydap engine, but got an error message. Is there a way to incorporate this functionality into xarray.open_dataset? Thank you so much for any assistance!","{""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-263029510,https://api.github.com/repos/pydata/xarray/issues/1068,263029510,MDEyOklzc3VlQ29tbWVudDI2MzAyOTUxMA==,13774246,2016-11-25T22:41:39Z,2016-11-25T22:41:39Z,NONE,"@j08lue no, not yet. I've been in touch with the folks at NASA who run the server, but their suggestions didn't work for me and I haven't had time to keep troubleshooting. I will need to sort out this issue in the next couple of months to get some data that I need, so if/when I ever resolve it, I'll post the solution here.","{""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-258002779,https://api.github.com/repos/pydata/xarray/issues/1068,258002779,MDEyOklzc3VlQ29tbWVudDI1ODAwMjc3OQ==,13774246,2016-11-02T21:20:52Z,2016-11-02T21:20:52Z,NONE,"Ah, I see. Thanks for the suggestion. Using Pydap I'm able to see all the variables and their metadata, so I thought it was working, but when I try to actually access the data values, I get the same error message as from Xarray. The issue must be something unrelated to Xarray -- I'll keep investigating. Thanks for your help!
","{""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-257479761,https://api.github.com/repos/pydata/xarray/issues/1068,257479761,MDEyOklzc3VlQ29tbWVudDI1NzQ3OTc2MQ==,13774246,2016-11-01T03:15:46Z,2016-11-01T03:15:46Z,NONE,"Thanks very much for your reply! I still get an error from xarray when I use the `engine='pydap'` option. Here's a minimum (almost) working example (almost because you need an account with the server so you can substitute your username/password into the url string):
```
import xarray
from pydap.client import open_url
url = 'http://:@goldsmr5.sci.gsfc.nasa.gov/opendap/MERRA2/M2I3NPASM.5.12.4/1986/01/MERRA2_100.inst3_3d_asm_Np.19860101.nc4'
ds1 = open_url(url) # Works but data isn't in xarray format
ds2 = xarray.open_dataset(url, engine='pydap') # Error message, see attached
```
I've attached the error message here --
[error_msg.txt](https://github.com/pydata/xarray/files/563281/error_msg.txt)
I don't know enough about the inner workings of xarray to trace through it. Please let me know if any of this means anything to you and has a reasonably easy fix or workaround. Thank you!
","{""total_count"": 0, ""+1"": 0, ""-1"": 0, ""laugh"": 0, ""hooray"": 0, ""confused"": 0, ""heart"": 0, ""rocket"": 0, ""eyes"": 0}",,186169975