nasa数据库cm1数据集_获取下一个地理项目的NASA数据
nasa數(shù)據(jù)庫cm1數(shù)據(jù)集
NASA provides an extensive library of data points that they’ve captured over the years from their satellites. These datasets include temperature, precipitation and more. NASA hosts this data on a website where you can search and grab information as needed, whether you want the data for the whole world or a specific area. The user can choose a certain range of dates, look for aggregate time frames (hours, days, months etc.). The possibilities are limitless.
NASA提供了一個廣泛的數(shù)據(jù)點庫,這些數(shù)據(jù)點是他們多年來從衛(wèi)星中捕獲的。 這些數(shù)據(jù)集包括溫度,降水量等。 NASA將這些數(shù)據(jù)托管在一個網(wǎng)站上,您可以根據(jù)需要搜索和獲取信息,無論您是要使用整個世界還是特定區(qū)域的數(shù)據(jù)。 用戶可以選擇某個日期范圍,查找合計的時間范圍(小時,天,月等)。 可能性是無限的。
In this article, let’s explore this huge resource and I’ll describe a step-by-step process to collect data from the website.
在本文中,讓我們探索這個巨大的資源,我將描述一個分步過程,以從網(wǎng)站收集數(shù)據(jù)。
通用光盤 (GES DISC)
GES DISC stands for NASA Goddard Earth Sciences (GES) Data and Information Services Center (DISC). It is a data repository that hosts remote sensing data about precipitation, hydrology, atmosphere and more. It was designed to enable researchers and application developers to get access to NASA data, which they can then use to do analysis and create applications.
GES DISC代表NASA戈達德地球科學(GES)數(shù)據(jù)和信息服務中心(DISC) 。 它是一個數(shù)據(jù)庫,托管有關(guān)降水,水文,大氣等的遙感數(shù)據(jù)。 它旨在使研究人員和應用程序開發(fā)人員能夠訪問NASA數(shù)據(jù),然后他們可以將其用于分析和創(chuàng)建應用程序。
數(shù)據(jù)采集 (DATA COLLECTION)
Let’s walk through the steps for retrieving data from GES DISC. In this particular article, I’ll walk through the steps for downloading precipitation data and for that, I’ll download the GPM monthly data. GPM stands for Global Precipitation Measurement, a joint venture between JAXA and NASA to capture precipitation data across the globe.
讓我們逐步介紹從GES DISC檢索數(shù)據(jù)的步驟。 在這篇特別的文章中,我將逐步介紹下載降水量數(shù)據(jù)的步驟,為此,我將下載GPM月度數(shù)據(jù)。 GPM代表“全球降水量測量” ,這是JAXA和NASA之間的合資企業(yè),用于捕獲全球的降水量數(shù)據(jù)。
1.登錄 (1. Login)
The data repository is located here. Before you download data, you need to create an account on the earthdata website. Simply create an account on this website, verify yourself and you should be good to go.
數(shù)據(jù)存儲庫位于此處 。 在下載數(shù)據(jù)之前,您需要在Earthdata網(wǎng)站上創(chuàng)建一個帳戶。 只需在此網(wǎng)站上創(chuàng)建一個帳戶,驗證自己,就可以了。
Select the Login button on the top right. If you have an account, log in else select the Register button to get registered.
選擇右上角的登錄按鈕。 如果您有帳戶,請登錄,否則選擇“ 注冊”按鈕進行注冊。
2.搜索 (2. Search)
Once we are logged in, we can get started. The website greets you with a search box with Data Collections selected by default. We are looking for data in this collection itself, so we will let it be and start typing in the search box.
登錄后,即可開始。 該網(wǎng)站會在搜索框中向您打招呼,默認情況下會選中“ 數(shù)據(jù)收集” 。 我們正在此集合中尋找數(shù)據(jù),因此我們將其保留下來并開始在搜索框中輸入內(nèi)容。
Here, I’ll type precipitation in the search box and press the yellow search button to get the available datasets. You’ll notice a loading icon indicating that the system is processing our search query and will return a list of datasets that match the search query.
在這里,我將在搜索框中鍵入降水 ,然后按黃色搜索按鈕以獲取可用的數(shù)據(jù)集。 您會注意到一個加載圖標,指示系統(tǒng)正在處理我們的搜索查詢,并將返回與搜索查詢匹配的數(shù)據(jù)集列表。
GES DISC homepageGES DISC主頁3.探索數(shù)據(jù)集列表 (3. Explore the list of datasets)
Once the search completes, you will see a table of various datasets that match the query and a filters section on the left. The table includes information such as image, dataset name, sources, spatial radius, start of data collection date and end of data collection date. Based on your specific requirements, you can use the filters on the left and select conditions that help you get the most precise data.
搜索完成后,您將在左側(cè)看到包含與查詢匹配的各種數(shù)據(jù)集的表格。 該表包含諸如圖像,數(shù)據(jù)集名稱,來源,空間半徑,數(shù)據(jù)收集日期的開始和數(shù)據(jù)收集日期的結(jié)束之類的信息。 根據(jù)您的特定要求,您可以使用左側(cè)的過濾器并選擇條件以幫助您獲得最精確的數(shù)據(jù)。
Precipitation降水的搜索結(jié)果In this example, I’m looking for GPM monthly data. So, in the filters, under Project, I selected GPM. This filtered the datasets that belong to GPM. From the Time Res. column, I looked for the dataset which had 1 month resolution. This means that data is aggregated on a monthly basis.
在此示例中,我正在尋找GPM每月數(shù)據(jù)。 因此,在過濾器的Project下,我選擇了GPM。 這過濾了屬于GPM的數(shù)據(jù)集。 從時間資源。 列,我查找了具有1個月分辨率的數(shù)據(jù)集。 這意味著數(shù)據(jù)是每月匯總的。
Precipitation with GPM filter降水搜索結(jié)果From the list, it’s the third dataset called GPM IMERG Final Precipitation L3 1 month 0.1 degree x 0.1 degree V06 (GPM_3IMERGM 06). To explore more about this dataset, I simply click on its name (which is a hyperlink) and it takes me to the dataset page.
從列表中,它是第三個數(shù)據(jù)集,稱為GPM IMERG最終降水L3 1個月0.1度x 0.1度V06(GPM_3IMERGM 06) 。 要探索有關(guān)此數(shù)據(jù)集的更多信息,我只需單擊其名稱(這是一個超鏈接),便會帶我到數(shù)據(jù)集頁面。
4.瀏覽數(shù)據(jù)集頁面 (4. Explore the dataset page)
The page has detailed information about the dataset along with an image. This is followed by the summary of the dataset (referred to as Product). The most essential parts are the buttons we see on the right side of the screen. You can explore the various services and more but we are interested in the link Subset / Get Data. This is the step where we get started with downloading the data. Click on this link.
該頁面具有有關(guān)數(shù)據(jù)集的詳細信息以及圖像。 接下來是數(shù)據(jù)集的摘要(稱為Product )。 最重要的部分是我們在屏幕右側(cè)看到的按鈕。 您可以探索各種服務以及更多服務,但是我們對鏈接Subset / Get Data感興趣。 這是我們開始下載數(shù)據(jù)的步驟。 點擊此鏈接。
Dataset page數(shù)據(jù)集頁面5.選擇數(shù)據(jù) (5. Select data)
On clicking the link, a popup shows up as seen in the image below.
單擊鏈接后,將彈出一個彈出窗口,如下圖所示。
Popup with download options帶有下載選項的彈出窗口The dataset we get is pretty huge because it captures information for the whole globe across several years. A good idea is to select a certain range of dates that you’re looking for and certain area of the globe.
我們獲得的數(shù)據(jù)集非常龐大,因為它可以捕獲幾年來全球的信息。 一個好主意是選擇您要查找的特定日期范圍和全球特定區(qū)域。
In the example here, I’ll capture all the original files, which means all the variables they have. I’ll refine the range from January 1, 2001 to December 31, 2020. Lastly, based on your selection above, you might see certain options for the Output format. As I am selecting original files, I only see HDF5.
在這里的示例中,我將捕獲所有原始文件,這意味著它們具有所有變量。 我將細化2001年1月1日至2020年12月31日的范圍。最后,根據(jù)上面的選擇,您可能會看到Output格式的某些選項。 在選擇原始文件時,我只會看到HDF5。
Selecting specific data out of the complete dataset從完整的數(shù)據(jù)集中選擇特定數(shù)據(jù)I’ve worked with HDF5 file format and there is a very simple package h5py which enables you to read these files directly into python. But to just view these files, a popular software, HDFView is often used.
我使用的是HDF5文件格式,有一個非常簡單的軟件包h5py ,使您可以將這些文件直接讀入python。 但是,為了僅查看這些文件,通常使用HDFView 。
Next, press the button Get Data and it’ll start running to generate a number of links that will allow you to download the data.
接下來,按下獲取數(shù)據(jù)按鈕,它將開始運行以生成許多鏈接,這些鏈接使您可以下載數(shù)據(jù)。
6.下載資料 (6. Download data)
The popup shows a list of links, each corresponding to one data file based on the selection. There are two ways to download data from here.
彈出窗口顯示一個鏈接列表,每個鏈接都基于選擇對應一個數(shù)據(jù)文件。 有兩種從此處下載數(shù)據(jù)的方法。
Download links for the dataset下載數(shù)據(jù)集的鏈接6.1一次單個文件 (6.1 Single file at a time)
Click on the link of the data file you want to download. If you’re logged in, the dataset will start downloading. It is fast, simple and requires no extra steps for downloading data.
單擊要下載的數(shù)據(jù)文件的鏈接。 如果您已登錄,則數(shù)據(jù)集將開始下載。 它快速,簡單,不需要額外的步驟來下載數(shù)據(jù)。
6.2一次多個文件 (6.2 Multiple files at once)
However, if you are downloading multiple files (say 30–40 files), this is not the most efficient way. Using curl, you can download all the files using just one single command.
但是,如果要下載多個文件(例如30–40個文件),則這不是最有效的方法。 使用curl ,您只需一個命令即可下載所有文件。
curl is a command line tool for transferring data using various network protocols.
curl是用于使用各種網(wǎng)絡協(xié)議傳輸數(shù)據(jù)的命令行工具。
However, to use curl to download these data files, we need to perform some steps for the first time. The complete instructions vary by operating system and are available here.
但是,要使用curl下載這些數(shù)據(jù)文件,我們需要第一次執(zhí)行一些步驟。 完整的說明因操作系統(tǒng)而異,可在此處獲得 。
Here’s a general overview of the steps in the most easy way to understand terms (as followed on MacOS):
以下是最容易理解術(shù)語的步驟的一般概述(在MacOS上如下):
Get all links
獲取所有鏈接
Above the list of links, you’ll see a link called Download links list. When you click on it, a new tab opens up with all the links in one place. Select and copy all the text and save it to a file called url.txt on your machine.
在鏈接列表上方,您會看到一個名為下載鏈接列表的鏈接 。 當您單擊它時,將打開一個新選項卡,其中所有鏈接都放在一個位置。 選擇并復制所有文本,然后將其保存到計算機上的url.txt文件中。
Create required files
創(chuàng)建所需的文件
In the terminal, perform the following:
在終端中,執(zhí)行以下操作:
Go to your home using cd ~
使用cd ~回家
Create a new file .netrc using touch .netrc and another file for keeping track of session during multiple curl calls using touch .urs_cookies
使用touch .netrc創(chuàng)建一個新文件.netrc,并使用touch .urs_cookies創(chuàng)建另一個文件以在多次卷曲調(diào)用期間跟蹤會話
We will now save the login credentials inside this file. Type the command echo “machine urs.earthdata.nasa.gov login <uid> password <password>” >> .netrc while replacing <uid> with your username and <password> with your password
現(xiàn)在,我們將登錄憑據(jù)保存在該文件中。 鍵入命令echo “machine urs.earthdata.nasa.gov login <uid> password <password>” >> .netrc同時用用戶名替換<uid>和用密碼替換<password>
Change its access permissions using chmod 0600 .netrc
使用chmod 0600 .netrc更改其訪問權(quán)限
Type the command cat url.txt | tr -d ‘\r’ | xargs -n 1 curl -LJO -n -c ~/.urs_cookies -b ~/.urs_cookies in the terminal where your file url.txt is located and all files will be downloaded one after the other.
鍵入命令cat url.txt | tr -d '\r' | xargs -n 1 curl -LJO -n -c ~/.urs_cookies -b ~/.urs_cookies cat url.txt | tr -d '\r' | xargs -n 1 curl -LJO -n -c ~/.urs_cookies -b ~/.urs_cookies cat url.txt | tr -d '\r' | xargs -n 1 curl -LJO -n -c ~/.urs_cookies -b ~/.urs_cookies ,位于文件url.txt所在的終端中,所有文件將一個接一個地下載。
wget is also another option but I haven’t used it as curl performs well and I didn’t feel the need to try wget.
wget也是另一種選擇,但是我沒有使用它,因為curl表現(xiàn)良好,而且我不認為需要嘗試wget。
7.查看數(shù)據(jù) (7. View data)
Once the HDF5 files are downloaded, you can use HDFView to open these files and look at the dataset. You will need an account to download this software.
下載HDF5文件后,您可以使用HDFView打開這些文件并查看數(shù)據(jù)集。 您將需要一個帳戶來下載該軟件。
The data can be downloaded in other formats as well such as netCDF, ASCII etc. and there are ways to work with these files too but I haven’t worked with them personally.
數(shù)據(jù)可以以其他格式下載,例如netCDF,ASCII等。并且也可以使用這些文件,但是我個人還沒有使用它們。
HDFViewHDF視圖And we’re all set!!
而且我們都準備好了!!
結(jié)論 (Conclusion)
You now have a set of data files containing resourceful data collected by NASA over the years, which you can use for your own work. In an upcoming article, I will describe the steps to read a HDF5 file in Python and understand its components to use the data.
現(xiàn)在,您將擁有一組數(shù)據(jù)文件,其中包含NASA多年來收集的資源豐富的數(shù)據(jù),您可以將其用于自己的工作。 在下一篇文章中,我將描述在Python中讀取HDF5文件并了解其使用數(shù)據(jù)的組件的步驟。
Hope this was insightful. If you have any questions, ideas or suggestions, please mention them in the comments.
希望這是有見地的。 如果您有任何問題,想法或建議,請在評論中提及。
翻譯自: https://towardsdatascience.com/getting-nasa-data-for-your-next-geo-project-9d621243b8f3
nasa數(shù)據(jù)庫cm1數(shù)據(jù)集
總結(jié)
以上是生活随笔為你收集整理的nasa数据库cm1数据集_获取下一个地理项目的NASA数据的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 经常梦到一个人是想念还是遗忘
- 下一篇: 做梦梦到抓狐狸什么意思