fraymio / modis-tools

Tools for working with the MODIS API and MODIS data.
Apache License 2.0
23 stars 12 forks source link

cannot download MOD35L2/MYD35L2 data #59

Closed fowill closed 1 month ago

fowill commented 1 month ago

Describe the bug I cannot download MOD35L2/MYD35L2 data in CollectionApi.query(), CollectionApi.query(short_name="MOD35_L2", version="061") returns null instead of collections. MOD35L2 is offical dataset available at https://ladsweb.modaps.eosdis.nasa.gov/archive/allData/61/MOD35_L2/ I can still download the MOD13A1 data in the sample code.

Code from modis_tools.auth import ModisSession from modis_tools.resources import CollectionApi, GranuleApi from modis_tools.granule_handler import GranuleHandler

username = "" password = ""

session = ModisSession(username=username, password=password)

collection_client = CollectionApi(session=session) collections = collection_client.query(short_name="MOD35_L2", version="061")

granule_client = GranuleApi.from_collection(collections[0], session=session)

bbox = [-125.0, 24.0, -66.5, 49.5]

bbox_granules = granule_client.query(start_date="2020-01-01", end_date="2020-12-31", bounding_box=bbox)

GranuleHandler.download_from_granules(bbox_granules, session)

fowill commented 1 month ago

MOD35_L2 has differernt version collections = collection_client.query(short_name="MOD35_L2", version="6.1")