Command Search Method

Command search method overview

File searches can be performed from the user's terminal.
The user's information must be sent along with the search, and the parameters should be stored in a cookie.

Command search reference

URL: https://product.gosat-gw.nies.go.jp/product_search/api/cui-search/

Parameters

Parameter Item name data type description value
level process level integer Specify the process level to the request 2: L1B
3: L2
mode observation mode integer Specify the observation mode to the request 1: Wide Mode
2: Focus Mode
product product name string Specify the product name to the request GWT3W_L1B
GWT3F_L1B
GWT3W_L2_NO2
GWT3F_L2_NO2
GWT3F_L2_NO2_QD
GWT3W_L2_GHG
GWT3F_L2_GHG
GWT3F_L2_GHG_QD
format request format integer Specify the output format of the search results 1: plane text (default)
2: json
3: csv
version version integer Specify the version to the request 1: both (default)
2: current
3: previous
area area select method integer Select the region using the specific search method 1: none (default)
2: point
3: rectangle
start search start date string Specify the search start date yyyy-mm-dd
end search end date string Specify the search end date yyyy-mm-dd
path path no string Searches for products matching the specified path no 01,02,04,12
obsreqid observation request ID string Searches for products matching the specified observation request ID 0011
lat latitude floating point Specify the latitude you wish to search. This is required when selecting a point. (ex)35.41
lon longitude floating point Specify the longitude you wish to search. This is required when selecting a point. (ex)139.41
nlat north latitude floating point Specify the north latitude you wish to search. This is required when selecting a rectangle. (ex)45.33
wlon west longitude floating point Specify the west longitude you wish to search. This is required when selecting a rectangle. (ex)122.55
slat south latitude floating point Specify the south latitude you wish to search. This is required when selecting a rectangle. (ex)20.25
elon east longitude floating point Specify the east longitude you wish to search. This is required when selecting a rectangle. (ex)153.59
Python sample code

Sample code to perform a download function in Python.
The requests module must be installed.


        import requests
        
        cui_search_url = "https://product.gosat-gw.nies.go.jp/product_search/api/cui-search/"
        

        cookies = {
            "mail": "project_user@prototype.demo",
            "password": "project_user"
        }

        payload = {
            "level": 2,
            "mode": 1,
            "product": "GWT3F_L1B",
            "format":3,
            "version":1,
            "area":1,
            "start": "",
            "end": ""
            }


        urlData = requests.get(cui_search_url, params=payload, cookies=cookies)

        if urlData.status_code == requests.codes.ok:
            print(urlData)
            print(type(urlData))
            print(urlData.headers["Content-Type"])
            print(urlData.text)
        else:
            urlData.raise_for_status()

      
Command download method overview

File downloads can be performed from the user's terminal.
It is intended to be used after selecting the file you wish to download through a Command search or a Browser search.
The download must be sent with the user's information and the parameters must be stored in a cookie.

Command download reference

URL: https://product.gosat-gw.nies.go.jp/product_search/api/cui-download/

Parameters

Parameter Item name data type description value
filename request filename string Specify the name of the file to download
Python sample code

Sample code to perform a Command download in Python.
The requests module must be installed.


        import requests
        
        cui_download_url = "https://product.gosat-gw.nies.go.jp/product_search/api/cui-download/"
        

        cookies = {
            "mail": "project_user@prototype.demo",
            "password": "project_user"
            }

        filelist = [
            "TANSO3_202201021530001JO1F35000200_1BP00_000001.h5",
            "TANSO3_202201090930007JO1F35000800_1BP00_000001.h5",
            "TANSO3_202201031830002JO1F35000300_1BP00_000001.h5"
            ]

        for filename in filelist:

            payload = {"filename": filename}
            urlData = requests.get(cui_download_url, stream=True, params=payload, cookies=cookies)

            loopcounter = 0

            if urlData.status_code == requests.codes.ok:
                with open(filename, 'wb') as f:
                    for chunk in urlData.iter_content(chunk_size=4096):
                        if loopcounter % 1000 == 0:
                            print('--- loop count: %s ---' % (loopcounter))
                        if chunk:
                            f.write(chunk)
                            f.flush()
                        loopcounter += 1
            else:
                urlData.raise_for_status()