You are here: Home Data Tools and services Select a list of orbit files on space/time criteria

Select a list of orbit files on space/time criteria

The following script is intended to retrieve the list and urls of the orbit files of a given product matching a user defined area and time period of interest.

The getgranulelist script

This script is written in python language and uses standard packages. It has been tested with python2.6 and python2.7, slight changes may be necessary for a different version. The main task of the script is to build the URL of the query to the webservice offering this operation and then calling this URL, so it can be very easily adapted to any of your favorite language. An example of such a call is given below.In case of any issue, feel free to This email address is being protected from spambots. You need JavaScript enabled to view it. .

Please download the script here.

Usage

Usage: getgranulelist [options]
Options:
-h, --help
show this help message and exit
-p identifier, --product=identifier
collection (dataset) to search for granules
-d date,date, --date=date,date
start and end dates for which to the search the dataset granules, expressed as <start,stop> with each date as <YYYY-MM-DDThh:mm:ss>
-b minLat,maxLat,minLon,maxLon, --bbox= minLat,maxLat,minLon,maxLon
geographical selection frame, expressed as <minLat,maxLat,minLon,maxLon> with longitudes (between -180 and 180) and latitudes (between -90 and 90) in degrees (ex: --bbox=-80/80/-180/180)
-l, --list
list some of the available products
-u, --url
list also the available URLs for each product

Example

Example 1

getting orbit files (L2P) for geophysical product from ERS-1 altimeter (product id = GW_L2P_ALT_ERS1_GDR, refer to the product description pages or use getgranulelist --list to see available products), in a 60S-60N 100W-0E geographical area on 1st February 1994. The --url option will display the corresponding file FTP link in addition to the file name.

getgranulelist --product=GW_L2P_ALT_ERS1_GDR --date=1994-02-01T00:00:00,1994-02-02T00:00:00 --bbox=-60.,60.,-100.,0. --url

 

The script will return a list of possible URLs for this product (notes that if different URLs are available, they are all listed so here you get a mix of ftp and opendap URLs as the same data files are available through both protocols) :

QUERYING..... http://www.ifremer.fr/naiad/naiad/services-2.3.2/index.php?method=GetListOfGranules&AUTHENTICATION=guest&TIME=2015-01-01T00:00:00/2015-01-03T00:00:00&COLLECTION=EUR-L2P-AVHRR_METOP_A&URL=true&PUBLIC=true
URL;extension;row_min;row_max;col_min;col_max;
http://www.ifremer.fr/opendap/cerdap1/ghrsst/l2p/metop-a/avhrr/osisaf/data/2015/001/20150101000103-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_000103-v02.0-fv01.0.nc;540;1079;512;2047
ftp://c1f2a8:This email address is being protected from spambots. You need JavaScript enabled to view it. /cersat-rt/project/osi-saf/data/sst/l2p/avhrr_metop_a/2015/001/20150101000103-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_000103-v02.0-fv01.0.nc;bz2;540;1079;512;2047
...

Example 2

getting the names of the L2P orbit files for METOP AVHRR O&SI SAF product (product_id=EUR-L2P-AVHRR_METOP_A, refer to the product description pages or use getgranulelist --list to see available products), in a 60S-60N 100W-0E geographical area between 1st and 3rd January 2015. By omitting the --url option, you just get the granule names.

getgranulelist --product=EUR-L2P-AVHRR_METOP_A --date=2015-01-01T00:00:00,2015-01-04T00:00:00 --bbox=-60.,60.,-100.,0.

 

Results in:

20150101001003-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_001003-v02.0-fv01.0.nc
20150101010103-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_010103-v02.0-fv01.0.nc
20150101010403-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_010403-v02.0-fv01.0.nc
20150101010703-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_010703-v02.0-fv01.0.nc
20150101011003-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_011003-v02.0-fv01.0.nc
20150101011303-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_011303-v02.0-fv01.0.nc
20150101011603-OSISAF-L2P_GHRSST-SSTsubskin-AVHRR_SST_METOP_A-sstmgr_metop02_20150101_011603-v02.0-fv01.0.nc
etc...

 

Adapting the script

As shown on above example, the script actually just build and call the URL to a webservice then parse and display the result to user's console. It is then quite easy to perform the same task in any other language provided you just build correctly the URL which is quite straightforward to understand. In above example, the corresponding URL is displayed on console :

http://www.ifremer.fr/naiad/naiad/services-2.1.10/index.php?method=GetListOfGranules&AUTHENTICATION=guest&TIME=1994-02-01T00:00:00/1994-02-02T00:00:00&COLLECTION=GW_L2P_ALT_ERS1_GDR&BBOX=-100.,-60.,0.,60.&URL=true&PUBLIC=true