Query and download PACE or VIIRS data from EarthData
Posted: Wed May 01, 2024 5:05 am
I have implemented a simple query and download function for the EarthData API to get VIIRS and OCI L1B data.
To use the EarthData portal please make an account at https://urs.earthdata.nasa.gov/ and put your credentials in your .netrc file:
Make sure your .netrc file has no group or world read access, i.e. -rw-------. You can set this for example by:
Alternatively you can provide the credentials in a more unsafe manner by setting them in your operating system variables or ACOLITE config.txt file. See the GitHub ReadMe for details.
Before using the functions shown below, make sure you import the acolite distribution in your Python code, for example:
To use the EarthData portal please make an account at https://urs.earthdata.nasa.gov/ and put your credentials in your .netrc file:
Code: Select all
machine urs.earthdata.nasa.gov
login YOUR_LOGIN
password YOUR_PASSWORD
Code: Select all
chmod 600 ~/.netrc
Before using the functions shown below, make sure you import the acolite distribution in your Python code, for example:
Code: Select all
import sys, os
user_home = os.path.expanduser("~")
sys.path.append(user_home+'/git/acolite')
import acolite as ac