-
Notifications
You must be signed in to change notification settings - Fork 37
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
add earthdata support #393
Conversation
@mgovorcin I'll have to look into this a little bit, but Earthaccess has a hard time with some of the ASF datasets; I thought I had fixed those issues already, but I've gotten a couple of reports now that it's not working (again?) with various datasets. That said, is there any particular reason you're using Earthaccess since you already have |
@jhkennedy, I am adding earthaccess as alternative option to asf_search, to assist one of our users in downloading ARIA-S1-GUNW version 3 products with ariaDownload.py, while waiting for these products to be visible with asf_search. They are eager to use the data, so we trying to make things easier for them. We can touch base on this on our regular Tuesday meetings |
@jhkennedy is this an easy fix or should we defer to asf_search support for the new GUNW collection (@glshort)? If we persue this earthdata search then we should probably also work directly off the dev_refactor branch of @alexfore. |
@mgovorcin @dbekaert Earthaccess uses EDL tokens to access datasets, but the GRFN distribution app does not support tokens, so Earthaccess will not be able to download them at this time. @betolink and I may update Earthaccess to handle this dataset, or ASF my update the distribution app to support tokens -- all of those options are a ways out unfortunately. That said, dct_kw = dict(dataset=asf.DATASET.ARIA_S1_GUNW,
collections=["C2859376221-ASF", "C1261881077-ASF"],
relativeOrbit=tracks,
flightDirection=flight_direction,
intersectsWith=bbox)
scenes = asf.geo_search(**dct_kw) With the next release, which may only be a day or two away, you can drop the Or if you just want to search for version 3 products, it'd look like: dct_kw = dict(shortName='ARIA_S1_GUNW',
relativeOrbit=tracks,
flightDirection=flight_direction,
intersectsWith=bbox)
scenes = asf.geo_search(**dct_kw) You can also get to a GeoDataFrame from import geopandas as gpd
gdf = gpd.GeoDataFrame.from_features(scenes.geojson(), crs='EPSG:4326') which will have all the properties as columns and a geometry column. You can then add whatever columns you need from the file names or what have you. |
@jhkennedy thanks for checking on this, I updated Here is my query:
Confirm that both @jhkennedy minor thing to report that for the where can retrieve the values for those [bperp, temporal_baseline] with Tagging @bbuzz31 and closing this PR as we do not need Earthaccess support |
@mgovorcin @dbekaert @bbuzz31 dct_kw = dict(dataset=asf.DATASET.ARIA_S1_GUNW,
relativeOrbit=[14],
flightDirection=asf.FLIGHT_DIRECTION.ASCENDING,
processingLevel=asf.constants.GUNW_STD,
intersectsWith='POLYGON((34.9254 24.4438,38.8022 24.4438,38.8022 28.9871,34.9254 28.9871,34.9254 24.4438))')
scenes = asf.geo_search(**dct_kw) And finding only the v3 products remains the same: dct_kw = dict(shortName='ARIA_S1_GUNW',
relativeOrbit=[14],
flightDirection=asf.FLIGHT_DIRECTION.ASCENDING,
processingLevel=asf.constants.GUNW_STD,
intersectsWith='POLYGON((34.9254 24.4438,38.8022 24.4438,38.8022 28.9871,34.9254 28.9871,34.9254 24.4438))')
scenes = asf.geo_search(**dct_kw) Though when providing processing levels, you may need to also add dct_kw = dict(shortName='ARIA_S1_GUNW',
relativeOrbit=[14],
flightDirection=asf.FLIGHT_DIRECTION.ASCENDING,
processingLevel=asf.constants.GUNW_STD,
intersectsWith='POLYGON((34.9254 24.4438,38.8022 24.4438,38.8022 28.9871,34.9254 28.9871,34.9254 24.4438))',
collectionAlias=False)
scenes = asf.geo_search(**dct_kw) |
@jhkennedy I don't fully understand how important this |
@bbuzz31 ah, right, yes, you can't pass it directly to the "specialized" search methods, but you can provide it via the I don't know if you'll need it, so I'd try without it. But if you're seeing v2 products in your results without it, you can add it like: import asf_search as asf
opts = asf.ASFSearchOptions(
shortName='ARIA_S1_GUNW',
relativeOrbit=[14],
flightDirection=asf.FLIGHT_DIRECTION.ASCENDING,
processingLevel=asf.constants.GUNW_STD,
intersectsWith='POLYGON((34.9254 24.4438,38.8022 24.4438,38.8022 28.9871,34.9254 28.9871,34.9254 24.4438))',
collectionAlias=False,
)
scenes = asf.geo_search(opts=opts) |
Adding earthdata download support [placeholder at the moment]
The code seems to work for searching products on Earthdata, however when downloading with earthdataaccess getting errors:
Unauthorized for url: https://urs.earthdata.nasa.gov/oauth/authorize?response_type=code&client_id=BO_n7nTIlMljdvU6kRRB3g&redirect_uri=https://auth.asf.alaska.edu/login&state=https%3A%2F%2Fgrfn.asf.alaska.edu%2Fdoor%2Fdownload%2FS1-GUNW-A-R-014-tops-20200102_20191221-152853-00038E_00019N-PP-e9d0-v3_0_1.nc&app_type=401
but when clicking on the url link, download starts with not issues, ask ASF folks what might be the cause.
Description
Added
Index(['sensor', 'datasetName', 'flight_direction', 'look_direction', 'track_number', 'mode', 'reference_secondary', 'UTC_time', 'upper_left_latlon', 'orbits', 'system_tag', 'version', 'geometry', 'ASCENDING_DESCENDING', 'BEAM_MODE', 'POLARIZATION', 'PERPENDICULAR_BASELINE', 'VERSION', 'FRAME_NUMBER', 'PATH_NUMBER', 'TEMPORAL_BASELINE_DAYS', 'URL', 'PNG_URL', 'start', 'end', 'btemp'], dtype='object')
Command:
By using geopandas, we can vizualize the frames without downloading;
and probably also plot the network, as bperp and btemp are included