Skip to content

Sentinel-2

Goal

Run the app-water-body-cloud-native.1.0.0.cwl released application package using cwltool.

Lab

This step has a dedicated lab available at /workspace/quickwin/practice-labs/Execution-scenario.ipynb

Step 1 - Configure the workspace

The results produced will be available in the local folder /workspace/quickwin/runs

terminal
1
2
3
4
export WORKSPACE=/workspace/quickwin
export RUNTIME=${WORKSPACE}/runs
mkdir -p ${RUNTIME}
cd ${RUNTIME}

Step 2 - Download the released Application package

scripts/download-app-water-body-cloud-native.sh
1
2
3
4
5
6
7
version="1.0.0"

export WORKSPACE=/workspace/quickwin

wget \
    -O ${WORKSPACE}/runs/app-water-body-cloud-native.${version}.cwl \
    https://github.com/eoap/quickwin/releases/download/${version}/app-water-body-cloud-native.${version}.cwl

Step 3 - Execute the Application Package

scripts/exec-app-water-body-cloud-native.sh
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
version="1.0.0"

export WORKSPACE=/workspace/quickwin

cwltool \
    --podman \
    --outdir ${WORKSPACE}/runs \
    ${WORKSPACE}/runs/app-water-body-cloud-native.${version}.cwl \
    --item "https://earth-search.aws.element84.com/v0/collections/sentinel-s2-l2a-cogs/items/S2B_10TFK_20210713_0_L2A" \
    --aoi="-121.399,39.834,-120.74,40.472" \
    --epsg "EPSG:4326"

Expected outcome

The folder /workspace/quickwin/runs contains:

(base) jovyan@jupyter-fbrito--training:~/quickwin$ tree runs
runs
├── app-water-body-cloud-native.1.0.0.cwl
└── fc2e52v2
    ├── S2B_10TFK_20210713_0_L2A
    │   ├── S2B_10TFK_20210713_0_L2A.json
    │   └── otsu.tif
    ├── catalog.json
    └── otsu.tif

2 directories, 5 files