Skip to content

Commit

Permalink
Built site for gh-pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Quarto GHA Workflow Runner committed Aug 29, 2024
1 parent 3008713 commit bfcf069
Show file tree
Hide file tree
Showing 4 changed files with 124 additions and 124 deletions.
2 changes: 1 addition & 1 deletion .nojekyll
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b7c6a63a
97c68fd7
2 changes: 1 addition & 1 deletion notebooks/SearchDownload_SWOTviaCMR.html
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ <h4 class="anchored" data-anchor-id="swot-level-2-karin-high-rate-version-2.0-da
<pre><code>Granules found: 6</code></pre>
</div>
</div>
<p>During the science orbit, a pass will be repeated once every 21 days. A particular location may have different passes observe it within the 21 days, however. See the <a href="https://swot.jpl.nasa.gov/mission/swath-visualizer/">SWOT swath visualizer</a> for your location!</p>
<p>During the science orbit, a pass will be repeated once every 21 days. A particular location may have different passes observe it within the 21 days, however.</p>
</section>
</section>
<section id="download-the-data-into-a-folder" class="level3">
Expand Down
2 changes: 1 addition & 1 deletion search.json
Original file line number Diff line number Diff line change
Expand Up @@ -4876,7 +4876,7 @@
"href": "notebooks/SearchDownload_SWOTviaCMR.html#requirements",
"title": "Search and Download SWOT Data via earthaccess",
"section": "Requirements",
"text": "Requirements\n\n1. Compute environment\nThis tutorial can be run in the following environments: - Local compute environment e.g. laptop, server: this tutorial can be run on your local machine\n\n\n2. Earthdata Login\nAn Earthdata Login account is required to access data, as well as discover restricted data, from the NASA Earthdata system. Thus, to access NASA data, you need Earthdata Login. Please visit https://urs.earthdata.nasa.gov to register and manage your Earthdata Login account. This account is free to create and only takes a moment to set up.\n\n\nImport libraries\n\nimport geopandas as gpd\nimport glob\nfrom pathlib import Path\nimport pandas as pd\nimport os\nimport zipfile\nimport earthaccess\n\nIn this notebook, we will be calling the authentication in the below cell.\n\nauth = earthaccess.login() \n\n\n\nSearch for SWOT data links\nWe want to find the SWOT files for a particular pass over North America.\nEach dataset has it’s own unique shortname, which can be used to search earthaccess. Shortnames can be found on dataset landing pages or Earthdata Search Collections.\n\nSWOT Level 2 KaRIn High Rate Version 2.0 Datasets:\n\nWater Mask Pixel Cloud NetCDF - SWOT_L2_HR_PIXC_2.0\nWater Mask Pixel Cloud Vector Attribute NetCDF - SWOT_L2_HR_PIXCVec_2.0\nRiver Vector Shapefile - SWOT_L2_HR_RiverSP_2.0\nLake Vector Shapefile - SWOT_L2_HR_LakeSP_2.0\nRaster NetCDF - SWOT_L2_HR_Raster_2.0\n\nLet’s start our search for River Vector Shapefiles with a particular pass, pass 013. SWOT files come in “reach” and “node” versions in the same collection, here we want the 10km reaches rather than the nodes. We will also only get files for North America, or ‘NA’ and call out a specific pass number that we want.\n\nresults = earthaccess.search_data(short_name = 'SWOT_L2_HR_RIVERSP_2.0', \n #temporal = ('2024-02-01 00:00:00', '2024-02-29 23:59:59'), # can also specify by time\n granule_name = '*Reach*_013_NA*') # here we filter by Reach files (not node), pass=013, continent code=NA\n\nGranules found: 6\n\n\nDuring the science orbit, a pass will be repeated once every 21 days. A particular location may have different passes observe it within the 21 days, however. See the SWOT swath visualizer for your location!\n\n\n\nDownload the Data into a folder\n\nearthaccess.download(results, \"./datasets/data_downloads/SWOT_files/\")\nfolder = Path(\"./datasets/data_downloads/SWOT_files\")\n\n Getting 6 granules, approx download size: 0.0 GB\nAccessing cloud dataset using dataset endpoint credentials: https://archive.swot.podaac.earthdata.nasa.gov/s3credentials\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.zip\n\n\n\n\nShapefiles come in a .zip format, and need to be unzipped in the existing folder\n\nfor item in os.listdir(folder): # loop through items in dir\n if item.endswith(\".zip\"): # check for \".zip\" extension\n zip_ref = zipfile.ZipFile(f\"{folder}/{item}\") # create zipfile object\n zip_ref.extractall(folder) # extract file to dir\n zip_ref.close() # close file\n\n\nos.listdir(folder)\n\n['SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.zip',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.shx',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.shp',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.prj',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.prj']"
"text": "Requirements\n\n1. Compute environment\nThis tutorial can be run in the following environments: - Local compute environment e.g. laptop, server: this tutorial can be run on your local machine\n\n\n2. Earthdata Login\nAn Earthdata Login account is required to access data, as well as discover restricted data, from the NASA Earthdata system. Thus, to access NASA data, you need Earthdata Login. Please visit https://urs.earthdata.nasa.gov to register and manage your Earthdata Login account. This account is free to create and only takes a moment to set up.\n\n\nImport libraries\n\nimport geopandas as gpd\nimport glob\nfrom pathlib import Path\nimport pandas as pd\nimport os\nimport zipfile\nimport earthaccess\n\nIn this notebook, we will be calling the authentication in the below cell.\n\nauth = earthaccess.login() \n\n\n\nSearch for SWOT data links\nWe want to find the SWOT files for a particular pass over North America.\nEach dataset has it’s own unique shortname, which can be used to search earthaccess. Shortnames can be found on dataset landing pages or Earthdata Search Collections.\n\nSWOT Level 2 KaRIn High Rate Version 2.0 Datasets:\n\nWater Mask Pixel Cloud NetCDF - SWOT_L2_HR_PIXC_2.0\nWater Mask Pixel Cloud Vector Attribute NetCDF - SWOT_L2_HR_PIXCVec_2.0\nRiver Vector Shapefile - SWOT_L2_HR_RiverSP_2.0\nLake Vector Shapefile - SWOT_L2_HR_LakeSP_2.0\nRaster NetCDF - SWOT_L2_HR_Raster_2.0\n\nLet’s start our search for River Vector Shapefiles with a particular pass, pass 013. SWOT files come in “reach” and “node” versions in the same collection, here we want the 10km reaches rather than the nodes. We will also only get files for North America, or ‘NA’ and call out a specific pass number that we want.\n\nresults = earthaccess.search_data(short_name = 'SWOT_L2_HR_RIVERSP_2.0', \n #temporal = ('2024-02-01 00:00:00', '2024-02-29 23:59:59'), # can also specify by time\n granule_name = '*Reach*_013_NA*') # here we filter by Reach files (not node), pass=013, continent code=NA\n\nGranules found: 6\n\n\nDuring the science orbit, a pass will be repeated once every 21 days. A particular location may have different passes observe it within the 21 days, however.\n\n\n\nDownload the Data into a folder\n\nearthaccess.download(results, \"./datasets/data_downloads/SWOT_files/\")\nfolder = Path(\"./datasets/data_downloads/SWOT_files\")\n\n Getting 6 granules, approx download size: 0.0 GB\nAccessing cloud dataset using dataset endpoint credentials: https://archive.swot.podaac.earthdata.nasa.gov/s3credentials\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.zip\nDownloaded: ./datasets/data_downloads/SWOT_files/SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.zip\n\n\n\n\nShapefiles come in a .zip format, and need to be unzipped in the existing folder\n\nfor item in os.listdir(folder): # loop through items in dir\n if item.endswith(\".zip\"): # check for \".zip\" extension\n zip_ref = zipfile.ZipFile(f\"{folder}/{item}\") # create zipfile object\n zip_ref.extractall(folder) # extract file to dir\n zip_ref.close() # close file\n\n\nos.listdir(folder)\n\n['SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.zip',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.shx',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.shp',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.prj',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_009_013_NA_20240104T143502_20240104T143504_PIC0_01.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.prj',\n 'SWOT_L2_HR_RiverSP_Reach_010_013_NA_20240125T112008_20240125T112010_PIC0_02.shp.xml',\n 'SWOT_L2_HR_RiverSP_Reach_007_013_NA_20231123T210452_20231123T210454_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.zip',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.shx',\n 'SWOT_L2_HR_RiverSP_Reach_008_013_NA_20231214T174955_20231214T174957_PIC0_01.shp',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.dbf',\n 'SWOT_L2_HR_RiverSP_Reach_011_013_NA_20240215T080513_20240215T080514_PIC0_01.prj']"
},
{
"objectID": "notebooks/SWOT-EA-2021/Colocate_satellite_insitu_ocean.html#use-case-co-locate-satellite-and-in-situ-data-for-cross-validation",
Expand Down
Loading

0 comments on commit bfcf069

Please sign in to comment.