Thanks very much! Got a new issue here,
I can successfully download data from '
https://cmr.earthdata.nasa.gov/stac/LANCEMODIS' using my EDL token with the following code, but it won't work for the CLDMSK_NRT data:
edl_token = 'my token'
headers = {'Authorization': f'Bearer {edl_token}'}
response = requests.get(item_url, headers=headers)
if response.status_code == 200:
filename = 'Data/' + item_url.split('/')[-1]
with open(filename, 'wb') as file:
for chunk in response.iter_content(chunk_size=1024):
file.write(chunk)
print(f'Downloaded: {filename}')
else:
print(f'Failed to download: {item_url}')
For example, this link
https://sips-data.ssec.wisc.edu/nrt/47710112/CLDMSK_L2_VIIRS_SNPP.A2023135.0806.001.nrt.nc I can manually download the file with my Earthdata account logged in, but won't work with the above code and my EDL token. Shall I use a different token or code? Thank you.