Created
August 30, 2019 17:31
-
-
Save blaylockbk/d60f4fce15a7f0475f975fc57da9104d to your computer and use it in GitHub Desktop.
View and download GOES data on AWS with s3fs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Brian Blaylock | |
# Requres `s3fs` | |
# Website: https://s3fs.readthedocs.io/en/latest/ | |
# In Anaconda, download via conda-forge. | |
import s3fs | |
# Use the anonymous credentials to access public data | |
fs = s3fs.S3FileSystem(anon=True) | |
# List contents of GOES-16 bucket. | |
fs.ls('s3://noaa-goes16/') | |
# List specific files of GOES-17 CONUS data (multiband format) on a certain hour | |
# Note: the `s3://` is not required | |
files = np.array(fs.ls('noaa-goes17/ABI-L2-MCMIPC/2019/240/00/')) | |
print(files) | |
# Download the first file, and rename it the same name (without the directory structure) | |
fs.get(files[0], files[0].split('/')[-1]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just wanted to provide a version to load into memory: