Skip to content

No data for 2019 for a tile in a MODIS collection #136

Answered by TomAugspurger
shijithpk asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for the clear example. I think I've confirmed the existence of at least one NetCDF file without a corresponding STAC item:

import planetary_computer
import pystac_client

cc = planetary_computer.get_container_client("modiseuwest", "modis-061")

prefix = "MYD11A1/25/07/2019"
blobs = cc.list_blobs(name_starts_with=prefix)
blob = next(blobs)

print(blob.name)  # MYD11A1/25/07/2019001/MYD11A1.A2019001.h25v07.061.2020342151634.hdf

import requests

item_id = blob.name.split("/")[-1].rsplit(".", 1)[0]
r = requests.get(f"https://planetarycomputer.microsoft.com/api/stac/v1/collections/modis-11A1-061/items/{item_id}")
# url: https://planetarycomputer.microsoft.com/api/stac/v1/collections/mo…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@shijithpk
Comment options

@TomAugspurger
Comment options

@shijithpk
Comment options

Answer selected by shijithpk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants