import sys
'../src') sys.path.append(
S-MODE Workshop: Science Case Study Airborne Part 1
imported on: 2024-09-05
This notebook is from a different repository in NASA’s PO.DAAC, 2022-SMODE-Open-Data-Workshop
The original source for this document is https://github.com/podaac/2022-SMODE-Open-Data-Workshop/blob/main/notebooks/DownloadDopplerScattData.ipynb
Downloading DopplerScatt Data
Use this notebook, appropriately modified for the dates of interest and the location where you want to store the data, to download DopplerScatt data from the S-MODE Pilot experiment that occurred in October and November 2021.
Since this notebook installs packages via pip, you may want to run it in a separate environment to avoid conflicts with your existing installations.
from download_dopplerscatt_data import setup_netrc_file, download_dopplerscatt_data
Create a netrc file, if non-existent.
Prior to doing this, you must obtain an account with NASA Earthdata.
= setup_netrc_file() netrc_file
netrc file not found, please login into NASA Earthdata:
Enter NASA Earthdata Login Username: ········
Enter NASA Earthdata Login Password: ········
nterc file written to /Users/erodrigu/.netrc
Install the PODAAC download ustility using pip
!pip install podaac-data-subscriber > pip.log
Use the DopplerScatt utility program to download the data
Modify the destination directory, starting and ending dates (using the same format shown), and the download utility path (although this should not need to be modified).
= '../data/SMODE_L2_DOPPLERSCATT_WINDS_CURRENT_V1',
download_dopplerscatt_data(data_dir = '2021-11-03T00:00:00Z',
start_date = '2021-11-04T00:00:00Z',
end_date ='podaac-data-downloader') downloader
[2022-11-27 10:44:34,150] {podaac_data_downloader.py:155} INFO - NOTE: Making new data directory at ../data/SMODE_L2_DOPPLERSCATT_WINDS_CURRENT_V1(This is the first run.)
[2022-11-27 10:44:35,376] {podaac_data_downloader.py:243} INFO - Found 1 total files to download
[2022-11-27 10:44:58,149] {podaac_data_downloader.py:276} INFO - 2022-11-27 10:44:58.149797 SUCCESS: https://archive.podaac.earthdata.nasa.gov/podaac-ops-cumulus-protected/SMODE_L2_DOPPLERSCATT_WINDS_CURRENT_V1/dopplerscatt_20211103_125259.tomoL2CF.nc
[2022-11-27 10:44:58,150] {podaac_data_downloader.py:287} INFO - Downloaded Files: 1
[2022-11-27 10:44:58,150] {podaac_data_downloader.py:288} INFO - Failed Files: 0
[2022-11-27 10:44:58,150] {podaac_data_downloader.py:289} INFO - Skipped Files: 0
[2022-11-27 10:44:59,026] {podaac_access.py:122} INFO - CMR token successfully deleted
[2022-11-27 10:44:59,026] {podaac_data_downloader.py:299} INFO - END
Succesfully downloaded desired DopplerScatt data.
Cleanup auxiliary files, if desired
The netrc file is not secure, so you may want to remove it if you are concerned about the security of your Earthdata credentials. WARNING This will remove your existing netrc file, which may already contain other information in addition to your Earthdata credentials.
!rm pip.log $netrc_file