-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
streaming from OPeNDAP? #24
Comments
I've been working a bit more on an example of using this api. Since our code is already in python and What is currently working on CERES:
What is NOT currently working on CERES:
What still needs to be figured out (besides the things that don't currently work...):
Code snippet of what's working on CERES at the moment:
|
had to install and import lxml to get the line but still got error for the next line Exception has occurred: SSLCertVerificationError |
tried the sample code at ceres hpc, no "ssl:certificate" problem for getting data from but still "302 found" error for getting data from |
tried the cookie/.netrc method from the link created .netrc file in home directory changed the code from python 2 to python 3, and little modification of http importing the method open_url() for 'https://goldsmr4.gesdisc.eosdis.nasa.gov' worked, but still "302 Found" error at open_url() to open data from ''http://opendap.cr.usgs.gov/opendap/hyrax"
|
Thought I found a good sample/tutorial which we can borrow some codes from, https://github.com/ornldaac/daymet-python-opendap-xarrayhttps://www.youtube.com/watch?v=0jCKiqrcYaUbut stuck at the line with error related pydap github issue: pydap/pydap#196 |
looks like the error: "UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)" can be solved by pydap/pydap#126 change the file net.py in the pydap package according to then restart the python kernel. stuck again on the line of code: ValueError: unable to decode time units 'days since 2010-01-01 12:00:00' with "calendar 'proleptic_gregorian'". Try opening your dataset with decode_times=False or installing cftime if it is not installed. |
tried to create get_session function to solve 302 Found / redirection issue on hyrax server login, described in pydap/pydap#188, no luck |
played with AppEEARS API for a while MOD13Q1.061 is one of the supported dataset by AppEEARS |
Good news: pydap 3.3 was released yesterday. Using python 3.6.6 on CERES, I upgraded pydap in my home directory using
Which I think confirms the issue is as discussed in pydap/pydap#188. So I'm currently inclined to consider |
I tried the solution suggested in pydap/pydap#188 too with no luck either. Keep getting the redirect error message. I also ran the AppEEARS tutorial linked above and its stuck in
banner on their website so it may not be a representative processing time. @haitao-nmsu said it only took a couple min to run the tutorial. I'll check again tomorrow. |
Alternatively, we could also start with ORNL DAAC MODIS product. The daymet tutorial above can be generalized to at least other ORNL DAAC products on their THREDDS server. Based on a quick edit to the tutorial code, I'm able to access their MODIS product found here. The tutorial also shows how the NASA CMR (mentioned above) can be queried for searching dataset metadata. Next, I'll see if I can figure out a generalized approach leveraging CMR and ORNL DAAC THREDDS (for now, other pydap-compatible servers later) to include datasets in gcdl. |
Things that the daymet opendap tutorial hard-coded, but I think we could generalize:
Or, maybe for pilot, just have catalog entries for tested datasets that include the collection id. In this collection entry, there are data on the temporal and spatial coverage of the dataset.
The catalog can then be retrieved as xml. I just haven't figured out how to parse the xml yet. But within the .xml, there is a service section that tells you how to point to the opendap service:
Note, the granule search can be constrained further, e.g. with spatial bounds.
With all of those pieces, you can use So the next questions are:
|
I've been taking a look into what options there are for streaming MODIS, particularly focusing on methods that can be useful for other products. OPeNDAP seems to be like a potential option for NASA earth data. I've been looking at LP DAAC hyrax, but there seem to be other potential products/servers of interest for our group. There is a python package
pydap
for accessing these kinds of servers. One general maybe issue is the requirement to authenticate an EarthData login (would need to review the user agreement, what account would to the requests?), but pydap has support for the authentication process if it is OK.Spatial and temporal subsets can be made, and metadata queried, but formats might vary a bit depending on what server you are talking to.
Warning though: I've only dabbled in reading about this option and have not yet successfully executed my test of extracting a few timesteps of NDVI covering the Jornada. I can use basic curl commands to handle authentication and request the intended spatial extent from the intended NDVI product, but I'm not sure on the temporal part (I am pulling a few timesteps but I picked the first 4) and I haven't successfully read in the result. I was trying in R since that's what I know, but I can't tell if its an R
netcd4
issue or not that I can view the layers that I downloaded, but the geographic info is missing. I tried thepydap
package and I can make some example code download data from some other server, but not for my MODIS/hyrax test.At this point, I'd need other people's input on if this is something worth continuing to explore as we try to include some streaming of popular datasets that are too big to store on scinet.
I found this LP DAAC webinar as a helpful starting point.
The text was updated successfully, but these errors were encountered: