Find ARD in CEDA by searching using their Elasticsearch API.
Create virtual env
cd cd_ard_finder
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
Installing a specific version:
pip install git+https://github.com/jncc/ceda_ard_finder.git@vx.x.x
vx.x.x is the version and can be found in tags
Then import the required tasks into your workflow and use them:
...
from ceda_ard_finder import CreateSymlinksFromTextFileList, CreateSymlinksFromFilters
@requires(CreateSymlinksFromFilters)
class GetArdProducts(luigi.Task):
...
Add to requirements.txt of your workflow
...
ceda_ard_finder @ git+https://git@github.com/jncc/ceda_ard_finder.git@v0.0.1
...
All search filters are optional except startDate and endDate. See ceda-ard-finder-luigi.cfg.example for more filter examples.
Generate state file with search results:
LUIGI_CONFIG_PATH=ceda-ard-finder-luigi.cfg PYTHONPATH='.' luigi --module ceda_ard_finder SearchForProducts --startDate=2021-01-01 --endDate=2021-01-31 --local-scheduler
Output results as symlinks to CEDA locations:
LUIGI_CONFIG_PATH=ceda_ard_finder/ceda-ard-finder-luigi.cfg PYTHONPATH='.' luigi --module ceda_ard_finder CreateSymlinksFromFilters --startDate=2021-01-01 --endDate=2021-01-31 --local-scheduler
Output results as symlinks to CEDA locations (Ingested from a text file):
LUIGI_CONFIG_PATH=ceda_ard_finder/ceda-ard-finder-luigi.cfg PYTHONPATH='.' luigi --module ceda_ard_finder CreateSymlinksFromTextFileList --local-scheduler
Output results in a text file instead of symlinks. The date range queried is included in the filename:
LUIGI_CONFIG_PATH=ceda_ard_finder/ceda-ard-finder-luigi.cfg PYTHONPATH='.' luigi --module ceda_ard_finder CreateTextFileList --startDate=2021-01-01 --endDate=2021-01-31 --local-scheduler
-
spatialOperatoris a required parameter. However, it will not be processed unlesswktis also supplied. If you don't intend to usespatialOperator, you can just set it tointersects. You do not have to supply awktparameter. -
Do not supply a
ardFilterwithout asatelliteFilterparmeter to the SearchForProducts task unless searching for Sentinel-1/2 ARD products because the task will derive thesatelliteFilterfrom theardFilterif it is not supplied and this is only compatible with Sentinel-1/2 ARD product searches.