Closed Joshdpaul closed 1 year ago
I am using Python 3.11.3 and earthaccess version 0.5.1
Same issue on Python 3.10.10
This is probably related to a Benedict dependency issue, we are moving away from it and will have a new release tomorrow!
@arkottke @Joshdpaul can you try installing v0.5.2
and see if this keeps happening?
conda install -c conda-forge earthaccess=0.5.2
or using pip
pip install earthaccess==0.5.2
It now works for me.
On Fri, Apr 21, 2023 at 7:38 AM Luis López @.***> wrote:
@arkottke https://github.com/arkottke @Joshdpaul https://github.com/Joshdpaul can you try installing v0.5.2 and see if this keeps happening?
conda install -c conda-forge earthaccess=0.5.2
or using pip
pip install earthaccess==0.5.2
— Reply to this email directly, view it on GitHub https://github.com/nsidc/earthaccess/issues/233#issuecomment-1517936147, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH4LM7L4JU4GJIMKNC7S23XCKLXNANCNFSM6AAAAAAXDFRHEA . You are receiving this because you were mentioned.Message ID: @.***>
Installing 0.5.2 fixed this issue for me. Thank you!
However, the results list I just generated shows some other issues. The MODIS granules are listed with file sizes of 0MB (which is not true, as the file download URLs link to .hdf files ~8MB). Should this be opened as a new issue? Or do you think its related to the 0.5.2 update?
import earthaccess
import geopandas as gpd
import xarray as xr
auth = earthaccess.login()
some authentication lines omitted for privacy...
You're now authenticated with NASA Earthdata Login
Using token with expiration date: 06/17/2023
extent = gpd.read_file('/shp/extent_mbg.shp')
poly = extent.to_crs(4326)
xy = poly.bounds.values.tolist()[0]
print(xy)
[-166.28104223150558, 56.411541689521265, -122.80983754793994, 69.07918623548356]
modis_lst_results = earthaccess.search_data(short_name='MYD11A2', version='061', bounding_box=(xy[0], xy[1], xy[2], xy[3]), temporal=('2021-06-01', '2021-06-15'))
Granules found: 27
modis_lst_results[0:2]
[Collection: {'ShortName': 'MYD11A2', 'Version': '061'}
Spatial coverage: {'HorizontalSpatialDomain': {'Geometry': {'GPolygons': [{'Boundary': {'Points': [{'Longitude': -100.03352173756, 'Latitude': 60.0041666666667}, {'Longitude': -80.0285159682453, 'Latitude': 60.0041666666667}, {'Longitude': -116.964383085246, 'Latitude': 69.9958333333333}, {'Longitude': -146.202379163736, 'Latitude': 69.9958333333333}, {'Longitude': -100.03352173756, 'Latitude': 60.0041666666667}]}}]}}}
Temporal coverage: {'RangeDateTime': {'BeginningDateTime': '2021-05-25T00:00:00.000Z', 'EndingDateTime': '2021-06-01T23:59:59.000Z'}}
Size(MB): 0
Data: ['https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/MYD11A2.061/MYD11A2.A2021145.h13v02.061.2021154064507/MYD11A2.A2021145.h13v02.061.2021154064507.hdf'],
Collection: {'ShortName': 'MYD11A2', 'Version': '061'}
Spatial coverage: {'HorizontalSpatialDomain': {'Geometry': {'GPolygons': [{'Boundary': {'Points': [{'Longitude': -120.038560848178, 'Latitude': 60.0041666666667}, {'Longitude': -100.033555078863, 'Latitude': 60.0041666666667}, {'Longitude': -146.202427893183, 'Latitude': 69.9958333333333}, {'Longitude': -175.440423971673, 'Latitude': 69.9958333333333}, {'Longitude': -120.038560848178, 'Latitude': 60.0041666666667}]}}]}}}
Temporal coverage: {'RangeDateTime': {'BeginningDateTime': '2021-05-25T00:00:00.000Z', 'EndingDateTime': '2021-06-01T23:59:59.000Z'}}
Size(MB): 0
Data: ['https://data.lpdaac.earthdatacloud.nasa.gov/lp-prod-protected/MYD11A2.061/MYD11A2.A2021145.h12v02.061.2021154064609/MYD11A2.A2021145.h12v02.061.2021154064609.hdf']]
Downloading the files also shows "0.0 GB" when the total size for these granules should be ~150MB
files = earthaccess.download(results, 'F:/GIS/OTHER/JP/files')
Getting 27 granules, approx download size: 0.0 GB
SUBMITTING | : 100%
27/27 [00:00<00:00, 1476.14it/s]
PROCESSING | : 100%
27/27 [00:22<00:00, 1.35it/s]
COLLECTING | : 100%
27/27 [00:00<00:00, 3856.37it/s]
@Joshdpaul You're right, there is a typo on the result's parser, it should still download the files. I'll be releasing a fixed version this week. Thanks for following up!
Attempting to use
search_data()
with the package readme example returns an unexpected keyword argument error. The granule search seems to work and the number of granules is returned, but the remainder of the function fails and the 'results' variable is not assigned. Any assistance here would be appreciated, thanks!some authentication lines hidden for privacy...
results