I’m doing some research which requires me to programmatically download satellite data for certain days within a specific latitude/longitude bounding box. This should be a relatively simple task using Hyrax server-side functions to determine which data to get and OPeNDAP to get it. However, I’m running into some problems.
I have a few setups to try accessing these resources using different tools (Python urllib.request
, C libcurl
, and command line curl
), but fundamentally all I am executing is an HTTP GET request and streaming that data into an appropriate file/memory.
One of the products I’m downloading is AquaMODIS L2 Cloud Data from https://ladsweb.modaps.eosdis.nasa.gov/opendap/hyrax/RemoteResources/laads/61/MYDATML2/YYYY/DDD/FILENAME.hdf
. Using the version
function, I can see that this endpoint does not support many standard Hyrax functions like geogrid
, but does support functions like range
, which I could not find any documentation for.
(Just in case anyone has the above issue, my solution was to query https://ladsweb.modaps.eosdis.nasa.gov/api/v1/files/product=MYDATML2&collection=61&areaOfInterest=x-121y32,x-116y35&dateRanges=YYYY-MM-DD
, a separate API which happens to point to the same data. The download link this API supplies requires some auth, though, so you can just plug the back half of it into the front half of the opendap/hyrax URL to get that data.)
Another product I’m downloading is AquaMODIS L3 OC Data from https://oceandata.sci.gsfc.nasa.gov/opendap/MODISA/L3SMI/YYYY/MMDD/FILENAME.nc
. Using version
on this endpoint reveals that geogrid
is supported, although when I get an example URL like https://oceandata.sci.gsfc.nasa.gov/opendap/MODISA/L3SMI/2002/0101/AQUA_MODIS.20020101_20021231.L3m.YR.RRS.Rrs_555.4km.nc.dap.nc4?geogrid(Rrs_555,35,-121,32,-116)
, it simply responds by giving me the entire file. Perhaps I misunderstand how geogrid
works, but I expected only to get the data within the bounding coordinates from the Rrs_555 band.
It’s my understanding that this inconsistency in behavior is because these resources are hosted under different sub-domains (ladsweb.mdaps.eosdis.nasa.gov versus oceandata.sci.gsfc.nasa.gov). However, they both support some sort of Hyrax-style functions since version
responds on each.
So, my main questions are:
- Why are these two endpoints different from one another?
and - Do I misunderstand
geogrid
or is there an obvious issue with my URL to access MODISA/L3SMI data usinggeogrid
?
My understanding of who manages the Hyrax servers and compliance with new versions is not deep, so any insight is appreciated, thanks!