Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
eeholmes committed Sep 17, 2023
2 parents c5950bc + 60c4331 commit 47616dc
Show file tree
Hide file tree
Showing 10 changed files with 11,988 additions and 6,994 deletions.
16 changes: 10 additions & 6 deletions python-notebooks/00_NASA_Earthdata_Authentication.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 1,
"id": "induced-shell",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from netrc import netrc\n",
Expand All @@ -70,9 +72,11 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 2,
"id": "signal-slide",
"metadata": {},
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"urs = 'urs.earthdata.nasa.gov' # Earthdata URL endpoint for authentication\n",
Expand Down Expand Up @@ -125,11 +129,11 @@
{
"cell_type": "code",
"execution_count": null,
"id": "adjusted-render",
"id": "ac04c010-07fa-4324-9f10-9b392083eab4",
"metadata": {},
"outputs": [],
"source": [
"!ls -al ~/"
"!"
]
}
],
Expand Down
119 changes: 13 additions & 106 deletions python-notebooks/01_ERA5_S3_Downloader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 1,
"id": "06eece7e-7ec0-4405-8962-46fb8abf5c67",
"metadata": {
"tags": []
Expand Down Expand Up @@ -179,7 +179,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 2,
"id": "0a4339b9-a003-4861-a020-b8e33e5b9c4b",
"metadata": {
"tags": []
Expand All @@ -192,7 +192,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 3,
"id": "be58d7b4-9bf3-4351-a578-c4acca6a8575",
"metadata": {
"tags": []
Expand Down Expand Up @@ -231,123 +231,30 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 4,
"id": "9f5de92b-639f-48f9-b828-bd1029b6e762",
"metadata": {
"collapsed": true,
"jupyter": {
"outputs_hidden": true
},
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Downloading 2000/01/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/02/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/03/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/04/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/05/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/06/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/07/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/08/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/09/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/10/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/11/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/12/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/01/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/02/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/03/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/04/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/05/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/06/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/07/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/08/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/09/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/10/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/11/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/01/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/02/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/03/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/04/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/05/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/06/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/07/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/08/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/09/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/10/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/11/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/12/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/01/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/02/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/03/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/04/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/05/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/06/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/07/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/08/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/09/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/10/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2001/11/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2000/01/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/02/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/03/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/04/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/05/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/06/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/07/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/08/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/09/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/10/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/11/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/12/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/01/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/02/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/03/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/04/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/05/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/06/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/07/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/08/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/09/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/10/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2001/11/data/sea_surface_temperature.nc from S3...\n",
"Downloading 2000/01/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/02/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/03/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/04/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/05/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/06/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/07/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/08/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/09/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/10/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/11/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2000/12/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/01/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/02/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/03/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/04/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/05/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/06/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/07/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/08/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/09/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/10/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/11/data/air_temperature_at_2_metres.nc from S3...\n",
"Downloading 2001/12/data/air_temperature_at_2_metres.nc from S3...\n"
"Downloading 2003/01/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2003/02/data/eastward_wind_at_10_metres.nc from S3...\n",
"Downloading 2003/01/data/northward_wind_at_10_metres.nc from S3...\n",
"Downloading 2003/02/data/northward_wind_at_10_metres.nc from S3...\n"
]
}
],
"source": [
"# download data for 4 variables we need\n",
"# download data for 4 variables we need \n",
"# consult available names in the table above in the file name column (remove .nc)\n",
"download_era5_s3(var_era5='eastward_wind_at_10_metres', month_start='2000-01', month_end='2001-12')\n",
"download_era5_s3(var_era5='northward_wind_at_10_metres', month_start='2000-01', month_end='2001-12')\n",
"download_era5_s3(var_era5='sea_surface_temperature', month_start='2000-01', month_end='2001-12')\n",
"download_era5_s3(var_era5='air_temperature_at_2_metres', month_start='2000-01', month_end='2002-01')"
"\n",
"# month_end is not included in dataset (right-exclusive)\n",
"download_era5_s3(var_era5='eastward_wind_at_10_metres', month_start='2003-01', month_end='2003-03')\n",
"download_era5_s3(var_era5='northward_wind_at_10_metres', month_start='2003-01', month_end='2003-03')"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion python-notebooks/01_ERDDAP_Downloader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"id": "6d6a1f05-4077-4273-97e2-47506a254915",
"metadata": {},
"source": [
"**NOTE: YOU CAN SKIP THIS NOTEBOOK IF YOU ONLY WANT TO DOWNLOAD SAMPLE DATA OF OUR DATASET SINCE WE DO NOT USE ANY DATA FROM ERDDAP IN OUR FINAL PRODUCT.**\n",
"**WE DO NOT USE ANY DATA GENERATED FROM THIS NOTEBOOK**\n",
"\n",
"This tutorial serves to provide one of many ways a user can download data from NOAA's ERDDAP HTML link template. Unlike NASA's EarthData, you don't need to register an account to download data from NOAA ERRDAP."
]
Expand Down
8 changes: 8 additions & 0 deletions python-notebooks/01_MOTU_Downloader.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@
"### Written by Minh Phan"
]
},
{
"cell_type": "markdown",
"id": "b229206e-3d01-40d8-b20c-f5613fc481e1",
"metadata": {},
"source": [
"**WE DO NOT USE DATA GENERATED FROM THIS NOTEBOOK IN OUR DEMO**"
]
},
{
"cell_type": "markdown",
"id": "a3702a31-b876-4e40-990a-4ba08abd9232",
Expand Down
Loading

0 comments on commit 47616dc

Please sign in to comment.