Download NASA datasets#
To access data from NASA, you will need an EarthData login (register for free here). There are 3 ways to supply this login info:
you will be prompted to enter in manually when you call a function requiring it.
add the username and password as temporary environment variable which only persist through the current python session
import os
os.environ["EARTHDATA_PASSWORD"] = "<<your password>>"
os.environ["EARTHDATA_USERNAME"] = "<<your username>>"
add the username and password as system environment variable which will always be available. This is done different on each operating system. For Unix, add the following to the end of your
.bashrcfile:
export EARTHDATA_PASSWORD=<<your password>>
export EARTHDATA_USERNAME=<<your username>>
[1]:
from polartoolkit import fetch
[2]:
fetch.groundingline("measures-v2")
[2]:
'/home/mattd/.cache/pooch/polartoolkit/shapefiles/measures/GroundingLine_Antarctica_v02.shp'