Quickstart¶
Basic stuff¶
As a starter we will play with AVHRR L2P METOP product by OSI SAF.
Initialize a product index¶
We create first a quick index without any specific priorities. The index stores the spatial (shape) and temporal (time range) of each product granule.
We use the naiad-create_index
command line tool:
naiad-create-index --elasticsearch http://localhost:9200/ avhrr_sst_metop_a-osisaf-l2p-v1.0
Tile some granules¶
We have to extract the global shape and time frame from the granules and the tiles constituting these granules.
We use the naiad-tile
command line tool:
naiad-tile 20100123-EUR-L2P_GHRSST-SSTsubskin-AVHRR_METOP_A-eumetsat_sstmgr_metop02_20100123_000103-v01.7-fv01.0.nc GHRSSTNCFile --show --xstep=540 --ystep=540
For more information on this, refer to naiad-tile command in details.
Register the granules¶
Simply ingest the content of the tile files generated above with naiad-register
command:
naiad-register avhrr_sst_metop_a-osisaf-l2p-v1.0 20100123-EUR-L2P_GHRSST-SSTsubskin-AVHRR_METOP_A-eumetsat_sstmgr_metop02_20100123_000103-v01.7-fv01.0.nc.tiles
Get a granule description and display¶
We can get the description of a previously registered granule and also display
its shape on a map using naiad-granule-info
command:
naiad-granule-info ascat_a ascat_20100820_080601_metopa_19899_eps_o_coa_1100_ovw.l2.nc --show
Do a spatio-temporal search¶
Naiad is mainly about spatio-temporal search, so let’s search for some granules
intersecting an area and period of interest. This is done with naiad-search
command.
Get everything! (be careful!):
naiad-search ascat_a --show
Add a time frame restriction:
naiad-search ascat_a --start 2010-08-19 --end 2010-08-20 --show
And now some area, defined as lonmin, latmin, lonmax, latmax:
naiad-search ascat_a --start 2010-08-19 --end 2010-12-20 --area='-20,-20,20,20' --show
You can request several products at the same time using a coma-separated list:
naiad-search ascat_a,avhrr_sst_metop_a-osisaf-l2p-v1.0 --start 2010-08-19 --end 2010-12-20 --area='-20,-20,20,20' --show
You can specify some constraints on the granule properties, if they have been registered in the product index. For instance, get all granules with a file_quality_level greater than 3 (if such a property was defined).
naiad-search amsr2 --granule_constraints=file_quality_level.ge.3
Multiple constraints can be combined, separating the different constraints by a ;
:
naiad-search amsr2 --granule_constraints='file_quality_level.ge.3;file_quality_level.lt.3'
Do a cross search (colocation)¶
We want to keep only the granules from different products that cross each other within a time window.
One product, given by --cross
argument is considered as the “reference”
sensor, the one with which all other products, given by --versus
argument must match within the time window given by --time_window
:
naiad-cross-search --cross amsr2 --versus srl_oprssha_2 --time_window=720
You can display the crossovers one by one with --show
option:
naiad-cross-search --cross amsr2 --versus srl_oprssha_2 --time_window=720 --show
Use --full_footprint
option in addition to display the full footprint of
the colocated granules(usefull for checking).
naiad-cross-search --cross amsr2 --versus srl_oprssha_2 --time_window=720 --full_footprint --show
Use filters in search¶
If some properties were indexed together with the granules or the tiles, they can be used
as search filters, using either --granule_constraints
to filter on granule properties.
For instance let’s assume we gave indexed the
granules of slstr product with a property version specifying the algorithm version used
for a specific granule. We can query the granules having version number equal to 2.3:
naiad-search slstr --granule_constraints='version eq 2.3'
Note the available comparison operators: eq
, lt
, le
, gt
, ge
.
Filters can be combined (logical AND) using ;
:
naiad-search slstr --granule_constraints='version eq 2.3';'cloud_fraction le 0.5'
It can be used also in a cross-over search, but the expressed constraint (for now) only
applies to the reference dataset, defined by --cross argument
. In the following example,
we request the cross-overs between slstr and metop_a datasets where the version property
for slstr granules equals 2.3:
naiad-cross-search --cross slstr --versus metop_a --time_window=15--start 20160520T000000 --end 20160610T000000 --granule_constraints='version eq 2.3'