You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The jupyter notebook on "How to Find and Plot Level 2 Data from Multiple Granules on a Map using Python" can be modified to create a new How-To document that might be titled "How to Find and Plot at time series Level 2 Data from Multiple Granules using Python".
The text was updated successfully, but these errors were encountered:
I like the state of the notebook so far! I do have some suggestions, before I can make formatting edits:
For the get_CMRgranurls function, lets make it so that it only returns the HTTPS urls. This will make it a bit more readable and will avoid issues where users will try to grab the S3 URLs when not in us-west-2.
Let's replace the wget call with requests. I want to make it so that non-Python methods are not used when downloading granules in Jupyter Notebooks. Here's some code that can be used instead, which will work if a .netrc file is present:
datadir = 'granules'
os.makedirs(datadir, exist_ok=True)
with open('dataurls.txt', 'r') as file:
urls = file.readlines()
for url in urls:
url = url.strip()
filename = os.path.join(datadir, os.path.basename(url))
if not os.path.exists(filename):
response = requests.get(url)
with open(filename, 'wb') as f:
f.write(response.content)
Great work so far! Thanks for taking this project up.
The jupyter notebook on "How to Find and Plot Level 2 Data from Multiple Granules on a Map using Python" can be modified to create a new How-To document that might be titled "How to Find and Plot at time series Level 2 Data from Multiple Granules using Python".
The text was updated successfully, but these errors were encountered: