home / github / issue_comments

Menu
  • GraphQL API
  • Search all tables

issue_comments: 287653485

This data as json

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-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
Powered by Datasette · Queries took 0.778ms · About: xarray-datasette