eval "$(pixi shell-hook --change-ps1 false)"5 Apparent Thermal Inertia
5.1 Introduction
The following sections demonstrate that the HEATWISE Hot- and Coldspot detection Software follows the OGC Best Practice for Earth Observation Application Package.
The order of demonstration is deliberately different from that given in the best practice document. This is done to make the demonstration easy to follow and group requirements that can be shown together. An effort is made to keep the requirements in order as much as possible to make it easy to find a specific requirement.
The demonstration proceeds in the following steps:
- Execute the software as docker container and as CWL document (the EOAP)
- Show that STAC inputs and outputs are handled by the application as required
- Show that the CWL document is structured as required
- Show that STAC inputs and outputs are declared in the CWL as required
After each step, the requirements shown are listed.
Chapter 2 contains an overview of all requirements in order and how they are demonstrated in this document. It furthermore shows all utility scripts used in this demonstration. For brevity, the content of utility scripts is only shown in the requirements overview and not in each demonstration.
5.2 Preparation
Activate the pixi environment to make validation tools and scripts available.
Set environment variables to software, cwl documents, inputs and outputs.
set -o pipefail
set -x
SOFTWARE_ROOT="$PIXI_PROJECT_ROOT"/software/lstm-wp3-products/products/inertia
CWL_PATH="$PIXI_PROJECT_ROOT"/application-packages/heatwise-inertia.cwl
INPUT_PATH="$PIXI_PROJECT_ROOT"/inputs/inertia
DOCKER_IMAGE_ID=ghcr.io/esa-heatwise/lstm-wp3-products-inertia:1.0.0
OUTPUT_PATH="$PIXI_PROJECT_ROOT"/outputs/inertia
ls -ltrAh --color=never "$SOFTWARE_ROOT"
set +x+ SOFTWARE_ROOT=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/software/lstm-wp3-products/products/inertia
+ CWL_PATH=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl
+ INPUT_PATH=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia
+ DOCKER_IMAGE_ID=ghcr.io/esa-heatwise/lstm-wp3-products-inertia:1.0.0
+ OUTPUT_PATH=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia
+ ls --color=auto -ltrAh --color=never /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/software/lstm-wp3-products/products/inertia
total 32K
-rw-r--r-- 1 runner runner 1.2K Nov 27 10:37 README.md
-rw-r--r-- 1 runner runner 115 Nov 27 10:37 environment.yml
-rwxr-xr-x 1 runner runner 270 Nov 27 10:37 build.sh
-rw-r--r-- 1 runner runner 8.1K Nov 27 10:37 heatwise_inertia.ipynb
drwxr-xr-x 5 runner runner 4.0K Nov 27 10:37 inputs
-rwxr-xr-x 1 runner runner 318 Nov 27 10:37 run.sh
+ set +x
5.3 Running the software
The first set of requirements is concerned with how the software is executed. It shall be
- Runnable as a non-interactive script
- Bundled in (Docker) container
- Executable as a CWL Workflow containing at least one CWL CommandLineTool
5.3.1 Running as a docker container
We can run the (dockerized) software directly, without using the CWL machinery with docker run:
mkdir -p "$OUTPUT_PATH"
docker run --rm --user "$(id -u):$(id -g)" --workdir=/home/mambauser/wd -v $SOFTWARE_ROOT/data:/home/mambauser/data -v $SOFTWARE_ROOT/inputs:/home/mambauser/wd/inputs -v "$OUTPUT_PATH":/home/mambauser/wd $DOCKER_IMAGE_ID || { FAIL_REQ_1=1; FAIL_REQ_2=1; }
ls -ltrAh --color=never $OUTPUT_PATHCWD /home/mambauser/wd
total 4.0K
drwxr-xr-x 2 root root 4.0K Nov 27 10:43 inputs
The image should not only be available locally, but also in a container registry.
check-container-registry.sh $DOCKER_IMAGE_ID || FAIL_REQ_3=1SUCCESS: Image ghcr.io/esa-heatwise/lstm-wp3-products-inertia:1.0.0 found on registry
5.3.1.1 Requirements Validated
req/app/cmd-line (Requirement 1)
The Application SHALL be a non-interactive executable as a command-line application.
req/app/container (Requirement 2)
The environment, libraries, binaries, executable and configuration files necessary to execute the Application SHALL be bundled in a container image.
req/app/registry (Requirement 3)
The Application container image SHALL be accessible in a container registry.
5.3.2 Running as an EOAP
First, we validate that the CWL document is valid.
cwltool --disable-color --validate "$CWL_PATH" | catINFO /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/.pixi/envs/dev/bin/cwltool 3.2.20260413085819
INFO Resolved '/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl' to 'file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl'
WARNING:root:File contains $graph of multiple objects and no default process (#main). Validating all objects:
file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl#heatwise_inertia is valid CWL.
file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl#xce_script is valid CWL.
/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl is valid CWL.
The CWL should contain a Workflow and at least one CommandLineTool object. We inspect the classes in the CWL graph to make sure.
show-cwl-graph-classes.sh "$CWL_PATH"class: Workflow
id: heatwise_inertia
---
class: CommandLineTool
id: xce_script
The EOAP can be executed from its CWL description with cwltool.
cwltool \
--disable-color \
--outdir "$OUTPUT_PATH/cwlruns" \
"$CWL_PATH"#heatwise_inertia \
\
--lst_day $INPUT_PATH/lst_day \
--lst_night $INPUT_PATH/lst_night \
--refl $INPUT_PATH/refl \
|| FAIL_REQ_7=1INFO /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/.pixi/envs/dev/bin/cwltool 3.2.20260413085819
INFO Resolved '/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl#heatwise_inertia' to 'file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/application-packages/heatwise-inertia.cwl#heatwise_inertia'
INFO [workflow ] start
INFO [workflow ] starting step run_script
INFO [step run_script] start
INFO [job run_script] /tmp/3i_0d3kb$ docker \
run \
-i \
--mount=type=bind,source=/tmp/3i_0d3kb,target=/noQekW \
--mount=type=bind,source=/tmp/11midkio,target=/tmp \
--mount=type=bind,source=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia/lst_day,target=/var/lib/cwl/stg093a4794-a8b8-4cfc-a87c-0e2b64767ad0/lst_day,readonly \
--mount=type=bind,source=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia/lst_night,target=/var/lib/cwl/stg764fe77e-3dd2-4b1d-a2db-ea0bdc94aa38/lst_night,readonly \
--mount=type=bind,source=/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia/refl,target=/var/lib/cwl/stg30126ffa-a918-4a98-9d59-32d555c80474/refl,readonly \
--workdir=/noQekW \
--read-only=true \
--user=1001:1001 \
--rm \
--cidfile=/tmp/xh6sac89/20261127104330-134512.cid \
--env=TMPDIR=/tmp \
--env=HOME=/noQekW \
ghcr.io/esa-heatwise/lstm-wp3-products-inertia:1.0.0 \
/usr/local/bin/_entrypoint.sh \
python \
/home/mambauser/execute.py \
--batch \
--eoap \
--asset-id-lst-day \
lst_day \
--asset-id-lst-night \
lst_night \
--asset-id-refl \
refl \
--day \
18 \
--latitude \
37.98381 \
--longitude \
23.727539 \
--lst-day \
/var/lib/cwl/stg093a4794-a8b8-4cfc-a87c-0e2b64767ad0/lst_day \
--lst-day-band \
7 \
--lst-day-ndv \
-9999 \
--lst-night \
/var/lib/cwl/stg764fe77e-3dd2-4b1d-a2db-ea0bdc94aa38/lst_night \
--lst-night-band \
7 \
--lst-night-ndv \
-9999 \
--month \
7 \
--output-format \
zarr \
--refl \
/var/lib/cwl/stg30126ffa-a918-4a98-9d59-32d555c80474/refl \
--refl-ndv \
-9999 \
--savename \
'' \
--year \
2009
INFO:util:Saving sol_pos to /noQekW/sol_pos...
INFO:util:Saving hw_ati to /noQekW/hw_ati...
WARNING:util:No geospatial bounds in dataset attributes -- using defaults
CWD /noQekW
INFO [job run_script] Max memory used: 1278MiB
INFO [job run_script] completed success
INFO [step run_script] completed success
INFO [workflow ] completed success
{
"stac_catalog": {
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb",
"basename": "3i_0d3kb",
"class": "Directory",
"listing": [
{
"class": "Directory",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati",
"basename": "hw_ati",
"listing": [
{
"class": "Directory",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr",
"basename": "hw_ati.zarr",
"listing": [
{
"class": "Directory",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati",
"basename": "ati",
"listing": [
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati/.zarray",
"basename": ".zarray",
"size": 339,
"checksum": "sha1$f2abe1a23323de258ef97dc2138bf8ca9659f8f1",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati/.zarray"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati/.zattrs",
"basename": ".zattrs",
"size": 96,
"checksum": "sha1$7ea92f84edec97615c377b3563a3a58cb6fa6732",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati/.zattrs"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati/0.0",
"basename": "0.0",
"size": 9117,
"checksum": "sha1$c0a23d8a9942ce9ed190d2c7c24f68a90d165ee1",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati/0.0"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/ati"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/.zattrs",
"basename": ".zattrs",
"size": 222,
"checksum": "sha1$2aa55e552da9dc644a58a1ff7bcd63a0bbc61e1d",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/.zattrs"
},
{
"class": "Directory",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref",
"basename": "spatial_ref",
"listing": [
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref/.zarray",
"basename": ".zarray",
"size": 166,
"checksum": "sha1$9bfbb21f45d7f65601e46be803ce2ef66fd54997",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref/.zarray"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref/.zattrs",
"basename": ".zattrs",
"size": 2069,
"checksum": "sha1$3e965869539e09df6625ca226a0a3b22aa16c056",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref/.zattrs"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref/0",
"basename": "0",
"size": 8,
"checksum": "sha1$05fe405753166f125559e7c9ac558654f107c7e9",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref/0"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/spatial_ref"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/.zgroup",
"basename": ".zgroup",
"size": 24,
"checksum": "sha1$63b0fcd7748c79d0de97705fb1b8ed5fcc5ac788",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/.zgroup"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/.zmetadata",
"basename": ".zmetadata",
"size": 3647,
"checksum": "sha1$2c6e55b05005ac8dea0906ee845c517f6793aac2",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr/.zmetadata"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.zarr"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.json",
"basename": "hw_ati.json",
"size": 1228,
"checksum": "sha1$b90cb80f400380c4b1df83149ae138ac4f9cb181",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati/hw_ati.json"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/hw_ati"
},
{
"class": "Directory",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/sol_pos",
"basename": "sol_pos",
"listing": [
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/sol_pos/sol_pos.csv",
"basename": "sol_pos.csv",
"size": 199,
"checksum": "sha1$73f8ac3e0be811e2362a78580dd9ca3a19be2de2",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/sol_pos/sol_pos.csv"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/sol_pos/sol_pos.json",
"basename": "sol_pos.json",
"size": 1004,
"checksum": "sha1$3d108c55b6f1d86c11ac8ed35204a26c2365d960",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/sol_pos/sol_pos.json"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/sol_pos"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/catalog.json",
"basename": "catalog.json",
"size": 438,
"checksum": "sha1$195f172b2ff6aacca3489e15e84c8dfd2edc8007",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/catalog.json"
},
{
"class": "File",
"location": "file:///home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/datasets_saved",
"basename": "datasets_saved",
"size": 0,
"checksum": "sha1$da39a3ee5e6b4b0d3255bfef95601890afd80709",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/datasets_saved"
}
],
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb"
}
}INFO Final process status is success
Cwltool creates a new output directory with a random name when it is run. We save the last run in a variable to access it later.
CWLRUN_PATH=$(find-newest-directory-entry.sh "$OUTPUT_PATH/cwlruns")
echo "Path to last cwl run: $CWLRUN_PATH"Path to last cwl run: /home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb
5.3.2.1 Requirements Validated
req/app-pck/cwl (Requirement 7)
The Application Package SHALL be a valid CWL document with a “Workflow” class and one or more “CommandLineTool” classes.
5.3.2.2 EOAP Output
tree -n $CWLRUN_PATH || :/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb
├── catalog.json
├── datasets_saved
├── hw_ati
│ ├── hw_ati.json
│ └── hw_ati.zarr
│ ├── ati
│ │ └── 0.0
│ └── spatial_ref
│ └── 0
└── sol_pos
├── sol_pos.csv
└── sol_pos.json
6 directories, 7 files
python -c "import xarray as xr; \
import matplotlib.pyplot as plt; \
ds = xr.open_zarr(\"$CWLRUN_PATH/hw_ati/hw_ati.zarr\"); \
fig, ax = plt.subplots(); \
ds['ati'].plot(ax=ax); \
fig.savefig('lst_inertia.png')" || :
5.4 STAC input / output
5.4.1 Inputs
The EO Products of the input are provided as directories with a catalog.json describing the products each:
ls -lAhX --color=never $INPUT_PATH/*/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia/lst_day:
total 148K
-rw-r--r-- 1 runner runner 338 Nov 27 10:37 catalog.json
-rw-r--r-- 1 runner runner 516 Nov 27 10:37 lst_day_item.json
-rw-r--r-- 1 runner runner 138K Nov 27 10:37 Athens_Center_LSTM_Thermopolis_090718_day_50m.tif
/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia/lst_night:
total 148K
-rw-r--r-- 1 runner runner 344 Nov 27 10:37 catalog.json
-rw-r--r-- 1 runner runner 522 Nov 27 10:37 lst_night_item.json
-rw-r--r-- 1 runner runner 138K Nov 27 10:37 Athens_Center_LSTM_Thermopolis_090718_night_50m.tif
/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/inputs/inertia/refl:
total 11M
-rw-r--r-- 1 runner runner 329 Nov 27 10:37 catalog.json
-rw-r--r-- 1 runner runner 503 Nov 27 10:37 refl_item.json
-rw-r--r-- 1 runner runner 11M Nov 27 10:37 Athens_Center_CHIME_Thermopolis_090718.tif
These same inputs are classed as Directory in the workflow:
extract-directory-inputs-from.sh Workflow "$CWL_PATH" || FAIL_REQ_4=1Running
inputs_with_directory_type:
- label: lst_day
doc: lst_day
type: Directory
default:
class: Directory
location: null
- label: lst_night
doc: lst_night
type: Directory
default:
class: Directory
location: null
- label: refl
doc: refl
type: Directory
default:
class: Directory
location: null
5.4.2 Outputs
The output contains a single catalog.json and item, describing the output. Using the recursive validation, both the catalog and item are confirmed to be valid STAC.
(stac-validator validate --recursive $CWLRUN_PATH/catalog.json | cat) || FAIL_REQ_5=1
Thanks for using STAC version 1.1.0!
[
{
"version": "1.1.0",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/catalog.json",
"schema": [
"https://schemas.stacspec.org/v1.1.0/catalog-spec/json-schema/catalog.json"
],
"valid_stac": true,
"asset_type": "CATALOG",
"validation_method": "recursive",
"validator_engine": "jsonschema"
},
{
"version": "1.1.0",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/./sol_pos/sol_pos.json",
"schema": [
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json"
],
"valid_stac": true,
"asset_type": "ITEM",
"validation_method": "recursive",
"validator_engine": "jsonschema"
},
{
"version": "1.1.0",
"path": "/home/runner/work/heatwise-interoperability-demonstration/heatwise-interoperability-demonstration/outputs/inertia/cwlruns/3i_0d3kb/./hw_ati/hw_ati.json",
"schema": [
"https://schemas.stacspec.org/v1.1.0/item-spec/json-schema/item.json"
],
"valid_stac": true,
"asset_type": "ITEM",
"validation_method": "recursive",
"validator_engine": "jsonschema"
}
]
-- Recursive Validation Summary:
Stac objects passed: 3/3 (100.0%)
Breakdown by type:
Catalog: 1/1 (100.0%)
Item: 2/2 (100.0%)
Validation completed in 227.56ms
The EOAP best practice mandates that the item contains at least geometry, bbox and datetime keys.
extract-output-keys-from-stac-item.sh $CWLRUN_PATH/hw_ati/hw_ati.json || FAIL_REQ_6=1geometry:
type: Polygon
coordinates: '[...truncated...]'
bbox:
- 23.72636383551353
- 37.966241073864175
- 23.771245392796686
- 37.99652340089966
properties:
datetime: null
start_datetime: '2000-01-01T00:00:00Z'
end_datetime: '2001-01-01T00:00:00Z'
Required keys present: true
5.4.3 Requirements Validated
req/app/stac-input (Requirement 4)
An Application input argument that requires staged EO product files SHALL be defined as an argument that points to a folder where a STAC Catalog, named catalog.json, contains a list of one or more STAC Items and associated STAC Assets referencing the files.
req/app/stac-out (Requirement 5)
An Application that creates EO product files to be stage-out SHALL generate a valid STAC Catalog, named catalog.json, and include the STAC Item(s) and corresponding STAC Assets pointing to the results of the processing.
rec/app/stac-out-metadata (Requirement 6)
The STAC Catalog created by the Application SHALL include metadata elements for each STAC Item with at least their spatial (geometry, box) and temporal (datetime) properties.
5.5 CWL
The fields id, baseCommand, inputs, requirements should be present in the CommandLineTool. One of the requirements should be DockerRequirement.
check-commandlinetool-fields.sh "$CWL_PATH" || FAIL_REQ_8=1id: xce_script
baseCommand:
- /usr/local/bin/_entrypoint.sh
- python
- /home/mambauser/execute.py
requirements:
DockerRequirement:
dockerPull: ghcr.io/esa-heatwise/lstm-wp3-products-inertia:1.0.0
Required keys present: true
The fields id, label, and doc should be present in the Workflow.
check-workflow-fields.sh "$CWL_PATH" || FAIL_REQ_9=1id: heatwise_inertia
label: xcengine notebook
doc: xcengine notebook
Required keys present: true
Each input of the Workflow should have fields id, label, and doc
check-workflow-input-fields.sh $CWL_PATH || FAIL_REQ_10=1inputs:
- id: asset_id_lst_day
label: asset_id_lst_day
doc: asset_id_lst_day
- id: asset_id_lst_night
label: asset_id_lst_night
doc: asset_id_lst_night
- id: asset_id_refl
label: asset_id_refl
doc: asset_id_refl
- id: day
label: day
doc: day
- id: latitude
label: latitude
doc: latitude
- id: longitude
label: longitude
doc: longitude
- id: lst_day
label: lst_day
doc: lst_day
- id: lst_day_band
label: lst_day_band
doc: lst_day_band
- id: lst_day_ndv
label: lst_day_ndv
doc: lst_day_ndv
- id: lst_night
label: lst_night
doc: lst_night
- id: lst_night_band
label: lst_night_band
doc: lst_night_band
- id: lst_night_ndv
label: lst_night_ndv
doc: lst_night_ndv
- id: month
label: month
doc: month
- id: output_format
label: output_format
doc: output_format
- id: refl
label: refl
doc: refl
- id: refl_ndv
label: refl_ndv
doc: refl_ndv
- id: savename
label: savename
doc: savename
- id: year
label: year
doc: year
The CWL document should contain a version:
check-version.sh $CWL_PATH || FAIL_REQ_11=1s:version: 1.0.0
https://schema.org/version: null
Found version: true
5.5.1 Requirements Validated
req/app-pck/clt (Requirement 8)
The Application Package CWL CommandLineTool classes SHALL contain the following elements:
- Identifier (“id”)
- Command line name (“baseCommand”)
- Input parameters (“inputs”)
- Environment requirements (“requirements”)
- Docker information (“DockerRequirement”)
req/app-pck/wf (Requirement 9)
The Application Package CWL Workflow class SHALL contain the following elements:
- Identifier (“id”)
- Title (“label”)
- Abstract (“doc”)
req/app-pck/wf-inputs (Requirement 10)
The Application Package CWL Workflow class “inputs” fields SHALL contain the following elements:
- Identifier (“id”)
- Title (“label”)
- Abstract (“doc”)
req/app-pck/metadata (Requirement 11)
The Application Package CWL Workclass classes SHALL include additional metadata as defined in Table 1
Required in table 1: version
5.6 CWL STAC / IO
Inputs and outputs are staged in and out using STAC catalogs. Each input that is an “EO Product” like a vector or raster dataset is declared as type Directory and is described by a STAC catalog catalog.json and accompanying STAC item(s) placed in that directory.
Outputs are handled in much the same way, the application in the application package is responsible for generating a STAC catalog (also named catalog.json) and stage out all the contents of its working directory together with the STAC metadata describing the outputs.
5.6.1 Inputs
There are inputs of type directory in the CommandLineTool description.
extract-directory-inputs-from.sh CommandLineTool "$CWL_PATH" || FAIL_REQ_12=1Running
inputs_with_directory_type:
- label: lst_day
doc: lst_day
type: Directory
default:
class: Directory
location: null
inputBinding:
prefix: --lst-day
- label: lst_night
doc: lst_night
type: Directory
default:
class: Directory
location: null
inputBinding:
prefix: --lst-night
- label: refl
doc: refl
type: Directory
default:
class: Directory
location: null
inputBinding:
prefix: --refl
There are inputs of type directory in the Workflow description.
extract-directory-inputs-from.sh Workflow "$CWL_PATH" || FAIL_REQ_13=1Running
inputs_with_directory_type:
- label: lst_day
doc: lst_day
type: Directory
default:
class: Directory
location: null
- label: lst_night
doc: lst_night
type: Directory
default:
class: Directory
location: null
- label: refl
doc: refl
type: Directory
default:
class: Directory
location: null
5.6.2 Outputs
The CommandLineTool stages out all the contents of the working directory.
extract-commandlinetool-outputs.sh "$CWL_PATH" || FAIL_REQ_14=1results:
type: Directory
outputBinding:
glob: .
Extracts all items from Working directory: true
5.6.3 Requirements validated
req/app-pck-stage-in/clt-stac (Requirement 12)
All input parameters of the CWL ComandLineTool that require the staging of EO products SHALL be of type Directory.
req/app-pck-stage-in/wf-stac (Requirement 13)
Input parameters of the CWL Workflow that require the staging of EO products SHALL be of type Directory.
req/app-pck-stage-out/output-stac (Requirement 14)
The outputs field of the CommandLineTool that requires the stage-out of EO products SHALL retrieve all the files produced in the working directory.
5.7 Summary
for i in {1..14}; do
var="FAIL_REQ_$i"
req=${var#FAIL_}
if [[ "${!var:-}" == "1" ]]; then
#echo "$req: FAILED"
printf '%s\t\033[31mFAILED\033[0m\n' "$req"
else
printf '%s\t\033[32mPASSED\033[0m\n' "$req"
fi
doneREQ_1 PASSED REQ_2 PASSED REQ_3 PASSED REQ_4 PASSED REQ_5 PASSED REQ_6 PASSED REQ_7 PASSED REQ_8 PASSED REQ_9 PASSED REQ_10 PASSED REQ_11 PASSED REQ_12 PASSED REQ_13 PASSED REQ_14 PASSED
The Apparent Thermal Inertia detection software has been shown to be non-interactively executable from the command line and using a CWL runner (cwltool). Furthermore it follows the CWL structure and mandatory fields prescribed by the OGC Best Practice for Earth Observation Application Package (EOAP). Inputs and outputs are processed as CWL Directories and valid STAC metadata is generated for the output. It may therefore be concluded that the software behaves as expected by the EOAP best practice in the example scenario.
No conclusive judgment on the adherence to all requirements listed in Chapter 2 under all valid input conditions can be made without inspection of the source code. The demonstration evaluates the statically available information (the CWL document, and container image) as well as the outputs produced by a single example input dataset. It does not show how the validity and content of the generated output depends on the input dataset. While inputs are shown to be a directory containing STAC metadata, only inspection of the source code can establish whether the STAC is actually processed.
Furthermore, the demonstration purely evaluates the adherence of the software to the interoperability best practice and makes no attempt to judge the scientific validity of the data products produced.